![]() |
VR-Link API Documentation for HLA 1516
|
Instances of DtExerciseConn are used to provide an application's interface or connection to the network in an HLA environment. More...
Inheritance diagram for DtExerciseConn:
Collaboration diagram for DtExerciseConn:Public Types | |
| enum | InitializationStatus { DtINIT_SUCCESS = 0, DtCOULD_NOT_CREATE_RTIAMB = 1, DtCOULD_NOT_CREATE_FEDEX = 2, DtCOULD_NOT_JOIN_FEDEX = 3, DtCOULD_NOT_OPEN_FED = 4, DtCOULD_NOT_PARSE_FED = 5, DtCOULD_NOT_FIND_FOMMAPPER = 6, DtERROR_OPENING_FOMMAPPER_LIB = 7, DtCOULD_NOT_CONNECT_RTIAMB = 8 } |
| Initialization Error Enumerations. More... | |
| typedef DtVrlFederateAmbassador *(* | DtFedAmbCreator )() |
| typedef DtFomMapper *(* | DtFomMapperCreator )(void *usr) |
| typedef void(* | DtFomMapperDeletor )(DtFomMapper *) |
| typedef DtVrlRtiAmbassador *(* | DtRtiAmbCreator )(const std::vector< std::wstring > &) |
| RTIambassador creator function. | |
| typedef DtTime(* | DtLogicalTimeToVrlTimeConverter )(const RTI::LogicalTime &theLogicalTime) |
| typedef std::auto_ptr < RTI::LogicalTime >(* | DtVrlTimeToLogicalTimeConverter )(const DtTime &time) |
Public Member Functions | |
| DtExerciseConn (const DtExerciseConnInitializer &init, InitializationStatus *status=0) | |
| This constructor takes a DtExerciseConnInitializer and creates an exercise connection based on the parameters set within the initializer. | |
| DtExerciseConn (const char *execName, const char *federateType, DtFomMapper *mapper=DtRprFomMapper::create(0), const char *fedFileName=0, InitializationStatus *status=0) | |
| Constructor. | |
| DtExerciseConn (const char *execName, const char *federateType, const char *dsoName, const char *fedFileName=0, void *fomMapInitData=0, InitializationStatus *status=0) | |
| Constructor. | |
| virtual | ~DtExerciseConn () |
| destructor | |
| virtual void | setReflecting () |
| Set a flag that determines whether local objects and interactions will be reflected back to us. | |
| virtual bool | reflecting () const |
| Get the reflecting flag. See above description. | |
| virtual void | setReflectRemoteUpdatesIntoPubFlag (bool onff) |
| Set the reflectRemoteUpdatesIntoPub flag. | |
| virtual bool | reflectRemoteUpdatesIntoPubFlag () const |
| Get the reflectRemoteUpdatesIntoPub flag. See above description. | |
| virtual void | setReflectingThroughRti () |
| Set the reflecting through RTI flag to true. | |
| virtual bool | reflectingThroughRti () const |
| Get the reflecting through RTI flag. | |
| virtual void | ignoreAdvisories () |
| The following functions control whether VR-Link should send updates for classes, attributes, and interactions based on advisories describing the existence of remote subscribing federates. | |
| virtual bool | usingAdvisories () const |
| Get the advisories flag. See above description. | |
| void | setRemoveObjectOnAttOutOfScope (bool remove) |
| virtual void | send (const DtStateMsg &msg) |
| Send a state message to the network. | |
| virtual void | send (const DtInteraction &msg) |
| Send an interaction to the network. | |
| virtual void | send (const DtInteraction &msg, const RTI::RegionHandleSet *region) |
| Send an interaction to the network (DDM version). | |
| virtual void | sendStamped (const DtStateMsg &msg) |
| Send a state message to the network which has been time stamped with the current time. | |
| virtual void | sendStamped (const DtInteraction &msg) |
| Send an interaction to the network which has been time stamped with the current time. | |
| virtual void | sendStampedWithRegion (const DtInteraction &msg, DtDDMRegionSP region) |
| Send an interaction to the network with the DDM region described by region. | |
| virtual void | sendStamped (const DtInteraction &msg, const RTI::RegionHandleSet *region) |
| Send an interaction to the network which has been time stamped with the current time (DDM version). | |
| virtual DtTime | currentTimeForStamping () |
| currentTimeForStamping() returns time to send with outgoing messages (default is real time if absolute time-stamping, sim time otherwise. | |
| virtual int | drainInput (DtTime maxTime=-1, DtTime minTime=0.0) |
| Processes input from the exercise by calling the RTI's tick function. | |
| virtual void | setObjectIdForEventId (const DtGlobalObjectDesignator &id) |
| Set objectID to use in the next event ID. | |
| virtual const DtEventID & | nextEventId () |
| Get a unique event ID. | |
| virtual DtVrlRtiAmbassador * | rtiAmb () |
| Get the RTI ambassador. | |
| virtual DtVrlFederateAmbassador * | fedAmb () |
| Get the federate ambassador. | |
| virtual RTI::FederateHandle | fedHandle () const |
| Get the federate handle. | |
| virtual const DtString & | fedType () const |
| Returns the specified type of the federate. | |
| virtual const DtString & | execName () const |
| Get the federation execution name. | |
| virtual bool | isUsingMakRti () const |
| Returns true if MAK RTI is in use. | |
| virtual DtString | rtiName () const |
| Returns the name of the RTI in use. | |
| virtual DtString | rtiVersion () const |
| Returns the version of the RTI in use. | |
| virtual DtString | rtiError () const |
| Returns the error string (used to store the exceptions thrown by RTI during the connection initialization stage. | |
| virtual DtFom * | fom () |
| Get the FOM. | |
| virtual DtInteractionFactory * | interactionFactory () |
| Get the interaction factory. | |
| virtual DtHlaObjectFactory * | objectFactory () |
| Get the object factory. | |
| virtual DtFomMapper * | fomMapper () |
| Get the FOM Mapper. | |
| virtual DtHlaObjectManager * | hlaObjectManager () |
| Get the hlaObjectManager. | |
| virtual void | setTimeStampType (DtTimeStampType relOrAbs) |
| Set the time stamp type (DtTimeStampAbsolute or DtTimeStampRelative). | |
| virtual DtTimeStampType | timeStampType () const |
| Get the time stamp type. | |
| virtual void | addInteractionCallback (RTI::InteractionClassHandle h, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Add an interaction callback by class handle, which is called with the user data when the specified interaction is received. | |
| virtual void | addInteractionCallbackByName (const char *className, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Add an interaction callback by class name, which is called with the user data when the specified interaction is received. | |
| virtual void | removeInteractionCallback (RTI::InteractionClassHandle h, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Remove an interaction callback by class handle. | |
| virtual void | removeInteractionCallbackByName (const char *className, DtReceiveInteractionCb cb, void *usr, DtDDMRegionSP region=DtDDMRegionSP()) |
| Remove an interaction callback by class name. | |
| virtual void | addDiscoverObjectCallback (RTI::ObjectClassHandle h, DtDiscoverObjectCb cb, void *usr) |
| Add a discoverObject callback which is called with the user data when the specified interaction is received. | |
| virtual void | removeDiscoverObjectCallback (RTI::ObjectClassHandle h, DtDiscoverObjectCb cb, void *usr) |
| Remove a discoverObject callback. | |
| virtual void | addRemoveObjectCallback (RTI::ObjectInstanceHandle id, DtRemoveObjectCb cb, void *usr) |
| Add a removeObject callback which is called with the user data when the specified interaction is received. | |
| virtual void | removeRemoveObjectCallback (RTI::ObjectInstanceHandle id, DtRemoveObjectCb cb, void *usr) |
| Remove a removeObject callback. | |
| virtual void | setDestroyFedExecFlag (bool flag) |
| Set the flag that determines whether or not the DtExerciseConn destructor will attempt to destroy the federation execution. | |
| virtual bool | destroyFedExecFlag () |
| Get the destroy fed exec flag. See above description. | |
| virtual void | setReplyingToSynchronizationPoints (bool yesNo) |
| Get/Set flag which determines whether the exConn will respond to synchronization points. | |
| virtual bool | replyingToSynchronizationPoints () |
| Get the reply to synchronization points flag. | |
| virtual void | replyToSynchronizationPoint (const char *label) |
| Replies to sync point. | |
| virtual void | setAutoSubscribeFlag (bool flag) |
| Set flag which determines whether to automatically subscribe to interaction classes for which callbacks are being registered. | |
| virtual bool | autoSubscribeFlag () const |
| Get the auto subscribe flag. See above description. | |
| virtual void | setSendFedTime (bool flag) |
| Set flag which determines whether to use Time Stamp Order when sending and receiving interactions. | |
| virtual bool | sendFedTime () const |
| Get the send fed time flag. See above description. | |
| virtual void | setUseGeographicDdm (bool flag) |
| Set flag which indicates geographic whether Geographic DDM is to be used or not. | |
| virtual bool | useGeographicDdm () const |
| Returns whether this federate is using Geographic DDM. | |
| virtual void | setDeleteOnOutOfScope (bool yesNo) |
| virtual bool | deleteOnOutOfScope () const |
| virtual RTI::LogicalTimeFactory * | logicalTimeFactory () const |
| returns a pointer to the logicalTimeFactory used by the exerciseConnection; | |
| virtual void | registerSynchronizationPoint (const DtString &label) |
| Register a synchronization point. | |
| virtual void | registerSynchronizationPoint (const DtString &label, const RTI::VariableLengthData &tag) |
| Register a synchronization point with user tag supplied. | |
| virtual void | addSynchPointRegistrationSucceededCb (const DtString &label, DtSynchPointCb func, void *usr) |
| Add callback for sync point registration succeeded, for a specific label. | |
| virtual void | addSynchPointRegistrationSucceededCb (DtSynchPointCb func, void *usr) |
| Add a callback for any sync point registration succeeded. | |
| virtual void | removeSynchPointRegistrationSucceededCb (const DtString &label, DtSynchPointCb func, void *usr) |
| Remove a callback for sync point registration succeeded, for a specific label. | |
| virtual void | removeSynchPointRegistrationSucceededCb (DtSynchPointCb func, void *usr) |
| Remove a callback for any sync point registration succeeded. | |
| virtual void | addSynchPointRegistrationFailedCb (const DtString &label, DtSynchPointCb func, void *usr) |
| Add a callback for sync point registration failed, for a specific label. | |
| virtual void | addSynchPointRegistrationFailedCb (DtSynchPointCb func, void *usr) |
| Add a callback for any sync point registration failed. | |
| virtual void | removeSynchPointRegistrationFailedCb (const DtString &label, DtSynchPointCb func, void *usr) |
| Remove a callback for sync point registration failed, for a specific label. | |
| virtual void | removeSynchPointRegistrationFailedCb (DtSynchPointCb func, void *usr) |
| Remove a callback for sync point registration failed. | |
| virtual void | addFederationSynchedCb (const DtString &label, DtSynchPointCb func, void *usr) |
| Add a callback for federation synced callback, for a specific label. | |
| virtual void | addFederationSynchedCb (DtSynchPointCb func, void *usr) |
| Add a callback for federation synced callback, for any label. | |
| virtual void | removeFederationSynchedCb (const DtString &label, DtSynchPointCb func, void *usr) |
| Remove a callback for federation synced callback, for a specific label. | |
| virtual void | removeFederationSynchedCb (DtSynchPointCb func, void *usr) |
| Remove a callback for federation synced callback, for any label. | |
| virtual void | addAnnounceSynchPointCb (const DtString &label, DtAnnounceSynchPointCb func, void *usr) |
| Add a callback for announce sync point callback, for a specific label. | |
| virtual void | addAnnounceSynchPointCb (DtAnnounceSynchPointCb func, void *usr) |
| Add a callback for announce sync point callback, for a specific label. | |
| virtual void | removeAnnounceSynchPointCb (const DtString &label, DtAnnounceSynchPointCb func, void *usr) |
| Remove a callback for announce sync point callback, for a specific label. | |
| virtual void | removeAnnounceSynchPointCb (DtAnnounceSynchPointCb func, void *usr) |
| Remove a callback for announce sync point callback, for any label. | |
| virtual void | setDdmPlayBoxLowerBound (const DtGeodeticCoord &bound) |
| Sets the lower bound of the play-box. | |
| virtual void | setDdmPlayBoxUpperBound (const DtGeodeticCoord &bound) |
| Sets the upper bound of the play-box. | |
| virtual const DtGeodeticCoord & | ddmPlayBoxLowerBound () const |
| Returns the lower bound of the play-box. | |
| virtual const DtGeodeticCoord & | ddmPlayBoxUpperBound () const |
| Returns the upper bound of the play-box. | |
| virtual void | setObjectTagModifier (const DtString &className, DtObjectTagModifierSP modifier, bool applyToSubClasses=true) |
| Sets the object tag modifier class for the class name. | |
| virtual void | setInteractionTagModifier (const DtString &className, DtInteractionTagModifierSP modifier, bool applyToSubClasses=true) |
| Sets the interaction tag modifier class for the class name. | |
Public Member Functions inherited from DtBaseExerciseConn | |
| virtual | ~DtBaseExerciseConn () |
| destructor | |
| virtual void | addPostDrainCallback (DtPostDrainCb cb, void *usr) |
| Add/remove callbacks to be executed from within drainInput right before it returns. | |
| virtual void | removePostDrainCallback (DtPostDrainCb cb, void *usr) |
| virtual void | removeAllPostDrainCallbacks () |
| virtual void | setClock (DtClock *clock) |
| This function allows one to set the exercise connection's clock – overriding the default clock and setting the simulation time to zero. | |
| virtual DtClock * | clock () |
| Get reference to exercise connection's clock. | |
| virtual int | lastDrainInputReceiveCount () const |
| virtual void | incrementNumberOfMessagesProcessed () |
| Increments myNumberOfMessagesProcessed. | |
| virtual void | setApplicationId (int siteId, int applNum) |
| ----------------—— ID MANAGEMENT ----------------—— | |
| virtual DtSimulationAddress | applicationId () |
| virtual const DtEntityIdentifier & | nextId () |
| Returns the next valid entity ID formed by calling makeEntityId with the current value of a entity number counter. | |
| virtual DtEntityIdentifier | makeEntityId (int entityNum) |
| Returns an entity ID consisting of the DtExerciseConn's site and host numbers, and entityNum as the entity number. | |
Static Public Member Functions | |
| static void | setLogicalTimeFactoryFactoryParameter (std::wstring) |
| Set the parameter passed to RTI::LogicalTimeFactoryFactory to create the default LogicalTime Factory. | |
| static std::wstring | logicalTimeFactoryFactoryParameter () |
| Get the parameter described above. | |
| static void | setFedAmbCreator (DtFedAmbCreator creator) |
| Set the function to be used to create a federate ambassador. | |
| static DtFedAmbCreator | fedAmbCreator () |
| Get the function used to create a federate ambassador. | |
| static void | setRtiAmbCreator (DtRtiAmbCreator creator) |
| Set the function to be used to create an RTI ambassador. | |
| static DtRtiAmbCreator | rtiAmbCreator () |
| Get the function used to create an RTI ambassador. | |
| static void | overrideRidParameters (const std::map< DtString, DtString > &ridParams) |
| Overrides the parameters defined in the RTI rid file. | |
| static void | setFomMapperCreator (DtFomMapperCreator creator, void *usr=0) |
| Set the default FomMapper creator - used to create a fomMapper when a NULL FOM Mapper or invalid FOM Mapper DSO name is passed to the constructor. | |
| static DtFomMapperCreator | fomMapperCreator () |
| Get the default FomMapper creator. See above description. | |
| static void | setLogicalTimeToVrlTimeConverter (DtLogicalTimeToVrlTimeConverter func) |
| Set/Get the function to convert RTI::FedTime/RTI::LogicalTime to DtTime. | |
| static DtLogicalTimeToVrlTimeConverter | logicalTimeToVrlTimeConverter () |
| static void | setVrlTimeToLogicalTimeConverter (DtVrlTimeToLogicalTimeConverter func) |
| Set/Get the function to convert DtTime to RTI::FedTime/RTI::LogicalTIme. | |
| static DtVrlTimeToLogicalTimeConverter | vrlTimeToLogicalTimeConverter () |
| static DtTime | defaultDtLogicalTimeToVrlTimeConverter (const RTI::LogicalTime &time) |
| The next two methods convert between RTI::FedTime (HLA 1.3)/ RTI::LogicalTime(1516) and DtTime. | |
| static std::auto_ptr < RTI::LogicalTime > | defaultVrlTimeToLogicalTimeConverter (const DtTime &time) |
| See Comments for defaultDtFedTimeToVrlTimeConverter (above). | |
| static DtString | vrlinkVersion () |
| Returns a string indicating the VR-Link version number. | |
Protected Member Functions | |
| void | initializeConnection (InitializationStatus *result) |
| Not virtual, since called by constructor. | |
| void | initializeFomMapper (const char *dsoName, void *fomMapInitData, InitializationStatus *result) |
| Not virtual, since called by constructor. | |
| void | getFuncsFromSharedLib (DtDynamicLibrary &dso, DtFomMapperCreator *creator, DtFomMapperDeletor *deletor) |
| Not virtual, since called by CTOR. | |
| void | handleFedFile (const DtString &fedFileName) |
| Not virtual, since called by CTOR. | |
| int | initFom (InitializationStatus *result) |
| Not virtual, since called by CTOR. | |
| int | createRtiAmb (InitializationStatus *result) |
| Create the RTI ambassador. | |
| int | connectRtiAmb (InitializationStatus *result) |
| Connect to the RTI ambassador. | |
| int | createFedEx (InitializationStatus *result) |
| Create the federation execution. | |
| int | createFedAmb (InitializationStatus *result) |
| Create the federate ambassador. | |
| int | joinFedEx (InitializationStatus *result) |
| Join the federation execution. | |
| bool | fedFileExists (const DtFilename &name) const |
| Checks the local directory, then the RTI_CONFIG directory to find out if the file exists and is readable. | |
| void | setFedFile (const DtString &fedFile) |
| Set the fedFile. | |
| virtual void | rtiSend (DtInteraction &msg, RTI::InteractionClassHandle handle, const RTI::RegionHandleSet *region) |
| Perform the specific RTI send call. | |
| virtual void | selfReflectInteraction (DtInteraction &msg, RTI::InteractionClassHandle handle, const RTI::RegionHandleSet *region) |
| Perform a self reflect of an interaction. | |
Protected Member Functions inherited from DtBaseExerciseConn | |
| DtBaseExerciseConn () | |
| Constructors are protected since this is an abstract base class. | |
| DtBaseExerciseConn (const DtBaseExerciseConn &) | |
| copy constructor – Not implemented | |
| DtBaseExerciseConn & | operator= (const DtBaseExerciseConn &) |
| Assignment Operator – Not Implemented. | |
| virtual void | executePostDrainCbs () |
| Should be called by derived class's drainInputs. | |
Static Protected Member Functions | |
| static void | replyToSyncPointCallback (void *usr) |
| Callback function for automatically responding to sync points. | |
Static Protected Attributes | |
| static std::wstring | myLogicalTimeFactFactParam |
| static DtFedAmbCreator | theFedAmbCreator |
| static DtRtiAmbCreator | theRtiAmbCreator |
| static DtFomMapperCreator | theFomMapperCreator |
| static void * | theFomMapInitData |
| static DtVrlTimeToLogicalTimeConverter | theVrlTimeToLogicalTimeConverter |
| static DtLogicalTimeToVrlTimeConverter | theLogicalTimeToVrlTimeConverter |
Private Member Functions | |
| DtExerciseConn (const DtExerciseConn &orig) | |
| copy constructor – Not Implemented | |
| DtExerciseConn & | operator= (const DtExerciseConn &orig) |
| assignment operator – Not Implemented | |
Instances of DtExerciseConn are used to provide an application's interface or connection to the network in an HLA environment.
DtExerciseConn maintains an application's interface to the RTI via the RTI Ambassador. DtExerciseConn also maintains the RTI's connection to the federate via the federate ambassador. A federate must continually tick() the DtExerciseConn so that the LRC (Local RTI Component may process RTI messages, and receive callbacks.
| typedef DtVrlFederateAmbassador*(* DtExerciseConn::DtFedAmbCreator)() |
| typedef DtFomMapper*(* DtExerciseConn::DtFomMapperCreator)(void *usr) |
| typedef void(* DtExerciseConn::DtFomMapperDeletor)(DtFomMapper *) |
| typedef DtTime(* DtExerciseConn::DtLogicalTimeToVrlTimeConverter)(const RTI::LogicalTime &theLogicalTime) |
| typedef DtVrlRtiAmbassador*(* DtExerciseConn::DtRtiAmbCreator)(const std::vector< std::wstring > &) |
RTIambassador creator function.
The argument is used only in HLA 1516-2000 to specify the creation arguments. It has no effect in HLA 1.3 and Evolved.
| typedef std::auto_ptr<RTI::LogicalTime>(* DtExerciseConn::DtVrlTimeToLogicalTimeConverter)(const DtTime &time) |
Initialization Error Enumerations.
InitializationStatus enumerates possible values to be returned by the ExerciseConns's optional 'status' variable. When status is non-null, DtFatalError will not get called, allowing users to check programatically for initialization errors and hence deal with them as they wish. If no errors occur, status will equal DtINIT_SUCCESS.
| DtExerciseConn::DtExerciseConn | ( | const DtExerciseConnInitializer & | init, |
| InitializationStatus * | status = 0 |
||
| ) |
This constructor takes a DtExerciseConnInitializer and creates an exercise connection based on the parameters set within the initializer.
| DtExerciseConn::DtExerciseConn | ( | const char * | execName, |
| const char * | federateType, | ||
| DtFomMapper * | mapper = DtRprFomMapper::create(0), |
||
| const char * | fedFileName = 0, |
||
| InitializationStatus * | status = 0 |
||
| ) |
Constructor.
Mapper is a pointer to a new'ed FOM Mapper to use. The FOM Mapper's init() function will be called by the DtExerciseConn constructor. The default value for mapper is a new'ed DtRprFomMapper. The mapper is deleted by DtExerciseConn destructor. If mapper is NULL, we create one using the creator function passed to setFomMapperCreator (default is an empty FOM Mapper). The FOM Mapper's init function is called after the RTI is initialized. If fedFileName is NULL, <execName>.fdd is used, unless using HLA 1516 then <execName>.xml. Use status when you want to know whether the exercise connection has successfully initialized itself (see note above under "Error enumerations").
| DtExerciseConn::DtExerciseConn | ( | const char * | execName, |
| const char * | federateType, | ||
| const char * | dsoName, | ||
| const char * | fedFileName = 0, |
||
| void * | fomMapInitData = 0, |
||
| InitializationStatus * | status = 0 |
||
| ) |
Constructor.
Similar to above, but rather than passing a FOM Mapper, pass the name of a shared library (DSO or DLL) that contains a FOM Mapper creation function called DtCreateFomMapper (and a FOM Mapper destruction function called DtDeleteFomMapper. fomMapInitData is a pointer to arbitrary data that you wish to have passed to the FOM Mapper creation function in your FOM Mapper shared library.
|
virtual |
destructor
|
private |
copy constructor – Not Implemented
|
virtual |
Add a callback for announce sync point callback, for a specific label.
If a callback is registered, and replyingToSynchronizationCallbacks() is true, DtExerciseConn will not auto-reply (for "label")
|
virtual |
Add a callback for announce sync point callback, for a specific label.
If a callback is registered, and replyingToSynchronizationCallbacks() is true, DtExerciseConn will not auto-reply (for any label)
|
virtual |
Add a discoverObject callback which is called with the user data when the specified interaction is received.
|
virtual |
Add a callback for federation synced callback, for a specific label.
|
virtual |
Add a callback for federation synced callback, for any label.
|
virtual |
Add an interaction callback by class handle, which is called with the user data when the specified interaction is received.
Rather than using this function, user code should typically use each derived DtInteraction's addCallback function.
|
virtual |
Add an interaction callback by class name, which is called with the user data when the specified interaction is received.
Rather than using this function, user code should typically use each derived DtInteraction's addCallback function.
|
virtual |
Add a removeObject callback which is called with the user data when the specified interaction is received.
|
virtual |
Add a callback for sync point registration failed, for a specific label.
|
virtual |
Add a callback for any sync point registration failed.
|
virtual |
Add callback for sync point registration succeeded, for a specific label.
|
virtual |
Add a callback for any sync point registration succeeded.
|
virtual |
Get the auto subscribe flag. See above description.
|
protected |
Connect to the RTI ambassador.
Not virtual, since called by the CTOR. Exclusive to HLA1516 Evolved, as connection to the ambassador is implicit in the RTI Ambassador instantiation in 1.3/1516 If result is NULL, calls DtFatalError on failure; otherwise, it sets result to DtCOULD_NOT_CONNECT_RTIAMB and returns 0. Returns 1 on success.
|
protected |
Create the federate ambassador.
Not virtual, since called by constructor. Currently, always returns 1.
|
protected |
Create the federation execution.
Not virtual, since called by constructor. If result is NULL, calls DtFatalError on failure; otherwise, it sets result to either DtCOULD_NOT_CREATE_FEDEX and return 0. Returns 1 on success.
|
protected |
Create the RTI ambassador.
Not virtual, since called by CTOR. If result is NULL, calls DtFatalError on failure; otherwise, it sets result to DtCOULD_NOT_CREATE_RTIAMB and return 0. Returns 1 on success.
|
virtual |
currentTimeForStamping() returns time to send with outgoing messages (default is real time if absolute time-stamping, sim time otherwise.
|
virtual |
Returns the lower bound of the play-box.
|
virtual |
Returns the upper bound of the play-box.
|
static |
The next two methods convert between RTI::FedTime (HLA 1.3)/ RTI::LogicalTime(1516) and DtTime.
They are installed by default and used by VR-Link to communicate time to the RTI. These functions PRESUME you are using the FedTime/LogicalTime implementation which is shipped with the MAK RTI. If you are not, you MUST create your own conversion functions and register them with the Exercise Connection.
|
static |
See Comments for defaultDtFedTimeToVrlTimeConverter (above).
|
inlinevirtual |
References myDeleteOnOutOfScope.
|
virtual |
Get the destroy fed exec flag. See above description.
Processes input from the exercise by calling the RTI's tick function.
It is from within drainInput that user callbacks are executed. If maxTime is negative, then we call tick with no arguments, to read all available input without bound on time spent before returning. Zero is returned indicated there is no more data to read. If maxTime is positive, we pass minTime and maxTime to tick, and return its result. If maxTime is zero, we do not call tick at all, and return -1, indicating that we do not know if data is still available or not. minTime and maxTime are the approximate minimum and maximum time to spend in tick. (In reality, most RTI implementations will slightly overrun maxTime.) Note that unlike tick, maxTime is the first argument here, so that we can have a default value for minTime.
| DtException | if an RTI Exception is caught when ticking. |
|
inlinevirtual |
Get the federation execution name.
References myExecName.
|
inlinevirtual |
|
static |
Get the function used to create a federate ambassador.
|
protected |
Checks the local directory, then the RTI_CONFIG directory to find out if the file exists and is readable.
If the file exists it returns true, else returns false. This is not virtual because it is called in the constructor.
|
inlinevirtual |
Get the federate handle.
References myFedHandle.
|
inlinevirtual |
Returns the specified type of the federate.
References myFedType.
|
virtual |
Get the FOM Mapper.
|
static |
Get the default FomMapper creator. See above description.
|
protected |
Not virtual, since called by CTOR.
Get pointers to functions called DtCreateFomMapper and DtDestroyFomMapper from DtDynamicLibrary called. Pointers will point to NULL on failure.
|
protected |
Not virtual, since called by CTOR.
Takes fed file name. Merges the fed file name into the creation fom modules.
|
inlinevirtual |
Get the hlaObjectManager.
References myHlaObjectManager.
|
virtual |
The following functions control whether VR-Link should send updates for classes, attributes, and interactions based on advisories describing the existence of remote subscribing federates.
Specifically, calling ignoreAdvisories() means that VR-Link will send attribute updates regardless of whether other federates are subscribed to the given attributes; and that VR-Link will assume all interactions and classes are needed by the federation. NOTE: To have the correct effect, this function needs to get called before any Publishers get created
|
protected |
Not virtual, since called by CTOR.
Initializes myFom from fedFile and fomModules. If result is NULL, calls DtFatalError on failure; otherwise, it sets result to either DtCOULD_NOT_OPEN_FED or DtCOULD_NOT_PARSE_FED and return 0. Returns 1 on success.
|
protected |
Not virtual, since called by constructor.
|
protected |
Not virtual, since called by constructor.
If can't get functions from DSO, use fomMapperCreator().
|
virtual |
Get the interaction factory.
|
virtual |
Returns true if MAK RTI is in use.
|
protected |
Join the federation execution.
Not virtual, since called by constructor. If result is NULL, calls DtFatalError on failure; otherwise, it sets result to either DtCOULD_NOT_JOIN_FEDEX and return 0. Returns 1 on success.
|
virtual |
returns a pointer to the logicalTimeFactory used by the exerciseConnection;
|
static |
Get the parameter described above.
|
static |
|
virtual |
Get a unique event ID.
|
virtual |
Get the object factory.
|
private |
assignment operator – Not Implemented
|
static |
Overrides the parameters defined in the RTI rid file.
This can only be used before the RTI Ambassador has been created, i.e. before the exConn is initialized. Throws an exception if the Ambassador has already been created or if the function is unavailable.
|
virtual |
Get the reflecting flag. See above description.
|
virtual |
Get the reflecting through RTI flag.
|
virtual |
Get the reflectRemoteUpdatesIntoPub flag. See above description.
|
virtual |
Register a synchronization point.
Uses the current time as the user-defined tag
|
virtual |
Register a synchronization point with user tag supplied.
|
virtual |
Remove a callback for announce sync point callback, for a specific label.
|
virtual |
Remove a callback for announce sync point callback, for any label.
|
virtual |
Remove a discoverObject callback.
Note: The user data is significant for identifying the callback and needs to be the same as when the callback was added.
|
virtual |
Remove a callback for federation synced callback, for a specific label.
|
virtual |
Remove a callback for federation synced callback, for any label.
|
virtual |
Remove an interaction callback by class handle.
Note: The user data is significant for identifying the callback and needs to be the same as when the callback was added. Rather than using this function, user code should typically use each derived DtInteraction's addCallback function.
|
virtual |
Remove an interaction callback by class name.
Note: The user data is significant for identifying the callback and needs to be the same as when the callback was added. Rather than using this function, user code should typically use each derived DtInteraction's addCallback function.
|
virtual |
Remove a removeObject callback.
Note: The user data is significant for identifying the callback and needs to be the same as when the callback was added.
|
virtual |
Remove a callback for sync point registration failed, for a specific label.
|
virtual |
Remove a callback for sync point registration failed.
|
virtual |
Remove a callback for sync point registration succeeded, for a specific label.
|
virtual |
Remove a callback for any sync point registration succeeded.
|
virtual |
Get the reply to synchronization points flag.
|
virtual |
Replies to sync point.
Generally, the user should not use this function. Makes the sync point achieved call to the RTI.
|
staticprotected |
Callback function for automatically responding to sync points.
|
inlinevirtual |
Get the RTI ambassador.
For an example see: Regulator (Time Managed Talk)
References myRtiAmb.
Referenced by DtFom::rtiAmb().
|
static |
Get the function used to create an RTI ambassador.
|
virtual |
Returns the error string (used to store the exceptions thrown by RTI during the connection initialization stage.
|
virtual |
Returns the name of the RTI in use.
This is only available with the MAK RTI or with HLA1516/Evolved. If the name cannot be obtained, returns "Unknown".
|
protectedvirtual |
Perform the specific RTI send call.
If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.
|
virtual |
Returns the version of the RTI in use.
This is only available with the MAK RTI or with HLA1516/Evolved. If the version cannot be obtained, returns "Unknown".
|
protectedvirtual |
Perform a self reflect of an interaction.
|
virtual |
Send a state message to the network.
If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.
Implements DtBaseExerciseConn.
|
virtual |
Send an interaction to the network.
If using Time Management this may throw DtVrlInvalidTimeException if the time se-t was below LBTS. This can also throw: DtException - for any RTI exception that occurs
Implements DtBaseExerciseConn.
|
virtual |
Send an interaction to the network (DDM version).
If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.
|
inlinevirtual |
Get the send fed time flag. See above description.
References mySendFedTimeFlag.
|
virtual |
Send a state message to the network which has been time stamped with the current time.
If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.
Implements DtBaseExerciseConn.
|
virtual |
Send an interaction to the network which has been time stamped with the current time.
If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.
Implements DtBaseExerciseConn.
|
virtual |
Send an interaction to the network which has been time stamped with the current time (DDM version).
If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.
|
virtual |
Send an interaction to the network with the DDM region described by region.
This method is preferable to sendStamped, which takes an interaction and region pointer/handle
|
virtual |
Set flag which determines whether to automatically subscribe to interaction classes for which callbacks are being registered.
Defaults to true, but should be set to false if you will be managing subscriptions manually, e.g. if using DDM.
|
virtual |
Sets the lower bound of the play-box.
|
virtual |
Sets the upper bound of the play-box.
|
inlinevirtual |
References myDeleteOnOutOfScope.
|
virtual |
Set the flag that determines whether or not the DtExerciseConn destructor will attempt to destroy the federation execution.
Default is true.
|
static |
Set the function to be used to create a federate ambassador.
Call before creating a DtExericseConn if you want to use something other than a DtVrlFedAmbassador.
|
protected |
Set the fedFile.
|
static |
Set the default FomMapper creator - used to create a fomMapper when a NULL FOM Mapper or invalid FOM Mapper DSO name is passed to the constructor.
Set before creating a DtExConn if you want it to have an effect. The FomMapperCreator defaults to DtFomMapper::create. usr allows you to specify some arbitrary initialization data that will be passed to the FOM Mapper creator when it is called. VR-Link maintains a pointer to the object passed as usr as long as the DtExerciseConn and DtFomMapper are around, and does not delete it.
|
virtual |
Sets the interaction tag modifier class for the class name.
| className | is the FOM class name, e.g. "WeaponFire" |
| modifier | is a shared pointer to the tag modifier class implemented by the user |
| applyToSubclasses | determines whether the modifier will be applied to subclasses of "className" e.g. passing in "InteractionRoot" with applyToSubclasses set to true will cause modifier to be applied to all interactions |
| DtException | of className is not in the FOM |
|
static |
Set the parameter passed to RTI::LogicalTimeFactoryFactory to create the default LogicalTime Factory.
This should be called before an DtExerciseConnection instance is created.
|
static |
Set/Get the function to convert RTI::FedTime/RTI::LogicalTime to DtTime.
If this is not set functions are installed which do the conversion presuming the FedTime Implementation distributed with the MAK RTI is used. If the application developer is using an implementation other than that provided with the MAK RTI, the customer should install other conversion functions. If the function to set the Converter is called with NULL, then the default converter is installed.
|
virtual |
Set objectID to use in the next event ID.
|
virtual |
Sets the object tag modifier class for the class name.
| className | is the FOM class name, e.g. "BaseEntity" |
| modifier | is a shared pointer to the tag modifier class implemented by the user |
| applyToSubclasses | determines whether the modifier will be applied to subclasses of "className" e.g. passing in "ObjectRoot" with applyToSubclasses set to true will cause modifier to be applied to all objects |
| DtException | of className is not in the FOM |
|
virtual |
Set a flag that determines whether local objects and interactions will be reflected back to us.
(Default in HLA is no, since the RTI does not do this.) If reflecting is on, then objects that you register locally using publishers will show up in reflected object lists. If you are using HLA's ownership management features, you should set reflecting on, since there may be objects for which you would like to have both a publisher (for sending attributes that you own) and a reflected object (for receiving attributes that you do not). Once reflecting is turned on in an application, it can not be turned off.
|
virtual |
Set the reflecting through RTI flag to true.
Use only in rare cases when you want setReflecting() to be implemented by spoofing federate ambassador calls rather than by reflecting directly into VR-Link classes.
|
virtual |
Set the reflectRemoteUpdatesIntoPub flag.
If the reflecting flag is on (see above), then we may publishers and reflected objects with different state repositories for the same HLA object. Updates that we send locally get reflected into our "reflected" view of the object. If the reflectRemoteUpdatesIntoPub flag is set, we will additionally reflect any remote updates into our publisher's state repository. This will mean that the publisher's state repository represents the best truth we know: values we've set for attributes we own, plus values we've received for attributes we don't. If this flag is off, then the publisher's state repository will contain only values that have been set locally.
| void DtExerciseConn::setRemoveObjectOnAttOutOfScope | ( | bool | remove | ) |
|
virtual |
Get/Set flag which determines whether the exConn will respond to synchronization points.
Default is true.
|
static |
Set the function to be used to create an RTI ambassador.
Call before creating a DtExerciseConn if you want to use something other than a DtDirectRtiAmbassador.
|
inlinevirtual |
Set flag which determines whether to use Time Stamp Order when sending and receiving interactions.
References mySendFedTimeFlag.
|
virtual |
Set the time stamp type (DtTimeStampAbsolute or DtTimeStampRelative).
|
inlinevirtual |
Set flag which indicates geographic whether Geographic DDM is to be used or not.
If Geographic DDM is used, entity/aggregate publishers will create regions and publish with them. The region size/values depend on the location and velocity of the entity/aggregate. Reflected lists can take advantage of this by using a region, so that published data can be filtered via DDM. Geographic DDM is off by default. Geographic DDM is a VR-Link based DDM scheme and not related to the one used by VR-Forces in Entity Boost.
References myUseGeographicDdm.
|
static |
Set/Get the function to convert DtTime to RTI::FedTime/RTI::LogicalTIme.
If this is not set, functions which PRESUME the MAK FedTime/LogicalTime implementations are used are installed. If the application developer is using a RTI other than the MAK RTI, it is recommended that a new conversion function is installed. If the function is passed NULL, then the default converter is installed.
|
virtual |
Get the time stamp type.
|
inlinevirtual |
Returns whether this federate is using Geographic DDM.
References myUseGeographicDdm.
|
virtual |
Get the advisories flag. See above description.
|
static |
Returns a string indicating the VR-Link version number.
|
static |
|
protected |
|
protected |
|
protected |
The lower bound of the play box - or total simulation area - when using geographic DDM.
Used for normalization purposes. Defaults to -90 degrees latitude, -180 degrees longitude.
|
protected |
The upper bound of the play box - or the total simulation area - when using geographic DDM.
Used for normalization purposes. Defaults to 90 degrees latitude, 180 degrees longitude.
|
protected |
Referenced by deleteOnOutOfScope(), and setDeleteOnOutOfScope().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by execName().
|
protected |
Referenced by fedAmb().
|
protected |
myFedFile is used to specify a Fed File for the federation.
|
protected |
Referenced by fedHandle().
|
protected |
|
protected |
|
protected |
Referenced by hlaObjectManager().
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by rtiAmb().
|
protected |
|
protected |
used to save the Rti error incurred during connection init stage
|
protected |
Referenced by sendFedTime(), and setSendFedTime().
|
protected |
|
protected |
|
protected |
Referenced by setUseGeographicDdm(), and useGeographicDdm().
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |