![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Distributes fomModule files from initiating federate to RtiExec and then from RtiExec to all joining federates. More...
Inheritance diagram for DtSynchronousFileDistributor:
Collaboration diagram for DtSynchronousFileDistributor:Public Member Functions | |
| DtSynchronousFileDistributor (const int fedEx, const MAKRti::DtString &fedExName, DtConnectionMgr *connMgr) | |
| Federate Constructor. | |
| virtual | ~DtSynchronousFileDistributor () |
| Destructor. | |
| virtual bool | tick () |
| Tick the multFileDistributor. | |
| virtual bool | sendFedFile (const std::vector< MAKRti::DtString > &modules) |
| Override sendFedFile upload fed files passed in. | |
| virtual bool | pullEntireFedFile (const std::vector< MAKRti::DtString > &modules) |
| Download FED File from the RtiExec ( blocking ) | |
| bool | pushedFomModules () const |
| Has the fedex pushed an entire fom module since the last time getPushedFomModules called? | |
| bool | pullInProgress () const |
| Is the distributor currently pulling FOM modules? | |
| void | getPushedFomModules (std::vector< MAKRti::DtString > &modules) |
| Populate modules w/ the names of pushedFomModules. | |
| void | multFileRequestedCb (const DtFomModuleRequestMsg &msg) |
| File requested callback ( part of multiple file requested) | |
| void | multFileReceivedCb (const DtFomModuleDistributionMsg &msg) |
| File received callback ( part of multiple file recieved) | |
| void | fileReceivedCb (const DtFomModuleDistributionMsg &msg) |
| We're hiding DtFileDistributorRunnable's fileReceivedCb. | |
Public Member Functions inherited from DtFileDistributor | |
| virtual bool | pushFedFile (DtConnectionMgr *connMgr, const MAKRti::DtString &fileName, const unsigned int fileSize, const char *fileBuffer, const DtFederateHandle destination=0) |
| pushFedFile | |
| virtual void | fedFileUploaded (const MAKRti::DtString fileUploaded) |
| Called when Fom Module received successfully. | |
| virtual bool | fileReceived (const DtFomModuleDistributionMsg &msg, bool &areAllHere) |
| virtual bool | fileRequested (const DtFomModuleRequestMsg &msg) |
| virtual void | removeFile (const MAKRti::DtString fileName) |
| Remove all knowledge of this file from myFiles. | |
| virtual void | removeFiles (const std::vector< MAKRti::DtString > &modules) |
| Remove all knowledge of these file from myFiles. | |
| virtual bool | fedFileReady (const MAKRti::DtString &fileName) const |
| Does the distributor have a valid copy of this fom Module. | |
| virtual bool | fedFilesReady (const std::vector< MAKRti::DtString > *fileNames) const |
| Does the distributor have a valid copy of all of these fom Modules. | |
| const FILE * | fedFilePtr (MAKRti::DtString fileName) const |
| Get the fed file pointer. | |
| const char * | fedFileBuff (MAKRti::DtString fileName) const |
| Get the fed file buffer. | |
| DtFileInformation * | takeFedFile (MAKRti::DtString fileName) |
| Take ownership of the file. | |
| unsigned int | fileSize (MAKRti::DtString fileName) const |
| FILE * | getTmpFile () |
| void | setFedHandle (unsigned int newHandle) |
| Set the Fed Handle of the distributor. | |
| void | setFedexHandle (unsigned int newHandle) |
| bool | requestsPending () const |
| Are there outstanding requests to be handled? | |
Static Public Member Functions | |
| static DtSynchronousFileDistributor * | create (const int fedEx, const MAKRti::DtString &fedExName, DtConnectionMgr *connMgr) |
| static void | multFileReceivedCb (const DtFomModuleDistributionMsg &msg, void *usr) |
| File received callback ( part of multiple file recieved) | |
Static Public Member Functions inherited from DtFileDistributor | |
| static void | setCreatorFunction (DtFileDistributorCreator fn) |
Private Member Functions | |
| DtSynchronousFileDistributor () | |
| DtSynchronousFileDistributor (const DtSynchronousFileDistributor &orig) | |
| DtSynchronousFileDistributor & | operator= (const DtSynchronousFileDistributor &orig) |
Private Attributes | |
| DtConnectionMgr * | myConnMgr |
| Map between files that have been uploaded to me and their 'file names'. | |
| std::vector< MAKRti::DtString > | myReceivedPushedFomModules |
| bool | myPullInProgress |
| Indicates that a FOM module pull is currently in progress. | |
Additional Inherited Members | |
Protected Types inherited from DtFileDistributor | |
| typedef std::list< DtRtiMsg * > | rtiMsgList |
Protected Member Functions inherited from DtFileDistributor | |
| DtFileDistributor (const int fedExHandle, const int federateHandle, const MAKRti::DtString &fedExName) | |
| Constructor. | |
| virtual | ~DtFileDistributor () |
| Destructor. | |
Protected Attributes inherited from DtFileDistributor | |
| std::map< MAKRti::DtString, DtFileInformation * > | myFiles |
| Map between files that have been uploaded to me and their 'file names'. | |
| std::set< std::pair < DtFederateHandle, MAKRti::DtString > > | myPendingRequests |
| MAKRti::DtString | myFedExName |
| int | myFedExHandle |
| int | myFederateHandle |
| std::map< MAKRti::DtString, FILE * > | myOpenFileHandles |
Static Protected Attributes inherited from DtFileDistributor | |
| static DtFileDistributorCreator | theCreator = 0 |
Distributes fomModule files from initiating federate to RtiExec and then from RtiExec to all joining federates.
| DtSynchronousFileDistributor::DtSynchronousFileDistributor | ( | const int | fedEx, |
| const MAKRti::DtString & | fedExName, | ||
| DtConnectionMgr * | connMgr | ||
| ) |
Federate Constructor.
References DtFomModuleDistributionMsg::addCallback(), multFileReceivedCb(), and myConnMgr.
|
virtual |
Destructor.
References multFileReceivedCb(), myConnMgr, and DtFomModuleDistributionMsg::removeCallback().
|
private |
|
private |
|
static |
| void DtSynchronousFileDistributor::fileReceivedCb | ( | const DtFomModuleDistributionMsg & | msg | ) |
We're hiding DtFileDistributorRunnable's fileReceivedCb.
| void DtSynchronousFileDistributor::getPushedFomModules | ( | std::vector< MAKRti::DtString > & | modules | ) |
Populate modules w/ the names of pushedFomModules.
References myReceivedPushedFomModules.
Referenced by DtRtiExecFederateMgr::posttick().
|
static |
File received callback ( part of multiple file recieved)
Referenced by DtSynchronousFileDistributor(), and ~DtSynchronousFileDistributor().
| void DtSynchronousFileDistributor::multFileReceivedCb | ( | const DtFomModuleDistributionMsg & | msg | ) |
File received callback ( part of multiple file recieved)
References DtFileDistributor::fedFileUploaded(), DtFileDistributor::fileReceived(), DtFomModuleDistributionMsg::fomModuleName(), DtFileDistributor::myFiles, and myReceivedPushedFomModules.
| void DtSynchronousFileDistributor::multFileRequestedCb | ( | const DtFomModuleRequestMsg & | msg | ) |
File requested callback ( part of multiple file requested)
References DtFileDistributor::fileRequested(), DtFomModuleRequestMsg::getFomModuleNames(), DtFileDistributor::myPendingRequests, and DtFomModuleRequestMsg::sourceID().
|
private |
|
virtual |
Download FED File from the RtiExec ( blocking )
References DtMessageFactory< T_Message, T_MessageKind, T_NetworkHeader >::create(), DtFomModuleRequestMsgKind, DtConnectionMgr::enterServiceCall(), DtConnectionMgr::exitServiceCall(), DtConnectionMgr::msgFactory(), myConnMgr, DtFileDistributor::myFederateHandle, DtFileDistributor::myFedExHandle, DtFileDistributor::myFedExName, DtFileDistributor::myFiles, myPullInProgress, DtConnectionMgr::params(), DtConnectionMgr::sendAndDelete(), DtFomModuleRequestMsg::set(), DtRtiMsg::setFederateHandle(), DtRtiMsg::setFedEx(), tick(), and DtConnectionMgr::tick().
| bool DtSynchronousFileDistributor::pullInProgress | ( | ) | const |
Is the distributor currently pulling FOM modules?
References myPullInProgress.
Referenced by DtRtiExecFederateMgr::posttick().
| bool DtSynchronousFileDistributor::pushedFomModules | ( | ) | const |
Has the fedex pushed an entire fom module since the last time getPushedFomModules called?
References myReceivedPushedFomModules.
Referenced by DtRtiExecFederateMgr::posttick().
|
virtual |
Override sendFedFile upload fed files passed in.
Reimplemented from DtFileDistributor.
References myConnMgr, DtFileDistributor::myFiles, DtFileDistributor::pushFedFile(), DtFileDistributor::sendFedFile(), and DtConnectionMgr::tick().
|
virtual |
Tick the multFileDistributor.
References myConnMgr, DtFileDistributor::myFiles, DtFileDistributor::myPendingRequests, NULL, and DtFileDistributor::pushFedFile().
Referenced by pullEntireFedFile().
|
private |
Map between files that have been uploaded to me and their 'file names'.
Referenced by DtSynchronousFileDistributor(), pullEntireFedFile(), sendFedFile(), tick(), and ~DtSynchronousFileDistributor().
|
private |
Indicates that a FOM module pull is currently in progress.
Referenced by pullEntireFedFile(), and pullInProgress().
|
private |
Referenced by getPushedFomModules(), multFileReceivedCb(), and pushedFomModules().