Functions
colab Namespace Reference

Functions

template<typename T >
void addFloatToBuffer (UINT8 *buffer, UINT16 &pos, T floatValue)
void addFrameToBuffer (UINT8 *sendBuffer, UINT8 *cmdBuffer, UINT16 *len)
template<typename T >
void addIntegerToBuffer (UINT8 *buffer, UINT16 &pos, T intValue)
void addStringToBuffer (UINT8 *buffer, UINT16 &pos, const std::string &stringValue)
void addStringToBuffer (BYTE *buffer, const std::string &stringValue)
UINT16 decodeUINT16 (BYTE *buffer)
std::string getCommandStringFromBuffer (UINT8 *buffer)
double getDoubleFromBuffer (UINT8 *buffer, UINT16 &pos)
std::string getIdentifierFromBuffer (UINT8 *buffer, UINT16 &nextData, UINT16 bufferLength)
template<typename T >
getIntegerFromBuffer (UINT8 *buffer, UINT16 &pos)
std::string getStringFromBuffer (UINT8 *buffer, UINT16 &pos, UINT16 length)
std::string getStringFromBuffer (BYTE *&buffer, UINT16 length)

Function Documentation

template<typename T >
void colab::addFloatToBuffer ( UINT8 buffer,
UINT16 pos,
floatValue 
)

NOT IMPLEMENTED YET!!! It's only a skeleton.

Accepts float and double.

The floatValue will be stored in BigEndian byte order (as required for CoLaB). pos points then to the first byte of the next data field.

Definition at line 152 of file colab.hpp.

void colab::addFrameToBuffer ( UINT8 sendBuffer,
UINT8 cmdBuffer,
UINT16 len 
)

Stores the given cmdBuffer (sopas command) to the given sendBuffer (with header and checksum).

Definition at line 99 of file colab.cpp.

template<typename T >
void colab::addIntegerToBuffer ( UINT8 buffer,
UINT16 pos,
intValue 
)

Accepts all integer types (any bit width and sign). If width of intValue is greater than given type T, the higher bytes are truncated.

The intValue will be stored in BigEndian byte order (as required for CoLaB). pos points then to the first byte of the next data field..

Definition at line 104 of file colab.hpp.

void colab::addStringToBuffer ( UINT8 buffer,
UINT16 pos,
const std::string &  stringValue 
)

Stores the given stringValue to the given buffer. The string is inserted at position pos, and pos is increased by the number of bytes that were written. If the length of stringValue is longer than the remaining space of the buffer, than filling stopps at the end of buffer.

Definition at line 16 of file colab.cpp.

void colab::addStringToBuffer ( BYTE buffer,
const std::string &  stringValue 
)

Stores the given stringValue to the given buffer. The buffer pointer will be increased

Definition at line 25 of file colab.cpp.

Definition at line 144 of file colab.cpp.

std::string colab::getCommandStringFromBuffer ( UINT8 buffer)

Returns the Sopas command as string from buffer

Definition at line 52 of file colab.cpp.

double colab::getDoubleFromBuffer ( UINT8 buffer,
UINT16 pos 
)

Definition at line 131 of file colab.cpp.

std::string colab::getIdentifierFromBuffer ( UINT8 buffer,
UINT16 nextData,
UINT16  bufferLength 
)

buffer should point to the BEGIN of the buffer (incl. magic word), bufferLength is the length of the full buffer (incl. magic word and checksum).

Returns the variable or method identifier from buffer. pos points to the begin of the next data after identifier. is pos == 0, there is no more data

Definition at line 59 of file colab.cpp.

template<typename T >
T colab::getIntegerFromBuffer ( UINT8 buffer,
UINT16 pos 
)

Accepts all integer types (any bit width and sign).

Returns the requested intValue. pos points then to the first byte of the next data field.

Definition at line 124 of file colab.hpp.

std::string colab::getStringFromBuffer ( UINT8 buffer,
UINT16 pos,
UINT16  length 
)

Returns bytes from pos to pos+length as string. pos points to the next byte after (pos+length)

Definition at line 34 of file colab.cpp.

std::string colab::getStringFromBuffer ( BYTE *&  buffer,
UINT16  length 
)

Returns bytes from 0 to length as string. buffer will be shifted to be able to read the next value

Definition at line 43 of file colab.cpp.



libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Thu Jun 6 2019 21:02:36