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

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. More...
 
virtual ~DtSynchronousFileDistributor ()
 Destructor. More...
 
virtual bool tick ()
 Tick the multFileDistributor. More...
 
virtual bool sendFedFile (const std::vector< MAKRti::DtString > &modules)
 Override sendFedFile upload fed files passed in. More...
 
virtual bool pullEntireFedFile (const std::vector< MAKRti::DtString > &modules, bool sc=true)
 Download FED File from the RtiExec ( blocking ) More...
 
bool pushedFomModules () const
 Has the fedex pushed an entire fom module since the last time getPushedFomModules called? More...
 
bool pullInProgress () const
 Is the distributor currently pulling FOM modules? More...
 
void getPushedFomModules (std::vector< MAKRti::DtString > &modules)
 Populate modules w/ the names of pushedFomModules. More...
 
void multFileRequestedCb (const DtFomModuleRequestMsg &msg)
 File requested callback ( part of multiple file requested) More...
 
void multFileReceivedCb (const DtFomModuleDistributionMsg &msg)
 File received callback ( part of multiple file recieved) More...
 
void fileReceivedCb (const DtFomModuleDistributionMsg &msg)
 We're hiding DtFileDistributorRunnable's fileReceivedCb. More...
 
- 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 More...
 
virtual void fedFileUploaded (const MAKRti::DtString fileUploaded)
 Called when Fom Module received successfully. More...
 
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. More...
 
virtual void removeFiles (const std::vector< MAKRti::DtString > &modules)
 Remove all knowledge of these file from myFiles. More...
 
virtual bool fedFileReady (const MAKRti::DtString &fileName) const
 Does the distributor have a valid copy of this fom Module. More...
 
virtual bool fedFilesReady (const std::vector< MAKRti::DtString > *fileNames) const
 Does the distributor have a valid copy of all of these fom Modules. More...
 
const FILE * fedFilePtr (MAKRti::DtString fileName) const
 Get the fed file pointer. More...
 
const char * fedFileBuff (MAKRti::DtString fileName) const
 Get the fed file buffer. More...
 
DtFileInformationtakeFedFile (MAKRti::DtString fileName)
 Take ownership of the file. More...
 
unsigned int fileSize (MAKRti::DtString fileName) const
 
FILE * getTmpFile ()
 
void setFedHandle (unsigned int newHandle)
 Set the Fed Handle of the distributor. More...
 
void setFedexHandle (unsigned int newHandle)
 
bool requestsPending () const
 Are there outstanding requests to be handled? More...
 

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) More...
 
- Static Public Member Functions inherited from DtFileDistributor
static void setCreatorFunction (DtFileDistributorCreator fn)
 

Private Member Functions

 DtSynchronousFileDistributor ()
 
 DtSynchronousFileDistributor (const DtSynchronousFileDistributor &orig)
 
DtSynchronousFileDistributoroperator= (const DtSynchronousFileDistributor &orig)
 

Private Attributes

DtConnectionMgrmyConnMgr
 Map between files that have been uploaded to me and their 'file names'. More...
 
std::vector< MAKRti::DtString > myReceivedPushedFomModules
 
bool myPullInProgress
 Indicates that a FOM module pull is currently in progress. More...
 

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. More...
 
virtual ~DtFileDistributor ()
 Destructor. More...
 
- Protected Attributes inherited from DtFileDistributor
std::map< MAKRti::DtString,
DtFileInformation * > 
myFiles
 Map between files that have been uploaded to me and their 'file names'. More...
 
std::set< std::pair
< DtFederateHandle,
MAKRti::DtString > > 
myPendingRequests
 
MAKRti::DtString myFedExName
 
int myFedExHandle
 
int myFederateHandle
 
std::map< MAKRti::DtString,
FILE * > 
myTempFileHandles
 
- Static Protected Attributes inherited from DtFileDistributor
static DtFileDistributorCreator theCreator
 

Detailed Description

Distributes fomModule files from initiating federate to RtiExec and then from RtiExec to all joining federates.

Constructor & Destructor Documentation

DtSynchronousFileDistributor::DtSynchronousFileDistributor ( const int  fedEx,
const MAKRti::DtString &  fedExName,
DtConnectionMgr connMgr 
)

Federate Constructor.

virtual DtSynchronousFileDistributor::~DtSynchronousFileDistributor ( )
virtual

Destructor.

DtSynchronousFileDistributor::DtSynchronousFileDistributor ( )
private
DtSynchronousFileDistributor::DtSynchronousFileDistributor ( const DtSynchronousFileDistributor orig)
private

Member Function Documentation

static DtSynchronousFileDistributor* DtSynchronousFileDistributor::create ( const int  fedEx,
const MAKRti::DtString &  fedExName,
DtConnectionMgr connMgr 
)
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.

static void DtSynchronousFileDistributor::multFileReceivedCb ( const DtFomModuleDistributionMsg msg,
void *  usr 
)
static

File received callback ( part of multiple file recieved)

void DtSynchronousFileDistributor::multFileReceivedCb ( const DtFomModuleDistributionMsg msg)

File received callback ( part of multiple file recieved)

void DtSynchronousFileDistributor::multFileRequestedCb ( const DtFomModuleRequestMsg msg)

File requested callback ( part of multiple file requested)

DtSynchronousFileDistributor& DtSynchronousFileDistributor::operator= ( const DtSynchronousFileDistributor orig)
private
virtual bool DtSynchronousFileDistributor::pullEntireFedFile ( const std::vector< MAKRti::DtString > &  modules,
bool  sc = true 
)
virtual

Download FED File from the RtiExec ( blocking )

bool DtSynchronousFileDistributor::pullInProgress ( ) const

Is the distributor currently pulling FOM modules?

bool DtSynchronousFileDistributor::pushedFomModules ( ) const

Has the fedex pushed an entire fom module since the last time getPushedFomModules called?

virtual bool DtSynchronousFileDistributor::sendFedFile ( const std::vector< MAKRti::DtString > &  modules)
virtual

Override sendFedFile upload fed files passed in.

Reimplemented from DtFileDistributor.

virtual bool DtSynchronousFileDistributor::tick ( )
virtual

Tick the multFileDistributor.

Member Data Documentation

DtConnectionMgr* DtSynchronousFileDistributor::myConnMgr
private

Map between files that have been uploaded to me and their 'file names'.

bool DtSynchronousFileDistributor::myPullInProgress
private

Indicates that a FOM module pull is currently in progress.

std::vector<MAKRti::DtString> DtSynchronousFileDistributor::myReceivedPushedFomModules
private

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

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