MAK RTIspy API Documentation for HLA 1516
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Static Private Attributes
DtFedExec Class Reference
+ Collaboration diagram for DtFedExec:

Public Member Functions

virtual ~DtFedExec ()
 Destructor.
virtual DtConnectionMgrconnectMgr ()
 Returns the connection mgr.
virtual DtLogicalTimeFactoryfedTimeFactory ()
 Returns the time factory.
virtual const DtString & fedExName () const
 Returns the name of the this federation execution.
virtual int fedExHandle () const
 Returns the handle of this federation execution.
virtual const DtString & fedFileName () const
 Returns the name of the FED file that was associated with the federation execution at creation time.
virtual const std::vector
< DtString > & 
fomModules () const
 Returns the fomModules names associated w/ the fedex.
virtual bool fullyCreated () const
 Return boolean: Federation execution creation is complete.
virtual void setFullyCreated (bool val)
 Set completion status.
virtual unsigned long creatorID () const
 Set the ID for who created this federation execution.
virtual void createDistributor (const unsigned long initiatingFedID, const DtString &momModuleName, const std::vector< DtString > &fomModules)
 Create Fed File Distributor for federation.
virtual int numFederates () const
 Returns the total number of federates joined to this federation.
virtual DtFederategetFederate (DtFederateHandle handle)
 Returns the DtFederate object representing the joined federate with the indicated handle.
virtual DtFederateHandle federateHandleOfConnection (unsigned long connId) const
 Return the connection's federate handle if joined to this federation; otherwise, 0.
virtual void disconnectFederate (DtFederate *fed)
 Mark federate as attempting to reconnect.
virtual bool removeFederateConnection (unsigned long id)
 Removes the federate with the given connection ID.
virtual bool restoreFederateConnection (DtFederateHandle handle, unsigned long newConnId, unsigned long &oldConnId)
 Restore a joined federate on a new connection ID TODO: let this work for connected, not necessarily joined federates Pass back old connection ID Return bool: federate restored.
virtual void reconnectFederateSucceeded (DtFederate *fed)
 Federate successfully reconnected.
virtual void reconnectFederateFailed (DtFederate *fed)
 Federate failed to reconnect.
virtual bool resignFederate (DtFederateHandle handle, DtResignAction action, DtResignReason reason)
 Resign the given federate from the federation.
virtual void resetClockForHeartBeat ()
 This should only be called when the rtiExec has reconnected.
virtual bool tick ()
 Tick the federation execution.
virtual void printFederates ()
 Print the list of federates for each federation execution.
virtual void addFederateJoinedCallback (DtFederateCbFn fn, void *usr)
 Register callback to be invoked whenever a federate joins a federation.
virtual void removeFederateJoinedCallback (DtFederateCbFn fn, void *usr)
 Remove callback to be invoked whenever a federate joins a federation.
virtual void addFederateResignedCallback (DtFederateCbFn fn, void *usr)
 Register callback to be invoked whenever a federate resigns a federation.
virtual void removeFederateResignedCallback (DtFederateCbFn fn, void *usr)
 Remove callback to be invoked whenever a federate resigns a federation.
virtual void addSyncPtRegisteredCallback (DtSyncPointCbFn fn, void *usr)
 Register a callback to be invoked whenever a new sync point has been registered.
virtual void removeSyncPtRegisteredCallback (DtSyncPointCbFn fn, void *usr)
 Unregister a callback to be invoked whenever a new sync point has been registered.
virtual void addSyncPtAchievedCallback (DtSyncPointAchievedCbFn fn, void *usr)
 Register a callback to be invoked whenever a federate has achieved a sync point.
virtual void removeSyncPtAchievedCallback (DtSyncPointAchievedCbFn fn, void *usr)
 Unregister a callback to be invoked whenever a federate has achieved a sync point.
virtual void addFederationSynchronizedCallback (DtSyncPointCbFn fn, void *usr)
 Register a callback to be invoked whenever all federates has achieved a sync point.
virtual void removeFederationSynchronizedCallback (DtSyncPointCbFn fn, void *usr)
 Unregister a callback to be invoked whenever all federates has achieved a sync point.
virtual void addFederateDisconnectedCallback (DtFederateCbFn fn, void *usr)
 Register callbacks for federate disconnected.
virtual void removeFederateDisconnectedCallback (DtFederateCbFn fn, void *usr)
 Unregister callbacks for federate disconnected.
virtual void addFederateReconnectSucceededCallback (DtFederateCbFn fn, void *usr)
virtual void removeFederateReconnectSucceededCallback (DtFederateCbFn fn, void *usr)
virtual void addFederateReconnectFailedCallback (DtFederateCbFn fn, void *usr)
virtual void removeFederateReconnectFailedCallback (DtFederateCbFn fn, void *usr)
void multFileReceivedCb (const DtFomModuleDistributionMsg &msg)
 File received callback... generates a distributor postCommand.
void multFileRequestedCb (const DtFomModuleRequestMsg &msg)
 File requested callback... generates a distributor postCommand.
void pushFomModuleToJoinedFederates (DtFederate *newFederate, DtString fileName, unsigned int fileSize, const char *fileBuffer)
 Push a FOM Module to all joined federates except the one specified.
void pushFomModuleToSingleFederate (DtFederateHandle recipient, DtString fileName, unsigned int fileSize, const char *fileBuffer)
 Push a FOM Module to the given federate.
virtual void processRequestedModulesArrived (const DtRequestedModulesArrivedEvent &e)
 Process arrival of requested FOM Modules.
virtual void processFedFileRequestMsg (const DtFedFileRequestMsgEvent &e)
 Process FED file requests.
virtual void processFileTransfer (const DtFedExTakeFileEvent &e)
 Process file transfers.
virtual
DtFederateHandleInfoMap const & 
federates () const
 Returns the list of federates for this fed exec.
virtual void disableNetworkTesting ()
 Disable network testing at federate.
virtual void enableNetworkTesting ()
 Enable network testing at federate.
virtual void changeLatencyTestMode (DtFederateHandle handle, bool runTest, bool continuous, bool haltContinuous, bool observing, unsigned int interactionPeriod, unsigned int numInteractions, unsigned int payloadBytes)
 Changes the latency test mode for the specified federate.
virtual bool transferRidParams (DtFederateHandle handle, const DtString &ridString)
 Transfer RID parameters over network.

Static Public Member Functions

static void multFileReceivedCb (const DtFomModuleDistributionMsg &msg, void *usr)
 File received callback... generates a distributor postCommand.
static void multFileRequestedCb (const DtFomModuleRequestMsg &msg, void *usr)
 File requested callback... generates a distributor postCommand.
static DtFedExeccreate (DtConnectionMgr *connMgr, const std::vector< unsigned int > &crcs, DtString const &fedExName, std::string const &timeImplName, MAKRti::DtFomType fedType, DtString const &momModuleName, const std::vector< DtString > &fomModules, int fedExHandle, DtRIDParameters *params, unsigned int momModuleCrc)
 Creates an instance of a DtFedExec;.
static void setCreatorFunction (DtFedExecCreator creator)
 Call this function to set an alternate creator function With this function, users can replace this DtFedExec with their own derived class.
static void init (DtRtiAssistantExecClient *assistant)
Static RTI message callbacks

Static methods to install in connection manager to process message callbacks

