MAK RTIspy API Documentation for HLA 1516
List of all members | Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions
DtRtiAssistantPeer Class Reference

DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using the same multicast address. More...

+ Collaboration diagram for DtRtiAssistantPeer:

Classes

struct  DtPeerMsgStats

Public Member Functions

 DtRtiAssistantPeer (int id, int port=DtASSISTANT_DEFAULT_PORT, const MAKRti::DtInetAddr &ipv4Addr=DtASSISTANT_DEFAULT_IPV4_ADDR, const MAKRti::DtInetAddr &ipv6Addr=DtASSISTANT_DEFAULT_IPV6_ADDR, int ttl=DtASSISTANT_DEFAULT_TTL)
 Constructor.
virtual ~DtRtiAssistantPeer ()
 Destructor.
virtual bool tick (unsigned int timeout=0)
 Do the actual message processing.
virtual void setMsgFactory (DtAssistantMessageFactory *fact)
 Set the message factory.
virtual DtAssistantMessageFactorymsgFactory () const
 Get the message factory.
virtual void sendQueryMsg ()
 Sends a query message to the other Assistants for their information.
virtual void sendInfoMsg (const DtRtiConnectionAndConfiguration &connsAndConfigs, unsigned memoryPeriod, bool acceptRemoteCommands, bool removal)
 Sends the information from this Assistant to the other Assistants.
virtual void sendLightweightInfoMsg (const DtRtiConnectionAndConfiguration &connsAndConfigs, unsigned memoryPeriod)
 Sends the local lightweight connection information from this Assistant to the other Assistants.
virtual void sendLicServerInfoMsg (const DtLicServerSet &licServers, bool removal)
 Sends the information from this Assistant to the other Assistants.
virtual void sendStartRtiexecMsg (const DtRtiConnectionInfoDataPair &conn, const DtRtiConnectionConfigurationInfo &config)
 Sends a message to another Assistant to start an rtiexec with the given connection parameters.
virtual void sendObserveFederationsMsg (const DtRtiConnectionInfo &conn, bool observe, const DtAssistantInfo &assistant=DtAssistantInfo(), int compId=-1)
 Sends a message to another Assistant to either begin or stop observing the federations of the given connection.
virtual void sendObserveRtiExecLogMsg (const DtAssistantInfo &assistant, int compId, bool observe)
 Sends a message to another Assistant to either begin or stop observing the given rtiExec printer connection.
virtual void sendObserveRtiexecRspMsg (const MAKRti::DtInetAddr &webSpyAddr, int webSpyPort, DtNotifyLevelType notifyLevel, int compId, const DtAssistantInfo &destination)
 Sends an observe response message to a remote Assistant observing a local rtiexec.
virtual void sendObserveRtiForwarderMsg (const DtRtiConnectionInfo &conn, bool observe, const DtAssistantInfo &assistant, int compId)
 Sends a message to another Assistant to either begin or stop observing the RTI Forwarder on the given connection.
virtual void sendFederationStateMsg (const DtRtiConnectionInfoDataPair &conn, const DtAssistantFederationInfo &federation, bool isRemoval)
 Sends a message to the other Assistants with the state of the given federation.
virtual void sendNoFederationMsg (const DtRtiConnectionInfoDataPair &conn)
 Sends a message to the other Assistants informing them that a local rtiexec has no federations.
virtual void sendFederateResignMsg (const DtAssistantInfo &assistant, int compId, int federationHdl, int federateHdl)
 Sends a force federate resign message to a remote Assistant to be forwarded to a remote rtiexec.
virtual void sendFederationDestroyMsg (const DtAssistantInfo &assistant, int compId, int federationHdl)
 Sends a force federation destroy message to a remote Assistant to be forwarded to a remote rtiexec.
virtual void sendRidParamsRequestMsg (const DtAssistantInfo &assistant, int compId)
 Sends a message to a remote Assistant to get the RID parameters of one of its rtiexecs.
virtual void sendLogRequestMsg (const DtAssistantInfo &assistant, int compId, unsigned maxLogSize)
 Sends a message to a remote Assistant to get the log, or at least the most recent entries up to a size of maxLogSize bytes, of one of its rtiexecs.
virtual bool sendLatencyTestRequestMsg (const DtAssistantInfo &assistant, int compId, int federationHdl, int federateHdl, bool runTest, bool continuous, bool shouldHalt, bool observing, unsigned int interactionPeriod, unsigned int numInteractions, unsigned int payloadBytes)
 Sends a latency test request message to a remote Assistant to be forwarded to a remote rtiexec.
