![]() |
eRPC API Reference
Rev. 1.9.0
NXP Semiconductors
|
Based server functionality. More...
#include <erpc_server.h>
Inheritance diagram for erpc::Server:
Collaboration diagram for erpc::Server:Public Member Functions | |
| Server (void) | |
| Constructor. More... | |
| virtual | ~Server (void) |
| ClientManager destructor. | |
| void | setMessageBufferFactory (MessageBufferFactory *factory) |
| Set MessageBufferFactory to use. More... | |
| void | setCodecFactory (CodecFactory *factory) |
| Set CodecFactory to use. More... | |
| void | setTransport (Transport *transport) |
| This function sets transport layer to use. More... | |
| void | addService (Service *service) |
| Add service. More... | |
| void | removeService (Service *service) |
| Remove service. More... | |
| virtual erpc_status_t | run (void)=0 |
| This function runs the server. | |
| virtual void | stop (void)=0 |
| This function stop the server. | |
Public Member Functions inherited from erpc::ClientServerCommon | |
| ClientServerCommon (void) | |
| ClientServerCommon constructor. | |
| ~ClientServerCommon (void) | |
| ClientServerCommon destructor. | |
Protected Member Functions | |
| virtual erpc_status_t | processMessage (Codec *codec, message_type_t msgType, uint32_t serviceId, uint32_t methodId, uint32_t sequence) |
| Process message. More... | |
| virtual erpc_status_t | readHeadOfMessage (Codec *codec, message_type_t &msgType, uint32_t &serviceId, uint32_t &methodId, uint32_t &sequence) |
| Read head of message to identify type of message. More... | |
| virtual Service * | findServiceWithId (uint32_t serviceId) |
| This function finds service base on service ID. More... | |
Protected Attributes | |
| MessageBufferFactory * | m_messageFactory |
| CodecFactory * | m_codecFactory |
| Transport * | m_transport |
| Service * | m_firstService |
Based server functionality.
|
inline |
Constructor.
This function initializes object attributes.
|
inline |
Set MessageBufferFactory to use.
| [in] | factory | MessageBufferFactory to use. |
|
inline |
Set CodecFactory to use.
| [in] | factory | CodecFactory to use. |
| void Server::setTransport | ( | Transport * | transport | ) |
This function sets transport layer to use.
It also set messageBufferFactory to the same as in transport layer.
| [in] | transport | Transport layer to use. |
| void Server::removeService | ( | Service * | service | ) |
Remove service.
| [in] | service | Service to remove. |
|
protectedvirtual |
Process message.
| [in] | codec | Inout codec to use. |
| [in] | msgType | Type of received message. Based on message type will be (will be not) sent respond. |
| [in] | serviceId | To identify interface. |
| [in] | methodId | To identify function in interface. |
| [in] | sequence | To connect correct answer with correct request. |
|
protectedvirtual |
Read head of message to identify type of message.
| [in] | codec | Inout codec to use. |
| [out] | msgType | Type of received message. Based on message type will be (will be not) sent respond. |
| [out] | serviceId | To identify interface. |
| [out] | methodId | To identify function in interface. |
| [out] | sequence | To connect correct answer with correct request. |
|
protectedvirtual |
This function finds service base on service ID.
| [in] | serviceId | Service id number. |
|
protected |
Contains MessageBufferFactory to use.
|
protected |
Contains CodecFactory to use.
|
protected |
Contains pointer to first service.