Public Member Functions |
| virtual | ~DtForwarderNode () |
| virtual int | tick (double maxTime=0.0f) |
| | Forward pending inbound messages.
|
| virtual void | addTickCallback (DtTickCbFn fn, void *usr, MAKRti::DtTime interval) |
| | Register a callback to be called during tick, but only at the given interval.
|
| virtual void | removeTickCallback (DtTickCbFn fn, void *usr) |
| virtual bool | ready () const |
| | Is the forwarder fully connected and actively forwarding?
|
| virtual const DtRIDParameters * | params () const |
| | Get the RID parameters object.
|
virtual DtBoost::shared_ptr
< DtRouteMap > | routeMap () const |
| | Get the Route Map.
|
| virtual DtForwarderPort * | inPort () const |
| | Get a pointer to the IN/OUT/LAN port.
|
| virtual DtForwarderPort * | lanPort () const |
| virtual DtForwarderPort * | outPort () const |
| virtual void | selectParams (MAKRti::DtSelectParamWithWrite &selectParams) |
| | Get the current set of file descriptors to select against for notification.
|
| virtual unsigned long | localNodeId () const |
| | Get the ID of this Node for Routing purposes.
|
| const DtInetAddrAndPort & | localNodeAddress () const |
| | Get the address of this Node for Routing purposes Not virtual as used in CTOR.
|
| virtual MAKRti::DtString | localNodeName () const |
| | Get the forwarder name.
|
| virtual void | processInToLanMsg (DtForwarderPort::DtAddressMsgPair &msg) |
| | Process and Send Msg from IN to LAN.
|
| virtual void | processInToOutMsg (DtForwarderPort::DtAddressMsgPair &msg) |
| | Process and Send Msg from IN to OUT.
|
| virtual void | processLanToOutMsg (DtForwarderPort::DtAddressMsgPair &msg) |
| | Process and Send Msg from LAN to OUT.
|
| virtual void | sendToLanPort (DtForwarderPort::DtAddressMsgPair &msg) |
| | Send message directly to LAN port.
|
| virtual void | sendToOutPort (DtForwarderPort::DtAddressMsgPair &msg) |
| | Send message directly to OUT port (all destinations)
|
| virtual void | sendToOutPort (DtForwarderPort::DtAddressMsgPair &msg, const DtRouteMap::DtAddressPortList &destinations) |
| | Send message directly to the specified OUT port destinations.
|
| virtual void | registerOutPortProcessor (DtForwarderMessageProcessor::Filter *processor) |
| | Add/Remove a Message Processor for IN or LAN to OUT messages (LAN to OUT messages identifiable since src == local)
|
| virtual void | unregisterOutPortProcessor (DtForwarderMessageProcessor::Filter *processor) |
| virtual void | registerLanPortProcessor (DtForwarderMessageProcessor::Filter *processor) |
| | Add/Remove a Message Processor for IN to LAN messages.
|
| virtual void | unregisterLanPortProcessor (DtForwarderMessageProcessor::Filter *processor) |
| virtual void | packageAndSendReliable (DtRtiMsg &msg, unsigned int sendViaIntfc) |
| | Wrap a DtRtiMsg in a DtForwarderMsg envelope and send to the indicated interfaces.
|
| virtual void | packageAndSendReliable (DtRtiMsg &msg, unsigned int sendViaIntfc, const DtRouteMap::DtAddressPortList &destinations) |
| virtual void | setMetadataControl (DtMetadataType type, bool onOff) |
| | Set/Get metadata control indicators.
|
| virtual bool | isMetadataEnabled (DtMetadataType type) |
| virtual void | lanPortListenToMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| | Listen/Drop multicast groups on LAN port's UDP receive socket.
|
| virtual void | lanPortDropMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| virtual bool | lanPortUpdateFederateConnectionId (unsigned long orig, unsigned long final) |
| | Set locally connected federate's connectionId to final value specified by federate in its Connect Confirm message.
|
| virtual DtInetAddrAndPort | nextForwarderOnRoute (const DtInetAddrAndPort &target) |
| | Locate the next forwarder connection on the route to the targeted address.
|
| virtual DtInetAddrAndPort | nextForwarderOnRoute (const MAKRti::DtString &targetGroupName) |
| virtual DtInetAddrAndPort | rootForwarder () |
| | Return the IP address of the rtiexec's root forwarder.
|
| virtual DtInetAddrAndPort | nextHopToExec () |
| | Return the next upstream outbound forwarder's IP address on the path toward the rtiexec's root forwarder.
|
| virtual void | abortPendingConnections () |
| | Abort setting up embryonic connections.
|
| virtual unsigned int | abortedConnections () |
| | Get the count of failed/aborted connection attempts.
|
| virtual bool | connectionInformation (unsigned int &numForwarderToForwarderConns, std::vector< MAKRti::DtString > &forwarderIdentifiers, std::vector< MAKRti::DtString > &forwarderConnectionHostNames, std::vector< DtInetAddrAndPort > &forwarderConnectionAddrs, unsigned int &numForwarderExecConns, unsigned int &numForwarderClientConns, std::vector< MAKRti::DtString > &clientConnectionHostNames, std::vector< MAKRti::DtInetAddr > &clientConnectionAddrs) |
| | Get connections information from the forwarder.
|
| void | continueWithoutUnconnectedFws () |
| | If the forwarder is currently waiting for remote forwarder connections, this method tells it to abandon any unconnected forwarders and continue on without them.
|
Static Public Member Functions |
| static DtForwarderNode * | create (const DtRIDParameters *params, DtForwarderMessageProcessor *toOutProcessor, DtForwarderMessageProcessor *toLanProcessor, int forwarderPort, MAKRti::DtInetAddr forwarderAddrToConnectTo, bool writeToPipeWhenReady) |
| | Creates an instance of a DtForwarderNode.
|
| static void | setCreatorFunction (DtForwarderNodeCreatorFcn creator) |
| | Call this function to set an alternate creator function With this function, users can replace this DtForwarderNode with their own derived class.
|
| static int | newInPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, void *usr) |
| | Callbacks.
|
| static int | newOutPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, void *usr) |
| static int | lostInPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, void *usr) |
| static int | lostOutPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, void *usr) |
| static void | inOutForwarderPortReady (unsigned long forwarderNodeId, void *usr) |
Protected Member Functions |
| | DtForwarderNode (const DtRIDParameters *params, DtForwarderMessageProcessor *toOutProcessor, DtForwarderMessageProcessor *toLanProcessor, int forwarderPort, const MAKRti::DtInetAddr &forwarderAddrToConnectTo, bool writeToPipeWhenReady) |
| | Base Constructor.
|
| | DtForwarderNode () |
| | Default Ctor, Copy Ctor, and Assignment - unimplemented.
|
| | DtForwarderNode (const DtForwarderNode &orig) |
| DtForwarderNode & | operator= (const DtForwarderNode &orig) |
| int | refreshConnections () |
| | Ensure that all connections are stable and connected.
|
| void | writeMessageToPipe (const MAKRti::DtString &msg) |
| | Write message to rtiexec pipe.
|
| int | newInPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| | Callbacks.
|
| int | newOutPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| int | lostInPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| int | lostOutPortConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr) |
| void | inOutForwarderPortReady (unsigned long forwarderNodeId) |
The DtForwarderNode class defines a 3-way message distribution architecture for building forwarding networks of arbitrary complexity.
The DtForwarderNode has 3 interfaces: IN: - incoming message path from other DtForwarderNodes OUT: - outgoing message path to other DtForwarderNodes LAN: - bidirectional message path to/from local message sources/sinks ( generally HLA Federates )
- these are the message distribution endpoints
Forwarding Pathways: 1) Messages from LAN will be forwarded out to upstream/downstream forwarders in hierarchical configurations, to the portal forwarders in foreign Forwarder Groups, and to other LAN connections 2) Messages from IN will be forwarded out to LAN 3) Messages from IN can ONLY be forwarded out to OUT under the following conditions: (a) The forwarder is acting as a bridge (aka "link") node between upstream forwarders and downstream forwarders in a hierarchical network. In this case the user must configure the route and specify the endpoints and the bridge forwarder. This will create an entry in the DtRouteMap myRoutesByLinkAddrMap map. Messages can be forwarded FROM upstream sources TO downstream recipients and vice-versa. (b) The forwarder is acting as a portal forwarder in a Forwarder Group. Only certain internal messages will be forwarded, and only FROM foreign Forwarder Groups TO members of the local group, not in the reverse direction. The reverse direction is taken care of by virtue of the fact that all the local group members will have a connection to a portal in the foreign Forwarder Groups so the messages do not need to pass through the local portal. Some messages require the local portal to aggregate responses of the local group members, but the group members individual response messages are not forwarded in those cases.
Note: These pathways do not guarantee that a message will be forwarded as described above. Outlets may be altered by filters and destinations can be added or removed based on the type of message and the network topology. An optional filter may be applied to all messages forwarded to OUT to allow a final message processing step before passing the message.