MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
DtRtiAssistantForwarderClient Class Reference

The client connection to the RTI Assistant for the an RTI Forwarder. More...

+ Inheritance diagram for DtRtiAssistantForwarderClient:
+ Collaboration diagram for DtRtiAssistantForwarderClient:

Public Member Functions

 DtRtiAssistantForwarderClient (DtAssistantComponentType type, int port=DtASSISTANT_DEFAULT_PORT)
 Constructor.
virtual ~DtRtiAssistantForwarderClient ()
 Destructor.
virtual void updateForwarderInfo (const MAKRti::DtInetAddr &reliableIpAddr, const MAKRti::DtInetAddr &bestEffortIpAddr, const DtInetAddr &networkIfAddr, int udpPort, int tcpPort, bool fullCompliance, int forwarderPort, const MAKRti::DtInetAddr &additionalForwarder)
 Updates the forwarder connection info to be sent to the Assistant.
virtual void updateLogFile (const MAKRti::DtFilename &file)
 Updates the log file name used by this forwarder.
virtual void updateExecConfirmed (bool confirmed, bool fullyCompliant)
 Updates whether or not there is an rtiexec confirmed in order to be sent to the Assistant.
virtual void sendClientInfo ()
 Send forwarder address and port to the Assistant.
virtual void sendFullForwarderInfo (unsigned int numForwarderToForwarderConns, const std::vector< MAKRti::DtString > &forwarderIdentifiers, const std::vector< MAKRti::DtString > &forwarderConnectionHostNames, const std::vector< MAKRti::DtInetAddr > &forwarderConnectionAddrs, const std::vector< int > &forwarderConnectionPorts, unsigned int numForwarderExecConns, unsigned int numForwarderClientConns, const std::vector< MAKRti::DtString > &clientConnectionNames, const std::vector< MAKRti::DtString > &clientConnectionTypeNames, const std::vector< DtString > &clientConnectionProcessNames, const std::vector< DtString > &clientConnectionPIDs, const std::vector< DtString > &clientConnectionCommandArgs, const std::vector< MAKRti::DtString > &clientConnectionHostNames, const std::vector< MAKRti::DtInetAddr > &clientConnectionAddrs, const std::vector< MAKRti::DtString > &clientConnectionFederationNames, const std::vector< int > &clientFederateHandles, const std::vector< unsigned > &clientConnIds, const std::vector< int > &clientConnectionQueueStatus, const std::vector< DtHlaVersionId > &clientHlaVersions, const std::vector< DtAssistantMsgFederateStatus > &clientConnectionFederateStatus)
 Sends information on this forwarder and all of its connected components.
virtual void sendWaitingForForwarders (bool isWaiting, const DtNeededFwConnMap &neededFws)
 Sends information regarding what forwarder connections we are currently waiting for.
- Public Member Functions inherited from DtRtiAssistantClient
 DtRtiAssistantClient (DtAssistantComponentType type, int port=DtASSISTANT_DEFAULT_PORT)
 Constructor.
virtual ~DtRtiAssistantClient ()
 Destructor.
virtual bool tick (unsigned int timeout=0)
 Do the actual message processing.
virtual bool isConnected ()
 Returns true if the socket is connected.
virtual bool isDisabled ()
 Returns true if the socket is disabled.
virtual void addMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
 Message Callbacks These callback functions operate on all of the connections.