static void processJoinMsg (const DtJoinMsg &msg, void *usr)
static void processJoinConfirm (const DtJoinConfirmMsg &msg, void *usr)
static void processAlive (const DtAliveMsg &msg, void *usr)
static void processResign (const DtResignMsg &msg, void *usr)
static void processSyncPoint (const DtSyncPointMsg &msg, void *usr)
static void processSyncPointQuery (const DtSyncPointQueryMsg &msg, void *usr)
static void processSaveRequest (const DtSaveRequestMsg &msg, void *usr)
static void processInitiatedSave (const DtInitiatedSaveMsg &msg, void *usr)
static void processSaveComplete (const DtSaveCompleteMsg &msg, void *usr)
static void processSaveBegun (const DtSaveBegunMsg &msg, void *usr)
static void processAbortSave (const DtAbortSaveMsg &msg, void *usr)
static void processRestoreRequest (const DtRestoreRequestMsg &msg, void *usr)
static void processRestoreBegun (const DtRestoreBegunMsg &msg, void *usr)
static void processRestoreComplete (const DtRestoreCompleteMsg &msg, void *usr)
static void processAbortRestore (const DtAbortRestoreMsg &msg, void *usr)
static void processOwnership (const DtOwnershipMsg &msg, void *usr)
static void processReserveName (DtReserveNameMsg const &msg, void *usr)
static void processReserveMultiName (DtReserveMultiNameMsg const &msg, void *usr)
static void processReleaseMultiName (DtReleaseMultiNameMsg const &msg, void *usr)
static void processQuerySaveStatus (DtQuerySaveStatusMsg const &msg, void *usr)
static void processQueryRestoreStatus (DtQueryRestoreStatusMsg const &msg, void *usr)

Protected Types

typedef std::set< std::string > DtFedExReservedNameSet
typedef std::map
< DtFederateHandle,
DtFedExReservedNameSet
DtFedExFederateReservedNameMap

Protected Member Functions

 DtFedExec (DtConnectionMgr *connMgr, const std::vector< unsigned int > &crcs, DtString const &fedExName, std::string const &timeImplName, MAKRti::DtFomType fedType, const DtString &momModuleName, const std::vector< DtString > &modules, int fedExHandle, DtRIDParameters *params, unsigned int momModuleCrc)
 Constructor.
virtual const std::map
< unsigned long, const
std::vector< DtString > * > & 
joinFomModules () const
 Returns the joinfomModules names associated w/ the fedex.
virtual const std::vector
< DtString > & 
joinFomModulesForConnection (unsigned long connID) const
virtual const std::vector
< DtString > & 
createFomModules () const
 Returns the joinfomModules names associated w/ the fedex.
virtual void processRegisterSyncPoint (const DtSyncPointMsg &msg)
 Process sync point registration.
virtual void processAchievedSyncPoint (const DtSyncPointMsg &msg)
 Process sync point achieved.
virtual void createSyncPoint (const DtSyncPointMsg &msg)
 Create a sync point.
virtual void processSyncPtAchievedCallbacks (DtSyncPt *point, DtFederate *federate)
 Process the callbacks registered for federates achieving sync points.
virtual void processFederationSynchronizedCallbacks (DtSyncPt *point)
 Process the callbacks registered for federates achieving sync points.
virtual bool synchronized (DtSyncPt *point, DtFederateHandleSet &unsuccessfulSet) const
 Return true if we've reached synchronization for this point, false otherwise.
virtual void sendSyncPointReport (const DtSyncPointQueryMsg &msg)
 Send MOM report synchronization point interaction.
virtual void sendSyncPointStatusReport (const DtSyncPointQueryMsg &msg)
 Send MOM report synchronization point status interaction.
virtual DtFederateaddFederate (const char *federateType, const char *federateName, DtFederateHandle handle, unsigned long connHandle, int astntCompId, const char *fedHostName, MAKRti::DtInetAddr host, DtHlaVersionId hlaVersion)
 Add a federate to the federation.
virtual DtFederatecreateFederate (const char *federateType, const char *federateName, DtFederateHandle handle, unsigned long connHandle, int astntCompId, const char *fedHostname, MAKRti::DtInetAddr host, DtHlaVersionId hlaVersion)
 Create a new federate.
virtual bool isMember (DtFederateHandle handle) const
 Returns true if the given federate is a member of this federation.
virtual bool deleteFederate (DtFederateHandle handle)
 Removes the indicated federate from the federation execution, and deletes the corresponding DtFederate object.
virtual bool processCreateReady ()
 Federation Execution Processing.
virtual void processJoin (unsigned long connID, const DtFedJoinInfo *fedInfo)
 Process a join.
virtual void processJoinReady ()
 Perform processing when a join is ready.
virtual void destroyDistributor ()
 Destroy Fed File Distributor for federation.
virtual
DtAsyncFileDistributorRunnable
distributor () const
 Return a pointer to the distributor.
virtual unsigned int numberFederatesAllowed (unsigned int numPartners) const
 Given the number of partners allowed by a joining federate, determines the number of federates allowed in the federation.
virtual void resetControl ()
 Reset control.
virtual bool tickDistributor ()
 Tick the distributor.
virtual bool processEvents ()
 Process events from asynchronous thread.
DtFedReader * getReader (DtFomType theFomType)
DtFedReader * getReader (DtFomType theFomType, DtFomClassMgr *target)
void populateWithUnknownFoms (std::vector< DtString > &mods, std::vector< DtString > &requestedMods)
bool isFomAvailable (const DtString &fomName)
bool doesCrcMatchKnownFomModuleCrc (const DtString &fomName, unsigned int myTakenFomCrc)
virtual bool fedFileReady (const MAKRti::DtString &fileName) const
 Return boolean: File has been received and is ready to process.
virtual bool fedFilesReady (const std::vector< MAKRti::DtString > *fileNames) const
 Return boolean: Files have been received and is ready to process.
virtual bool addJoinFomModuleForConnection (unsigned long connId, const std::vector< MAKRti::DtString > &modulesFromJoinRequest)
 Add the given FOM Module request to the given connection's list.
virtual void removeJoinFomModuleForConnection (unsigned long connID)
 Remove the given FOM Module request to the given connection's list.
virtual void tickSaveRestore ()
 Tick actions.
virtual void tickJoin ()
 Periodically send a join response to prod unconfirmed federate joins This polling mechanism compensates for dropped messages.
virtual void tickFederates ()
 Check if the interval since the last heartbeat for any federate has exceeded the timeout.
virtual void retireSyncPoint (const char *name)
 DtTIME.
virtual void announceAllSyncPoints (DtFederateHandle hand)
 Called when new federates join to announce to them all of the currently existing synch points that involve them.
virtual void checkTimedSave ()
 Initiate save if conditions for timed save have been meet.
virtual void initiateSave (const char *label)
 Initiates the save of the federation, including the fedex.
virtual bool save (const char *label)
 saves the fedex Return boolean: save was successful?
virtual int initializeRestore (const char *label)
 Initializes the restore label Returns status: 0 : OK, -1 : failed to open save label, -2 : failed to configure.
virtual bool restore (const char *label)
 restores the fedex Return boolean: save was successful?
virtual void endSave (DtSaveFinishedResult result)
 finish the save
virtual void endRestore (DtEndRestoreResult restoreResult)
 finish the restore
virtual DtString & getSaveFileName (const char *label, MAKRti::DtString &fileName, bool extendName=true)
 Create a restore file name from the label and return in supplied parameter.
virtual DtString & getRestoreFileName (const char *label, MAKRti::DtString &fileName)
 Create a restore file name from the label and return in supplied parameter.
virtual int getNextFreeFedHandle ()
 Used internally to get the next available Federate Id within this federation.
 DtFedExec ()
 Default Ctor disabled.
 DtFedExec (const DtFedExec &orig)
 Copy and assignment operators are disabled.
DtFedExecoperator= (DtFedExec const &orig)
RTI message callbacks

Actual methods used to process message callbacks

