28 template <
typename T> T
getValue(
const uint8_t **buffer);
40 template <
typename T>
size_t putValue(uint8_t **buffer, T value);
42 template <
typename T> T
getValue(
const uint8_t **buffer) {
44 size_t sz =
sizeof(T);
46 memcpy(&var, buf, sz);
51 template <
typename T>
size_t putValue(uint8_t **buffer, T value) {
52 uint8_t *buf = *buffer;
53 size_t sz =
sizeof(T);
54 memcpy(buf, &value, sz);
T getValue(const uint8_t **buffer)
Get value from buffer.
size_t putValue(uint8_t **buffer, T value)
Put value to buffer.