virtual void sendNetworkTestEnableMsg (const DtAssistantInfo &assistant, int compId, int federationHdl, bool enable)
 Sends a message enabling or disabling network testing for the given federation.
virtual void sendRtiexecExitMsg (const DtAssistantInfo &assistant, int compId)
 Sends a message to a remote Assistant asking it to shutdown one of its local rtiexecs.
virtual void sendNotifyObserveMsg (bool isObserving)
 Sends a message to other assistants letting them know that we are observing notification messages.
virtual void sendNotifyMsg (const MAKRti::DtString &text, DtNotifyLevelType notifyLevel, const MAKRti::DtString &sourceName)
 Sends a notification message to other assistants.
virtual void sendRemovalMsg ()
 Sends a removal message to the other Assistants to inform them that this Assistant should be removed from their lists of known Assistants.
virtual void sendFederateInfoReqMsg (const DtAssistantInfo &astnt, const DtRtiConnectionInfo &conn, const MAKRti::DtString &federation=MAKRti::DtString::nullString(), unsigned federateHandle=0)
 Sends a message to the other Assistants which queries for federate info.
virtual void sendFederateInfoRespMsg (const DtRtiConnectionInfo &conn, std::vector< const DtAssistantFederateInfo * > federates)
 Sends a message to the other Assistants in response to a federate info request with information on one or more matching federates.
virtual void sendNetStatsObservationRequestMsg (const DtAssistantInfo &astnt, DtAssistantObservationType observationType, int compId, bool observe=false, unsigned int interval=0)
 Sends a Observation Request to an assistant.
virtual void sendNetStatsObservationResponseMsg (const DtAssistantInfo &astnt, DtAssistantObservationType observationType, int compId, bool observe)
virtual void sendNetStatsStringUpdateReqMsg (const DtAssistantInfo &assistant, int compId, DtAssistantHandleType handletype, const std::set< DtU32 > &handles)
virtual void sendNetStatsStringUpdate (const DtAssistantInfo &assistant, int compId, DtAssistantHandleType handletype, const std::vector< DtU32 > &objectInstanceHandles, const std::vector< MAKRti::DtString > &objectInstanceNames)
virtual void forwardNetStatsUpdate (const DtAssistantMsg &msg, const std::set< DtAssistantInfo > &observers)
virtual void sendFedDisconnectNetStatsObsRespMsg (DtAssistantObservationType observationType, int compId, const std::set< DtAssistantInfo > &observers)
virtual void sendNetStatsInitStateRequestMsg (const DtAssistantInfo &astnt, DtAssistantObservationType observationType, int compId)
virtual void sendFomTreeData (const DtAssistantInfo &astnt, int compId, const std::vector< MAKRti::DtU32 > &objectClassHandles, const std::vector< MAKRti::DtU32 > &parentObjectClassHandles, const std::vector< MAKRti::DtString > &objectClassNames, const std::vector< MAKRti::DtU32 > &interactionClassHandles, const std::vector< MAKRti::DtU32 > &parentInteractionClassHandles, const std::vector< MAKRti::DtString > &interactionClassNames)
virtual void sendNetStatsAttrStringUpdate (const DtAssistantInfo &astnt, int compId, const std::vector< MAKRti::DtU32 > &objectClassHandles, const std::vector< MAKRti::DtU32 > &attributeHandles, const std::vector< MAKRti::DtString > &attributeNames, const std::vector< MAKRti::DtU32 > &parentClassHandles, const std::vector< MAKRti::DtU32 > &totalObjHandles)
virtual void sendNetStatsParamStringUpdate (const DtAssistantInfo &astnt, int compId, const std::vector< MAKRti::DtU32 > &interClassHandles, const std::vector< MAKRti::DtU32 > &parameterHandles, const std::vector< MAKRti::DtString > &parameterNames, const std::vector< MAKRti::DtU32 > &parentInterHandles, const std::vector< MAKRti::DtU32 > &totalInterHandles)
virtual void sendNetStatsAttrParamStringUpdate (const DtAssistantInfo &astnt, int compId, const std::vector< MAKRti::DtU32 > &objectClassHandles, const std::vector< MAKRti::DtU32 > &attributeHandles, const std::vector< MAKRti::DtString > &attributeNames, const std::vector< MAKRti::DtU32 > &parentClassHandles, const std::vector< MAKRti::DtU32 > &totalObjHandles, DtAssistantHandleType objInterType, DtAssistantHandleType attrParamType, DtAssistantHandleType parentClassType)
virtual void sendNetStatsFomAttrParamUpdate (const DtAssistantInfo &astnt, int compId, DtAssistantHandleType handleType, bool isInit, const std::vector< MAKRti::DtU32 > &objectClassHandles, const std::vector< MAKRti::DtU32 > &attributeHandles, const std::vector< bool > &attributePub, const std::vector< bool > &attributeSub, const std::vector< DtTransportType > &attributeTransport, const std::vector< DtOrderType > &attributeOrder, const std::vector< bool > &objectPub, const std::vector< bool > &objectSub, const std::vector< MAKRti::DtU32 > &objPubSubHandles)
virtual void forwardMsg (const DtAssistantMsg &msg, int astntCompId, const DtAssistantInfo &dest=DtAssistantInfo())
 Forwards the given message to the other Assistants over the given interface.