virtual void processJoinMsg (const DtJoinMsg &msg)
virtual bool handleJoinFailureCases (const DtJoinMsg &msg)
virtual void requestFedFileUpload (const DtJoinMsg &msg)
virtual void processJoinConfirm (const DtJoinConfirmMsg &msg)
virtual void processAlive (const DtAliveMsg &msg)
virtual void processResign (const DtResignMsg &msg)
virtual void processSyncPoint (const DtSyncPointMsg &msg)
virtual void processSyncPointQuery (const DtSyncPointQueryMsg &msg)
virtual void processSaveRequest (const DtSaveRequestMsg &msg)
virtual void processInitiatedSave (const DtInitiatedSaveMsg &msg)
virtual void processSaveComplete (const DtSaveCompleteMsg &msg)
virtual void processSaveBegun (const DtSaveBegunMsg &msg)
virtual void processAbortSave (const DtAbortSaveMsg &msg)
virtual void processRestoreRequest (const DtRestoreRequestMsg &msg)
virtual void processRestoreBegun (const DtRestoreBegunMsg &msg)
virtual void processRestoreComplete (const DtRestoreCompleteMsg &msg)
virtual void processAbortRestore (const DtAbortRestoreMsg &msg)
virtual void processOwnership (const DtOwnershipMsg &msg)
virtual void processReserveName (DtReserveNameMsg const &msg)
virtual void processReserveMultiName (DtReserveMultiNameMsg const &msg)
virtual void processReleaseMultiName (DtReleaseMultiNameMsg const &msg)
virtual void processQuerySaveStatus (DtQuerySaveStatusMsg const &msg)
virtual void processQueryRestoreStatus (DtQueryRestoreStatusMsg const &msg)
Send RTI messages

Send an RTI message of the appropriate kind with the given parameters.

virtual void sendSyncPointMsg (DtSyncMsgType kind, int id, DtSyncPointStatus status, const char *name, RTINAMESPACE::VariableLengthData const *theTag=NULL, const DtFederateHandleSet *set=NULL, const DtFederateHandleSet *unsuccessfulSet=NULL)
virtual void sendResignMsg (const char *name, DtFederateHandle fedHandle, DtResignAction action, DtResignReason reason, const DtTimeInfo *timeInfo)
virtual void sendEnableDisableNetworkTestingMsg (const char *name, bool enabled)
virtual void sendTransferRidParamsMsg (const char *name, DtFederateHandle fedHandle, const DtString &paramString)
virtual void sendJoinResponseMsg (unsigned long destinationIDValue, unsigned short requestID, unsigned int crcOfFedFile, DtFederateHandle handle, const char *federateName, int fedExHandle, const char *fedExName, const DtString &momModule, const std::vector< MAKRti::DtString > &modules, unsigned long flags, bool allowNetworkTesting, bool enableNetworkTesting, DtHlaVersionId hlaVers, DtJoinResponseMsg::errorCodes errorValue=DtJoinResponseMsg::DT_NO_ERROR, const DtString &errorString=DtString::nullString())
virtual void sendSaveInitiateMsg (const char *labelVal)
virtual void sendSaveInitiateConstrainedMsg (const char *labelVal)
virtual void sendSaveResponse (DtFederateHandle fedHandle, unsigned long requestID, const char *labelVal, DtSaveResponseFlag response)
virtual void sendDesignatedFederate (DtFederateHandle fedHandle)
virtual void sendNameReservedMsg (DtFederateHandle requestingFederate, char const *objectName, bool result)
virtual void sendMultiNameReservedMsg (DtFederateHandle requestingFederate, std::set< std::wstring > const &objectNames, bool result)
virtual void sendRestoreStatus (DtFederateHandle requestingFederate, RTINAMESPACE::FederateRestoreStatusVector const &restoreStatusList)
virtual void sendSaveStatus (DtFederateHandle requestingFederate, RTINAMESPACE::FederateHandleSaveStatusPairVector const &saveStatusList)

Protected Attributes

DtConnectionMgrmyConnectionMgr
unsigned int myCrcOfFedFile
int myFreeFedHandle
bool * myFedHandlesInUse
DtString myFedExName
DtFederateHandleInfoMap myFederates
DtFederateNameInfoMap myFederatesByName
std::map< MAKRti::DtString,
DtFederateHandle
myFederateHdlsByName
int myNumFederates
DtSyncHashlist mySyncList
DtString myMomModule
unsigned int myMomModuleCrc
std::vector< unsigned int > myCreationFedFilesCRCs
MAKRti::DtFomType myFedType
std::vector< DtString > myFomModules
std::map< DtString, unsigned int > myFomModulesNameToCrcMap
std::set< DtString > myFomModulesSet
std::vector< DtString > myCreateFomModules
std::map< unsigned long, const
std::vector< DtString > * > 
myJoinFomModules
DtFomClassMgrmyFom
int myFedExHandle
DtFederateHandle myDesignatedFederate
float myFederateTimeoutInterval
std::set< unsigned long > myConnectionsProcessJoined
std::map< DtFederateHandle,
DtFedJoinInfo * > 
myJoiningFederates
 List of joining federates for which a join confirm is expected.
std::map< unsigned long,
DtFedJoinInfo * > 
myJoiningFederatesByID
int myNumberResponseAttempts
 Response interval from params is divided by this number.
float myResponseInterval
 to obtain response retransmission interval
bool mySave
bool myRestore
std::set< DtFederateHandlemyPendingSaveFederates
DtFederateHandleStdSet myInitiatedSaveFederates
DtString mySaveLabel
DtFederateHandle mySavingFederate
std::set< DtFederateHandlemyPendingRestoreFederates
DtFederateHandleInfoMap myRestoreFederatesByOld
DtFederateHandleInfoMap myRestoreFederatesByNew
DtString mySavePath
bool mySavePending
bool mySaveBegun
std::map< DtString,
DtFileInformation * > 
myTakenFiles
bool myAwaitingCreateUpload
unsigned long myCreatorConnId
std::set< unsigned long > myAwaitingJoinUpload
bool myFullyCreated
int myTimeout
int myDefaultWait
DtList myJoinCallbacks
DtList myResignCallbacks
DtList myDisconnectCallbacks
DtList myReconnectSucceededCallbacks
DtList myReconnectFailedCallbacks
DtList myFedSynchronizedCallbacks
DtList mySpAchievedCallbacks
DtList mySpRegisterCallbacks
DtFedExReservedNameSet myReservedNames
DtFedExFederateReservedNameMap myFederateReservedNames
vrlmod::DtThreadedObjectmyDistributorThread
 DtTIME.
DtAsyncFileDistributorRunnablemyDistributor
bool myDistributeFedFile
bool myCrcCheckFedFile
unsigned long myInitiatorID
int myStrictNameReservation
bool myAllowNetworkTesting
 Whether network testing is enabled or completely disabled by the RID.
bool myNetworkTestingEnabled
 Whether network testing has been toggled on/off by the assistant.
DtClock myClock
unsigned int myNumberFederatesAllowed
DtFedReader13 * myFedReader13
DtFedReader1516 * myFedReader1516
DtFedReader1516e * myFedReader1516e

Static Protected Attributes

static const std::vector
< DtString > 
theEmptyStringSet = std::vector<DtString>()
static DtFedExecCreator theCreator = NULL

Private Attributes

bool myFullFedFileDistribution

Static Private Attributes

static const DtString nullStr = ""

Member Typedef Documentation

typedef std::set<std::string> DtFedExec::DtFedExReservedNameSet
protected

Constructor & Destructor Documentation

DtFedExec::DtFedExec ( DtConnectionMgr connMgr,
const std::vector< unsigned int > &  crcs,
DtString const &  fedExName,
std::string const &  timeImplName,
MAKRti::DtFomType  fedType,
const DtString &  momModuleName,
const std::vector< DtString > &  modules,
int  fedExHandle,
DtRIDParameters params,
unsigned int  momModuleCrc 
)
protected

Constructor.

