VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtExerciseConn Class Reference

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:

Classes

struct  DtGeneralRtiErrorCbInfo
struct  DtLabelledRtiErrorCbInfo

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 void(* DtRtiErrorCb )(const char *label, void *usr)
typedef DtVrlRtiAmbassador *(* DtRtiAmbCreator )(const std::vector< std::wstring > &)
 RTIambassador creator function.
typedef DtTime(* DtFedTimeToVrlTimeConverter )(const RTI::FedTime &theFedTIme)
typedef RTI::FedTime *(* DtVrlTimeToFedTimeConverter )(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 setPassiveMode ()
 Set a flag that determines whether HLA should subscribe actively (The default) or passively.
virtual bool passiveMode () const
 Get the passive mode 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.
virtual void setRemoveObjectOnAttOutOfScope (bool remove)
virtual bool enabledGenericAttributes () const
 Get the Generic attributes flag.
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::Region *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::Region *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 DtEventIDnextEventId ()
 Get a unique event ID.
virtual DtVrlRtiAmbassadorrtiAmb ()
 Get the RTI ambassador.
virtual DtVrlFederateAmbassadorfedAmb ()
 Get the federate ambassador.
virtual RTI::FederateHandle fedHandle () const
 Get the federate handle.
virtual const DtStringfedType () const
 Returns the specified type of the federate.
virtual const DtStringexecName () 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 DtFomfom ()
 Get the FOM.
virtual DtInteractionFactoryinteractionFactory ()
 Get the interaction factory.
virtual DtHlaObjectFactoryobjectFactory ()
 Get the object factory.
virtual DtFomMapperfomMapper () const
 Get the FOM Mapper.
virtual DtHlaObjectManagerhlaObjectManager ()
 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::ObjectHandle 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::ObjectHandle 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 void registerSynchronizationPoint (const DtString &label)
 Register a synchronization point.
virtual void registerSynchronizationPoint (const DtString &label, const DtString &tag)
 Register a synchronization point with user tag supplied.
virtual void addFederateSaveCb (const DtString &label, DtFederateSaveCb func, void *usr)
 Add callback for save federation.
virtual void addFederateSaveCb (DtFederateSaveCb func, void *usr)
virtual void addFederateRestoreCb (const DtString &label, DtFederateSaveCb func, void *usr)
 Add callback for restore federation.
virtual void addFederateRestoreCb (DtFederateSaveCb func, void *usr)
virtual void removeFederateSaveCb (const DtString &label, DtFederateSaveCb func, void *usr)
 Remove callback for save federation.
virtual void removeFederateSaveCb (DtFederateSaveCb func, void *usr)
virtual void removeFederateRestoreCb (const DtString &label, DtFederateSaveCb func, void *usr)
 Remove callback for restore federation.
virtual void removeFederateRestoreCb (DtFederateSaveCb func, void *usr)
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 DtGeodeticCoordddmPlayBoxLowerBound () const
 Returns the lower bound of the play-box.
virtual const DtGeodeticCoordddmPlayBoxUpperBound () 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.
virtual bool callRtiErrorCallback (DtString &label)
 Notify the system that something bad happened with the RTI Do not call this unless you want to notify the system there is an error.
virtual void setDefaultOwnershipHandler (DtOwnershipHandler *ownershipHandler)
 If you are using Ownership Management, you want to give each HLA Object an ownership handler.
virtual DtOwnershipHandlerdefaultOwnershipHandler ()
 If you are using Ownership Management, you want to give each HLA Object an ownership handler.
virtual void addRtiErrorCb (const DtString &label, DtRtiErrorCb func, void *usr)
 Add/remove a callback for an RTI requested shutdown.
virtual void removeRtiErrorCb (const DtString &label, DtRtiErrorCb func, void *usr)
 Add/remove a callback for an RTI requested shutdown.
virtual void addRtiErrorCb (DtRtiErrorCb func, void *usr)
 Add/remove a callback for an RTI requested shutdown.
virtual void removeRtiErrorCb (DtRtiErrorCb func, void *usr)
 Add/remove a callback for an RTI requested shutdown.
virtual void setGetValueMethod (DtExerciseConnInitializer::DtGetValueMethod getValueMethodChoice)
 Configure how VR-Link retrieves data from RTI attribute/parameter handle value pair sets.
virtual
DtExerciseConnInitializer::DtGetValueMethod 
getValueMethod () const
 Configure how VR-Link retrieves data from RTI attribute/parameter handle value pair sets.
- 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 DtClockclock ()
 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 DtEntityIdentifiernextId ()
 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 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 setFedTimeToVrlTimeConverter (DtFedTimeToVrlTimeConverter func)
 Set/Get the function to convert RTI::FedTime/RTILogicalTime to DtTime.
static DtFedTimeToVrlTimeConverter fedTimeToVrlTimeConverter ()
static void setVrlTimeToFedTimeConverter (DtVrlTimeToFedTimeConverter func)
 Set/Get the function to convert DtTime to RTI::FedTime/RTI::LogicalTIme.
static DtVrlTimeToFedTimeConverter vrlTimeToFedTimeConverter ()
static DtTime defaultDtFedTimeToVrlTimeConverter (const RTI::FedTime &time)
 The next two methods convert between RTI::FedTime (HLA 1.3)/ RTI::LogicalTime(1516) and DtTime.
static RTI::FedTime * defaultVrlTimeToFedTimeConverter (const DtTime &time)
 See Comments for defaultDtFedTimeToVrlTimeConverter (above).
static DtString vrlinkVersion ()
 Returns a string indicating the VR-Link version number.

Protected Member Functions

bool checkRtiVersionForPointerAlignment ()
 Not virtual, since called by constructor.
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.
virtual void rtiSend (DtInteraction &msg, RTI::InteractionClassHandle handle, const RTI::Region *region)
 Perform the specific RTI send call.
virtual void selfReflectInteraction (DtInteraction &msg, RTI::InteractionClassHandle handle, const RTI::Region *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
DtBaseExerciseConnoperator= (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.

Protected Attributes

DtString myExecName
DtString myFedType
DtVrlRtiAmbassadormyRtiAmb
RTI::FederateHandle myFedHandle
DtVrlFederateAmbassadormyFedAmb
DtFommyFom
DtHlaObjectManagermyHlaObjectManager
DtInteractionManagermyInteractionManager
DtOwnershipHandlermyOwnershipHandler
DtFomMappermyFomMapper
DtDynamicLibrarymyFomMapperDso
DtFomMapperCreator myDsoCreator
DtFomMapperDeletor myDsoDeletor
DtEventID myCurrentEventId
DtTimeStampType myRelOrAbs
bool myDestroyFedExFlag
bool myUseFomMapperDeletor
bool myGenericAttributes
bool myPassiveMode
bool myReflecting
bool myReflectRemoteUpdatesIntoPubFlag
bool myReflectingThroughRti
bool myReplyingToSynchronizationPoints
bool myUsingAdvisories
bool myAutoSubscribeFlag
bool mySendFedTimeFlag
DtExerciseConnInitializer::DtGetValueMethod myGetValueMethod
bool myPauseOnSaveRestore
bool myUseGeographicDdm
bool myDeleteOnOutOfScope
DtString myRtiError
 used to save the Rti error incurred during connection init stage
DtString myFedFile
 myFedFile is used to specify a Fed File for the federation.
DtString myTag
DtGeodeticCoord myDdmPlayBoxLowerBound
 The lower bound of the play box - or total simulation area - when using geographic DDM.
DtGeodeticCoord myDdmPlayBoxUpperBound
 The upper bound of the play box - or the total simulation area - when using geographic DDM.
std::list
< DtGeneralRtiErrorCbInfo
myRtiErrorCbList
std::list
< DtLabelledRtiErrorCbInfo
myLabRtiErrorCbList
- Protected Attributes inherited from DtBaseExerciseConn
DtSimulationAddress myAppId
DtEntityIdentifier myCurrentId
DtList myPostDrainCbs
DtClockmyClock
int myNumberOfMessagesProcessed

Static Protected Attributes

static std::wstring myLogicalTimeFactFactParam
static DtFedAmbCreator theFedAmbCreator
static DtRtiAmbCreator theRtiAmbCreator
static DtFomMapperCreator theFomMapperCreator
static void * theFomMapInitData
static DtVrlTimeToFedTimeConverter theVrlTimeToFedTimeConverter
static DtFedTimeToVrlTimeConverter theFedTimeToVrlTimeConverter

Private Member Functions

 DtExerciseConn (const DtExerciseConn &orig)
 copy constructor – Not Implemented
DtExerciseConnoperator= (const DtExerciseConn &orig)
 assignment operator – Not Implemented

Detailed Description

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.

Protocol Independant Examples
HLA Specific Examples
See Also
DtExerciseConnInitializer

Member Typedef Documentation

typedef DtVrlFederateAmbassador*(* DtExerciseConn::DtFedAmbCreator)()
typedef DtTime(* DtExerciseConn::DtFedTimeToVrlTimeConverter)(const RTI::FedTime &theFedTIme)
typedef DtFomMapper*(* DtExerciseConn::DtFomMapperCreator)(void *usr)
typedef void(* DtExerciseConn::DtFomMapperDeletor)(DtFomMapper *)
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 void(* DtExerciseConn::DtRtiErrorCb)(const char *label, void *usr)
typedef RTI::FedTime*(* DtExerciseConn::DtVrlTimeToFedTimeConverter)(const DtTime &time)

Member Enumeration Documentation

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.

Note
Do not attempt to use a DtExerciseConn instance when an error is indicated: VR-Link's behavior will be undefined.
Enumerator:
DtINIT_SUCCESS 
DtCOULD_NOT_CREATE_RTIAMB 
DtCOULD_NOT_CREATE_FEDEX 
DtCOULD_NOT_JOIN_FEDEX 
DtCOULD_NOT_OPEN_FED 
DtCOULD_NOT_PARSE_FED 
DtCOULD_NOT_FIND_FOMMAPPER 
DtERROR_OPENING_FOMMAPPER_LIB 
DtCOULD_NOT_CONNECT_RTIAMB 

Constructor & Destructor Documentation

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").

Deprecated:
Users should now use the DtExeciseConnInitializer CTOR
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.

Deprecated:
Users should now use the DtExeciseConnInitializer CTOR
virtual DtExerciseConn::~DtExerciseConn ( )
virtual

destructor

DtExerciseConn::DtExerciseConn ( const DtExerciseConn orig)
private

copy constructor – Not Implemented

Member Function Documentation

virtual void DtExerciseConn::addAnnounceSynchPointCb ( const DtString label,
DtAnnounceSynchPointCb  func,
void *  usr 
)
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 void DtExerciseConn::addAnnounceSynchPointCb ( DtAnnounceSynchPointCb  func,
void *  usr 
)
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 void DtExerciseConn::addDiscoverObjectCallback ( RTI::ObjectClassHandle  h,
DtDiscoverObjectCb  cb,
void *  usr 
)
virtual

Add a discoverObject callback which is called with the user data when the specified interaction is received.

virtual void DtExerciseConn::addFederateRestoreCb ( const DtString label,
DtFederateSaveCb  func,
void *  usr 
)
virtual

Add callback for restore federation.

virtual void DtExerciseConn::addFederateRestoreCb ( DtFederateSaveCb  func,
void *  usr 
)
virtual
virtual void DtExerciseConn::addFederateSaveCb ( const DtString label,
DtFederateSaveCb  func,
void *  usr 
)
virtual

Add callback for save federation.

virtual void DtExerciseConn::addFederateSaveCb ( DtFederateSaveCb  func,
void *  usr 
)
virtual
virtual void DtExerciseConn::addFederationSynchedCb ( const DtString label,
DtSynchPointCb  func,
void *  usr 
)
virtual

Add a callback for federation synced callback, for a specific label.

virtual void DtExerciseConn::addFederationSynchedCb ( DtSynchPointCb  func,
void *  usr 
)
virtual

Add a callback for federation synced callback, for any label.

virtual void DtExerciseConn::addInteractionCallback ( RTI::InteractionClassHandle  h,
DtReceiveInteractionCb  cb,
void *  usr,
DtDDMRegionSP  region = DtDDMRegionSP() 
)
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 void DtExerciseConn::addInteractionCallbackByName ( const char *  className,
DtReceiveInteractionCb  cb,
void *  usr,
DtDDMRegionSP  region = DtDDMRegionSP() 
)
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 void DtExerciseConn::addRemoveObjectCallback ( RTI::ObjectHandle  id,
DtRemoveObjectCb  cb,
void *  usr 
)
virtual

Add a removeObject callback which is called with the user data when the specified interaction is received.

virtual void DtExerciseConn::addRtiErrorCb ( const DtString label,
DtRtiErrorCb  func,
void *  usr 
)
virtual

Add/remove a callback for an RTI requested shutdown.

If a shutdown is not handled, it is likely that your application will simply crash. This callback allows you to shutdown your application gracefully before that happens

virtual void DtExerciseConn::addRtiErrorCb ( DtRtiErrorCb  func,
void *  usr 
)
virtual

Add/remove a callback for an RTI requested shutdown.

If a shutdown is not handled, it is likely that your application will simply crash. This callback allows you to shutdown your application gracefully before that happens

virtual void DtExerciseConn::addSynchPointRegistrationFailedCb ( const DtString label,
DtSynchPointCb  func,
void *  usr 
)
virtual

Add a callback for sync point registration failed, for a specific label.

virtual void DtExerciseConn::addSynchPointRegistrationFailedCb ( DtSynchPointCb  func,
void *  usr 
)
virtual

Add a callback for any sync point registration failed.

virtual void DtExerciseConn::addSynchPointRegistrationSucceededCb ( const DtString label,
DtSynchPointCb  func,
void *  usr 
)
virtual

Add callback for sync point registration succeeded, for a specific label.

virtual void DtExerciseConn::addSynchPointRegistrationSucceededCb ( DtSynchPointCb  func,
void *  usr 
)
virtual

Add a callback for any sync point registration succeeded.

virtual bool DtExerciseConn::autoSubscribeFlag ( ) const
virtual

Get the auto subscribe flag. See above description.

virtual bool DtExerciseConn::callRtiErrorCallback ( DtString label)
virtual

Notify the system that something bad happened with the RTI Do not call this unless you want to notify the system there is an error.

Returns
true if the callback exists false otherwise.
bool DtExerciseConn::checkRtiVersionForPointerAlignment ( )
protected

Not virtual, since called by constructor.

int DtExerciseConn::connectRtiAmb ( InitializationStatus result)
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.

int DtExerciseConn::createFedAmb ( InitializationStatus result)
protected

Create the federate ambassador.

Not virtual, since called by constructor. Currently, always returns 1.

int DtExerciseConn::createFedEx ( InitializationStatus result)
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.

int DtExerciseConn::createRtiAmb ( InitializationStatus result)
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 DtTime DtExerciseConn::currentTimeForStamping ( )
virtual

currentTimeForStamping() returns time to send with outgoing messages (default is real time if absolute time-stamping, sim time otherwise.

virtual const DtGeodeticCoord& DtExerciseConn::ddmPlayBoxLowerBound ( ) const
virtual

Returns the lower bound of the play-box.

See Also
myDdmPlayBoxLowerBound
virtual const DtGeodeticCoord& DtExerciseConn::ddmPlayBoxUpperBound ( ) const
virtual

Returns the upper bound of the play-box.

See Also
myDdmPlayBoxLowerBound
static DtTime DtExerciseConn::defaultDtFedTimeToVrlTimeConverter ( const RTI::FedTime &  time)
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.

virtual DtOwnershipHandler* DtExerciseConn::defaultOwnershipHandler ( )
virtual

If you are using Ownership Management, you want to give each HLA Object an ownership handler.

If you set this value, HLA Objects created will receive a copy of this handler automatically.

static RTI::FedTime* DtExerciseConn::defaultVrlTimeToFedTimeConverter ( const DtTime time)
static

See Comments for defaultDtFedTimeToVrlTimeConverter (above).

bool DtExerciseConn::deleteOnOutOfScope ( ) const
inlinevirtual

References myDeleteOnOutOfScope.

virtual bool DtExerciseConn::destroyFedExecFlag ( )
virtual

Get the destroy fed exec flag. See above description.

virtual int DtExerciseConn::drainInput ( DtTime  maxTime = -1,
DtTime  minTime = 0.0 
)
virtual

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.

Exceptions
DtExceptionif an RTI Exception is caught when ticking.
virtual bool DtExerciseConn::enabledGenericAttributes ( ) const
virtual

Get the Generic attributes flag.

Generic Attributes enables the ability to encode and decode all attributes, even the ones that VR-Link does not understand. Those attributes' bytes are accessible through the state repository. This variable can only be set by an ExerciseConnInitializer

const DtString & DtExerciseConn::execName ( ) const
inlinevirtual

Get the federation execution name.

References myExecName.

DtVrlFederateAmbassador * DtExerciseConn::fedAmb ( )
inlinevirtual

Get the federate ambassador.

For an example see: Regulator (Time Managed Talk)

References myFedAmb.

static DtFedAmbCreator DtExerciseConn::fedAmbCreator ( )
static

Get the function used to create a federate ambassador.

bool DtExerciseConn::fedFileExists ( const DtFilename name) const
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.

RTI::FederateHandle DtExerciseConn::fedHandle ( ) const
inlinevirtual

Get the federate handle.

References myFedHandle.

static DtFedTimeToVrlTimeConverter DtExerciseConn::fedTimeToVrlTimeConverter ( )
static
const DtString & DtExerciseConn::fedType ( ) const
inlinevirtual

Returns the specified type of the federate.

References myFedType.

DtFom * DtExerciseConn::fom ( )
inlinevirtual

Get the FOM.

References myFom.

virtual DtFomMapper* DtExerciseConn::fomMapper ( ) const
virtual

Get the FOM Mapper.

static DtFomMapperCreator DtExerciseConn::fomMapperCreator ( )
static

Get the default FomMapper creator. See above description.

void DtExerciseConn::getFuncsFromSharedLib ( DtDynamicLibrary dso,
DtFomMapperCreator creator,
DtFomMapperDeletor deletor 
)
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.

virtual DtExerciseConnInitializer::DtGetValueMethod DtExerciseConn::getValueMethod ( ) const
virtual

Configure how VR-Link retrieves data from RTI attribute/parameter handle value pair sets.

When retrieving data from RTI attribute/parameter handle value pair sets, getValuePointer is more efficient but it may not guarantee 64-bit alignment. The alternative is the getValue method which copies the data from the set into safe VR-Link buffers. Versions of the MAK RTI 4.3 and beyond guarantee that getValuePointer returns a pointer that is 64-bit aligned. By default (DtGetValuePointerWhereAvailable), VR-Link will inspect the RTI version and use getValuePointer when it can determine that the RTI supports it; otherwise, VR-Link will use getValue. The alternatives DtForceGetValue and DtForceGetValuePointer force VR-Link to use getValue and getValuePointer respectively, regardless of the RTI version.

void DtExerciseConn::handleFedFile ( const DtString fedFileName)
protected

Not virtual, since called by CTOR.

Takes fed file name. Merges the fed file name into the creation fom modules.

DtHlaObjectManager * DtExerciseConn::hlaObjectManager ( )
inlinevirtual

Get the hlaObjectManager.

References myHlaObjectManager.

virtual void DtExerciseConn::ignoreAdvisories ( )
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

int DtExerciseConn::initFom ( InitializationStatus result)
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.

void DtExerciseConn::initializeConnection ( InitializationStatus result)
protected

Not virtual, since called by constructor.

void DtExerciseConn::initializeFomMapper ( const char *  dsoName,
void *  fomMapInitData,
InitializationStatus result 
)
protected

Not virtual, since called by constructor.

If can't get functions from DSO, use fomMapperCreator().

virtual DtInteractionFactory* DtExerciseConn::interactionFactory ( )
virtual

Get the interaction factory.

virtual bool DtExerciseConn::isUsingMakRti ( ) const
virtual

Returns true if MAK RTI is in use.

int DtExerciseConn::joinFedEx ( InitializationStatus result)
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 const DtEventID& DtExerciseConn::nextEventId ( )
virtual

Get a unique event ID.

virtual DtHlaObjectFactory* DtExerciseConn::objectFactory ( )
virtual

Get the object factory.

DtExerciseConn& DtExerciseConn::operator= ( const DtExerciseConn orig)
private

assignment operator – Not Implemented

static void DtExerciseConn::overrideRidParameters ( const std::map< DtString, DtString > &  ridParams)
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 bool DtExerciseConn::passiveMode ( ) const
virtual

Get the passive mode flag. See above description.

virtual bool DtExerciseConn::reflecting ( ) const
virtual

Get the reflecting flag. See above description.

virtual bool DtExerciseConn::reflectingThroughRti ( ) const
virtual

Get the reflecting through RTI flag.

virtual bool DtExerciseConn::reflectRemoteUpdatesIntoPubFlag ( ) const
virtual

Get the reflectRemoteUpdatesIntoPub flag. See above description.

virtual void DtExerciseConn::registerSynchronizationPoint ( const DtString label)
virtual

Register a synchronization point.

Uses the current time as the user-defined tag

virtual void DtExerciseConn::registerSynchronizationPoint ( const DtString label,
const DtString tag 
)
virtual

Register a synchronization point with user tag supplied.

virtual void DtExerciseConn::removeAnnounceSynchPointCb ( const DtString label,
DtAnnounceSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for announce sync point callback, for a specific label.

virtual void DtExerciseConn::removeAnnounceSynchPointCb ( DtAnnounceSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for announce sync point callback, for any label.

virtual void DtExerciseConn::removeDiscoverObjectCallback ( RTI::ObjectClassHandle  h,
DtDiscoverObjectCb  cb,
void *  usr 
)
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 void DtExerciseConn::removeFederateRestoreCb ( const DtString label,
DtFederateSaveCb  func,
void *  usr 
)
virtual

Remove callback for restore federation.

virtual void DtExerciseConn::removeFederateRestoreCb ( DtFederateSaveCb  func,
void *  usr 
)
virtual
virtual void DtExerciseConn::removeFederateSaveCb ( const DtString label,
DtFederateSaveCb  func,
void *  usr 
)
virtual

Remove callback for save federation.

virtual void DtExerciseConn::removeFederateSaveCb ( DtFederateSaveCb  func,
void *  usr 
)
virtual
virtual void DtExerciseConn::removeFederationSynchedCb ( const DtString label,
DtSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for federation synced callback, for a specific label.

virtual void DtExerciseConn::removeFederationSynchedCb ( DtSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for federation synced callback, for any label.

virtual void DtExerciseConn::removeInteractionCallback ( RTI::InteractionClassHandle  h,
DtReceiveInteractionCb  cb,
void *  usr,
DtDDMRegionSP  region = DtDDMRegionSP() 
)
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 void DtExerciseConn::removeInteractionCallbackByName ( const char *  className,
DtReceiveInteractionCb  cb,
void *  usr,
DtDDMRegionSP  region = DtDDMRegionSP() 
)
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 void DtExerciseConn::removeRemoveObjectCallback ( RTI::ObjectHandle  id,
DtRemoveObjectCb  cb,
void *  usr 
)
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 void DtExerciseConn::removeRtiErrorCb ( const DtString label,
DtRtiErrorCb  func,
void *  usr 
)
virtual

Add/remove a callback for an RTI requested shutdown.

If a shutdown is not handled, it is likely that your application will simply crash. This callback allows you to shutdown your application gracefully before that happens

virtual void DtExerciseConn::removeRtiErrorCb ( DtRtiErrorCb  func,
void *  usr 
)
virtual

Add/remove a callback for an RTI requested shutdown.

If a shutdown is not handled, it is likely that your application will simply crash. This callback allows you to shutdown your application gracefully before that happens

virtual void DtExerciseConn::removeSynchPointRegistrationFailedCb ( const DtString label,
DtSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for sync point registration failed, for a specific label.

virtual void DtExerciseConn::removeSynchPointRegistrationFailedCb ( DtSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for sync point registration failed.

virtual void DtExerciseConn::removeSynchPointRegistrationSucceededCb ( const DtString label,
DtSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for sync point registration succeeded, for a specific label.

virtual void DtExerciseConn::removeSynchPointRegistrationSucceededCb ( DtSynchPointCb  func,
void *  usr 
)
virtual

Remove a callback for any sync point registration succeeded.

virtual bool DtExerciseConn::replyingToSynchronizationPoints ( )
virtual

Get the reply to synchronization points flag.

virtual void DtExerciseConn::replyToSynchronizationPoint ( const char *  label)
virtual

Replies to sync point.

Generally, the user should not use this function. Makes the sync point achieved call to the RTI.

static void DtExerciseConn::replyToSyncPointCallback ( void *  usr)
staticprotected

Callback function for automatically responding to sync points.

DtVrlRtiAmbassador * DtExerciseConn::rtiAmb ( )
inlinevirtual

Get the RTI ambassador.

For an example see: Regulator (Time Managed Talk)

References myRtiAmb.

Referenced by DtFom::rtiAmb().

static DtRtiAmbCreator DtExerciseConn::rtiAmbCreator ( )
static

Get the function used to create an RTI ambassador.

virtual DtString DtExerciseConn::rtiError ( ) const
virtual

Returns the error string (used to store the exceptions thrown by RTI during the connection initialization stage.

virtual DtString DtExerciseConn::rtiName ( ) const
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".

virtual void DtExerciseConn::rtiSend ( DtInteraction msg,
RTI::InteractionClassHandle  handle,
const RTI::Region *  region 
)
protectedvirtual

Perform the specific RTI send call.

If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.

virtual DtString DtExerciseConn::rtiVersion ( ) const
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".

virtual void DtExerciseConn::selfReflectInteraction ( DtInteraction msg,
RTI::InteractionClassHandle  handle,
const RTI::Region *  region 
)
protectedvirtual

Perform a self reflect of an interaction.

virtual void DtExerciseConn::send ( const DtStateMsg msg)
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 void DtExerciseConn::send ( const DtInteraction msg)
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 void DtExerciseConn::send ( const DtInteraction msg,
const RTI::Region *  region 
)
virtual

Send an interaction to the network (DDM version).

If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.

bool DtExerciseConn::sendFedTime ( ) const
inlinevirtual

Get the send fed time flag. See above description.

References mySendFedTimeFlag.

virtual void DtExerciseConn::sendStamped ( const DtStateMsg msg)
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 void DtExerciseConn::sendStamped ( const DtInteraction msg)
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 void DtExerciseConn::sendStamped ( const DtInteraction msg,
const RTI::Region *  region 
)
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 void DtExerciseConn::sendStampedWithRegion ( const DtInteraction msg,
DtDDMRegionSP  region 
)
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 void DtExerciseConn::setAutoSubscribeFlag ( bool  flag)
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 void DtExerciseConn::setDdmPlayBoxLowerBound ( const DtGeodeticCoord bound)
virtual

Sets the lower bound of the play-box.

See Also
myDdmPlayBoxLowerBound
virtual void DtExerciseConn::setDdmPlayBoxUpperBound ( const DtGeodeticCoord bound)
virtual

Sets the upper bound of the play-box.

See Also
myDdmPlayBoxLowerBound
virtual void DtExerciseConn::setDefaultOwnershipHandler ( DtOwnershipHandler ownershipHandler)
virtual

If you are using Ownership Management, you want to give each HLA Object an ownership handler.

If you set this value, HLA Objects created will receive a copy of this handler automatically.

void DtExerciseConn::setDeleteOnOutOfScope ( bool  yesNo)
inlinevirtual

References myDeleteOnOutOfScope.

virtual void DtExerciseConn::setDestroyFedExecFlag ( bool  flag)
virtual

Set the flag that determines whether or not the DtExerciseConn destructor will attempt to destroy the federation execution.

Default is true.

static void DtExerciseConn::setFedAmbCreator ( DtFedAmbCreator  creator)
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.

static void DtExerciseConn::setFedTimeToVrlTimeConverter ( DtFedTimeToVrlTimeConverter  func)
static

Set/Get the function to convert RTI::FedTime/RTILogicalTime 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.

static void DtExerciseConn::setFomMapperCreator ( DtFomMapperCreator  creator,
void *  usr = 0 
)
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 void DtExerciseConn::setGetValueMethod ( DtExerciseConnInitializer::DtGetValueMethod  getValueMethodChoice)
virtual

Configure how VR-Link retrieves data from RTI attribute/parameter handle value pair sets.

When retrieving data from RTI attribute/parameter handle value pair sets, getValuePointer is more efficient but it may not guarantee 64-bit alignment. The alternative is the getValue method which copies the data from the set into safe VR-Link buffers. Versions of the MAK RTI 4.3 and beyond guarantee that getValuePointer returns a pointer that is 64-bit aligned. By default (DtGetValuePointerWhereAvailable), VR-Link will inspect the RTI version and use getValuePointer when it can determine that the RTI supports it; otherwise, VR-Link will use getValue. The alternatives DtForceGetValue and DtForceGetValuePointer force VR-Link to use getValue and getValuePointer respectively, regardless of the RTI version.

virtual void DtExerciseConn::setInteractionTagModifier ( const DtString className,
DtInteractionTagModifierSP  modifier,
bool  applyToSubClasses = true 
)
virtual

Sets the interaction tag modifier class for the class name.

Parameters
classNameis the FOM class name, e.g. "WeaponFire"
modifieris a shared pointer to the tag modifier class implemented by the user
applyToSubclassesdetermines 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
Exceptions
DtExceptionof className is not in the FOM
virtual void DtExerciseConn::setObjectIdForEventId ( const DtGlobalObjectDesignator id)
virtual

Set objectID to use in the next event ID.

virtual void DtExerciseConn::setObjectTagModifier ( const DtString className,
DtObjectTagModifierSP  modifier,
bool  applyToSubClasses = true 
)
virtual

Sets the object tag modifier class for the class name.

Parameters
classNameis the FOM class name, e.g. "BaseEntity"
modifieris a shared pointer to the tag modifier class implemented by the user
applyToSubclassesdetermines 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
Exceptions
DtExceptionof className is not in the FOM
virtual void DtExerciseConn::setPassiveMode ( )
virtual

Set a flag that determines whether HLA should subscribe actively (The default) or passively.

Passive subscription in HLA means that updates are picked up off the network, but no messages are specifically requested by your federate. Passive subscriptions just listen for existing messages and do not add to the network traffic. Passive mode should always be set before any Reflected Lists or subscriptions are created. Once it is set, it can not be turned off.

virtual void DtExerciseConn::setReflecting ( )
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 void DtExerciseConn::setReflectingThroughRti ( )
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 void DtExerciseConn::setReflectRemoteUpdatesIntoPubFlag ( bool  onff)
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.

virtual void DtExerciseConn::setRemoveObjectOnAttOutOfScope ( bool  remove)
virtual
virtual void DtExerciseConn::setReplyingToSynchronizationPoints ( bool  yesNo)
virtual

Get/Set flag which determines whether the exConn will respond to synchronization points.

Default is true.

static void DtExerciseConn::setRtiAmbCreator ( DtRtiAmbCreator  creator)
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.

void DtExerciseConn::setSendFedTime ( bool  flag)
inlinevirtual

Set flag which determines whether to use Time Stamp Order when sending and receiving interactions.

References mySendFedTimeFlag.

virtual void DtExerciseConn::setTimeStampType ( DtTimeStampType  relOrAbs)
virtual

Set the time stamp type (DtTimeStampAbsolute or DtTimeStampRelative).

void DtExerciseConn::setUseGeographicDdm ( bool  flag)
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 void DtExerciseConn::setVrlTimeToFedTimeConverter ( DtVrlTimeToFedTimeConverter  func)
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 DtTimeStampType DtExerciseConn::timeStampType ( ) const
virtual

Get the time stamp type.

bool DtExerciseConn::useGeographicDdm ( ) const
inlinevirtual

Returns whether this federate is using Geographic DDM.

See Also
setUseGeographicDdm

References myUseGeographicDdm.

virtual bool DtExerciseConn::usingAdvisories ( ) const
virtual

Get the advisories flag. See above description.

static DtString DtExerciseConn::vrlinkVersion ( )
static

Returns a string indicating the VR-Link version number.

static DtVrlTimeToFedTimeConverter DtExerciseConn::vrlTimeToFedTimeConverter ( )
static

Member Data Documentation

bool DtExerciseConn::myAutoSubscribeFlag
protected
DtEventID DtExerciseConn::myCurrentEventId
protected
DtGeodeticCoord DtExerciseConn::myDdmPlayBoxLowerBound
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.

DtGeodeticCoord DtExerciseConn::myDdmPlayBoxUpperBound
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.

bool DtExerciseConn::myDeleteOnOutOfScope
protected
bool DtExerciseConn::myDestroyFedExFlag
protected
DtFomMapperCreator DtExerciseConn::myDsoCreator
protected
DtFomMapperDeletor DtExerciseConn::myDsoDeletor
protected
DtString DtExerciseConn::myExecName
protected

Referenced by execName().

DtVrlFederateAmbassador* DtExerciseConn::myFedAmb
protected

Referenced by fedAmb().

DtString DtExerciseConn::myFedFile
protected

myFedFile is used to specify a Fed File for the federation.

RTI::FederateHandle DtExerciseConn::myFedHandle
protected

Referenced by fedHandle().

DtString DtExerciseConn::myFedType
protected

Referenced by fedType().

DtFom* DtExerciseConn::myFom
protected

Referenced by fom().

DtFomMapper* DtExerciseConn::myFomMapper
protected
DtDynamicLibrary* DtExerciseConn::myFomMapperDso
protected
bool DtExerciseConn::myGenericAttributes
protected
DtExerciseConnInitializer::DtGetValueMethod DtExerciseConn::myGetValueMethod
protected
DtHlaObjectManager* DtExerciseConn::myHlaObjectManager
protected

Referenced by hlaObjectManager().

DtInteractionManager* DtExerciseConn::myInteractionManager
protected
std::list<DtLabelledRtiErrorCbInfo> DtExerciseConn::myLabRtiErrorCbList
protected
std::wstring DtExerciseConn::myLogicalTimeFactFactParam
staticprotected
DtOwnershipHandler* DtExerciseConn::myOwnershipHandler
protected
bool DtExerciseConn::myPassiveMode
protected
bool DtExerciseConn::myPauseOnSaveRestore
protected
bool DtExerciseConn::myReflecting
protected
bool DtExerciseConn::myReflectingThroughRti
protected
bool DtExerciseConn::myReflectRemoteUpdatesIntoPubFlag
protected
DtTimeStampType DtExerciseConn::myRelOrAbs
protected
bool DtExerciseConn::myReplyingToSynchronizationPoints
protected
DtVrlRtiAmbassador* DtExerciseConn::myRtiAmb
protected

Referenced by rtiAmb().

DtString DtExerciseConn::myRtiError
protected

used to save the Rti error incurred during connection init stage

std::list<DtGeneralRtiErrorCbInfo> DtExerciseConn::myRtiErrorCbList
protected
bool DtExerciseConn::mySendFedTimeFlag
protected

Referenced by sendFedTime(), and setSendFedTime().

DtString DtExerciseConn::myTag
protected
bool DtExerciseConn::myUseFomMapperDeletor
protected
bool DtExerciseConn::myUseGeographicDdm
protected
bool DtExerciseConn::myUsingAdvisories
protected
DtFedAmbCreator DtExerciseConn::theFedAmbCreator
staticprotected
DtFedTimeToVrlTimeConverter DtExerciseConn::theFedTimeToVrlTimeConverter
staticprotected
void* DtExerciseConn::theFomMapInitData
staticprotected
DtFomMapperCreator DtExerciseConn::theFomMapperCreator
staticprotected
DtRtiAmbCreator DtExerciseConn::theRtiAmbCreator
staticprotected
DtVrlTimeToFedTimeConverter DtExerciseConn::theVrlTimeToFedTimeConverter
staticprotected

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

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)