virtual int port () const
 Returns the Assistant peer port.
virtual MAKRti::DtInetAddr ipv4Address () const
 Returns the Assistant IPv4 peer address.
virtual MAKRti::DtInetAddr ipv6Address () const
 Returns the Assistant IPv6 peer address.
virtual int id () const
 Returns the Assistant peer ID.
virtual const MAKRti::DtInetAddr & currentNetworkInterfaceAddr () const
 Returns the network interface address of the current socket being processed.
virtual void getMsgStats (unsigned &totalRecv, double &recvPerSecOverall, double &recvPerSecCurr, unsigned &totalProc, double &procPerSecOverall, double &procPerSecCurr, unsigned &totalSent, double &sentPerSecOverall, double &sentPerSecCurr)
 Get message statistics.
virtual DtU32 maxMsgSize () const
 Gets the maximum message size.
void sendMsgToAssistant (const DtAssistantInfo &ifAddr, DtAssistantMsg &msg)
 Sends the message to the specified Assistant.
Callback addition and removal methods
virtual void addMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
 Adds/removes callback for a particular message kind.
virtual void removeMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr)
 Adds/removes callback for a particular message kind.
virtual void addInterfaceFoundCallback (DtInterfaceFoundCb cb, void *usr)
 Adds a callback for notification for the discovery of a new network interface on the local machine.
virtual void removeInterfaceFoundCallback (DtInterfaceFoundCb cb, void *usr)
 Adds/removes callback for a particular message kind.

Public Attributes

DtCbInfoStruct(DtInterfaceFoundCb)
protected MAKRti::DtInetAddr 
myIpv4Addr
 The IPv4 multicast or broadcast address used by the assistant peer.
MAKRti::DtInetAddr myIpv6Addr
 The IPv6 multicast address used by the assistant peer.
int myTtl
 The TTL (Time To Live) for Assistant communication.
int myId
 A unique ID assigned to this assistant peer.
std::map< MAKRti::DtInetAddr,
DtUdpMsgSocket * > 
mySockets
 A map of network interface addresses to the sockets used on those interfaces to communicate with other Assistants.
std::map< MAKRti::DtInetAddr,
DtUdpMsgSocket * >::iterator 
mySocketIter
 Iterator of the current socket being processed or the next one that will be processed.
MAKRti::DtInetAddr myCurrNetworkInterfaceAddr
 The address of the current network interface being read from.
DtAssistantMsgCbMgr myMsgCbMgr
 Message callback manager.
DtAssistantMessageFactorymyMessageFactory
 The message factory.
DtAssistantDfltMsgFactory myDefaultMessageFactory
 Default message factory.
DtClock myClock
 Clock for timeouts and periodic update messages.
DtTime myNextCheckInterfacesTime
 Time to recheck the interfaces that are available.
DtTime myCheckInterfacesInterval
 Interval at which periodic interface checking should be performed.
DtTime myBeginProcessingTime
 The time when this assistant began processing messages.
DtTime myNextStatsTime
 The next time to compute message statistics.
DtTime myLastStatsTime
 The last time message statistics were computed.
DtPeerMsgStats myReceivedMsgStats
 Message statistics for messages received from other assistants.
DtPeerMsgStats myProcessedMsgStats
 Message statistics for messages processed from other assistants.
DtPeerMsgStats mySentMsgStats
 Message statistics for messages sent to other assistants.
std::list< DtInterfaceFoundCbInfo > myInterfaceFoundCallbacks
 The list of network interface discovery callbacks.
bool myUsingIpv4
 Indicates whether any IPv4 sockets are currently in use.
bool myUsingIpv6
 Indicates whether any IPv4 sockets are currently in use.

Static Public Attributes

static const DtTime theStatisticsInterval = 60
 The interval at which message statistics are calculated.

Protected Member Functions

bool needsProcessing (const DtAssistantMsg &msg)
 Returns true if the message should be processed by this assistant.