References DtAbortRestoreMsg::addCallback(), DtQuerySaveStatusMsg::addCallback(), DtQueryRestoreStatusMsg::addCallback(), DtSaveTimeAdvanceMsg::addCallback(), DtInitiatedSaveMsg::addCallback(), DtSaveBegunMsg::addCallback(), DtAbortSaveMsg::addCallback(), DtAliveMsg::addCallback(), DtRestoreRequestMsg::addCallback(), DtRestoreCompleteMsg::addCallback(), DtSaveRequestMsg::addCallback(), DtSaveCompleteMsg::addCallback(), DtReleaseMultiNameMsg::addCallback(), DtReserveMultiNameMsg::addCallback(), DtRestoreBegunMsg::addCallback(), DtJoinConfirmMsg::addCallback(), DtSyncPointQueryMsg::addCallback(), DtResignMsg::addCallback(), DtJoinMsg::addCallback(), DtOwnershipMsg::addCallback(), DtSyncPointMsg::addCallback(), connectMgr(), DtToWString(), fedExHandle(), DtRtiMtdDestinationList::getMaxDestinations(), myDefaultWait, myFederateTimeoutInterval, myFedExHandle, myFedHandlesInUse, myFomModules, myFomModulesNameToCrcMap, myFomModulesSet, myFreeFedHandle, myFullFedFileDistribution, myMomModule, myNumberResponseAttempts, myNumFederates, myResponseInterval, myRestore, mySave, mySavePath, myTimeout, NULL, processAbortRestore(), processAbortSave(), processAlive(), processInitiatedSave(), processJoinConfirm(), processJoinMsg(), processOwnership(), processQueryRestoreStatus(), processQuerySaveStatus(), processReleaseMultiName(), processReserveMultiName(), processReserveName(), processResign(), processRestoreBegun(), processRestoreComplete(), processRestoreRequest(), processSaveBegun(), processSaveComplete(), processSaveRequest(), processSyncPoint(), processSyncPointQuery(), DtRIDParameters::responseInterval, DtRIDParameters::saveRestoreDirectoryPath(), and DtInteractionMsg::setChannelIncluded().

DtFedExec::~DtFedExec ( )
virtual

Destructor.

References connectMgr(), destroyDistributor(), DtSyncHashlist::empty(), myFederateHdlsByName, myFederates, myFederatesByName, myFedHandlesInUse, myFedReader13, myFedReader1516, myFedReader1516e, myJoinFomModules, myJoiningFederates, myJoiningFederatesByID, mySyncList, NULL, processAbortRestore(), processAbortSave(), processAlive(), processInitiatedSave(), processJoinConfirm(), processJoinMsg(), processOwnership(), processQueryRestoreStatus(), processQuerySaveStatus(), processReleaseMultiName(), processReserveMultiName(), processReserveName(), processResign(), processRestoreBegun(), processRestoreComplete(), processRestoreRequest(), processSaveBegun(), processSaveComplete(), processSaveRequest(), processSyncPoint(), processSyncPointQuery(), DtAbortRestoreMsg::removeCallback(), DtQuerySaveStatusMsg::removeCallback(), DtQueryRestoreStatusMsg::removeCallback(), DtInitiatedSaveMsg::removeCallback(), DtSaveTimeAdvanceMsg::removeCallback(), DtSaveBegunMsg::removeCallback(), DtAbortSaveMsg::removeCallback(), DtAliveMsg::removeCallback(), DtRestoreRequestMsg::removeCallback(), DtRestoreCompleteMsg::removeCallback(), DtSaveRequestMsg::removeCallback(), DtSaveCompleteMsg::removeCallback(), DtReleaseMultiNameMsg::removeCallback(), DtReserveMultiNameMsg::removeCallback(), DtRestoreBegunMsg::removeCallback(), DtJoinConfirmMsg::removeCallback(), DtSyncPointQueryMsg::removeCallback(), DtResignMsg::removeCallback(), DtJoinMsg::removeCallback(), DtOwnershipMsg::removeCallback(), and DtSyncPointMsg::removeCallback().

DtFedExec::DtFedExec ( )
protected

Default Ctor disabled.

Referenced by create().

DtFedExec::DtFedExec ( const DtFedExec orig)
protected

Copy and assignment operators are disabled.

Member Function Documentation

DtFederate * DtFedExec::addFederate ( const char *  federateType,
const char *  federateName,
DtFederateHandle  handle,
unsigned long  connHandle,
int  astntCompId,
const char *  fedHostName,
MAKRti::DtInetAddr  host,
DtHlaVersionId  hlaVersion 
)
protectedvirtual
void DtFedExec::addFederateDisconnectedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual

Register callbacks for federate disconnected.

References myDisconnectCallbacks.

Referenced by DtRtiexecObserverMgr::federationCreatedCallback().

void DtFedExec::addFederateJoinedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual

Register callback to be invoked whenever a federate joins a federation.

References myJoinCallbacks.

Referenced by DtRtiexecObserverMgr::federationCreatedCallback().

void DtFedExec::addFederateReconnectFailedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual
void DtFedExec::addFederateReconnectSucceededCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual
void DtFedExec::addFederateResignedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual

Register callback to be invoked whenever a federate resigns a federation.

References myResignCallbacks.

Referenced by DtRtiexecObserverMgr::federationCreatedCallback().

void DtFedExec::addFederationSynchronizedCallback ( DtSyncPointCbFn  fn,
void *  usr 
)
virtual

Register a callback to be invoked whenever all federates has achieved a sync point.

References myFedSynchronizedCallbacks.

Referenced by DtRtiexecObserverMgr::federationCreatedCallback().

bool DtFedExec::addJoinFomModuleForConnection ( unsigned long  connId,
const std::vector< MAKRti::DtString > &  modulesFromJoinRequest 
)
protectedvirtual

Add the given FOM Module request to the given connection's list.

References connectMgr(), fomModuleMerging, myFomModulesSet, and myJoinFomModules.

Referenced by requestFedFileUpload().

void DtFedExec::addSyncPtAchievedCallback ( DtSyncPointAchievedCbFn  fn,
void *  usr 
)
virtual

Register a callback to be invoked whenever a federate has achieved a sync point.

References mySpAchievedCallbacks.

Referenced by DtRtiexecObserverMgr::federationCreatedCallback().

void DtFedExec::addSyncPtRegisteredCallback ( DtSyncPointCbFn  fn,
void *  usr 
)
virtual

Register a callback to be invoked whenever a new sync point has been registered.

References mySpRegisterCallbacks.

Referenced by DtRtiexecObserverMgr::federationCreatedCallback().

void DtFedExec::announceAllSyncPoints ( DtFederateHandle  hand)
protectedvirtual

Called when new federates join to announce to them all of the currently existing synch points that involve them.

References DtAnnouncePt, DtSyncStatusSucceeded, DtSyncPt::federates(), DtFederateHandleSet::isMember(), DtSyncHashlist::list(), mySyncList, DtSyncPt::name(), NULL, sendSyncPointMsg(), and DtSyncPt::tag().

Referenced by processJoinConfirm().

void DtFedExec::changeLatencyTestMode ( DtFederateHandle  handle,
bool  runTest,
bool  continuous,
bool  haltContinuous,
bool  observing,
unsigned int  interactionPeriod,
unsigned int  numInteractions,
unsigned int  payloadBytes 
)
virtual
void DtFedExec::checkTimedSave ( )
protectedvirtual

Initiate save if conditions for timed save have been meet.

References initiateSave(), mySaveLabel, and mySavePending.

DtConnectionMgr * DtFedExec::connectMgr ( )
inlinevirtual
DtFedExec * DtFedExec::create ( DtConnectionMgr connMgr,
const std::vector< unsigned int > &  crcs,
DtString const &  fedExName,
std::string const &  timeImplName,
MAKRti::DtFomType  fedType,
DtString const &  momModuleName,
const std::vector< DtString > &  fomModules,
int  fedExHandle,
DtRIDParameters params,
unsigned int  momModuleCrc 
)
static

Creates an instance of a DtFedExec;.

References DtFedExec(), fedExHandle(), fedExName(), fomModules(), and theCreator.

Referenced by createFederate(), and setCreatorFunction().

void DtFedExec::createDistributor ( const unsigned long  initiatingFedID,
const DtString &  momModuleName,
const std::vector< DtString > &  fomModules 
)
virtual
DtFederate * DtFedExec::createFederate ( const char *  federateType,
const char *  federateName,
DtFederateHandle  handle,
unsigned long  connHandle,
int  astntCompId,
const char *  fedHostname,
MAKRti::DtInetAddr  host,
DtHlaVersionId  hlaVersion 
)
protectedvirtual

Create a new federate.

Override this function when overriding DtFederate.