virtual void removeMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
virtual void addWildcardMsgCallback (DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
virtual void removeWildcardMsgCallback (DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
virtual void addDisconnectCallback (DtAssistantDisconnectCb cb, void *usr)
 These functions add callbacks for notification of a socket disconnect.
virtual void removeDisconnectCallback (DtAssistantDisconnectCb cb, void *usr)
virtual bool sendLRCConnQueryMsg (bool error, MAKRti::DtInetAddr &relIpAddr, MAKRti::DtInetAddr &beIpAddr, MAKRti::DtInetAddr &interfaceAddr, int &udpPort, int &tcpPort, bool &useRtiexec, bool &forceFullCompliance, int &forwarderPort)
 Send a message querying for the connection parameters.
virtual bool sendForwardingComponentConnQueryMsg (bool error, MAKRti::DtInetAddr &relIpAddr, MAKRti::DtInetAddr &beIpAddr, MAKRti::DtInetAddr &interfaceAddr, int &udpPort, int &tcpPort, bool &forceFullCompliance, int &forwarderPort, MAKRti::DtInetAddr &forwardrToConnectTo)
 Send a message querying for the rtiexec connection parameters.
virtual void sendLatencyTestMsg (const DtAssistantLatencyReportMsg &msg)
 Send a message to the assistant with latency test measurements.
virtual void sendLatencyTestStatusMsg (const DtAssistantTestMgrStatusMsg &msg)
 Send an updated latency test status message to the assistant.
virtual bool getNewLicenseServerFromAssistant (bool allowUnlicensed, bool &runUnlicensed, MAKRti::DtString &serverName, const MAKRti::DtString &featToCheck)
 Send a message to the assistant to query the user for an alternate license server.
virtual void sendNotifyMsg (const MAKRti::DtString &text, DtNotifyLevelType notifyLevel)
 Send a message to display a pop up notification above the tray icon.
virtual void sendSignalTickedMsg ()
 Send a signal ticked message to the assistant.
virtual void sendDialogBoxMsg (const MAKRti::DtString &text, const MAKRti::DtString &advancedText)
 Send a message to display a dialog notification.
virtual void sendClose ()
 Send connection closed message to Assistant.
virtual void sendRidParamsMsg (const MAKRti::DtString &params, const MAKRti::DtFilename &filename, const MAKRti::DtString &federation=MAKRti::DtString::nullString(), unsigned federateHdl=0)
 Send the RID parameters.
virtual void setMsgFactory (DtAssistantMessageFactory *fact)
 Get/Set the message factory.
virtual DtAssistantMessageFactorymsgFactory () const
virtual void shutDownConnection ()
 AssistantClientOwner should call this function when it processes an assistantExitMsg.
virtual MAKRti::DtString getProcessName () const
 get the process name
virtual int getPID () const
 get the PID
virtual MAKRti::DtString getCommandArgs () const
 get the command args
bool testConnectionStatus ()
 test the connection
virtual int componentId () const
 Returns the component ID assigned by the assistant.

Protected Attributes

MAKRti::DtInetAddr myReliableAddr
 The host address for the forwarder.
MAKRti::DtInetAddr myBestEffortAddr
 The best effort address for the forwarder.
MAKRti::DtInetAddr myNetworkIfAddr
 The forwarder's network interface address.
int myTcpPort
 The TCP port for the forwarder.
int myUdpPort
 The UDP port for the forwarder.
MAKRti::DtString myHostName
 The host name for the forwarder.
bool myFullCompliance
 Whether full compliance is enabled.
int myForwarderPort
 The port used to connect to other forwarders.
MAKRti::DtInetAddr myAdditionalForwarder
 The IP address of an optional additional forwarder that this forwarder attempted to connect to.
bool myExecConfirmed
 Whether an exec has connected to this forwarder or in the distributed forwarder network.
MAKRti::DtFilename myLogFile
 The name and full path of the log file.
- Protected Attributes inherited from DtRtiAssistantClient
bool myAssistantDisabled
 Set to true if the Assistant is disabled.
MAKRti::DtInetAddr myAssistantAddr
 The IP address of the Assistant.
unsigned int myAssistantPort
 The port on which the RTI Assistant listens for connections.
DtTcpMsgSocketmySocket
 The socket to the RTI Assistant.
bool myCreateIfConnectFails
 Indicates whether an Assistant should be created if a connection cannot be established.
DtAssistantConnectionStatus myConnStatus
 The current connection status.
bool myInitializingConnection
 Is connection being initialized.
MAKRti::DtU32 mySockOpts
 The socket options to be used when connecting to the Assistant.
DtAssistantMessageFactorymyMessageFactory
 The message factory.
DtAssistantDfltMsgFactory myDefaultMessageFactory
 Default message factory.
DtAssistantComponentType myComponentType
 The component type. (LRC, rtiexec, etc.)
MAKRti::DtClock myClock
 Clock for timeouts.
MAKRti::DtTime myConnTestInterval
 Interval at which connection should be tested.
MAKRti::DtTime myTimeToTestConnection
 Next time to test connection.
DtAssistantMsgCbMgr myMsgCbMgr
 Message callback manager.
std::auto_ptr< DtAssistantMsgmyRespMsg
 The last response message to be received.
std::list
< DtAssistantDisconnectCbInfo * > 
myDisconnectCallbacks
 Lists of pointers to socket disconnect callbacks.
MAKRti::DtMutex * mySocketMutex
 locks access to the socket connection.
bool myShouldShutdown
 should be set when assistant exit msg has been received.
int myNumFailedAssistantConnects
 How many assistant restarts have we attempted.
int myNumSuccessfulAssistantConnects
 How many assistant reconnects occurred.
int myPID
 the Process ID ( PID )
MAKRti::DtString myProcessName
 the Process Name
MAKRti::DtString myCommandArgs
 the command line arguments
int myAssistantCompId
 The assistant assigned component ID.

Additional Inherited Members

- Protected Member Functions inherited from DtRtiAssistantClient
virtual bool initialize ()
 Attempts to connect to the RTI Assistant.
virtual DtAssistantConnectionStatus connectToAssistant ()
 Attempt to open a connection and handshake with the Assistant.
virtual DtAssistantConnectionStatus makeSingleConnectionAttempt ()
virtual bool startAssistant ()
 Attempt to start a new Assistant.
virtual bool readAndProcess (MAKRti::DtTime maxTime)
 Read and process any messages on the socket for up to the maxTime.
virtual bool sendMsg (const DtAssistantMsg &msg)
 Send a message to the RTI Assistant.
virtual DtAssistantMsgsendMsgAndWait (const DtAssistantMsg &msg, DtAssistantMsgKind respKind, unsigned int waitSecs=0)
 Send a message to the RTI Assistant and wait for response of the specified kind.
virtual DtAssistantConnectionStatus sendConnectMsg ()
 Send basic component information to the Assistant for a new connection.
virtual void processRespMsg (const DtAssistantMsg &respMsg)
virtual void processNtfyLvlUpdateMsg (const DtAssistantNtfyLvlUpdateMsg &updateMsg)
virtual void processAssistantExitMsg (const DtAssistantExitMsg &inter)
virtual void processDisconnect ()
 Process Assistant socket disconnect.
virtual std::auto_ptr
< DtAssistantMsg
netRead (int *retCode) const
 Attempt to read a new message from the socket.
virtual bool sendLicQueryMsg (bool allowUnlicensed, bool &runUnlicensed, MAKRti::DtString &licServer)
 Send a message querying for the license server.
- Static Protected Member Functions inherited from DtRtiAssistantClient
static void processRespMsg (const DtAssistantMsg &respMsg, void *usr)
 Response message callback.
static void processNtfyLvlUpdateMsg (const DtAssistantNtfyLvlUpdateMsg &updateMsg, void *usr)
 Notify level update message callback.
static void processAssistantExitMsg (const DtAssistantExitMsg &inter, void *usr)
 Process the assistant exit message. The assistant is commanding us to exit.
- Static Protected Attributes inherited from DtRtiAssistantClient
static const int theMaxNumberOfAssistantConnectAttempts
 either starting up or reconnecting, how many assistant restarts do we tolerate before giving up.
static const MAKRti::DtInetAddr theFirstHostInetAddr
 The first InetAddr when the federate was launched.

Detailed Description

The client connection to the RTI Assistant for the an RTI Forwarder.

That RTI forwarder can be a thread of the RtiExec or a stand along Forwarder. DtRtiAssistantForwarderClient manages the client connection of the forwarder to the RTI Assistant. Provides routines to create and send messages to the Assistant.

Constructor & Destructor Documentation

DtRtiAssistantForwarderClient::DtRtiAssistantForwarderClient ( DtAssistantComponentType  type,
int  port = DtASSISTANT_DEFAULT_PORT 
)

Constructor.

virtual DtRtiAssistantForwarderClient::~DtRtiAssistantForwarderClient ( )
virtual

Destructor.

Member Function Documentation

virtual void DtRtiAssistantForwarderClient::sendClientInfo ( )
virtual

Send forwarder address and port to the Assistant.

Reimplemented from DtRtiAssistantClient.

Reimplemented in DtRtiAssistantExecClient.

virtual void DtRtiAssistantForwarderClient::sendFullForwarderInfo ( unsigned int  numForwarderToForwarderConns,
const std::vector< MAKRti::DtString > &  forwarderIdentifiers,
const std::vector< MAKRti::DtString > &  forwarderConnectionHostNames,
const std::vector< MAKRti::DtInetAddr > &  forwarderConnectionAddrs,
const std::vector< int > &  forwarderConnectionPorts,
unsigned int  numForwarderExecConns,
unsigned int  numForwarderClientConns,
const std::vector< MAKRti::DtString > &  clientConnectionNames,
const std::vector< MAKRti::DtString > &  clientConnectionTypeNames,
const std::vector< DtString > &  clientConnectionProcessNames,
const std::vector< DtString > &  clientConnectionPIDs,
const std::vector< DtString > &  clientConnectionCommandArgs,
const std::vector< MAKRti::DtString > &  clientConnectionHostNames,
const std::vector< MAKRti::DtInetAddr > &  clientConnectionAddrs,
const std::vector< MAKRti::DtString > &  clientConnectionFederationNames,
const std::vector< int > &  clientFederateHandles,
const std::vector< unsigned > &  clientConnIds,
const std::vector< int > &  clientConnectionQueueStatus,
const std::vector< DtHlaVersionId > &  clientHlaVersions,
const std::vector< DtAssistantMsgFederateStatus > &  clientConnectionFederateStatus 
)
virtual

Sends information on this forwarder and all of its connected components.

virtual void DtRtiAssistantForwarderClient::sendWaitingForForwarders ( bool  isWaiting,
const DtNeededFwConnMap neededFws 
)
virtual

Sends information regarding what forwarder connections we are currently waiting for.

virtual void DtRtiAssistantForwarderClient::updateExecConfirmed ( bool  confirmed,
bool  fullyCompliant 
)
virtual

Updates whether or not there is an rtiexec confirmed in order to be sent to the Assistant.

Note that this method does not send the data to the assistant, just stores it to be sent when sendClientInfo is called.

virtual void DtRtiAssistantForwarderClient::updateForwarderInfo ( const MAKRti::DtInetAddr &  reliableIpAddr,
const MAKRti::DtInetAddr &  bestEffortIpAddr,
const DtInetAddr &  networkIfAddr,
int  udpPort,
int  tcpPort,
bool  fullCompliance,
int  forwarderPort,
const MAKRti::DtInetAddr &  additionalForwarder 
)
virtual

Updates the forwarder connection info to be sent to the Assistant.

Note that this method does not send the data to the assistant, just stores it to be sent when sendClientInfo is called.

Reimplemented in DtRtiAssistantExecClient.

virtual void DtRtiAssistantForwarderClient::updateLogFile ( const MAKRti::DtFilename &  file)
virtual

Updates the log file name used by this forwarder.

This is sent to the Assistant so that it may display the log to interested users. Note that this method does not send the message to the assistant, just stores the name to be sent when sendClientInfo is called.

Member Data Documentation

MAKRti::DtInetAddr DtRtiAssistantForwarderClient::myAdditionalForwarder
protected

The IP address of an optional additional forwarder that this forwarder attempted to connect to.

MAKRti::DtInetAddr DtRtiAssistantForwarderClient::myBestEffortAddr
protected

The best effort address for the forwarder.

bool DtRtiAssistantForwarderClient::myExecConfirmed
protected

Whether an exec has connected to this forwarder or in the distributed forwarder network.

int DtRtiAssistantForwarderClient::myForwarderPort
protected

The port used to connect to other forwarders.

bool DtRtiAssistantForwarderClient::myFullCompliance
protected

Whether full compliance is enabled.

MAKRti::DtString DtRtiAssistantForwarderClient::myHostName
protected

The host name for the forwarder.

MAKRti::DtFilename DtRtiAssistantForwarderClient::myLogFile
protected

The name and full path of the log file.

MAKRti::DtInetAddr DtRtiAssistantForwarderClient::myNetworkIfAddr
protected

The forwarder's network interface address.

MAKRti::DtInetAddr DtRtiAssistantForwarderClient::myReliableAddr
protected

The host address for the forwarder.

int DtRtiAssistantForwarderClient::myTcpPort
protected

The TCP port for the forwarder.

int DtRtiAssistantForwarderClient::myUdpPort
protected

The UDP port for the forwarder.


The documentation for this class was generated from the following file:

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)