bool addSocketsForInterfaces ()
 Adds a new socket for each new interface.
bool readAndProcess (DtTime maxTime)
 Read and process the messages on the socket for up to the maximum time.
void calculateMsgStatistics ()
 Calculate message statistics.
void sendMsgOnInterface (const MAKRti::DtInetAddr &ifAddr, DtAssistantMsg &msg)
 Sends the message on the specified interface.
void sendMsg (std::map< MAKRti::DtInetAddr, DtUdpMsgSocket * >::iterator sockIter, DtAssistantMsg &msg)
 Sends the message to the other Assistants on the given socket.
void sendMsgToAll (DtAssistantMsg &msg)
 Sends the message to the other Assistants on all sockets.
std::auto_ptr< DtAssistantMsgnetRead (DtUdpMsgSocket *sock, int *retCode) const
 Read a message from the socket.

Detailed Description

DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using the same multicast address.

Constructor & Destructor Documentation

DtRtiAssistantPeer::DtRtiAssistantPeer ( int  id,
int  port = DtASSISTANT_DEFAULT_PORT,
const MAKRti::DtInetAddr &  ipv4Addr = DtASSISTANT_DEFAULT_IPV4_ADDR,
const MAKRti::DtInetAddr &  ipv6Addr = DtASSISTANT_DEFAULT_IPV6_ADDR,
int  ttl = DtASSISTANT_DEFAULT_TTL 
)
DtRtiAssistantPeer::~DtRtiAssistantPeer ( )
virtual

Destructor.

References mySockets.

Member Function Documentation

void DtRtiAssistantPeer::addInterfaceFoundCallback ( DtInterfaceFoundCb  cb,
void *  usr 
)
virtual

Adds a callback for notification for the discovery of a new network interface on the local machine.

References myInterfaceFoundCallbacks.

void DtRtiAssistantPeer::addMsgCallback ( DtAssistantMsgKind  msgKind,
DtAssistantMsgCbMgr::DtCallbackFcn  fcn,
void *  usr 
)
virtual
bool DtRtiAssistantPeer::addSocketsForInterfaces ( )
protected
void DtRtiAssistantPeer::calculateMsgStatistics ( )
protected
const MAKRti::DtInetAddr & DtRtiAssistantPeer::currentNetworkInterfaceAddr ( ) const
virtual

Returns the network interface address of the current socket being processed.

References myCurrNetworkInterfaceAddr.

void DtRtiAssistantPeer::forwardMsg ( const DtAssistantMsg msg,
int  astntCompId,
const DtAssistantInfo dest = DtAssistantInfo() 
)
virtual

Forwards the given message to the other Assistants over the given interface.

The local assistant component ID will be included in the message to indicate the original message sender. Optional parameter specifies a specific assistant to send the message to.

References DtAssistantMsg::clone(), and sendMsgToAssistant().

void DtRtiAssistantPeer::forwardNetStatsUpdate ( const DtAssistantMsg msg,
const std::set< DtAssistantInfo > &  observers 
)
virtual
void DtRtiAssistantPeer::getMsgStats ( unsigned &  totalRecv,
double &  recvPerSecOverall,
double &  recvPerSecCurr,
unsigned &  totalProc,
double &  procPerSecOverall,
double &  procPerSecCurr,
unsigned &  totalSent,
double &  sentPerSecOverall,
double &  sentPerSecCurr 
)
virtual
int DtRtiAssistantPeer::id ( ) const
virtual

Returns the Assistant peer ID.

References myId.

MAKRti::DtInetAddr DtRtiAssistantPeer::ipv4Address ( ) const
virtual

Returns the Assistant IPv4 peer address.

Returns inaddr_any address if IPv4 is not in use.

References myIpv4Addr, and myUsingIpv4.

MAKRti::DtInetAddr DtRtiAssistantPeer::ipv6Address ( ) const
virtual

Returns the Assistant IPv6 peer address.

Returns in6addr_any address if IPv6 is not in use.

References myIpv6Addr, and myUsingIpv6.

DtU32 DtRtiAssistantPeer::maxMsgSize ( ) const
virtual

Gets the maximum message size.

References mySockets.

DtAssistantMessageFactory * DtRtiAssistantPeer::msgFactory ( ) const
virtual
bool DtRtiAssistantPeer::needsProcessing ( const DtAssistantMsg msg)
protected

Returns true if the message should be processed by this assistant.

Filters out messages that were either sent by the local assistant or are specifically targeted to another assistant.

