![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 2007 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: synchronousFileDistributor.h,v $ $Revision: 1.6 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtSynchronousMultFileDistributor_H_ 00013 #define DtSynchronousMultFileDistributor_H_ 00014 00015 00016 #include "fileDistributor.h" 00017 00018 00019 class DtSynchronousFileDistributor; 00020 //DtFileDistributorThread creator callback signature 00021 00027 class DT_DLL_LRC DtSynchronousFileDistributor : public DtFileDistributor 00028 { 00029 00030 public: 00031 00033 DtSynchronousFileDistributor( const int fedEx, const MAKRti::DtString& fedExName, 00034 DtConnectionMgr* connMgr ); 00035 00037 virtual ~DtSynchronousFileDistributor(); 00038 00039 00040 00041 00042 public: 00043 00045 virtual bool tick(); 00046 00047 static DtSynchronousFileDistributor* create(const int fedEx, 00048 const MAKRti::DtString& fedExName, 00049 DtConnectionMgr* connMgr ); 00050 00051 00054 virtual bool sendFedFile(const std::vector<MAKRti::DtString>& modules); 00055 00057 virtual bool pullEntireFedFile(const std::vector<MAKRti::DtString>& modules); 00058 00060 static void multFileReceivedCb( const DtFomModuleDistributionMsg& msg, void* usr ); 00061 00063 bool pushedFomModules() const; 00064 00066 bool pullInProgress() const; 00067 00069 void getPushedFomModules(std::vector<MAKRti::DtString>& modules); 00070 00072 void multFileRequestedCb( const DtFomModuleRequestMsg& msg ); 00073 00075 void multFileReceivedCb( const DtFomModuleDistributionMsg& msg ); 00076 00078 void fileReceivedCb(const DtFomModuleDistributionMsg& msg ); 00079 00080 00081 private: 00082 DtSynchronousFileDistributor(); 00083 DtSynchronousFileDistributor(const DtSynchronousFileDistributor& orig); 00084 DtSynchronousFileDistributor& operator=(const DtSynchronousFileDistributor& orig); 00085 00086 private: 00087 00088 00090 //Really the string associated with the file when their contents were uploaded. 00091 //All files stored as tmpFiles. 00092 00093 DtConnectionMgr* myConnMgr; 00094 std::vector<MAKRti::DtString> myReceivedPushedFomModules; 00095 00097 bool myPullInProgress; 00098 00099 }; 00100 00101 #endif //! DtSynchronousMultFileDistributor_H_