11 #ifndef DtExtendedRtiMsgForwarder_H_
12 #define DtExtendedRtiMsgForwarder_H_
18 #include <vlutil/vlRunnable.h>
21 #include <vlutil/vlTime.h>
26 class DtMessageBufferFilter;
28 class DtNetworkMapLanRequestFilter;
52 virtual void applyFilters();
65 virtual void sendMessageToWan(
const DtRtiMsg& msg );
69 virtual inline bool flush();
77 virtual void selectParams( MAKRti::DtSelectParamWithWrite& selectParams );
89 virtual void listenToMulticastGroup(
const MAKRti::DtInetAddr& mcastAddr );
90 virtual void dropMulticastGroup(
const MAKRti::DtInetAddr& mcastAddr );
94 virtual void federateJoined(
const MAKRti::DtString&,
const MAKRti::DtString&,
95 const MAKRti::DtString&,
97 const MAKRti::DtString&,
unsigned int,
const MAKRti::DtString&,
99 virtual void federateResigned(
const MAKRti::DtString&,
100 const MAKRti::DtString&,
unsigned int,
unsigned int,
102 virtual void updateSocketQueueStatus(
unsigned int connId,
int connQueueStatus);
104 virtual void addFederateJoinedCb(
106 virtual void addFederateResignedCb(
109 virtual void addSocketAdditionCb(
111 virtual void addSocketRemovalCb(
114 virtual void addSocketQueueCb(
118 virtual void addExecConnectionEstablishedCb(
120 virtual void removeExecConnectionEstablishedCb(
124 virtual void addExecConnectionLostCb(
126 virtual void removeExecConnectionLostCb(
147 virtual void refreshConnectionList()
const;
int(* DtSocketQueueCb)(unsigned int, int, void *)
Definition: forwarderPort.h:87
DtForwarderPort::DtFederateRemovedCallbackList myFederateResignedCbs
Definition: extendedRtiMsgForwarder.h:174
std::vector< std::pair< DtConnectionChangeCb, void * > > DtConnectionChangeCallbackList
Definition: forwarderPort.h:94
std::pair< MAKRti::DtInetAddr, int > DtInetAddrAndPort
Definition: rtiUtil.h:148
Definition: extendedRtiMsgForwarder.h:30
std::pair< DtInetAddrAndPort, int > DtAddressAndSockIdPair
Definition: extendedRtiMsgForwarder.h:156
DtForwarderPort::DtConnectionAddRemoveCallbackList mySocketAddedCbs
Definition: extendedRtiMsgForwarder.h:178
virtual bool isOpen() const
Returns true if the socket is open.
void(* DtFederateRemovedCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, void *)
Definition: forwarderPort.h:77
DtCharBufferQueue myOutMsgQueue
Definition: extendedRtiMsgForwarder.h:163
std::vector< std::pair< DtFederateRemovedCb, void * > > DtFederateRemovedCallbackList
Definition: forwarderPort.h:96
int(* DtExecAddChangeCb)(const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, const MAKRti::DtString &, bool, void *)
Definition: forwarderPort.h:81
static const unsigned int theForwarderId
Address space for connection IDs for this LAN.
Definition: extendedRtiMsgForwarder.h:152
void(* DtFederateAddedCb)(const MAKRti::DtString &, const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, const MAKRti::DtString &, unsigned int, const MAKRti::DtString &, const MAKRti::DtString &, DtHlaVersionId, void *)
Definition: forwarderPort.h:72
This class manages the RTI's start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
virtual const DtFederateTrackingFilter * fedHandleTrackingFilter() const
Definition: extendedRtiMsgForwarder.h:129
DtClock myClock
Local timer.
Definition: extendedRtiMsgForwarder.h:168
DtUdpMsgSocket * myUdpRcvSocket
Definition: extendedRtiMsgForwarder.h:158
DtCharBufferQueue myInMsgQueue
Definition: extendedRtiMsgForwarder.h:162
Helper class captures DtNetJoinResponseMsg Messages and maps the associated federate ID to the connId...
Definition: federateTrackingFilter.h:23
DtMessageBufferFilter * myOutMsgFilter
Definition: extendedRtiMsgForwarder.h:164
This file contains the declaration of the DtRtiMsgForwarder class which implements a distributed TCP ...
DtHlaVersionId
Definition: rtiVersion.h:50
DtThreadSafeQueue< DtBoolAddressSocketIdPair > mySocketListChanges
Definition: extendedRtiMsgForwarder.h:187
DtThreadSafeBufferQueue< char > DtCharBufferQueue
Definition: extendedRtiMsgForwarder.h:39
This file contains the declaration of the DtUdpMsgSocket base class.
bool myForwardMessagesToParent
Should the local forwarder pass a copy of all messages on to the Parent or simply forward within the ...
Definition: extendedRtiMsgForwarder.h:195
DtForwarderPort::DtAddressPortList myDroppedConnections
Definition: extendedRtiMsgForwarder.h:190
DtForwarderPort::DtFederateAddedCallbackList myFederateJoinedCbs
Definition: extendedRtiMsgForwarder.h:173
int(* DtExecRemovedChangeCb)(const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, void *)
Definition: forwarderPort.h:83
Definition: forwarderPort.h:47
std::set< DtAddressAndSockIdPair > myConnections
Definition: extendedRtiMsgForwarder.h:188
std::vector< char > Buffer
Definition: vlThreadSafeBufferQueue.h:35
static void tcpSocketAdditionCb(DtTcpMsgSocket *sock, void *usr)
Callbacks on addition/removal of TCP sockets.
std::vector< std::pair< DtSocketQueueCb, void * > > DtSocketQueueCallbackList
Definition: forwarderPort.h:102
DtRouteMap::DtAddressPortList DtAddressPortList
Definition: forwarderPort.h:54
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
DtFederateTrackingFilter * myFedHandleTracker
Definition: extendedRtiMsgForwarder.h:165
The DtTcpMsgSocket class provides an address family independent TCP socket that handles RTI messages...
Definition: tcpMsgSocket.h:40
DtForwarderPort::DtAddressPortList myNewConnections
Definition: extendedRtiMsgForwarder.h:189
virtual bool flush()
Send buffered messages.
Definition: extendedRtiMsgForwarder.h:198
static void tcpSocketRemovalCb(DtTcpMsgSocket *sock, void *usr)
MAKRti::DtTime myLastDiscoveryTickTime
Time of last pass for mcast discovery.
Definition: extendedRtiMsgForwarder.h:171
DtRtiMsgForwarder manages connections and message distribution to local federates and remote Forwarde...
Definition: rtiMessageForwarder.h:65
DtForwarderPort::DtConnectionAddRemoveCallbackList mySocketRemovedCbs
Definition: extendedRtiMsgForwarder.h:179
std::pair< bool, DtAddressAndSockIdPair > DtBoolAddressSocketIdPair
These lists are mutable since they are simply used to cache a reflection of back-end thread lists (ra...
Definition: extendedRtiMsgForwarder.h:186
static DtRtiMsgForwarder * create(unsigned long id, const DtRIDParameters ¶ms)
Create an instance of a DtRtiMsgForwarder.
int(* DtConnectionAddRemoveCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &, void *)
Definition: forwarderPort.h:64
std::vector< std::pair< DtConnectionAddRemoveCb, void * > > DtConnectionAddRemoveCallbackList
Definition: forwarderPort.h:91
DtUdpMsgSocket * myUdpSendSocket
Definition: extendedRtiMsgForwarder.h:159
std::vector< std::pair< DtFederateAddedCb, void * > > DtFederateAddedCallbackList
Definition: forwarderPort.h:95
DtUniquePtr< DtCharBufferQueue::Buffer > myLastReceivedMsg
Definition: extendedRtiMsgForwarder.h:161
Defines a ThreadedObject which can run a DtRunnable object in a thread.
#define DT_DLL_FORWARDER
Definition: rtiMsConfig.h:153
The DtUdpMsgSocket class provides an address family independent UDP socket that handles RTI messages...
Definition: udpMsgSocket.h:26
DtForwarderPort::DtSocketQueueCallbackList mySocketQueueCbs
Definition: extendedRtiMsgForwarder.h:176
DtForwarderPort::DtConnectionChangeCallbackList mySocketChangedCbs
Definition: extendedRtiMsgForwarder.h:180
virtual void init()
Initialize the forwarder (called by creator)
virtual bool flush()
Attempts to send any queued messages and bundled messages.