Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_BufferAccessor.h
Go to the documentation of this file.
1/*
2 * Author: Crownstone Team
3 * Copyright: Crownstone (https://crownstone.rocks)
4 * Date: Feb 23, 2015
5 * License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
6 */
7#pragma once
8
10
17public:
21 virtual ~BufferAccessor(){};
22
31
37 virtual cs_buffer_size_t getBufferSize() const = 0;
38
45
47
54};
Base class for a buffer accessor object.
Definition: cs_BufferAccessor.h:16
virtual ~BufferAccessor()
Default destructor.
Definition: cs_BufferAccessor.h:21
virtual cs_data_t getSerializedBuffer()=0
Get the pointer to the buffer.
virtual cs_buffer_size_t getBufferSize() const =0
Get the capacity of the buffer.
virtual cs_buffer_size_t getSerializedSize() const =0
Get the size of the serialized data in the buffer.
virtual cs_ret_code_t assign(buffer_ptr_t buffer, cs_buffer_size_t size)=0
Assign the buffer used to hold the data.
virtual cs_buffer_size_t getRemainingCapacity() const
Definition: cs_BufferAccessor.h:46
uint16_t cs_buffer_size_t
Definition: cs_Typedefs.h:20
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21
uint8_t * buffer_ptr_t
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: 10 May....
Definition: cs_Typedefs.h:19
Packets (structs) that are used internally in the firmware, and can be changed freely.
Definition: cs_PacketsInternal.h:27