![]() |
eRPC API Reference
Rev. 1.9.0
NXP Semiconductors
|
Simple binary serialization format. More...
#include <erpc_basic_codec.h>
Inheritance diagram for erpc::BasicCodec:
Collaboration diagram for erpc::BasicCodec:Public Member Functions | |
Encoding | |
| virtual void | startWriteMessage (message_type_t type, uint32_t service, uint32_t request, uint32_t sequence) override |
| Prototype for write header of message. More... | |
| virtual void | writeData (const void *value, uint32_t length) |
| Prototype for write data stream. More... | |
| virtual void | write (bool value) override |
| Prototype for write boolean value. More... | |
| virtual void | write (int8_t value) override |
| Prototype for write int8_t value. More... | |
| virtual void | write (int16_t value) override |
| Prototype for write int16_t value. More... | |
| virtual void | write (int32_t value) override |
| Prototype for write int32_t value. More... | |
| virtual void | write (int64_t value) override |
| Prototype for write int64_t value. More... | |
| virtual void | write (uint8_t value) override |
| Prototype for write uint8_t value. More... | |
| virtual void | write (uint16_t value) override |
| Prototype for write uint16_t value. More... | |
| virtual void | write (uint32_t value) override |
| Prototype for write uint32_t value. More... | |
| virtual void | write (uint64_t value) override |
| Prototype for write uint64_t value. More... | |
| virtual void | write (float value) override |
| Prototype for write float value. More... | |
| virtual void | write (double value) override |
| Prototype for write double value. More... | |
| virtual void | writePtr (uintptr_t value) override |
| Prototype for write uintptr value. More... | |
| virtual void | writeString (uint32_t length, const char *value) override |
| Prototype for write string value. More... | |
| virtual void | writeBinary (uint32_t length, const uint8_t *value) override |
| Prototype for write binary value. More... | |
| virtual void | startWriteList (uint32_t length) override |
| Prototype for start write list. More... | |
| virtual void | startWriteUnion (int32_t discriminator) override |
| Prototype for start write union. More... | |
| virtual void | writeNullFlag (bool isNull) override |
| Writes a flag indicating whether the next value is null. More... | |
| virtual void | writeCallback (arrayOfFunPtr callbacks, uint8_t callbacksCount, funPtr callback) override |
| Writes an order ID of callback function. More... | |
| virtual void | writeCallback (funPtr callback1, funPtr callback2) override |
| Writes an order ID of callback function. More... | |
Decoding | |
| virtual void | startReadMessage (message_type_t *type, uint32_t *service, uint32_t *request, uint32_t *sequence) override |
| Prototype for read header of message. More... | |
| virtual void | readData (void *value, uint32_t length) |
| Prototype for read data stream. More... | |
| virtual void | read (bool *value) override |
| Prototype for read boolean value. More... | |
| virtual void | read (int8_t *value) override |
| Prototype for read int8_t value. More... | |
| virtual void | read (int16_t *value) override |
| Prototype for read int16_t value. More... | |
| virtual void | read (int32_t *value) override |
| Prototype for read int32_t value. More... | |
| virtual void | read (int64_t *value) override |
| Prototype for read int64_t value. More... | |
| virtual void | read (uint8_t *value) override |
| Prototype for read uint8_t value. More... | |
| virtual void | read (uint16_t *value) override |
| Prototype for read uint16_t value. More... | |
| virtual void | read (uint32_t *value) override |
| Prototype for read uint32_t value. More... | |
| virtual void | read (uint64_t *value) override |
| Prototype for read uint64_t value. More... | |
| virtual void | read (float *value) override |
| Prototype for read float value. More... | |
| virtual void | read (double *value) override |
| Prototype for read double value. More... | |
| virtual void | readPtr (uintptr_t *value) override |
| Prototype for read uintptr value. More... | |
| virtual void | readString (uint32_t *length, char **value) override |
| Prototype for read string value. More... | |
| virtual void | readBinary (uint32_t *length, uint8_t **value) override |
| Prototype for read binary value. More... | |
| virtual void | startReadList (uint32_t *length) override |
| Prototype for start read list. More... | |
| virtual void | startReadUnion (int32_t *discriminator) override |
| Prototype for start read union. More... | |
| virtual void | readNullFlag (bool *isNull) override |
| Reads a flag indicating whether the next value is null. More... | |
| virtual void | readCallback (arrayOfFunPtr callbacks, uint8_t callbacksCount, funPtr *callback) override |
| Read an callback function id and return address of callback function. More... | |
| virtual void | readCallback (funPtr callbacks1, funPtr *callback2) override |
| Read an callback function id and return address of callback function. More... | |
Public Member Functions inherited from erpc::Codec | |
| Codec (void) | |
| Constructor. More... | |
| virtual | ~Codec (void) |
| Codec destructor. | |
| MessageBuffer * | getBuffer (void) |
| Return message buffer used for read and write data. More... | |
| virtual void | setBuffer (MessageBuffer &buf) |
| Prototype for set message buffer used for read and write data. More... | |
| virtual void | reset (void) |
| Reset the codec to initial state. | |
| erpc_status_t | getStatus (void) |
| Return current status of eRPC message processing. More... | |
| bool | isStatusOk (void) |
| Return bool value representing current status. More... | |
| void | updateStatus (erpc_status_t status) |
| Set current status of eRPC message processing to given value. More... | |
Static Public Attributes | |
| static const uint8_t | kBasicCodecVersion |
Additional Inherited Members | |
Protected Attributes inherited from erpc::Codec | |
| MessageBuffer | m_buffer |
| MessageBuffer::Cursor | m_cursor |
| erpc_status_t | m_status |
Simple binary serialization format.
|
overridevirtual |
Prototype for write header of message.
| [in] | type | Type of message. |
| [in] | service | Which interface is requested. |
| [in] | request | Which function need be called. |
| [in] | sequence | Send sequence number to be sure that received message is reply for current request. or write function. |
Implements erpc::Codec.
|
virtual |
Prototype for write data stream.
| [in] | value | Pointer to data stream. |
| [in] | length | Size of data stream in bytes. |
|
overridevirtual |
Prototype for write boolean value.
| [in] | value | Boolean typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write int8_t value.
| [in] | value | int8_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write int16_t value.
| [in] | value | int16_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write int32_t value.
| [in] | value | int32_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write int64_t value.
| [in] | value | int64_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write uint8_t value.
| [in] | value | uint8_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write uint16_t value.
| [in] | value | uint16_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write uint32_t value.
| [in] | value | uint32_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write uint64_t value.
| [in] | value | uint64_t typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write float value.
| [in] | value | float typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write double value.
| [in] | value | double typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write uintptr value.
| [in] | value | uintptr typed value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write string value.
| [in] | length | of string. |
| [in] | value | string value to write. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for write binary value.
| [in] | length | of binary. |
| [in] | value | Binary value to write. |
Implements erpc::Codec.
|
overridevirtual |
|
overridevirtual |
Prototype for start write union.
| [in] | discriminator | Discriminator of union. |
Implements erpc::Codec.
|
overridevirtual |
Writes a flag indicating whether the next value is null.
| [in] | isNull | Null flag to send. |
Implements erpc::Codec.
|
overridevirtual |
Writes an order ID of callback function.
| [in] | callbacks | Pointer to array of callbacks. |
| [in] | callbacksCount | Size of array of callbacks. |
| [in] | callback | Callback which ID should be serialized. |
Implements erpc::Codec.
|
overridevirtual |
Writes an order ID of callback function.
| [in] | callback1 | Pointer to existing callback. |
| [out] | callback2 | Callback which ID should be serialized. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read header of message.
| [out] | type | Type of message. |
| [out] | service | Which interface was used. |
| [out] | request | Which function was called. |
| [out] | sequence | Returned sequence number to be sure that received message is reply for current request. |
Implements erpc::Codec.
|
virtual |
Prototype for read data stream.
| [in] | value | Pointer to data stream to be read. |
| [in] | length | Size of data stream in bytes to be read. |
|
overridevirtual |
Prototype for read boolean value.
| [out] | value | Boolean typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read int8_t value.
| [out] | value | int8_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read int16_t value.
| [out] | value | int16_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read int32_t value.
| [out] | value | int32_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read int64_t value.
| [out] | value | int64_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read uint8_t value.
| [out] | value | uint8_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read uint16_t value.
| [out] | value | uint16_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read uint32_t value.
| [out] | value | uint32_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read uint64_t value.
| [out] | value | uint64_t typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read float value.
| [out] | value | float typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read double value.
| [out] | value | double typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read uintptr value.
| [out] | value | uintptr typed value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read string value.
| [out] | length | of string. |
| [out] | value | String value to read. |
Implements erpc::Codec.
|
overridevirtual |
Prototype for read binary value.
| [out] | length | of binary. |
| [out] | value | Binary value to read. |
Implements erpc::Codec.
|
overridevirtual |
|
overridevirtual |
Prototype for start read union.
| [in] | discriminator | Discriminator of union. |
Implements erpc::Codec.
|
overridevirtual |
Reads a flag indicating whether the next value is null.
| [in] | isNull | Null flag to read. |
Implements erpc::Codec.
|
overridevirtual |
Read an callback function id and return address of callback function.
| [in] | callbacks | Pointer to array of callbacks. |
| [in] | callbacksCount | Size of array of callbacks. |
| [out] | callback | Callback which is deserialized. |
Implements erpc::Codec.
|
overridevirtual |
Read an callback function id and return address of callback function.
| [in] | callback1 | Pointer to existing callback. |
| [out] | callback2 | Callback which is deserialized. |
Implements erpc::Codec.
|
static |
Codec version.