|
Open Model Railroad Network (OpenMRN)
|
Transport-agnostic dispatcher of datagrams. More...
#include <Datagram.hxx>
Classes | |
| class | DatagramDispatcher |
| Class for routing incoming datagram messages to the datagram handlers. More... | |
Public Types | |
| typedef TypedNodeHandlerMap< Node, DatagramHandler > | Registry |
Public Member Functions | |
| DatagramService (If *iface, size_t num_registry_entries) | |
| Creates a datagram dispatcher. | |
| Registry * | registry () |
| TypedQAsync< DatagramClient > * | client_allocator () |
| Datagram clients. | |
| If * | iface () |
Public Member Functions inherited from Service | |
| Service (ExecutorBase *e) | |
| Constructor. | |
| ~Service () | |
| Destructor. | |
| ExecutorBase * | executor () |
Private Attributes | |
| If * | iface_ |
| Interface on which we are registered. | |
| TypedQAsync< DatagramClient > | clients_ |
| Datagram clients. | |
| DatagramDispatcher | dispatcher_ |
| Datagram dispatch handler. | |
Transport-agnostic dispatcher of datagrams.
There will be typically one instance of this for each interface with virtual nodes. This class is responsible for maintaining the registered datagram handlers, and taking the datagram MTI from the incoming messages and routing them to the datagra for datagram handlers.
The datagram handler needs to listen to the incoming queue for arriving datagrams.
Definition at line 160 of file Datagram.hxx.
Definition at line 163 of file Datagram.hxx.
| openlcb::DatagramService::DatagramService | ( | If * | iface, |
| size_t | num_registry_entries | ||
| ) |
Creates a datagram dispatcher.
| interface | is the async interface to which to bind. |
| num_registry_entries | is the size of the registry map (how many datagram handlers can be registered) |
Definition at line 44 of file Datagram.cxx.
| openlcb::DatagramService::~DatagramService | ( | ) |
Definition at line 52 of file Datagram.cxx.
|
inline |
Datagram clients.
Use control flows from this allocator to send datagrams to remote nodes. When the client flow completes, it is the caller's responsibility to return it to this allocator, once the client is done examining the result codes.
Definition at line 186 of file Datagram.hxx.
|
inline |
Definition at line 191 of file Datagram.hxx.
|
inline |
Definition at line 175 of file Datagram.hxx.
|
private |
Datagram clients.
Definition at line 243 of file Datagram.hxx.
|
private |
Datagram dispatch handler.
Definition at line 246 of file Datagram.hxx.
|
private |
Interface on which we are registered.
Definition at line 240 of file Datagram.hxx.