References DtAssistantMsg::destAddr(), DtAssistantMsg::destId(), DtASSISTANT_DEFAULT_DEST_ID, myId, mySockets, DtAssistantMsg::sourceAddr(), and DtAssistantMsg::sourceId().

Referenced by readAndProcess().

std::auto_ptr< DtAssistantMsg > DtRtiAssistantPeer::netRead ( DtUdpMsgSocket sock,
int *  retCode 
) const
protected
int DtRtiAssistantPeer::port ( ) const
virtual

Returns the Assistant peer port.

bool DtRtiAssistantPeer::readAndProcess ( DtTime  maxTime)
protected
void DtRtiAssistantPeer::removeInterfaceFoundCallback ( DtInterfaceFoundCb  cb,
void *  usr 
)
virtual

Adds/removes callback for a particular message kind.

References myInterfaceFoundCallbacks.

void DtRtiAssistantPeer::removeMsgCallback ( DtAssistantMsgKind  msgKind,
DtAssistantMsgCbMgr::DtCallbackFcn  fcn,
void *  usr 
)
virtual
void DtRtiAssistantPeer::sendFedDisconnectNetStatsObsRespMsg ( DtAssistantObservationType  observationType,
int  compId,
const std::set< DtAssistantInfo > &  observers 
)
virtual
void DtRtiAssistantPeer::sendFederateInfoReqMsg ( const DtAssistantInfo astnt,
const DtRtiConnectionInfo conn,
const MAKRti::DtString &  federation = MAKRti::DtString::nullString(),
unsigned  federateHandle = 0 
)
virtual
void DtRtiAssistantPeer::sendFederateInfoRespMsg ( const DtRtiConnectionInfo conn,
std::vector< const DtAssistantFederateInfo * >  federates 
)
virtual
void DtRtiAssistantPeer::sendFederateResignMsg ( const DtAssistantInfo assistant,
int  compId,
int  federationHdl,
int  federateHdl 
)
virtual
void DtRtiAssistantPeer::sendFederationDestroyMsg ( const DtAssistantInfo assistant,
int  compId,
int  federationHdl 
)
virtual

Sends a force federation destroy message to a remote Assistant to be forwarded to a remote rtiexec.

References DtAssistantDeleteFederationMsgKind, msgFactory(), sendMsgToAssistant(), DtAssistantMsg::setCompId(), and DtAssistantDeleteFederationMsg::setFederationHandle().

void DtRtiAssistantPeer::sendFederationStateMsg ( const DtRtiConnectionInfoDataPair conn,
const DtAssistantFederationInfo federation,
bool  isRemoval 
)
virtual
void DtRtiAssistantPeer::sendFomTreeData ( const DtAssistantInfo astnt,
int  compId,
const std::vector< MAKRti::DtU32 > &  objectClassHandles,
const std::vector< MAKRti::DtU32 > &  parentObjectClassHandles,
const std::vector< MAKRti::DtString > &  objectClassNames,
const std::vector< MAKRti::DtU32 > &  interactionClassHandles,
const std::vector< MAKRti::DtU32 > &  parentInteractionClassHandles,
const std::vector< MAKRti::DtString > &  interactionClassNames 
)
virtual
void DtRtiAssistantPeer::sendInfoMsg ( const DtRtiConnectionAndConfiguration connsAndConfigs,
unsigned  memoryPeriod,
bool  acceptRemoteCommands,
bool  removal 
)
virtual
bool DtRtiAssistantPeer::sendLatencyTestRequestMsg ( const DtAssistantInfo assistant,
int  compId,
int  federationHdl,
int  federateHdl,
bool  runTest,
bool  continuous,
bool  shouldHalt,
bool  observing,
unsigned int  interactionPeriod,
unsigned int  numInteractions,
unsigned int  payloadBytes 
)
virtual
void DtRtiAssistantPeer::sendLicServerInfoMsg ( const DtLicServerSet licServers,
bool  removal 
)
virtual

Sends the information from this Assistant to the other Assistants.

This message includes rtiexecs, forwarders, and licenses

References DtAssistantLicServerInfoMsgKind, msgFactory(), sendMsgToAll(), DtAssistantLicServerInfoMsg::setLicenseServers(), and DtAssistantLicServerInfoMsg::setRemoval().

void DtRtiAssistantPeer::sendLightweightInfoMsg ( const DtRtiConnectionAndConfiguration connsAndConfigs,
unsigned  memoryPeriod 
)
virtual
void DtRtiAssistantPeer::sendLogRequestMsg ( const DtAssistantInfo assistant,
int  compId,
unsigned  maxLogSize 
)
virtual

