40 int len = buffer.size();
43 memcpy((
char*)(m_buffer + m_readPos), buffer.c_str(), len);
51 uint8 v = m_buffer[m_readPos];
83 checkRead(stringLength);
84 char* v = (
char*)(m_buffer + m_readPos);
85 m_readPos += stringLength;
86 return std::string(v, stringLength);
93 return (v / std::pow((
float)10, precision));
100 return (
getU8() == 0x00);
105 checkWrite(m_readPos + size);
106 memcpy(m_buffer + m_readPos, buffer, size);
107 m_messageSize += size;
114 m_readPos = m_headerPos;
121 return receivedCheck == checksum;
124 bool InputMessage::canRead(
int bytes)
126 if((m_readPos - m_headerPos + bytes > m_messageSize) || (m_readPos + bytes >
BUFFER_MAXSIZE))
130 void InputMessage::checkRead(
int bytes)
136 void InputMessage::checkWrite(
int bytes)