References create(), and mySyncList.

Referenced by addFederate().

const std::vector< DtString > & DtFedExec::createFomModules ( ) const
protectedvirtual

Returns the joinfomModules names associated w/ the fedex.

References myCreateFomModules.

void DtFedExec::createSyncPoint ( const DtSyncPointMsg msg)
protectedvirtual
unsigned long DtFedExec::creatorID ( ) const
virtual

Set the ID for who created this federation execution.

References myCreatorConnId.

Referenced by DtRtiExec::removeDroppedFederateConnections().

bool DtFedExec::deleteFederate ( DtFederateHandle  handle)
protectedvirtual
void DtFedExec::destroyDistributor ( )
protectedvirtual
void DtFedExec::disableNetworkTesting ( )
virtual
void DtFedExec::disconnectFederate ( DtFederate fed)
virtual

Mark federate as attempting to reconnect.

References FedCallbackInfo::myData, myDisconnectCallbacks, and FedCallbackInfo::myFn.

Referenced by DtRtiExec::processDisconnect().

DtAsyncFileDistributorRunnable * DtFedExec::distributor ( ) const
protectedvirtual

Return a pointer to the distributor.

References myDistributor.

bool DtFedExec::doesCrcMatchKnownFomModuleCrc ( const DtString &  fomName,
unsigned int  myTakenFomCrc 
)
protected

References myFomModulesNameToCrcMap, and myMomModuleCrc.

Referenced by isFomAvailable().

void DtFedExec::enableNetworkTesting ( )
virtual
void DtFedExec::endRestore ( DtEndRestoreResult  restoreResult)
protectedvirtual
void DtFedExec::endSave ( DtSaveFinishedResult  result)
protectedvirtual
DtFederateHandle DtFedExec::federateHandleOfConnection ( unsigned long  connId) const
virtual

Return the connection's federate handle if joined to this federation; otherwise, 0.

References DtFederate::getConnectionHandle(), DtFederate::getHandle(), myFederates, and myJoiningFederatesByID.

Referenced by DtRtiExec::processDisconnect().

DtFederateHandleInfoMap const & DtFedExec::federates ( ) const
inlinevirtual

Returns the list of federates for this fed exec.

References myFederates.

Referenced by DtRtiexecObserverForAssistant::processSyncPtRegisteredEvent(), and DtRtiexecObserverForAssistant::processTimeStateEvent().

int DtFedExec::fedExHandle ( ) const
virtual
const DtString & DtFedExec::fedExName ( ) const
inlinevirtual
const DtString & DtFedExec::fedFileName ( ) const
virtual

Returns the name of the FED file that was associated with the federation execution at creation time.

References myFomModules, and nullStr.

Referenced by DtRtiexecObserverForAssistant::processFedExCreatedEvent().

bool DtFedExec::fedFileReady ( const MAKRti::DtString &  fileName) const
protectedvirtual

Return boolean: File has been received and is ready to process.

References myTakenFiles.

Referenced by fedFilesReady(), and processCreateReady().

bool DtFedExec::fedFilesReady ( const std::vector< MAKRti::DtString > *  fileNames) const
protectedvirtual

Return boolean: Files have been received and is ready to process.

References fedFileReady().

Referenced by processCreateReady(), and processJoinReady().

DtLogicalTimeFactory * DtFedExec::fedTimeFactory ( )
virtual

Returns the time factory.

References NULL.

Referenced by DtRtiExec::processCreate().

const std::vector< DtString > & DtFedExec::fomModules ( ) const
virtual
bool DtFedExec::fullyCreated ( ) const
virtual

Return boolean: Federation execution creation is complete.

References myFullyCreated.

Referenced by handleJoinFailureCases(), and DtRtiExec::removeDroppedFederateConnections().

DtFederate * DtFedExec::getFederate ( DtFederateHandle  handle)
virtual
int DtFedExec::getNextFreeFedHandle ( )
protectedvirtual

Used internally to get the next available Federate Id within this federation.

References DtRtiMtdDestinationList::destinationIndex(), DtRtiMtdDestinationList::getMaxDestinations(), myFedHandlesInUse, myFreeFedHandle, and DtRtiMsg::smartForwardingEnabled().

Referenced by processJoinMsg().

DtFedReader * DtFedExec::getReader ( DtFomType  theFomType)
protected
DtFedReader * DtFedExec::getReader ( DtFomType  theFomType,
DtFomClassMgr target 
)
protected

References getReader().

DtString & DtFedExec::getRestoreFileName ( const char *  label,
MAKRti::DtString &  fileName 
)
protectedvirtual

Create a restore file name from the label and return in supplied parameter.

Returns a reference to the supplied parameter

References getSaveFileName().

Referenced by initializeRestore(), and restore().

DtString & DtFedExec::getSaveFileName ( const char *  label,
MAKRti::DtString &  fileName,
bool  extendName = true 
)
protectedvirtual

Create a restore file name from the label and return in supplied parameter.

Returns a reference to the supplied parameter

References myFedExName, and mySavePath.

Referenced by getRestoreFileName(), and save().

bool DtFedExec::handleJoinFailureCases ( const DtJoinMsg msg)
protectedvirtual
void DtFedExec::init ( DtRtiAssistantExecClient assistant)
static
int DtFedExec::initializeRestore ( const char *  label)
protectedvirtual
void DtFedExec::initiateSave ( const char *  label)
protectedvirtual
bool DtFedExec::isFomAvailable ( const DtString &  fomName)
protected
bool DtFedExec::isMember ( DtFederateHandle  handle) const
protectedvirtual
const std::map< unsigned long, const std::vector< DtString > * > & DtFedExec::joinFomModules ( ) const
protectedvirtual

Returns the joinfomModules names associated w/ the fedex.

References myJoinFomModules.

const std::vector< DtString > & DtFedExec::joinFomModulesForConnection ( unsigned long  connID) const
protectedvirtual
void DtFedExec::multFileReceivedCb ( const DtFomModuleDistributionMsg msg)
void DtFedExec::multFileReceivedCb ( const DtFomModuleDistributionMsg msg,
void *  usr 
)
static

File received callback... generates a distributor postCommand.

References multFileReceivedCb().

void DtFedExec::multFileRequestedCb ( const DtFomModuleRequestMsg msg)
void DtFedExec::multFileRequestedCb ( const DtFomModuleRequestMsg msg,
void *  usr 
)
static

File requested callback... generates a distributor postCommand.

References multFileRequestedCb().

unsigned int DtFedExec::numberFederatesAllowed ( unsigned int  numPartners) const
protectedvirtual

Given the number of partners allowed by a joining federate, determines the number of federates allowed in the federation.

The value 0 indicates no limit in both the input and return values. Returns: 0 if no partner limit; otherwise, the number of partners allowed in the federation.

References myNumberFederatesAllowed.

Referenced by handleJoinFailureCases().

int DtFedExec::numFederates ( ) const
inlinevirtual

Returns the total number of federates joined to this federation.

References myNumFederates.

Referenced by DtRtiExec::destroyFederationByName().

DtFedExec& DtFedExec::operator= ( DtFedExec const &  orig)
protected
void DtFedExec::populateWithUnknownFoms ( std::vector< DtString > &  mods,
std::vector< DtString > &  requestedMods 
)
protected
void DtFedExec::printFederates ( )
virtual

Print the list of federates for each federation execution.

References DtFederate::getFederateHost(), DtFederate::getHandle(), DtFederate::getName(), DtFederate::getType(), DtFederate::isNamed(), and myFederates.