Sends a message to a remote Assistant to get the log, or at least the most recent entries up to a size of maxLogSize bytes, of one of its rtiexecs.

References DtAssistantLogRequestMsgKind, msgFactory(), sendMsgToAssistant(), DtAssistantMsg::setCompId(), and DtAssistantLogRequestMsg::setMaxLogSize().

void DtRtiAssistantPeer::sendMsg ( std::map< MAKRti::DtInetAddr, DtUdpMsgSocket * >::iterator  sockIter,
DtAssistantMsg msg 
)
protected
void DtRtiAssistantPeer::sendMsgOnInterface ( const MAKRti::DtInetAddr &  ifAddr,
DtAssistantMsg msg 
)
protected

Sends the message on the specified interface.

If interface is not found, sends to all interfaces.

References mySockets, sendMsg(), and sendMsgToAll().

Referenced by forwardNetStatsUpdate(), sendFedDisconnectNetStatsObsRespMsg(), sendFederateInfoRespMsg(), sendFederationStateMsg(), sendMsgToAssistant(), sendNoFederationMsg(), sendObserveFederationsMsg(), and sendStartRtiexecMsg().

void DtRtiAssistantPeer::sendMsgToAll ( DtAssistantMsg msg)
protected

Sends the message to the other Assistants on all sockets.

References mySockets, and sendMsg().

Referenced by sendLicServerInfoMsg(), sendMsgOnInterface(), sendMsgToAssistant(), sendNotifyMsg(), sendNotifyObserveMsg(), sendQueryMsg(), and sendRemovalMsg().

void DtRtiAssistantPeer::sendMsgToAssistant ( const DtAssistantInfo ifAddr,
DtAssistantMsg msg 
)
void DtRtiAssistantPeer::sendNetStatsAttrParamStringUpdate ( const DtAssistantInfo astnt,
int  compId,
const std::vector< MAKRti::DtU32 > &  objectClassHandles,
const std::vector< MAKRti::DtU32 > &  attributeHandles,
const std::vector< MAKRti::DtString > &  attributeNames,
const std::vector< MAKRti::DtU32 > &  parentClassHandles,
const std::vector< MAKRti::DtU32 > &  totalObjHandles,
DtAssistantHandleType  objInterType,
DtAssistantHandleType  attrParamType,
DtAssistantHandleType  parentClassType 
)
virtual
void DtRtiAssistantPeer::sendNetStatsAttrStringUpdate ( const DtAssistantInfo astnt,
int  compId,
const std::vector< MAKRti::DtU32 > &  objectClassHandles,
const std::vector< MAKRti::DtU32 > &  attributeHandles,
const std::vector< MAKRti::DtString > &  attributeNames,
const std::vector< MAKRti::DtU32 > &  parentClassHandles,
const std::vector< MAKRti::DtU32 > &  totalObjHandles 
)
virtual
void DtRtiAssistantPeer::sendNetStatsFomAttrParamUpdate ( const DtAssistantInfo astnt,
int  compId,
DtAssistantHandleType  handleType,
bool  isInit,
const std::vector< MAKRti::DtU32 > &  objectClassHandles,
const std::vector< MAKRti::DtU32 > &  attributeHandles,
const std::vector< bool > &  attributePub,
const std::vector< bool > &  attributeSub,
const std::vector< DtTransportType > &  attributeTransport,
const std::vector< DtOrderType > &  attributeOrder,
const std::vector< bool > &  objectPub,
const std::vector< bool > &  objectSub,
const std::vector< MAKRti::DtU32 > &  objPubSubHandles 
)
virtual
void DtRtiAssistantPeer::sendNetStatsInitStateRequestMsg ( const DtAssistantInfo astnt,
DtAssistantObservationType  observationType,
int  compId 
)
virtual
void DtRtiAssistantPeer::sendNetStatsObservationRequestMsg ( const DtAssistantInfo astnt,
DtAssistantObservationType  observationType,
int  compId,
bool  observe = false,
unsigned int  interval = 0 
)
virtual

Sends a Observation Request to an assistant.

It will either request that it observe and interval the federate should send, or tell the federate not observing.

References DtAssistantNetStatsObserveReqMsgKind, msgFactory(), sendMsgToAssistant(), and DtAssistantMsg::setCompId().

