|
Open Model Railroad Network (OpenMRN)
|
This class is used in the dispatching of incoming or outgoing NMRAnet messages to the message handlers at the protocol-agnostic level (i.e. More...
#include <If.hxx>
Public Types | |
| enum | DstFlags { WAIT_FOR_LOCAL_LOOPBACK = 1 , DSTFLAG_NOT_FIRST_MESSAGE = 2 , DSTFLAG_NOT_LAST_MESSAGE = 4 } |
| enum | SrcFlags |
| typedef uint32_t | id_type |
Public Member Functions | |
| void | clear () |
| void | reset (Defs::MTI mti, NodeID src, NodeHandle dst, string payload) |
| void | reset (Defs::MTI mti, NodeID src, string payload) |
| unsigned | get_flags_src () |
| unsigned | get_flags_dst () |
| void | set_flag_src (unsigned flags) |
| void | clear_flag_src (unsigned flags) |
| bool | has_flag_src (unsigned flags) |
| Returns true if src flags has all the specified flags set. | |
| void | set_flag_dst (unsigned flags) |
| void | clear_flag_dst (unsigned flags) |
| bool | has_flag_dst (unsigned flags) |
| Returns true if src flags has all the specified flags set. | |
| id_type | id () const |
| unsigned | priority () |
| Returns the NMRAnet-defined priority band, in the range of 0..3. | |
Public Attributes | |
| NodeHandle | src |
| Source node. | |
| NodeHandle | dst |
| Destination node. | |
| Defs::MTI | mti |
| OpenLCB MTI of the incoming message. | |
| Node * | dstNode |
| If the destination node is local, this value is non-NULL. | |
| string | payload |
| Data content in the message body. | |
| unsigned | flagsSrc: 4 |
| unsigned | flagsDst: 4 |
This class is used in the dispatching of incoming or outgoing NMRAnet messages to the message handlers at the protocol-agnostic level (i.e.
not CAN or TCP-specific).
TODO(balazs.racz) There shall be one instance of this class that will be sent to all handlers that expressed interest in that MTI. When all those handlers are done, the instance should be freed. Currently the instance is copied by the dispatcher separately for each handler.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| NodeHandle openlcb::GenMessage::dst |
| Node* openlcb::GenMessage::dstNode |
| Defs::MTI openlcb::GenMessage::mti |
| string openlcb::GenMessage::payload |
| NodeHandle openlcb::GenMessage::src |