38 namespace data_processing {
47 uint8_t value = buf[offset];
68 const uint16_t offset)
const 75 const uint16_t offset)
const 107 const uint16_t offset)
const 114 const uint16_t offset)
const 124 return (buf[offset + 1] << 8) + buf[offset];
129 return (buf[offset] << 8) + buf[offset + 1];
134 const uint16_t offset)
const 136 buf[offset] = (v & 0xff00) >> 8;
137 buf[offset + 1] = v & 0xff;
142 const uint16_t offset)
const 144 buf[offset + 1] = (v & 0xff00) >> 8;
145 buf[offset] = v & 0xff;
168 return (buf[offset + 3] << 24) + (buf[offset + 2] << 16) + (buf[offset + 1] << 8) + buf[offset];
173 return (buf[offset] << 24) + (buf[offset + 1] << 16) + (buf[offset + 2] << 8) + buf[offset + 3];
178 const uint16_t offset)
const 180 buf[offset + 3] = (v & 0xff000000) >> 24;
181 buf[offset + 2] = (v & 0xff0000) >> 16;
182 buf[offset + 1] = (v & 0xff00) >> 8;
183 buf[offset] = v & 0xff;
188 const uint16_t offset)
const 190 buf[offset] = (v & 0xff000000) >> 24;
191 buf[offset + 1] = (v & 0xff0000) >> 16;
192 buf[offset + 2] = (v & 0xff00) >> 8;
193 buf[offset + 3] = v & 0xff;
uint16_t readuint16_tBigEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 16-bit integer at offset in big endian encoding.
uint8_t readuint8_tBigEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 8-bit integer at offset in big endian encoding.
int16_t readint16_tBigEndian(const uint8_t *&buf, const uint16_t offset) const
Read a signed 16-bit integer at offset in big endian encoding.
int16_t readint16_tLittleEndian(const uint8_t *&buf, const uint16_t offset) const
Read a signed 16-bit integer at offset in little endian encoding.
uint32_t readuint32_tLittleEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 32-bit integer at offset in little endian encoding.
void writeuint8_tLittleEndian(uint8_t *&buf, const uint8_t v, const uint16_t offset) const
Writes an unsigned 8-bit integer to a buffer at offset in little endian encoding. ...
void writeuint32_tLittleEndian(uint8_t *&buf, const uint32_t v, const uint16_t offset) const
Writes an unsigned 32-bit integer to a buffer at offset in little endian encoding.
int8_t readint8_tBigEndian(const uint8_t *&buf, const uint16_t offset) const
Read a signed 8-bit integer at offset in big endian encoding.
void writeint8_tBigEndian(uint8_t *&buf, const uint8_t v, const uint16_t offset) const
Writes a signed 8-bit integer to a buffer at offset in big endian encoding.
int32_t readint32_tBigEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 32-bit integer at offset in big endian encoding.
void writeuint16_tLittleEndian(uint8_t *&buf, const uint16_t v, const uint16_t offset) const
Writes an unsigned 16-bit integer to a buffer at offset in little endian encoding.
void writeuint16_tBigEndian(uint8_t *&buf, const uint16_t v, const uint16_t offset) const
Writes an unsigned 16-bit integer to a buffer at offset in big endian encoding.
int8_t readint8_t(const uint8_t *&buffer, const uint16_t offset) const
Read a signed 8-bit integer at offset.
void writeuint8_t(uint8_t *&buf, const uint8_t v, const uint16_t offset) const
Writes an unsigned 8-bit integer to a buffer at offset.
uint8_t readuint8_tLittleEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 8-bit integer at offset in big little encoding.
void writeint8_tLittleEndian(uint8_t *&buf, const uint8_t v, const uint16_t offset) const
Writes a signed 8-bit integer to a buffer at offset in little endian encoding.
uint32_t readuint32_tBigEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 32-bit integer at offset in big endian encoding.
void writeint8_t(uint8_t *&buf, const uint8_t v, const uint16_t offset) const
Writes a signed 8-bit integer to a buffer at offset.
int32_t readint32_tLittleEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 32-bit integer at offset in little endian encoding.
int8_t readint8_tLittleEndian(const uint8_t *&buf, const uint16_t offset) const
Read a signed 8-bit integer at offset in little endian encoding.
ReadWriteHelper()
Constructor of read and write helper class.
uint16_t readuint16_tLittleEndian(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 16-bit integer at offset in little endian encoding.
uint8_t readuint8_t(const uint8_t *&buf, const uint16_t offset) const
Read an unsigned 8-bit integer at offset.
void writeuint32_tBigEndian(uint8_t *&buf, const uint32_t v, const uint16_t offset) const
Writes an unsigned 32-bit integer to a buffer at offset in big endian encoding.
void writeuint8_tBigEndian(uint8_t *&buf, const uint8_t v, const uint16_t offset) const
Writes an unsigned 8-bit integer to a buffer at offset in big endian encoding.