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

The client connection to the RTI Assistant for the rtiexec. More...

+ Inheritance diagram for DtRtiAssistantExecClient:
+ Collaboration diagram for DtRtiAssistantExecClient:

Public Member Functions

 DtRtiAssistantExecClient (int port=0)
 Constructor. More...
 
virtual ~DtRtiAssistantExecClient ()
 Destructor. More...
 
virtual void updateIsConnected (bool connected)
 Updates the flag indicating that the rtiexec is conencted to the forwarder. More...
 
virtual void updateLicenseServer (const MAKRti::DtString &server)
 Updates the license server used by this rtiexec. More...
 
virtual void sendClientInfo ()
 Send forwarder address and port, log file info, and license server to the assistant. More...
 
virtual void sendFederationStateMsg (const DtAssistantFederationInfo &fedexInfo, bool isRemoval)
 Sends a message to update the assistant with the latest info for an entire federation. More...
 
virtual void sendNoFederationMsg ()
 Sends a message to tell the assistant that this rtiexec currently has no federations. More...
 
virtual void sendExecStateMsg (const std::list< DtAssistantFederationInfo > &execInfo)
 Sends a message to update the assistant with the latest info for an entire Exec (all fedex's). More...
 
virtual void sendFederateUpdateMsg (const DtAssistantFederateInfo &fedInfo, const MAKRti::DtString &fedexName, bool isRemoval)
 Sends a message to update the assistant with the latest info for a single federate. More...
 
virtual void sendFederationTimeStateMsg (const DtAssistantFederationInfo &fedexInfo)
 Send all time state information for the given federation. More...
 
virtual void sendSyncPtUpdateMsg (const MAKRti::DtString &syncPtName, const DtPendingAchievedPair &pendAchieve, const MAKRti::DtString &fedexName, bool isRemoval)
 Sends a message to update the assistant with the latest sync point info for a federation. More...
 
virtual void sendLogMsg (const DtLogEntryList &log, unsigned maxSize, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr(), int destId=-1)
 Send the log. Can optionally specify the destination assistant. More...
 
- Public Member Functions inherited from DtRtiAssistantForwarderClient
 DtRtiAssistantForwarderClient (DtAssistantComponentType type, int port=DtASSISTANT_DEFAULT_PORT)
 Constructor. More...
 
virtual ~DtRtiAssistantForwarderClient ()
 Destructor. More...
 
virtual void updateForwarderInfo (const MAKRti::DtInetAddr &tcpAddr, int tcpPort, const DtInetAddr &tcpNetworkIfAddr, const MAKRti::DtInetAddr &udpAddr, int udpPort, const DtInetAddr &udpNetworkIfAddr, bool fullCompliance, const MAKRti::DtInetAddr &additionalForwarder, int forwarderPort, bool useRoutesFile)
 Updates the forwarder connection info to be sent to the Assistant. More...
 
virtual void updateLogFile (const MAKRti::DtFilename &file)
 Updates the log file name used by this forwarder. More...
 
virtual void updateExecConfirmed (bool confirmed, bool fullyCompliant)
 Updates whether or not there is an rtiexec confirmed in order to be sent to the Assistant. More...
 
virtual void sendFullForwarderInfo (unsigned int numForwarderToForwarderConns, const std::vector< MAKRti::DtString > &forwarderIdentifiers, const std::vector< MAKRti::DtString > &forwarderConnectionNames, const std::vector< MAKRti::DtString > &forwarderConnectionHostNames, const std::vector< std::pair< MAKRti::DtInetAddr, 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. More...
 
virtual void sendWaitingForForwarders (bool isWaiting, const DtNeededFwConnMap &neededFws)
 Sends information regarding what forwarder connections we are currently waiting for. More...
 
- Public Member Functions inherited from DtRtiAssistantClient
 DtRtiAssistantClient (DtAssistantComponentType type, int port=DtASSISTANT_DEFAULT_PORT)
 Constructor. More...
 
virtual ~DtRtiAssistantClient ()
 Destructor. More...
 
virtual bool tick (unsigned int timeout=0)
 Do the actual message processing. More...
 
virtual bool isConnected ()
 Returns true if the socket is connected. More...
 
virtual bool isDisabled ()
 Returns true if the socket is disabled. More...
 
virtual void addMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
 Message Callbacks These callback functions operate on all of the connections. More...
 
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. More...
 
virtual void removeDisconnectCallback (DtAssistantDisconnectCb cb, void *usr)
 
virtual bool sendLRCConnQueryMsg (bool error, MAKRti::DtString &connectionName, bool &ridIsPreconfigured, MAKRti::DtString &ridConfig, MAKRti::DtInetAddr &tcpAddr, int &tcpPort, MAKRti::DtInetAddr &tcpIntf, MAKRti::DtInetAddr &udpAddr, int &udpPort, MAKRti::DtInetAddr &udpIntf, int &forwarderPort, bool &useRtiexec, bool &forceFullCompliance)
 Send a message querying for the connection parameters. More...
 
virtual bool sendForwardingComponentConnQueryMsg (bool error, MAKRti::DtString &connectionName, bool &ridIsPreconfigured, MAKRti::DtString &ridConfig, MAKRti::DtInetAddr &tcpAddr, int &tcpPort, MAKRti::DtInetAddr &tcpIntf, MAKRti::DtInetAddr &udpAddr, int &udpPort, MAKRti::DtInetAddr &udpIntf, MAKRti::DtInetAddr &forwarderToConnectTo, int &forwarderPort, bool &forceFullCompliance)
 Send a message querying for the rtiexec connection parameters. More...
 
virtual void sendLatencyTestMsg (const DtAssistantLatencyReportMsg &msg)
 Send a message to the assistant with latency test measurements. More...
 
virtual void sendLatencyTestStatusMsg (const DtAssistantTestMgrStatusMsg &msg)
 Send an updated latency test status message to the assistant. More...
 
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. More...
 
virtual void sendNotifyMsg (const MAKRti::DtString &text, DtNotifyLevelType notifyLevel)
 Send a message to display a pop up notification above the tray icon. More...
 
virtual void sendSignalTickedMsg ()
 Send a signal ticked message to the assistant. More...
 
virtual void sendDialogBoxMsg (const MAKRti::DtString &text, const MAKRti::DtString &advancedText)
 Send a message to display a dialog notification. More...
 
virtual void sendClose ()
 Send connection closed message to Assistant. More...
 
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. More...
 
virtual void setMsgFactory (DtAssistantMessageFactory *fact)
 Get/Set the message factory. More...
 
virtual DtAssistantMessageFactorymsgFactory () const
 
virtual void shutDownConnection ()
 AssistantClientOwner should call this function when it processes an assistantExitMsg. More...
 
virtual MAKRti::DtString getProcessName () const
 get the process name More...
 
virtual int getPID () const
 get the PID More...
 
virtual MAKRti::DtString getCommandArgs () const
 get the command args More...
 
bool testConnectionStatus ()
 test the connection More...
 
virtual int componentId () const
 Returns the component ID assigned by the assistant. More...
 

Protected Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from DtRtiAssistantClient
virtual bool initialize ()
 Attempts to connect to the RTI Assistant. More...
 
virtual DtAssistantConnectionStatus connectToAssistant ()
 Attempt to open a connection and handshake with the Assistant. More...
 
virtual DtAssistantConnectionStatus makeSingleConnectionAttempt ()
 
virtual bool startAssistant ()
 Attempt to start a new Assistant. More...
 
virtual bool readAndProcess (MAKRti::DtTime maxTime)
 Read and process any messages on the socket for up to the maxTime. More...
 
virtual bool sendMsg (const DtAssistantMsg &msg)
 Send a message to the RTI Assistant. More...
 
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. More...
 
virtual DtAssistantConnectionStatus sendConnectMsg ()
 Send basic component information to the Assistant for a new connection. More...
 
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. More...
 
virtual std::auto_ptr
< DtAssistantMsg
netRead (int *retCode) const
 Attempt to read a new message from the socket. More...
 
virtual bool sendLicQueryMsg (bool allowUnlicensed, bool &runUnlicensed, MAKRti::DtString &licServer)
 Send a message querying for the license server. More...
 
- Static Protected Member Functions inherited from DtRtiAssistantClient
static void processRespMsg (const DtAssistantMsg &respMsg, void *usr)
 Response message callback. More...
 
static void processNtfyLvlUpdateMsg (const DtAssistantNtfyLvlUpdateMsg &updateMsg, void *usr)
 Notify level update message callback. More...
 
static void processAssistantExitMsg (const DtAssistantExitMsg &inter, void *usr)
 Process the assistant exit message. The assistant is commanding us to exit. More...
 
- 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. More...
 
static const MAKRti::DtTime theSleepBetweenAssistantConnectAttempts
 When attempting to connect, this is the number of seconds. More...
 
static const MAKRti::DtInetAddr theFirstHostInetAddr
 The first InetAddr when the federate was launched. More...
 

Detailed Description

The client connection to the RTI Assistant for the rtiexec.

DtRtiAssistantExecClient manages the client connection of the rtiexec to the RTI Assistant. Provides routines to create and send messages to the Assistant.

Constructor & Destructor Documentation

DtRtiAssistantExecClient::DtRtiAssistantExecClient ( int  port = 0)

Constructor.

virtual DtRtiAssistantExecClient::~DtRtiAssistantExecClient ( )
virtual

Destructor.

Member Function Documentation

virtual void DtRtiAssistantExecClient::sendClientInfo ( )
virtual

Send forwarder address and port, log file info, and license server to the assistant.

Reimplemented from DtRtiAssistantForwarderClient.

virtual void DtRtiAssistantExecClient::sendExecStateMsg ( const std::list< DtAssistantFederationInfo > &  execInfo)
virtual

Sends a message to update the assistant with the latest info for an entire Exec (all fedex's).

virtual void DtRtiAssistantExecClient::sendFederateUpdateMsg ( const DtAssistantFederateInfo fedInfo,
const MAKRti::DtString &  fedexName,
bool  isRemoval 
)
virtual

Sends a message to update the assistant with the latest info for a single federate.

The given federate is to be removed if the isRemoval flag is set. Does not send time state information.

virtual void DtRtiAssistantExecClient::sendFederationStateMsg ( const DtAssistantFederationInfo fedexInfo,
bool  isRemoval 
)
virtual

Sends a message to update the assistant with the latest info for an entire federation.

The given federation is to be removed if the isRemoval flag is set.

virtual void DtRtiAssistantExecClient::sendFederationTimeStateMsg ( const DtAssistantFederationInfo fedexInfo)
virtual

Send all time state information for the given federation.

virtual void DtRtiAssistantExecClient::sendLogMsg ( const DtLogEntryList log,
unsigned  maxSize,
const MAKRti::DtInetAddr &  destAddr = MAKRti::DtInetAddr(),
int  destId = -1 
)
virtual

Send the log. Can optionally specify the destination assistant.

virtual void DtRtiAssistantExecClient::sendNoFederationMsg ( )
virtual

Sends a message to tell the assistant that this rtiexec currently has no federations.

virtual void DtRtiAssistantExecClient::sendSyncPtUpdateMsg ( const MAKRti::DtString &  syncPtName,
const DtPendingAchievedPair pendAchieve,
const MAKRti::DtString &  fedexName,
bool  isRemoval 
)
virtual

Sends a message to update the assistant with the latest sync point info for a federation.

The given sync point is to be removed if the isRemoval flag is set.

virtual void DtRtiAssistantExecClient::updateIsConnected ( bool  connected)
virtual

Updates the flag indicating that the rtiexec is conencted to the forwarder.

Note that this method does not send the message to the assistant, just stores the value to be sent when sendLrcInfo is called.

virtual void DtRtiAssistantExecClient::updateLicenseServer ( const MAKRti::DtString &  server)
virtual

Updates the license server used by this rtiexec.

Used by the Assistant to help other components locate a license. 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

int DtRtiAssistantExecClient::myIsConnected
protected

Indicates if the rtiexec is connected to the forwarder.

MAKRti::DtString DtRtiAssistantExecClient::myLicServer
protected

The license server used by this LRC.


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

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)