Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
sick::datastructure::PacketBuffer Class Reference

A packetbuffer for the raw data from the sensor. More...

#include <PacketBuffer.h>

Public Types

typedef boost::array< uint8_t, MAXSIZEArrayBuffer
 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
 

Detailed Description

A packetbuffer for the raw data from the sensor.

Definition at line 61 of file PacketBuffer.h.

Member Typedef Documentation

Typedef for an arraybuffer which can be read from the sensor.

Definition at line 67 of file PacketBuffer.h.

Constructor & Destructor Documentation

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.

Parameters
buffervector 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.

Parameters
bufferArraybuffer to set for the PacketBuffer.
lengthLength of the array.

Definition at line 48 of file PacketBuffer.cpp.

Member Function Documentation

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.

Returns
Data copy as shared_ptr<vector const>. Needed because this bufer could be overwritten.

Definition at line 53 of file PacketBuffer.cpp.

size_t sick::datastructure::PacketBuffer::getLength ( ) const

Returns length of the current PacketBuffer.

Returns
Length.

Definition at line 69 of file PacketBuffer.cpp.

static uint32_t sick::datastructure::PacketBuffer::getMaxSize ( )
inlinestatic

Returns defined maximum size of PacketBuffer.

Returns
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.

Parameters
bufferInput 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.

Parameters
bufferInput ArrayBuffer to save.
lengthLength of input ArrayBuffer.

Definition at line 64 of file PacketBuffer.cpp.

Member Data Documentation

std::shared_ptr<std::vector<uint8_t> const> sick::datastructure::PacketBuffer::m_buffer
private

Definition at line 123 of file PacketBuffer.h.


The documentation for this class was generated from the following files:


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Apr 2 2021 02:45:42