Cursor within a MessageBuffer.
More...
#include <erpc_message_buffer.hpp>
erpc::Cursor::Cursor |
( |
void |
| ) |
|
|
inline |
Constructor.
This function initializes object attributes.
Constructor.
This function initializes object attributes.
- Parameters
-
void Cursor::setBuffer |
( |
MessageBuffer & |
buffer, |
|
|
uint8_t |
reserved = 0 |
|
) |
| |
Set message buffer.
- Parameters
-
[in] | buffer | Message buffer to set. |
[in] | reserved | Moved cursor position outside of reserved memory. |
uint8_t* erpc::Cursor::get |
( |
void |
| ) |
|
|
inline |
Return position in buffer.
Return position, where it last write/read.
- Returns
- Return position in buffer.
const uint8_t* erpc::Cursor::get |
( |
void |
| ) |
const |
|
inline |
Return position in buffer.
Return position, where it last write/read.
- Returns
- Return position in buffer.
uint16_t erpc::Cursor::getRemaining |
( |
void |
| ) |
const |
|
inline |
Return remaining free space in current buffer.
- Returns
- Remaining free space in current buffer.
uint16_t erpc::Cursor::getRemainingUsed |
( |
void |
| ) |
const |
|
inline |
Return remaining space from used of current buffer.
- Returns
- Remaining space from used of current buffer.
Read data from current buffer.
- Parameters
-
[out] | data | Pointer to value, where copy read data. |
[in] | length | How much bytes need be read. |
- Return values
-
kErpcStatus_Success | |
kErpcStatus_BufferOverrun | |
erpc_status_t Cursor::write |
( |
const void * |
data, |
|
|
uint32_t |
length |
|
) |
| |
Read data from current buffer.
- Parameters
-
[out] | data | Pointer to value to be sent. |
[in] | length | How much bytes need be wrote. |
- Return values
-
kErpcStatus_Success | |
kErpcStatus_BufferOverrun | |
uint8_t & Cursor::operator[] |
( |
int |
index | ) |
|
Array operator return value of buffer at given index.
- Parameters
-
[in] | index | Index in buffer. |
const uint8_t & Cursor::operator[] |
( |
int |
index | ) |
const |
Array operator return value of buffer at given index.
- Parameters
-
[in] | index | Index in buffer. |
Cursor & Cursor::operator+= |
( |
uint16_t |
n | ) |
|
Sum operator return local buffer.
- Parameters
-
- Returns
- Current cursor instance.
Cursor & Cursor::operator-= |
( |
uint16_t |
n | ) |
|
Subtract operator return local buffer.
- Parameters
-
- Returns
- Current cursor instance.
Cursor & Cursor::operator++ |
( |
void |
| ) |
|
Sum +1 operator.
- Returns
- Current cursor instance.
Cursor & Cursor::operator-- |
( |
void |
| ) |
|
Subtract -1 operator.
- Returns
- Current cursor instance.
The documentation for this class was generated from the following files: