21 #include <mtl/fedReader.h>
23 #include <vlutil/vlPrint.h>
24 #include <vlutil/vlTime.h>
25 #include <vlutil/vlString.h>
26 #include <vlutil/vlList.h>
27 #include <vlutil/vlSmartPointers.h>
31 #if defined(DtIFSPEC13)
39 #include "RTI/RTIambassador.h"
40 #include "RTI/Enums.h"
41 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
42 #include "RTI/LogicalTimeFactory.h"
44 #include "RTI/time/LogicalTimeFactory.h"
101 std::shared_ptr<DtRtiAssistantLrcClient> assistantClient);
104 typedef void (*DtFedMgrPostTickCallbackFcn) (
void*);
115 std::shared_ptr<DtRtiAssistantLrcClient> assistantClient);
134 virtual void setEnableCallbacks(
bool enableCallbacks);
135 virtual bool callbacksEnabled()
const;
139 #if defined(DtIFSPEC13) || defined(DtIFSPEC1516)
143 const std::vector<DtString>& fomModules,
144 const char* mimModule) = 0;
149 const char* executionName) = 0;
151 #if !defined(DtIFSPEC13) && !defined(DtIFSPEC1516)
152 virtual void listFederationExecutions()
const = 0;
156 virtual void listFederationMembers(DtString
const& federationName)
const = 0;
161 #
if !defined(DtIFSPEC13) && !defined(DtIFSPEC1516)
162 const char* federateName,
164 const char* federateType,
165 const char* executionName,
166 #
if defined(DtIFSPEC13) || defined(DtIFSPEC1516)
167 RTI_API::FederateAmbassador* federateAmbassadorReference,
169 const std::vector<DtString>& fomModules,
171 unsigned long flags) = 0;
178 virtual bool automaticReserveObjectName(
const char *);
181 #if defined(DtIFSPEC13)
188 virtual void waitForResignResponse(
bool serviceCall =
true);
191 virtual void waitForReserveNameResponse(
bool serviceCall =
true);
194 #if defined(DtIFSPEC13)
210 #if defined(DtIFSPEC13) || defined(DtIFSPEC1516)
211 virtual void setTopLevelAmbassador(RTI_API::RTIambassador* ambPtr);
213 virtual void setTopLevelAmbassador(RTI_API::RTIambassador* ambPtr,
214 RTI_API::FederateAmbassador* federateAmbassador);
220 virtual void pretick();
221 virtual void posttick();
223 virtual void postTickCallbacks();
226 virtual void removePostTickCallback(
const MAKRti::DtString& label);
231 #if !defined(DtIFSPEC13)
232 virtual void queryFederationSaveStatus()=0;
236 virtual void queryFederationRestoreStatus()=0;
238 #if !defined(DtIFSPEC1516)
239 virtual void abortFederationSave () =0;
243 virtual void abortFederationRestore () =0;
269 virtual char* getOrderName(MAKRti::DtOrderType order);
275 virtual MAKRti::DtOrderType getOrderHandle(MAKRti::DtString order);
281 virtual MAKRti::DtString
const & fedType()
const;
284 virtual MAKRti::DtString
const & fedName()
const;
287 virtual MAKRti::DtString
const & fedExName()
const;
290 virtual unsigned long fedExHandle()
const;
293 virtual bool isJoined()
const;
297 RTI_API::RTIambassador* rtiAmb();
298 RTI_API::RTIambassador* rtiAmb()
const;
303 virtual RTI_API::FederateAmbassador * federateAmbassador();
304 virtual RTI_API::FederateAmbassador * federateAmbassador()
const;
336 virtual DtTimeMgr* timeMgr();
338 virtual DtTimeMgr* timeMgr()
const;
346 virtual DtMomMgr* momMgr();
348 virtual DtMomMgr* momMgr()
const;
352 virtual DtDataDistMgr* ddmMgr();
354 virtual DtDataDistMgr* ddmMgr()
const;
367 virtual bool forcedToResign()
const;
370 virtual void setMomResign();
373 virtual void resetMomResign();
376 virtual bool saveInitiated()
const;
379 virtual bool saveBegun()
const;
382 virtual bool restoreRequested()
const;
385 virtual bool restoreInitiated()
const;
388 virtual bool restoreBegun()
const;
391 virtual const MAKRti::DtString& restoreLabel()
const;
394 virtual const MAKRti::DtString& lastRestoreLabel()
const;
397 const MAKRti::DtString& currentTimeImplName()
const;
398 void setCurrentTimeImplName(
const MAKRti::DtString& );
401 virtual const MAKRti::DtString& saveLabel()
const;
402 virtual void setSaveLabel(
const MAKRti::DtString& value);
405 virtual const MAKRti::DtString& lastSaveLabel()
const;
406 virtual void setLastSaveLabel(
const MAKRti::DtString& value);
410 virtual void testSaveProgress()
const = 0;
414 virtual void initiateSave();
418 virtual void initiateTimedSave(
DtRtiApiTime const& saveTime);
431 virtual MAKRti::DtString& getSaveFileName(
const char* label,
433 bool extendName=
true);
440 virtual MAKRti::DtString& getRestoreFileName(
const char* label,
444 virtual unsigned long tickCount()
const;
447 virtual bool isTicking()
const;
455 unsigned long flags()
const;
459 virtual DtResignAction automaticResignDirective()
const;
462 virtual void setAutomaticResignDirective(DtResignAction action);
465 #if !defined(DtIFSPEC13) && !defined(DtIFSPEC1516)
479 virtual const MAKRti::DtString& getFederateNameFromHandle(
DtFederateHandle handle );
480 virtual DtFederateHandle getFederateHandleFromName(
const MAKRti::DtString& name );
495 std::shared_ptr<DtRtiAssistantLrcClient> assistantClient);
499 static void setCreatorFunction(DtFederateMgrCreator fn);
505 static void setInternalCreatorFunction(DtFederateMgrCreator fn);
515 virtual void processResign(
const DtResignMsg& msg);
559 #if !defined(DtIFSPEC13) && !defined(DtIFSPEC1516)
565 virtual void sendAlive();
568 virtual void sendResignMsg(
const char* fedExName,
572 void sendTickedMsg();
575 virtual void applyRidParameters();
582 #if defined(DtIFSPEC13) || defined(DtIFSPEC1516)
583 virtual void postJoinInit(
584 const char* federateType,
585 const char* executionName,
586 const char* federateName,
587 RTI_API::FederateAmbassador* federateAmbassadorReference);
589 virtual void postJoinInit(
590 const char* federateType,
591 const char* executionName,
592 const char* federateName);
598 virtual void postJoinConfirmInit();
608 static void processResign(
const DtResignMsg& msg,
void* usr);
626 static void processRestore(
const DtRestoreMsg& msg,
void* usr);
654 #if !defined(DtIFSPEC13) && !defined(DtIFSPEC1516)
664 virtual void createObjectMgr();
667 virtual void createInteractionMgr();
670 virtual void createDdmMgr();
673 virtual void createTimeMgr();
676 virtual void createMomMgr();
679 virtual void createTestMgr();
724 DtDataDistMgr* myDdmMgr;
728 DtTimeMgr* myTimeMgr;
761 #if defined(DtIFSPEC13)
762 RTI::FedTimeFactory myHlaTimeFactory;
std::pair< DtFedMgrPostTickCallbackFcn, void * > DtFedMgrPostTickCallbackInfo
Definition: fedMgr.h:105
virtual Boolean tick(TickTime minimum, TickTime maximum)
virtual void federateSaveNotComplete()
DtFomModuleManager * myFomManager
The FOM Module Manager.
Definition: fedMgr.h:712
DtRtiAmbassadorBaseImplementor * myAmbImpl
The federate's RTI Ambassador Implementor.
Definition: fedMgr.h:702
MAKRti::DtString myFedName
Federate name.
Definition: fedMgr.h:747
This class is a base for the protocol specific DtRtiAmbassadorImplementor class.
Definition: ambImpBase.h:50
Definition: savFinMsg.h:32
DtRIDParameters * myParams
Initialization data.
Definition: fedMgr.h:772
MAKRti::DtString myCurrentTimeImplName
Current time implementation name.
Definition: fedMgr.h:753
virtual void requestFederationRestore(const char *label)
Definition: savRespMsg.h:29
virtual bool restore(DtRtiSaveFile &file)
Perform the actual restore.
Definition: fedMgr.h:424
The DtTestMgrStatusMsg defines a msg for a client to report the results of a latency test...
Definition: testMgrStatusMsg.h:36
The DtAssistantLogEnableMsg defines a wrapper for the RTI Assistant logging enable message used by th...
Definition: assistantLogEnableMsg.h:31
std::shared_ptr< DtRtiAssistantLrcClient > myAssistantClient
Manages the connection to the RTI Assistant.
Definition: fedMgr.h:775
This class manages the RTI's start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
Definition: fedTimeFactory.h:73
DtFedAmbWrapper * myFedAmbCatch
Catches exceptions from federate ambassador calls.
Definition: fedMgr.h:769
bool myMomSaveEvokeCallbacks
State of evoking callbacks prior to MOM resign.
Definition: fedMgr.h:811
DtInteractionMgr * myInterMgr
The interaction manager.
Definition: fedMgr.h:715
Definition: assistantFederateSignalIntervalMsg.h:27
The client connection to the RTI Assistant for an LRC.
Definition: rtiAssistantLrcClient.h:32
std::map< MAKRti::DtString, DtFedMgrPostTickCallbackInfo > DtPostTickCallbackMap
Definition: fedMgr.h:106
bool myFedCallbackReached
Definition: fedMgr.h:694
Definition: fedHandleSet.h:61
unsigned long myFedExHandle
Federation handle.
Definition: fedMgr.h:740
Definition: resignMsg.h:36
RTI_API::LogicalTime DtRtiApiTime
Typedefs for RTI API types that frequently require conditional precompile directives.
Definition: rtiApiTypes.h:91
Definition: resignDirectiveMsg.h:24
virtual void requestFederationSave(const char *label, const FedTime &theTime)
DtTime myLastTickTime
The last tick time.
Definition: fedMgr.h:840
virtual FederateHandle joinFederationExecution(const char *yourName, const char *executionName, FederateAmbassadorPtr federateAmbassadorReference)
bool myMomResign
Indicates MOM caused resign.
Definition: fedMgr.h:808
DtTestMgrFedAmbWrapper is installed by the testManager and serves to catch testInteraction messages f...
Definition: testMgrFedAmbWrapper.h:45
unsigned long myTickCount
Tick counter.
Definition: fedMgr.h:820
MAKRti::DtString myFedType
Federate type.
Definition: fedMgr.h:743
Instances of DtFederateMgr process federation-level messages (such as create, destroy, join, resign, and sync points) and manages the objects responsible for handling general communication, objects, interactions, the FOM, MOM, and data distribution mmg.
Definition: fedMgr.h:93
bool myRestoreRequested
Indicates restore requested.
Definition: fedMgr.h:786
#define NULL
Definition: baseTypes13.h:8
bool mySaveBegun
Indicates save begun.
Definition: fedMgr.h:784
DtLogicalTimeFactory * myLogicalTimeFactory
Logical time factory Even if NULL, need to have this factory.
Definition: fedMgr.h:760
virtual void resignFederationExecution(ResignAction theAction)
bool myIsTicking
indicates currently processing tick
Definition: fedMgr.h:823
virtual void federateRestoreComplete()
DtConnectionMgr * myConnectMgr
The connection manager.
Definition: fedMgr.h:709
The DtLatencyReportMsg defines a msg for a client to report the results of a latency test...
Definition: latencyReportMsg.h:37
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:67
static DtFederateMgrCreator theInternalCreator
The internal creator.
Definition: fedMgr.h:858
MAKRti::DtTime myLastHeartbeat
Time of last heartbeat.
Definition: fedMgr.h:756
Instances of DtInteractionMgr manage the sending and receiving of interactions.
Definition: interMgr.h:46
bool myRestoreInitiated
Indicates restore initiated.
Definition: fedMgr.h:788
DtHandle DtFederateHandle
Definition: internalTypes.h:46
Definition: resEndMsg.h:31
virtual void destroyFederationExecution(const char *executionName)
This class defines a message sent between the exec and the assistant that enables and disables networ...
Definition: enableDisableNetworkTestingMsg.h:25
virtual void registerFederationSynchronizationPoint(const char *label, const char *theTag)
unsigned long myFlags
Definition: fedMgr.h:831
bool myIgnoreForcedResign
Prevents forcing duplicate resign.
Definition: fedMgr.h:802
DtFederateHandle myFedHandle
Federate handle.
Definition: fedMgr.h:750
bool myRestoreBegun
Indicates restore begun.
Definition: fedMgr.h:790
float mySignalTickInterval
The Signal Tick Interval.
Definition: fedMgr.h:837
RTI_API::RTIambassador * myRtiAmb
The federate's RTI Ambassador.
Definition: fedMgr.h:699
bool myResignInProgress
Indicates a resign is in progress.
Definition: fedMgr.h:814
Definition: restoreMsg.h:23
The object manager class processes the object management services.
Definition: objMgr.h:81
DtMomMgr * myMomMgr
The MOM manager.
Definition: fedMgr.h:721
MAKRti::DtFilename myStandardMimPath
Definition: fedMgr.h:844
The DtAssistantRidParamsMsg defines a wrapper for the RTI Assistant RID parameter message used by the...
Definition: assistantRidParamsMsg.h:33
MAKRti::DtString myLastRestoreLabel
The last restore label.
Definition: fedMgr.h:798
virtual void federateRestoreNotComplete()
virtual void createFederationExecution(const char *executionName, const char *FED)
std::map< DtFederateHandle, MAKRti::DtString > myFederateHandleToName
Definition: fedMgr.h:848
ResignAction
Definition: datatypes.pb.h:305
DtObjectMgr * myObjMgr
The object manager.
Definition: fedMgr.h:718
MAKRti::DtTime myResponseInterval
Interval to wait for response message during a message protocol.
Definition: fedMgr.h:734
virtual void federateSaveBegun()
ULong FederateHandle
Definition: RTItypes13.h:120
Definition: resRepMsg.h:24
The DtAssistantExitMsg defines a wrapper for the RTI Assistant exit message used by the Assistant to ...
Definition: assistantExitMsg.h:32
MAKRti::DtString myLastSaveLabel
The last save label.
Definition: fedMgr.h:794
virtual void synchronizationPointAchieved(const char *label)
std::map< MAKRti::DtString, DtFederateHandle > myFederateNameToHandle
Definition: fedMgr.h:847
bool myCallbacksEnabled
Callbacks are enabled.
Definition: fedMgr.h:829
virtual TransportationHandle getTransportationHandle(const char *theName)
virtual bool save(DtRtiSaveFile &file)
Perform the actual save.
Definition: fedMgr.h:421
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
MAKRti::DtString myFedExName
Federation execution name.
Definition: fedMgr.h:737
Definition: saveFile.h:21
MAKRti::DtString mySaveLabel
The save label.
Definition: fedMgr.h:792
DtTestManager * myTestMgr
Definition: fedMgr.h:833
virtual void federateSaveComplete()
Definition: fomModuleManager.h:39
bool myForcedToResign
Indicates forced resign occurred.
Definition: fedMgr.h:805
errorCodes
error codes for the errorValue flag
Definition: joinConfMsg.h:29
MAKRti::DtResignAction myResignAction
The resign action.
Definition: fedMgr.h:851
virtual char * getTransportationName(TransportationHandle theHandle)
Definition: savInitMsg.h:23
DtTestManager runs network connectivity tests between local RTI components.
Definition: testManager.h:50
Definition: resInitMsg.h:22
bool myEnableFederateHeartbeat
is heartbeating enabled?
Definition: fedMgr.h:826
MAKRti::DtClock myClock
Clock for timing.
Definition: fedMgr.h:817
DtFedAmbWrapper * myPrinter
Prints data for federate ambassador calls.
Definition: fedMgr.h:766
MAKRti::DtString myRestoreLabel
The restore label.
Definition: fedMgr.h:796
static DtFederateMgrCreator theCreator
The plugin creator.
Definition: fedMgr.h:855
bool mySaveInitiated
Indicates save initiated.
Definition: fedMgr.h:782
bool myNetworkTestEnabled
Definition: fedMgr.h:834
DtPostTickCallbackMap myPostTickCallbacks
Definition: fedMgr.h:842