|
Open Model Railroad Network (OpenMRN)
|
Interface for a the central part of a hub. More...
#include <DirectHub.hxx>
Public Member Functions | |
| virtual Service * | get_service ()=0 |
| virtual void | register_port (DirectHubPort< T > *port)=0 |
| Adds a port to this hub. | |
| virtual void | unregister_port (DirectHubPort< T > *port)=0 |
| Synchronously removes a port from this hub. | |
| virtual void | unregister_port (DirectHubPort< T > *port, Notifiable *done)=0 |
| Asynchronously removes a port from this hub. | |
| virtual void | enqueue_send (Executable *caller)=0 |
| Signals that the caller wants to send a message to the hub. | |
| virtual MessageAccessor< T > * | mutable_message ()=0 |
| Accessor to fill in the message payload. | |
| virtual void | do_send ()=0 |
| Sends a message to the hub. | |
Interface for a the central part of a hub.
Definition at line 165 of file DirectHub.hxx.
|
pure virtual |
Sends a message to the hub.
Before this is called, the message has to be filled in via mutable_message().
Implemented in DirectHubImpl< T >.
|
pure virtual |
Signals that the caller wants to send a message to the hub.
When the hub is ready for that, will execute *caller. This might happen inline within this function call, or on a different executor.
| caller | callback that actually sends the message. It is required to call do_send() inline. |
Implemented in DirectHubImpl< T >.
|
pure virtual |
Implemented in DirectHubImpl< T >.
|
pure virtual |
Accessor to fill in the message payload.
Must be called only from within the callback as invoked by enqueue_send.
Implemented in DirectHubImpl< T >.
|
pure virtual |
Adds a port to this hub.
This port will be receiving all further messages.
| port | the downstream port. |
Implemented in DirectHubImpl< T >.
|
pure virtual |
Synchronously removes a port from this hub.
This port must have been registered previously. Must not be called on the main executor.
| port | the downstream port. |
Implemented in DirectHubImpl< T >.
|
pure virtual |
Asynchronously removes a port from this hub.
This port must have been registered previously.
| port | the downstream port. |
| done | will be notified when the removal is complete. |
Implemented in DirectHubImpl< T >.