10 #include "../BasicDatatypes.hpp" 108 for (
int i = 0; i < width; i++)
110 buffer[pos+width-1-i] = (intValue >> (8 * i)) & 0xff;
132 for (
int i = 0; i < width; i++)
134 intValue += buffer[pos+width-1-i] << (8 * i);
UINT16 decodeUINT16(BYTE *buffer)
void addIntegerToBuffer(UINT8 *buffer, UINT16 &pos, T intValue)
std::string getStringFromBuffer(UINT8 *buffer, UINT16 &pos, UINT16 length)
void addStringToBuffer(UINT8 *buffer, UINT16 &pos, const std::string &stringValue)
void addFrameToBuffer(UINT8 *sendBuffer, UINT8 *cmdBuffer, UINT16 *len)
std::string getCommandStringFromBuffer(UINT8 *buffer)
T getIntegerFromBuffer(UINT8 *buffer, UINT16 &pos)
void addFloatToBuffer(UINT8 *buffer, UINT16 &pos, T floatValue)
std::string getIdentifierFromBuffer(UINT8 *buffer, UINT16 &nextData, UINT16 bufferLength)
double getDoubleFromBuffer(UINT8 *buffer, UINT16 &pos)