Communication group server skeleton. More...
#include <communication_group_server.h>
Public Member Functions | |
| CommunicationGroupServer (ResponseHandler< R > responseHandler) | |
| Constructor. More... | |
| std::future< void > | Broadcast (const T &msg) const |
| Broadcast a request message to all the clients. More... | |
| std::future< void > | Message (uint32_t clientID, const T &msg) const |
| Send a request message to a specific client. More... | |
| void | Response (uint32_t clientID, const R &responseMsg) |
| Receive a response message from a client. More... | |
| std::future< std::vector< uint32_t > > | ListClients () const |
| List all the subscribed clients. More... | |
Communication group server skeleton.
| T | Request message type |
| R | Response message type |
|
inlineexplicit |
Constructor.
| responseHandler | On response message received handler |
| std::future< void > ara::com::cg::CommunicationGroupServer< T, R >::Broadcast | ( | const T & | msg | ) | const |
Broadcast a request message to all the clients.
| msg | Request message to be broadcasted |
| std::future< std::vector< uint32_t > > ara::com::cg::CommunicationGroupServer< T, R >::ListClients | ( | ) | const |
List all the subscribed clients.
| std::future< void > ara::com::cg::CommunicationGroupServer< T, R >::Message | ( | uint32_t | clientID, |
| const T & | msg | ||
| ) | const |
Send a request message to a specific client.
| clientID | Communication group client ID |
| msg | Request message to be sent |
|
inline |
Receive a response message from a client.
| clientID | Communication group client ID |
| responseMsg | Received response message |