void DtRtiAssistantPeer::sendNetStatsObservationResponseMsg ( const DtAssistantInfo astnt,
DtAssistantObservationType  observationType,
int  compId,
bool  observe 
)
virtual
void DtRtiAssistantPeer::sendNetStatsParamStringUpdate ( const DtAssistantInfo astnt,
int  compId,
const std::vector< MAKRti::DtU32 > &  interClassHandles,
const std::vector< MAKRti::DtU32 > &  parameterHandles,
const std::vector< MAKRti::DtString > &  parameterNames,
const std::vector< MAKRti::DtU32 > &  parentInterHandles,
const std::vector< MAKRti::DtU32 > &  totalInterHandles 
)
virtual
void DtRtiAssistantPeer::sendNetStatsStringUpdate ( const DtAssistantInfo assistant,
int  compId,
DtAssistantHandleType  handletype,
const std::vector< DtU32 > &  objectInstanceHandles,
const std::vector< MAKRti::DtString > &  objectInstanceNames 
)
virtual
void DtRtiAssistantPeer::sendNetStatsStringUpdateReqMsg ( const DtAssistantInfo assistant,
int  compId,
DtAssistantHandleType  handletype,
const std::set< DtU32 > &  handles 
)
virtual
void DtRtiAssistantPeer::sendNetworkTestEnableMsg ( const DtAssistantInfo assistant,
int  compId,
int  federationHdl,
bool  enable 
)
virtual
void DtRtiAssistantPeer::sendNoFederationMsg ( const DtRtiConnectionInfoDataPair conn)
virtual
void DtRtiAssistantPeer::sendNotifyMsg ( const MAKRti::DtString &  text,
DtNotifyLevelType  notifyLevel,
const MAKRti::DtString &  sourceName 
)
virtual
void DtRtiAssistantPeer::sendNotifyObserveMsg ( bool  isObserving)
virtual

Sends a message to other assistants letting them know that we are observing notification messages.

References DtAssistantNotifyObserveMsgKind, msgFactory(), sendMsgToAll(), and DtAssistantNotifyObserveMsg::setIsObserved().

void DtRtiAssistantPeer::sendObserveFederationsMsg ( const DtRtiConnectionInfo conn,
bool  observe,
const DtAssistantInfo assistant = DtAssistantInfo(),
int  compId = -1 
)
virtual
void DtRtiAssistantPeer::sendObserveRtiExecLogMsg ( const DtAssistantInfo assistant,
int  compId,
bool  observe 
)
virtual
void DtRtiAssistantPeer::sendObserveRtiexecRspMsg ( const MAKRti::DtInetAddr &  webSpyAddr,
int  webSpyPort,
DtNotifyLevelType  notifyLevel,
int  compId,
const DtAssistantInfo destination 
)
virtual
void DtRtiAssistantPeer::sendObserveRtiForwarderMsg ( const DtRtiConnectionInfo conn,
bool  observe,
const DtAssistantInfo assistant,
int  compId 
)
virtual
void DtRtiAssistantPeer::sendQueryMsg ( )
virtual

Sends a query message to the other Assistants for their information.

References DtAssistantQueryMsgKind, msgFactory(), and sendMsgToAll().

void DtRtiAssistantPeer::sendRemovalMsg ( )
virtual

Sends a removal message to the other Assistants to inform them that this Assistant should be removed from their lists of known Assistants.

References DtAssistantRemovalMsgKind, msgFactory(), and sendMsgToAll().

void DtRtiAssistantPeer::sendRidParamsRequestMsg ( const DtAssistantInfo assistant,
int  compId 
)
virtual

Sends a message to a remote Assistant to get the RID parameters of one of its rtiexecs.

References DtAssistantRidParamsMsgKind, msgFactory(), sendMsgToAssistant(), DtAssistantMsg::setCompId(), and DtAssistantRidParamsMsg::setIsRequest().

void DtRtiAssistantPeer::sendRtiexecExitMsg ( const DtAssistantInfo assistant,
int  compId 
)
virtual

Sends a message to a remote Assistant asking it to shutdown one of its local rtiexecs.

References DtAssistantExitMsgKind, msgFactory(), sendMsgToAssistant(), and DtAssistantMsg::setCompId().

void DtRtiAssistantPeer::sendStartRtiexecMsg ( const DtRtiConnectionInfoDataPair conn,
const DtRtiConnectionConfigurationInfo config 
)
virtual
void DtRtiAssistantPeer::setMsgFactory ( DtAssistantMessageFactory fact)
virtual

Set the message factory.

References myMessageFactory.

bool DtRtiAssistantPeer::tick ( unsigned int  timeout = 0)
virtual

Member Data Documentation

DtTime DtRtiAssistantPeer::myBeginProcessingTime

The time when this assistant began processing messages.

Referenced by calculateMsgStatistics(), and tick().

DtTime DtRtiAssistantPeer::myCheckInterfacesInterval

Interval at which periodic interface checking should be performed.

