Class CMemBufferAccessorRx#
Defined in File mem_buffer_accessor.h
Inheritance Relationships#
Base Type#
public CMemBufferAccessorBase
(Class CMemBufferAccessorBase)
Class Documentation#
-
class CMemBufferAccessorRx : public CMemBufferAccessorBase#
Accessor RX implementation.
Public Functions
-
virtual void Attach(uint8_t *pBuffer, uint32_t uiSize = 0) override#
Attach the buffer to the accessor. Overload of CMemBufferAccessorBase::Attach.
- Parameters:
pBuffer – [in] Pointer to the buffer that should be accessed.
uiSize – [in] Size of the buffer when still uninitialized (during buffer creation); otherwise 0.
-
std::optional<CAccessorRxPacket> TryRead()#
Get a packet. If the packet is accepted, call release before the packet.
- Attention
The writer will only be able to overwrite previously read data after it is released. If, for some reason there is no release, the writer won’t be able to write past the accessed packet.
- Returns:
Returns ‘true’ when the access request was successful or ‘false’ when currently there is no data.
Public Static Functions
-
static inline EAccessType GetAccessType()#
Get the accessor access type.
- Returns:
The access type of this accessor.
Protected Functions
-
void ReleasePackets()#
Release any read packets and update the read pointer.
-
virtual void Attach(uint8_t *pBuffer, uint32_t uiSize = 0) override#