35 #ifndef SICK_SAFETYSCANNERS_DATASTRUCTURE_PACKETBUFFER_H 36 #define SICK_SAFETYSCANNERS_DATASTRUCTURE_PACKETBUFFER_H 43 #include <boost/array.hpp> 44 #include <boost/asio.hpp> 51 namespace datastructure {
88 PacketBuffer(
const ArrayBuffer& buffer,
const size_t& length);
100 std::shared_ptr<std::vector<uint8_t>
const>
getBuffer()
const;
106 void setBuffer(
const std::vector<uint8_t>& buffer);
113 void setBuffer(
const ArrayBuffer& buffer,
const size_t& length);
123 std::shared_ptr<std::vector<uint8_t>
const>
m_buffer;
129 #endif // SICK_SAFETYSCANNERS_DATASTRUCTURE_PACKETBUFFER_H boost::array< uint8_t, MAXSIZE > ArrayBuffer
Typedef for an arraybuffer which can be read from the sensor.
A packetbuffer for the raw data from the sensor.
std::shared_ptr< std::vector< uint8_t > const > getBuffer() const
Getter to return a copy of the data saved in the PacketBuffer.
static uint32_t getMaxSize()
Returns defined maximum size of PacketBuffer.
size_t getLength() const
Returns length of the current PacketBuffer.
const uint32_t MAXSIZE
MAXSIZE of the packetbuffer.
std::shared_ptr< std::vector< uint8_t > const > m_buffer
void setBuffer(const std::vector< uint8_t > &buffer)
Setter for the PacketBuffer.
PacketBuffer()
Constructor of PacketBuffer.