Referenced by DtRtiAssistantPeer(), and tick().

DtClock DtRtiAssistantPeer::myClock

Clock for timeouts and periodic update messages.

Referenced by calculateMsgStatistics(), DtRtiAssistantPeer(), readAndProcess(), and tick().

MAKRti::DtInetAddr DtRtiAssistantPeer::myCurrNetworkInterfaceAddr

The address of the current network interface being read from.

Will have an invalid value if no messages are currently being processed.

Referenced by currentNetworkInterfaceAddr(), and readAndProcess().

DtAssistantDfltMsgFactory DtRtiAssistantPeer::myDefaultMessageFactory

Default message factory.

int DtRtiAssistantPeer::myId

A unique ID assigned to this assistant peer.

This ID, along with the IP address of this machine, should uniquely identify this Assistant.

Referenced by DtRtiAssistantPeer(), id(), needsProcessing(), and sendMsg().

std::list<DtInterfaceFoundCbInfo> DtRtiAssistantPeer::myInterfaceFoundCallbacks

The list of network interface discovery callbacks.

Referenced by addInterfaceFoundCallback(), removeInterfaceFoundCallback(), and tick().

DtCbInfoStruct (DtInterfaceFoundCb) protected MAKRti::DtInetAddr DtRtiAssistantPeer::myIpv4Addr

The IPv4 multicast or broadcast address used by the assistant peer.

Referenced by addSocketsForInterfaces(), and ipv4Address().

MAKRti::DtInetAddr DtRtiAssistantPeer::myIpv6Addr

The IPv6 multicast address used by the assistant peer.

Referenced by addSocketsForInterfaces(), and ipv6Address().

DtTime DtRtiAssistantPeer::myLastStatsTime

The last time message statistics were computed.

Referenced by calculateMsgStatistics(), and tick().

DtAssistantMessageFactory* DtRtiAssistantPeer::myMessageFactory

The message factory.

Referenced by msgFactory(), and setMsgFactory().

DtAssistantMsgCbMgr DtRtiAssistantPeer::myMsgCbMgr

Message callback manager.

Referenced by addMsgCallback(), readAndProcess(), and removeMsgCallback().

DtTime DtRtiAssistantPeer::myNextCheckInterfacesTime

Time to recheck the interfaces that are available.

Referenced by DtRtiAssistantPeer(), and tick().

DtTime DtRtiAssistantPeer::myNextStatsTime

The next time to compute message statistics.

Referenced by calculateMsgStatistics(), and tick().

DtPeerMsgStats DtRtiAssistantPeer::myProcessedMsgStats

Message statistics for messages processed from other assistants.

Referenced by calculateMsgStatistics(), getMsgStats(), and readAndProcess().

DtPeerMsgStats DtRtiAssistantPeer::myReceivedMsgStats

Message statistics for messages received from other assistants.

Referenced by calculateMsgStatistics(), getMsgStats(), and readAndProcess().

DtPeerMsgStats DtRtiAssistantPeer::mySentMsgStats

Message statistics for messages sent to other assistants.

Referenced by calculateMsgStatistics(), getMsgStats(), and sendMsg().

std::map< MAKRti::DtInetAddr, DtUdpMsgSocket*>::iterator DtRtiAssistantPeer::mySocketIter

Iterator of the current socket being processed or the next one that will be processed.

Referenced by DtRtiAssistantPeer(), readAndProcess(), and tick().

std::map< MAKRti::DtInetAddr, DtUdpMsgSocket*> DtRtiAssistantPeer::mySockets

A map of network interface addresses to the sockets used on those interfaces to communicate with other Assistants.

Referenced by addSocketsForInterfaces(), DtRtiAssistantPeer(), maxMsgSize(), needsProcessing(), readAndProcess(), sendInfoMsg(), sendLightweightInfoMsg(), sendMsgOnInterface(), sendMsgToAll(), tick(), and ~DtRtiAssistantPeer().

int DtRtiAssistantPeer::myTtl

The TTL (Time To Live) for Assistant communication.

Referenced by addSocketsForInterfaces().

bool DtRtiAssistantPeer::myUsingIpv4

Indicates whether any IPv4 sockets are currently in use.

Referenced by addSocketsForInterfaces(), and ipv4Address().

bool DtRtiAssistantPeer::myUsingIpv6

Indicates whether any IPv4 sockets are currently in use.

Referenced by addSocketsForInterfaces(), and ipv6Address().

const DtTime DtRtiAssistantPeer::theStatisticsInterval = 60
static

The interval at which message statistics are calculated.

Referenced by calculateMsgStatistics().


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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)