message: Adding buffer put and buffer get
diff: } \
  return false; \
  } \
  - bool put_##name(type* val, size_t bytes_top_copy) { \
  - if (ensure_capacity(bytes_top_copy)) { \
  - memcpy(this->buff + index, val, bytes_top_copy); \
  - index += size; \
  - return true; \
  - } \
  - return false; \
  - } \
  - \
  type get_##name() { \
  if (ensure_capacity(sizeof(type))) { \
  type val = 0; \
  @@ -60,7 +51,7 @@ namespace twisterx::comm {
  Buffer(const Buffer &) = delete;
  bool ensure_capacity(size_t size) {
  - return index + size < this->limit;
  + return index + size <= this->limit;
  }
  int32_t remaining() {
  @@ -89,6 +80,24 @@ namespace twisterx::comm {
  data_type(double, double)
  + bool put(void *data, size_t bytes_count) {
  + if (ensure_capacity(bytes_count)) {
  + memcpy(this->buff + index, data, bytes_count);
  + index += bytes_count;
  + return true;
  + }
  + return false;
  + }
  +
  + bool get(void *dest, size_t bytes_count) {
  + if (ensure_capacity(bytes_count)) {
  + memcpy(dest, this->buff + index, bytes_count);
  + index += bytes_count;
  + } else {
  + throw std::runtime_error("Can't read " + std::to_string(bytes_count) + " bytes from this buffer");
  + }
  + }
  +
  void flip() {
  this->index = 0;
  }
  