void DtFedExec::processAbortRestore ( const DtAbortRestoreMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processAbortRestore ( const DtAbortRestoreMsg msg)
protectedvirtual
void DtFedExec::processAbortSave ( const DtAbortSaveMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processAbortSave ( const DtAbortSaveMsg msg)
protectedvirtual
void DtFedExec::processAchievedSyncPoint ( const DtSyncPointMsg msg)
protectedvirtual
void DtFedExec::processAlive ( const DtAliveMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processAlive ( const DtAliveMsg msg)
protectedvirtual
bool DtFedExec::processCreateReady ( )
protectedvirtual
bool DtFedExec::processEvents ( )
protectedvirtual
void DtFedExec::processFederationSynchronizedCallbacks ( DtSyncPt point)
protectedvirtual

Process the callbacks registered for federates achieving sync points.

References SpCallbackInfo::myData, myFedSynchronizedCallbacks, and SpCallbackInfo::myFn.

Referenced by retireSyncPoint().

void DtFedExec::processFedFileRequestMsg ( const DtFedFileRequestMsgEvent e)
virtual
void DtFedExec::processFileTransfer ( const DtFedExTakeFileEvent e)
virtual

Process file transfers.

References DtFedExTakeFileEvent::myFileNames, and myTakenFiles.

Referenced by DtFedExTakeFileEvent::processResults().

void DtFedExec::processInitiatedSave ( const DtInitiatedSaveMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processInitiatedSave ( const DtInitiatedSaveMsg msg)
protectedvirtual
void DtFedExec::processJoin ( unsigned long  connID,
const DtFedJoinInfo fedInfo 
)
protectedvirtual
void DtFedExec::processJoinConfirm ( const DtJoinConfirmMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processJoinConfirm ( const DtJoinConfirmMsg msg)
protectedvirtual
void DtFedExec::processJoinMsg ( const DtJoinMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processJoinMsg ( const DtJoinMsg msg)
protectedvirtual

References DtJoinMsg::assistantCompId(), connectMgr(), DtJoinResponseMsg::DT_CRC_FAILURE, DtJoinResponseMsg::DT_FAILED_TO_GET_LICENSE, DtJoinResponseMsg::DT_FED_FILE_MERGE_PROBLEM, DtJoinResponseMsg::DT_MAX_FEDERATES_JOINED, DtJoinResponseMsg::DT_RTIEXEC_LICENSING_PARAM_MISMATCH, DtJoinResponseMsg::DT_UNKNOWN_ERROR, DtGENERATE_KEY, DtJoinMsg::federateHostName(), DtJoinMsg::federateName(), DtJoinMsg::federateType(), DtRtiMsg::fedExHandle(), fedExHandle(), DtRtiMsg::fedExName(), DtJoinMsg::flags(), DtRIDParameters::fomModuleMerging, fomModuleMerging, fomModules(), DtJoinMsg::fullFedExName(), DtJoinMsg::getCRCsOfFedFiles(), DtJoinMsg::getFomModuleNames(), getNextFreeFedHandle(), handleJoinFailureCases(), DtJoinMsg::hlaVersion(), DtJoinMsg::ipAddress(), joinFomModulesForConnection(), lm, myAllowNetworkTesting, DtFedJoinInfo::myAstntCompId, DtFedJoinInfo::myAttempts, myClock, myConnectionMgr, myCrcCheckFedFile, myCreationFedFilesCRCs, DtFedJoinInfo::myFederateHostName, DtFedJoinInfo::myFederateName, DtFedJoinInfo::myFedExName, DtFedJoinInfo::myFedId, myFomModules, myFomModulesNameToCrcMap, myFomModulesSet, DtFedJoinInfo::myHandle, DtFedJoinInfo::myHlaVersion, myJoinFomModules, myJoiningFederates, myJoiningFederatesByID, myMomModule, myNetworkTestingEnabled, DtFedJoinInfo::myNextSendTime, myNumberFederatesAllowed, DtFedJoinInfo::myRequestID, myResponseInterval, DtJoinMsg::needPartner(), DtConnectionMgr::params(), DtAssistantPopupHelper::popupAssistantMessage(), r1, removeJoinFomModuleForConnection(), requestFedFileUpload(), DtJoinMsg::requestID(), sendJoinResponseMsg(), DtJoinMsg::sourceID(), and true.

void DtFedExec::processJoinReady ( )
protectedvirtual
void DtFedExec::processOwnership ( const DtOwnershipMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processOwnership ( const DtOwnershipMsg msg)
protectedvirtual
void DtFedExec::processQueryRestoreStatus ( DtQueryRestoreStatusMsg const &  msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processQueryRestoreStatus ( DtQueryRestoreStatusMsg const &  msg)
protectedvirtual
void DtFedExec::processQuerySaveStatus ( DtQuerySaveStatusMsg const &  msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processQuerySaveStatus ( DtQuerySaveStatusMsg const &  msg)
protectedvirtual
void DtFedExec::processRegisterSyncPoint ( const DtSyncPointMsg msg)
protectedvirtual
void DtFedExec::processReleaseMultiName ( DtReleaseMultiNameMsg const &  msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processReleaseMultiName ( DtReleaseMultiNameMsg const &  msg)
protectedvirtual
void DtFedExec::processRequestedModulesArrived ( const DtRequestedModulesArrivedEvent e)
virtual
void DtFedExec::processReserveMultiName ( DtReserveMultiNameMsg const &  msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processReserveMultiName ( DtReserveMultiNameMsg const &  msg)
protectedvirtual
void DtFedExec::processReserveName ( DtReserveNameMsg const &  msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processReserveName ( DtReserveNameMsg const &  msg)
protectedvirtual
void DtFedExec::processResign ( const DtResignMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processResign ( const DtResignMsg msg)
protectedvirtual
void DtFedExec::processRestoreBegun ( const DtRestoreBegunMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processRestoreBegun ( const DtRestoreBegunMsg msg)
protectedvirtual
void DtFedExec::processRestoreComplete ( const DtRestoreCompleteMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processRestoreComplete ( const DtRestoreCompleteMsg msg)
protectedvirtual
void DtFedExec::processRestoreRequest ( const DtRestoreRequestMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processRestoreRequest ( const DtRestoreRequestMsg msg)
protectedvirtual
void DtFedExec::processSaveBegun ( const DtSaveBegunMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processSaveBegun ( const DtSaveBegunMsg msg)
protectedvirtual
void DtFedExec::processSaveComplete ( const DtSaveCompleteMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processSaveComplete ( const DtSaveCompleteMsg msg)
protectedvirtual
void DtFedExec::processSaveRequest ( const DtSaveRequestMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processSaveRequest ( const DtSaveRequestMsg msg)
protectedvirtual
void DtFedExec::processSyncPoint ( const DtSyncPointMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processSyncPoint ( const DtSyncPointMsg msg)
protectedvirtual
void DtFedExec::processSyncPointQuery ( const DtSyncPointQueryMsg msg,
void *  usr 
)
static

Referenced by DtFedExec(), and ~DtFedExec().

void DtFedExec::processSyncPointQuery ( const DtSyncPointQueryMsg msg)
protectedvirtual
void DtFedExec::processSyncPtAchievedCallbacks ( DtSyncPt point,
DtFederate federate 
)
protectedvirtual

Process the callbacks registered for federates achieving sync points.

References SpACallbackInfo::myData, SpACallbackInfo::myFn, and mySpAchievedCallbacks.

Referenced by processAchievedSyncPoint(), and processResign().

void DtFedExec::pushFomModuleToJoinedFederates ( DtFederate newFederate,
DtString  fileName,
unsigned int  fileSize,
const char *  fileBuffer 
)

Push a FOM Module to all joined federates except the one specified.

References myDistributor, myFederates, and DtAsyncFileDistributorRunnable::postCommand().

Referenced by DtPushFedFileToFederatesEvent::processResults().

void DtFedExec::pushFomModuleToSingleFederate ( DtFederateHandle  recipient,
DtString  fileName,
unsigned int  fileSize,
const char *  fileBuffer 
)

Push a FOM Module to the given federate.

References connectMgr(), myDistributor, and DtFileDistributor::pushFedFile().

Referenced by DtPushFedFileToSingleFederateEvent::processResults().

void DtFedExec::reconnectFederateFailed ( DtFederate fed)
virtual
void DtFedExec::reconnectFederateSucceeded ( DtFederate fed)
virtual

Federate successfully reconnected.

References FedCallbackInfo::myData, FedCallbackInfo::myFn, and myReconnectSucceededCallbacks.

Referenced by DtRtiExec::processReconnect().

bool DtFedExec::removeFederateConnection ( unsigned long  id)
virtual
void DtFedExec::removeFederateDisconnectedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual

Unregister callbacks for federate disconnected.

References FedCallbackInfo::myData, myDisconnectCallbacks, and FedCallbackInfo::myFn.

Referenced by DtRtiexecObserverMgr::federationDestroyedCallback().

void DtFedExec::removeFederateJoinedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual

Remove callback to be invoked whenever a federate joins a federation.

References FedCallbackInfo::myData, FedCallbackInfo::myFn, myJoinCallbacks, and NULL.

Referenced by DtRtiexecObserverMgr::federationDestroyedCallback().

void DtFedExec::removeFederateReconnectFailedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual
void DtFedExec::removeFederateReconnectSucceededCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual
void DtFedExec::removeFederateResignedCallback ( DtFederateCbFn  fn,
void *  usr 
)
virtual

Remove callback to be invoked whenever a federate resigns a federation.

References FedCallbackInfo::myData, FedCallbackInfo::myFn, myResignCallbacks, and NULL.

Referenced by DtRtiexecObserverMgr::federationDestroyedCallback().

void DtFedExec::removeFederationSynchronizedCallback ( DtSyncPointCbFn  fn,
void *  usr 
)
virtual

Unregister a callback to be invoked whenever all federates has achieved a sync point.

References SpCallbackInfo::myData, myFedSynchronizedCallbacks, SpCallbackInfo::myFn, and NULL.

Referenced by DtRtiexecObserverMgr::federationDestroyedCallback().

void DtFedExec::removeJoinFomModuleForConnection ( unsigned long  connID)
protectedvirtual

Remove the given FOM Module request to the given connection's list.

References myFomModules, myFomModulesSet, and myJoinFomModules.

Referenced by processJoin(), processJoinMsg(), processJoinReady(), and removeFederateConnection().

void DtFedExec::removeSyncPtAchievedCallback ( DtSyncPointAchievedCbFn  fn,
void *  usr 
)
virtual

Unregister a callback to be invoked whenever a federate has achieved a sync point.

References SpACallbackInfo::myData, SpACallbackInfo::myFn, mySpAchievedCallbacks, and NULL.

Referenced by DtRtiexecObserverMgr::federationDestroyedCallback().

void DtFedExec::removeSyncPtRegisteredCallback ( DtSyncPointCbFn  fn,
void *  usr 
)
virtual

Unregister a callback to be invoked whenever a new sync point has been registered.

References SpCallbackInfo::myData, SpCallbackInfo::myFn, mySpRegisterCallbacks, and NULL.

Referenced by DtRtiexecObserverMgr::federationDestroyedCallback().

void DtFedExec::requestFedFileUpload ( const DtJoinMsg msg)
protectedvirtual
void DtFedExec::resetClockForHeartBeat ( )
virtual

This should only be called when the rtiExec has reconnected.

This will prevent a healthy federate from being disconnected because the rtiExec was disconnected and it did not receive the heartbeat. This comes at the cost of not detecting an unhealthy federate for the period between that federates last heartbeat and the time that this was called.

References myClock, myFederates, myFederateTimeoutInterval, and DtFederate::setFederateHeartbeat().

void DtFedExec::resetControl ( )
protectedvirtual
bool DtFedExec::resignFederate ( DtFederateHandle  handle,
DtResignAction  action,
DtResignReason  reason 
)
virtual
bool DtFedExec::restore ( const char *  label)
protectedvirtual
bool DtFedExec::restoreFederateConnection ( DtFederateHandle  handle,
unsigned long  newConnId,
unsigned long &  oldConnId 
)
virtual

Restore a joined federate on a new connection ID TODO: let this work for connected, not necessarily joined federates Pass back old connection ID Return bool: federate restored.

References connectMgr(), DtReconnectMsg::DtReconnectAccepted, fedExHandle(), fedExName(), DtFederate::getConnectionHandle(), DtFederate::getDescription(), DtFederate::getHandle(), myFederates, DtConnectionMgr::send(), DtFederate::setConnectionHandle(), and DtRtiMsg::setFedEx().

Referenced by DtRtiExec::processReconnect().

void DtFedExec::retireSyncPoint ( const char *  name)
protectedvirtual

DtTIME.

Remove the sync point - usually called after the point has been reached by all, and the federation is synchronized.

References myFederates, mySyncList, processFederationSynchronizedCallbacks(), DtSyncHashlist::remove(), and DtFederate::removeFederateSyncPt().

Referenced by processAchievedSyncPoint(), and processResign().

bool DtFedExec::save ( const char *  label)
protectedvirtual
void DtFedExec::sendDesignatedFederate ( DtFederateHandle  fedHandle)
protectedvirtual
void DtFedExec::sendEnableDisableNetworkTestingMsg ( const char *  name,
bool  enabled 
)
protectedvirtual
void DtFedExec::sendJoinResponseMsg ( unsigned long  destinationIDValue,
unsigned short  requestID,
unsigned int  crcOfFedFile,
DtFederateHandle  handle,
const char *  federateName,
int  fedExHandle,
const char *  fedExName,
const DtString &  momModule,
const std::vector< MAKRti::DtString > &  modules,
unsigned long  flags,
bool  allowNetworkTesting,
bool  enableNetworkTesting,
DtHlaVersionId  hlaVers,
DtJoinResponseMsg::errorCodes  errorValue = DtJoinResponseMsg::DT_NO_ERROR,
const DtString &  errorString = DtString::nullString() 
)
protectedvirtual
void DtFedExec::sendMultiNameReservedMsg ( DtFederateHandle  requestingFederate,
std::set< std::wstring > const &  objectNames,
bool  result 
)
protectedvirtual
void DtFedExec::sendNameReservedMsg ( DtFederateHandle  requestingFederate,
char const *  objectName,
bool  result 
)
protectedvirtual
void DtFedExec::sendResignMsg ( const char *  name,
DtFederateHandle  fedHandle,
DtResignAction  action,
DtResignReason  reason,
const DtTimeInfo *  timeInfo 
)
protectedvirtual
void DtFedExec::sendRestoreStatus ( DtFederateHandle  requestingFederate,
RTINAMESPACE::FederateRestoreStatusVector const &  restoreStatusList 
)
protectedvirtual
void DtFedExec::sendSaveInitiateConstrainedMsg ( const char *  labelVal)
protectedvirtual
void DtFedExec::sendSaveInitiateMsg ( const char *  labelVal)
protectedvirtual
void DtFedExec::sendSaveResponse ( DtFederateHandle  fedHandle,
unsigned long  requestID,
const char *  labelVal,
DtSaveResponseFlag  response 
)
protectedvirtual
void DtFedExec::sendSaveStatus ( DtFederateHandle  requestingFederate,
RTINAMESPACE::FederateHandleSaveStatusPairVector const &  saveStatusList 
)
protectedvirtual
void DtFedExec::sendSyncPointMsg ( DtSyncMsgType  kind,
int  id,
DtSyncPointStatus  status,
const char *  name,
RTINAMESPACE::VariableLengthData const *  theTag = NULL,
const DtFederateHandleSet set = NULL,
const DtFederateHandleSet unsuccessfulSet = NULL 
)
protectedvirtual
void DtFedExec::sendSyncPointReport ( const DtSyncPointQueryMsg msg)
protectedvirtual
void DtFedExec::sendSyncPointStatusReport ( const DtSyncPointQueryMsg msg)
protectedvirtual
void DtFedExec::sendTransferRidParamsMsg ( const char *  name,
DtFederateHandle  fedHandle,
const DtString &  paramString 
)
protectedvirtual
void DtFedExec::setCreatorFunction ( DtFedExecCreator  creator)
static

Call this function to set an alternate creator function With this function, users can replace this DtFedExec with their own derived class.

References create(), DtBindCreator(), and theCreator.

void DtFedExec::setFullyCreated ( bool  val)
virtual

Set completion status.

References myFullyCreated.

Referenced by DtRtiExec::processCreate().

bool DtFedExec::synchronized ( DtSyncPt point,
DtFederateHandleSet unsuccessfulSet 
) const
protectedvirtual

Return true if we've reached synchronization for this point, false otherwise.

Also return the list of federates who achieved the sync point unsuccessfully.

References DtFederateHandleSet::add(), DtSyncPt::federates(), DtFederate::federateSyncPtAchieved(), DtFederate::federateSyncPtAchievedSuccessfully(), DtFederate::getHandle(), DtFederateHandleSet::isMember(), myFederates, and DtSyncPt::name().

bool DtFedExec::tick ( )
virtual

Tick the federation execution.

References myDistributeFedFile, tickDistributor(), tickFederates(), tickJoin(), and tickSaveRestore().

Referenced by DtRtiExec::tick().

bool DtFedExec::tickDistributor ( )
protectedvirtual

Tick the distributor.

References myDistributor, processCreateReady(), processEvents(), and processJoinReady().

Referenced by tick().

void DtFedExec::tickFederates ( )
protectedvirtual
void DtFedExec::tickJoin ( )
protectedvirtual
void DtFedExec::tickSaveRestore ( )
protectedvirtual

Tick actions.

Check if a save/restore has timed out. If so, terminate it.

References DtRestoreResultFailureDetected, DtSaveFinishedFailureDetected, endRestore(), endSave(), myRestore, mySave, myTimeout, and NULL.

Referenced by tick().

bool DtFedExec::transferRidParams ( DtFederateHandle  handle,
const DtString &  ridString 
)
virtual

Transfer RID parameters over network.

References getFederate(), myFedExName, NULL, and sendTransferRidParamsMsg().

Referenced by DtChangeRidParamCmd::operator()().

Member Data Documentation

bool DtFedExec::myAllowNetworkTesting
protected

Whether network testing is enabled or completely disabled by the RID.

Referenced by handleJoinFailureCases(), processJoin(), processJoinMsg(), and tickJoin().

bool DtFedExec::myAwaitingCreateUpload
protected
std::set< unsigned long> DtFedExec::myAwaitingJoinUpload
protected
DtClock DtFedExec::myClock
protected
DtConnectionMgr* DtFedExec::myConnectionMgr
protected
std::set< unsigned long > DtFedExec::myConnectionsProcessJoined
protected
bool DtFedExec::myCrcCheckFedFile
protected

Referenced by isFomAvailable(), and processJoinMsg().

unsigned int DtFedExec::myCrcOfFedFile
protected
std::vector<DtString> DtFedExec::myCreateFomModules
protected
std::vector<unsigned int> DtFedExec::myCreationFedFilesCRCs
protected
unsigned long DtFedExec::myCreatorConnId
protected
int DtFedExec::myDefaultWait
protected
DtFederateHandle DtFedExec::myDesignatedFederate
protected
DtList DtFedExec::myDisconnectCallbacks
protected
bool DtFedExec::myDistributeFedFile
protected

Referenced by destroyDistributor(), and tick().

DtAsyncFileDistributorRunnable* DtFedExec::myDistributor
protected
vrlmod::DtThreadedObject* DtFedExec::myDistributorThread
protected

DtTIME.

Referenced by createDistributor(), and destroyDistributor().

std::map< MAKRti::DtString, DtFederateHandle > DtFedExec::myFederateHdlsByName
protected
DtFedExFederateReservedNameMap DtFedExec::myFederateReservedNames
protected
DtFederateHandleInfoMap DtFedExec::myFederates
protected
DtFederateNameInfoMap DtFedExec::myFederatesByName
protected
float DtFedExec::myFederateTimeoutInterval
protected
int DtFedExec::myFedExHandle
protected
DtString DtFedExec::myFedExName
protected
bool* DtFedExec::myFedHandlesInUse
protected
DtFedReader13* DtFedExec::myFedReader13
protected

Referenced by getReader(), and ~DtFedExec().

DtFedReader1516* DtFedExec::myFedReader1516
protected

Referenced by getReader(), and ~DtFedExec().

DtFedReader1516e* DtFedExec::myFedReader1516e
protected

Referenced by getReader(), and ~DtFedExec().

DtList DtFedExec::myFedSynchronizedCallbacks
protected
MAKRti::DtFomType DtFedExec::myFedType
protected
DtFomClassMgr* DtFedExec::myFom
protected

Referenced by processCreateReady(), and processJoin().

std::vector<DtString> DtFedExec::myFomModules
protected
std::map<DtString, unsigned int> DtFedExec::myFomModulesNameToCrcMap
protected
std::set<DtString> DtFedExec::myFomModulesSet
protected
int DtFedExec::myFreeFedHandle
protected
bool DtFedExec::myFullFedFileDistribution
private
bool DtFedExec::myFullyCreated
protected
DtFederateHandleStdSet DtFedExec::myInitiatedSaveFederates
protected
unsigned long DtFedExec::myInitiatorID
protected
DtList DtFedExec::myJoinCallbacks
protected
std::map<unsigned long, const std::vector<DtString>* > DtFedExec::myJoinFomModules
protected
std::map<DtFederateHandle, DtFedJoinInfo*> DtFedExec::myJoiningFederates
protected
std::map<unsigned long, DtFedJoinInfo*> DtFedExec::myJoiningFederatesByID
protected
DtString DtFedExec::myMomModule
protected
unsigned int DtFedExec::myMomModuleCrc
protected
bool DtFedExec::myNetworkTestingEnabled
protected

Whether network testing has been toggled on/off by the assistant.

Referenced by disableNetworkTesting(), enableNetworkTesting(), handleJoinFailureCases(), processJoin(), processJoinMsg(), and tickJoin().

unsigned int DtFedExec::myNumberFederatesAllowed
protected
int DtFedExec::myNumberResponseAttempts
protected

Response interval from params is divided by this number.

Referenced by DtFedExec().

int DtFedExec::myNumFederates
protected
std::set<DtFederateHandle> DtFedExec::myPendingRestoreFederates
protected
std::set<DtFederateHandle> DtFedExec::myPendingSaveFederates
protected
DtList DtFedExec::myReconnectFailedCallbacks
protected
DtList DtFedExec::myReconnectSucceededCallbacks
protected
DtFedExReservedNameSet DtFedExec::myReservedNames
protected
DtList DtFedExec::myResignCallbacks
protected
float DtFedExec::myResponseInterval
protected

to obtain response retransmission interval

Referenced by DtFedExec(), processJoinMsg(), tickFederates(), and tickJoin().

bool DtFedExec::myRestore
protected
DtFederateHandleInfoMap DtFedExec::myRestoreFederatesByNew
protected
DtFederateHandleInfoMap DtFedExec::myRestoreFederatesByOld
protected
bool DtFedExec::mySave
protected
bool DtFedExec::mySaveBegun
protected
DtString DtFedExec::mySaveLabel
protected
DtString DtFedExec::mySavePath
protected

Referenced by DtFedExec(), and getSaveFileName().

bool DtFedExec::mySavePending
protected
DtFederateHandle DtFedExec::mySavingFederate
protected

Referenced by processSaveRequest().

DtList DtFedExec::mySpAchievedCallbacks
protected
DtList DtFedExec::mySpRegisterCallbacks
protected
int DtFedExec::myStrictNameReservation
protected

Referenced by deleteFederate().

DtSyncHashlist DtFedExec::mySyncList
protected
std::map<DtString, DtFileInformation*> DtFedExec::myTakenFiles
protected
int DtFedExec::myTimeout
protected
const DtString DtFedExec::nullStr = ""
staticprivate

Referenced by fedFileName().

DtFedExecCreator DtFedExec::theCreator = NULL
staticprotected

Referenced by create(), and setCreatorFunction().

const std::vector< DtString > DtFedExec::theEmptyStringSet = std::vector<DtString>()
staticprotected

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)