22 #ifndef NDN_DYNAMIC_UINT8_ARRAY_LITE_HPP
23 #define NDN_DYNAMIC_UINT8_ARRAY_LITE_HPP
25 #include "../../c/errors.h"
26 #include "../../c/util/dynamic-uint8-array-types.h"
45 (uint8_t *
array,
size_t length, ndn_ReallocFunction reallocFunction);
87 copy(
const uint8_t *value,
size_t valueLength,
size_t offset);
114 copyFromBack(
const uint8_t *value,
size_t valueLength,
size_t offsetFromBack);
153 friend class ArduinoYunTcpTransportLite;
154 friend class Esp8266TcpTransportLite;
A DynamicUInt8ArrayLite holds a pointer to an allocated array, the length of the allocated array...
Definition: dynamic-uint8-array-lite.hpp:35
ndn_Error ensureLengthFromBack(size_t length)
Ensure that getLength() is greater than or equal to the given length.
Definition: dynamic-uint8-array-lite.cpp:47
ndn_Error ensureLength(size_t length)
Ensure that getLength() is greater than or equal to length.
Definition: dynamic-uint8-array-lite.cpp:34
A UnixTransportLite object is used to send packets and to listen for incoming packets over a Unix soc...
Definition: unix-transport-lite.hpp:37
A struct ndn_DynamicUInt8Array holds a pointer to an allocated array, the length of the allocated arr...
Definition: dynamic-uint8-array-types.h:42
DynamicUInt8ArrayLite(uint8_t *array, size_t length, ndn_ReallocFunction reallocFunction)
Create a DynamicUInt8ArrayLite with the given array buffer.
Definition: dynamic-uint8-array-lite.cpp:28
size_t length
the length of the allocated array buffer
Definition: dynamic-uint8-array-types.h:44
ndn_Error copyFromBack(const uint8_t *value, size_t valueLength, size_t offsetFromBack)
First call ensureLengthFromBack to make sure this object's array has offsetFromBack bytes...
Definition: dynamic-uint8-array-lite.cpp:54
uint8_t * getArray()
Get the current allocated array.
Definition: dynamic-uint8-array-lite.hpp:52
ndn_Error copy(const uint8_t *value, size_t valueLength, size_t offset)
Copy value into this object's array at offset, using ensureLength to make sure the array has enough l...
Definition: dynamic-uint8-array-lite.cpp:41
size_t getLength() const
Get the current length of the allocated array.
Definition: dynamic-uint8-array-lite.hpp:62
uint8_t * array
the allocated array buffer
Definition: dynamic-uint8-array-types.h:43
static DynamicUInt8ArrayLite & downCast(ndn_DynamicUInt8Array &dynamicArray)
Downcast the reference to the ndn_DynamicUInt8Array struct to a DynamicUInt8ArrayLite.
Definition: dynamic-uint8-array-lite.hpp:123
void setArrayAndLength(uint8_t *array, size_t length)
Set the array and length.
Definition: dynamic-uint8-array-lite.hpp:142
A UdpTransportLite object is used to send packets and to listen for incoming packets over a UDP socke...
Definition: udp-transport-lite.hpp:36
A TcpTransportLite object is used to send packets and to listen for incoming packets over a TCP socke...
Definition: tcp-transport-lite.hpp:36