| eRPC API Reference Rev. 1.8.1 NXP Semiconductors

- Main Page
- API Reference
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
erpc::MessageBuffer::Cursor Class Reference

Cursor within a MessageBuffer. More...

`#include <erpc_message_buffer.h>`

## Public Member Functions
| Cursor (void)
| Constructor. More...
| Cursor (MessageBuffer *buffer)
| Constructor. More...
void | set (MessageBuffer *buffer)
| Set message buffer. More...
uint8_t * | get (void)
| Return position in buffer. More...
const uint8_t * | get (void) const
| Return position in buffer. More...
uint16_t | getRemaining (void) const
| Return remaining free space in current buffer. More...
erpc_status_t | read (void *data, uint32_t length)
| Read data from current buffer. More...
erpc_status_t | write (const void *data, uint32_t length)
| Read data from current buffer. More...
| operator uint8_t * (void)
| Casting operator return local buffer.
| operator const uint8_t * (void) const
| Casting operator return local buffer.
uint8_t & | operator[] (int index)
| Array operator return value of buffer at given index. More...
const uint8_t & | operator[] (int index) const
| Array operator return value of buffer at given index. More...
Cursor & | operator+= (uint16_t n)
| Sum operator return local buffer. More...
Cursor & | operator-= (uint16_t n)
| Substract operator return local buffer. More...
Cursor & | operator++ (void)
| Sum +1 operator. More...
Cursor & | operator-- (void)
| Substract -1 operator. More...

## Detailed Description

Cursor within a MessageBuffer.

## Constructor & Destructor Documentation

erpc::MessageBuffer::Cursor::Cursor | ( | void |  | ) |
| inline

Constructor.

This function initializes object attributes.

erpc::MessageBuffer::Cursor::Cursor | ( | MessageBuffer * | buffer | ) |
| inline

Constructor.

This function initializes object attributes.

Parameters

  [in] | buffer | MessageBuffer for sending/receiving.

## Member Function Documentation

void MessageBuffer::Cursor::set | ( | MessageBuffer * | buffer | ) |

Set message buffer.

Parameters

  [in] | buffer | Message buffer to set.

uint8_t* erpc::MessageBuffer::Cursor::get | ( | void |  | ) |
| inline

Return position in buffer.

Return position, where it last write/read.

Returns
  Return position in buffer.

const uint8_t* erpc::MessageBuffer::Cursor::get | ( | void |  | ) | const
| inline

Return position in buffer.

Return position, where it last write/read.

Returns
  Return position in buffer.

uint16_t erpc::MessageBuffer::Cursor::getRemaining | ( | void |  | ) | const
| inline

Return remaining free space in current buffer.

Returns
  Remaining free space in current buffer.

erpc_status_t MessageBuffer::Cursor::read | ( | void * | data,
|  | uint32_t | length
| ) |  |

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 MessageBuffer::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& erpc::MessageBuffer::Cursor::operator[] | ( | int | index | ) |
| inline

Array operator return value of buffer at given index.

Parameters

  [in] | index | Index in buffer.

const uint8_t& erpc::MessageBuffer::Cursor::operator[] | ( | int | index | ) | const
| inline

Array operator return value of buffer at given index.

Parameters

  [in] | index | Index in buffer.

Cursor& erpc::MessageBuffer::Cursor::operator+= | ( | uint16_t | n | ) |
| inline

Sum operator return local buffer.

Parameters

  [in] | n | Summing with n.

Returns
  Current cursor instance.

Cursor& erpc::MessageBuffer::Cursor::operator-= | ( | uint16_t | n | ) |
| inline

Substract operator return local buffer.

Parameters

  [in] | n | Substracting with n.

Returns
  Current cursor instance.

Cursor& erpc::MessageBuffer::Cursor::operator++ | ( | void |  | ) |
| inline

Sum +1 operator.

Returns
  Current cursor instance.

Cursor& erpc::MessageBuffer::Cursor::operator-- | ( | void |  | ) |
| inline

Substract -1 operator.

Returns
  Current cursor instance.

The documentation for this class was generated from the following files:

- erpc_message_buffer.h
- erpc_message_buffer.cpp