10 #define _CRT_SECURE_NO_WARNINGS
24 strcpy((
char*) &buffer[pos], stringValue.c_str());
33 strcpy((
char*) buffer, stringValue.c_str());
43 return std::string((
char *) &buffer[
start],
length);
50 std::string str((
char *) &buffer[0],
length);
58 return std::string((
char*) &buffer[9], 2);
66 if (buffer[11] == 0x20)
78 if (i == bufferLength - 2)
84 if (buffer[i] == 0x20)
105 sendBuffer[pos++] = 0x02;
106 sendBuffer[pos++] = 0x02;
107 sendBuffer[pos++] = 0x02;
108 sendBuffer[pos++] = 0x02;
110 colab::addIntegerToBuffer<UINT32>(sendBuffer, pos,
length + 1);
111 sendBuffer[pos++] =
's';
114 memcpy(&(sendBuffer[pos]), cmdBuffer,
length);
118 UINT8 checksum = sendBuffer[8];
119 for (
int i = 9; i < pos; i++)
121 checksum = checksum ^ sendBuffer[i];
123 colab::addIntegerToBuffer<UINT8>(sendBuffer, pos, checksum);
131 UINT16 width =
sizeof(double);
134 double* valuePtr = (
double*)buffer;
135 double value = *valuePtr;