A packetbuffer for the raw data from the sensor. More...
#include <PacketBuffer.h>
Public Types | |
typedef boost::array< uint8_t, MAXSIZE > | ArrayBuffer |
Typedef for an arraybuffer which can be read from the sensor. More... | |
Public Member Functions | |
std::shared_ptr< std::vector< uint8_t > const > | getBuffer () const |
Getter to return a copy of the data saved in the PacketBuffer. More... | |
size_t | getLength () const |
Returns length of the current PacketBuffer. More... | |
PacketBuffer () | |
Constructor of PacketBuffer. More... | |
PacketBuffer (const std::vector< uint8_t > &buffer) | |
Constructor of PacketBuffer. More... | |
PacketBuffer (const ArrayBuffer &buffer, const size_t &length) | |
Constructor of PacketBuffer. More... | |
void | setBuffer (const std::vector< uint8_t > &buffer) |
Setter for the PacketBuffer. More... | |
void | setBuffer (const ArrayBuffer &buffer, const size_t &length) |
Setter for the PacketBuffer. More... | |
Static Public Member Functions | |
static uint32_t | getMaxSize () |
Returns defined maximum size of PacketBuffer. More... | |
Private Attributes | |
std::shared_ptr< std::vector< uint8_t > const > | m_buffer |
A packetbuffer for the raw data from the sensor.
Definition at line 61 of file PacketBuffer.h.
typedef boost::array<uint8_t, MAXSIZE> sick::datastructure::PacketBuffer::ArrayBuffer |
Typedef for an arraybuffer which can be read from the sensor.
Definition at line 67 of file PacketBuffer.h.
sick::datastructure::PacketBuffer::PacketBuffer | ( | ) |
Constructor of PacketBuffer.
Definition at line 41 of file PacketBuffer.cpp.
sick::datastructure::PacketBuffer::PacketBuffer | ( | const std::vector< uint8_t > & | buffer | ) |
Constructor of PacketBuffer.
No explicit tag used to allow implicit conversion from different inputs types.
buffer | vector to set for the PacketBuffer. |
Definition at line 43 of file PacketBuffer.cpp.
sick::datastructure::PacketBuffer::PacketBuffer | ( | const ArrayBuffer & | buffer, |
const size_t & | length | ||
) |
Constructor of PacketBuffer.
buffer | Arraybuffer to set for the PacketBuffer. |
length | Length of the array. |
Definition at line 48 of file PacketBuffer.cpp.
std::shared_ptr< std::vector< uint8_t > const > sick::datastructure::PacketBuffer::getBuffer | ( | ) | const |
Getter to return a copy of the data saved in the PacketBuffer.
Definition at line 53 of file PacketBuffer.cpp.
size_t sick::datastructure::PacketBuffer::getLength | ( | ) | const |
Returns length of the current PacketBuffer.
Definition at line 69 of file PacketBuffer.cpp.
|
inlinestatic |
Returns defined maximum size of PacketBuffer.
Definition at line 94 of file PacketBuffer.h.
void sick::datastructure::PacketBuffer::setBuffer | ( | const std::vector< uint8_t > & | buffer | ) |
Setter for the PacketBuffer.
buffer | Input VectorBuffer to save. |
Definition at line 59 of file PacketBuffer.cpp.
void sick::datastructure::PacketBuffer::setBuffer | ( | const ArrayBuffer & | buffer, |
const size_t & | length | ||
) |
Setter for the PacketBuffer.
buffer | Input ArrayBuffer to save. |
length | Length of input ArrayBuffer. |
Definition at line 64 of file PacketBuffer.cpp.
|
private |
Definition at line 123 of file PacketBuffer.h.