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 | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes
DtPointObjectPublisher Class Reference

class DtPointObjectPublisher: More...

+ Inheritance diagram for DtPointObjectPublisher:
+ Collaboration diagram for DtPointObjectPublisher:

Public Types

typedef DtPointObjectRepository *(* DtStateRepCreator )()
 Function prototype for functions that create DtEnvironmentObjectRepositories. More...
 

Public Member Functions

 DtPointObjectPublisher (DtPointObjectRepository *stateRepToUse, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor – state rep must contain objectType. More...
 
 DtPointObjectPublisher (RTI::ObjectClassHandle h, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor. More...
 
 DtPointObjectPublisher (const DtSyntheticEnvironmentObjectType &type, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor. More...
 
virtual ~DtPointObjectPublisher ()
 destructor More...
 
virtual DtPointObjectRepositorypointObjectStateRep ()
 Returns a pointer to the DtPointObjectRepository - through which you can set or inspect current state information. More...
 
virtual DtPointObjectRepositoryposr ()
 Synonym for pointObjectStateRep(). More...
 
- Public Member Functions inherited from DtObjectPublisher
 DtObjectPublisher (DtExerciseConn *conn, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, bool okToDeleteStateRep=true, const DtDDMRegionSet *regionSet=0)
 Constructor. More...
 
virtual ~DtObjectPublisher ()
 Destructor. More...
 
virtual void setHlaObject (const char *className, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0, const char *objectName=0, const DtDDMRegionSet *regionSet=0)
 A DtObjectPublisher is not capable of communicating data through the RTI until setHlaObject is called. More...
 
virtual void setHlaObject (RTI::ObjectClassHandle hand, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0, const char *objectName=0, const DtDDMRegionSet *regionSet=0)
 This version takes a classHandle and optional object name, and creates the DtHlaObject for you. More...
 
virtual void setHlaObject (DtHlaObjectWithStateRep *obj, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0)
 This version takes an existing DtHlaObject, and uses it. More...
 
virtual void detachHlaObject ()
 Detach HLA object - bringing the DtObjectPublisher back to the state it was in before setHlaObject was called. More...
 
virtual DtStateRepositorystateRep ()
 Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. More...
 
virtual DtStateRepositorysr ()
 Synonym for stateRep(). More...
 
virtual DtStateRepositoryapproximateRemoteStateRep ()
 Returns a pointer to the approximate remote DtStateRepository – This state repository contains the contents of the last sent message. More...
 
virtual DtHlaStateDecoderdecoder ()
 Returns a pointer to the Decoder being used to decode state messages that we send back into the asSeenByRemote SR. More...
 
virtual DtHlaStateEncoderencoder ()
 Returns a pointer to the Encoder being used to encode current state into an outgoing message. More...
 
virtual DtHlaObjectWithStateRephlaObject ()
 Get the object's hlaObject. More...
 
virtual DtExerciseConnexerciseConn ()
 Get our exercise connection. More...
 
virtual const DtObjectIdid () const
 Get the object's local identifier. More...
 
virtual const DtObjectIdobjectId () const
 Get the object's local identifier. More...
 
virtual const DtObjectIdlocalId () const
 Get the object's local identifier. More...
 
virtual const DtStringname () const
 Get the object's name. More...
 
virtual const
DtGlobalObjectDesignator
globalId () const
 Get the HLA object's global object designator - the object name in RTI1.3.3, but the objectId in RTI1.0.3. More...
 
virtual void forceUpdate ()
 Specify a set of attributes that should be included in the ahvps the next time tick is called, even if they would not otherwise need to be sent. More...
 
virtual void forceUpdate (const RTI::AttributeHandleSet &set)
 
virtual bool tick ()
 Tick (update) this object. More...
 
virtual bool parallelTick ()
 Tick (update) this object in parallel threads. More...
 
virtual void setDeleteObjInDtorFlag (bool onOff)
 Set/Get a flag that determines whether to try to delete the HLA object that we represent, upon destruction of this DtObjectPublisher. More...
 
virtual bool deleteObjInDtorFlag () const
 
virtual const DtDDMRegionSetpublishingRegions () const
 
virtual void addRegion (DtDDMRegionSP regionToAdd)
 Adds the specified region to the set of publishing regions, and calls associateRegionForUpdates on the RTI Ambassador. More...
 
virtual void removeRegion (DtDDMRegionSP regionToRemove)
 Removes the specified region from the set of publishing regions, and calls unassociateRegionForUpdates on the RTI Ambassador. More...
 
virtual void setUpdateRateWarningThreshold (unsigned short updatesPerSecond)
 Sets & overrides the default (static) updates per second for a specific instance If a negative integer is passed to it, it will use the difference of the max value of an unsigned short and the absolute value of the negative integer. More...
 
virtual unsigned short updateRateWarningThreshold () const
 Returns the value of the overridden rate warning threshold. More...
 
virtual void checkForUpdateRateWarning ()
 Helper function that determines whether or not to trigger a spam warning. More...
 
 DtObjectPublisher (DtExerciseConn *conn, const char *name=0)
 These constructors and init functions are obsolete, but are here for backwards compatibility with pre-3.4 releases. More...
 
void init (RTI::ObjectClassHandle hand, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0)
 
void init (const char *className, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0)
 

Static Public Member Functions

static DtStateRepCreator setStateRepCreator (DtStateRepCreator creator)
 Give us a function to be used for creating SRs. More...
 
- Static Public Member Functions inherited from DtObjectPublisher
static void removeObjectCb (DtHlaObject *obj, void *pub)
 Callback to be called when our underlying DtHlaObject goes away. More...
 
static void setDfltUpdateRateWarningThreshold (unsigned short updatesPerSecond)
 Sets the default (static) updates per second for any instance. More...
 
static unsigned short dfltUpdateRateWarningThreshold ()
 Return the value of theDfltUpdateRateWarningThreshold. More...
 

Protected Member Functions

 DtPointObjectPublisher (const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor which does not include the DtExerciseConn and does not register the HLA object. More...
 
 DtPointObjectPublisher (const DtPointObjectPublisher &orig)
 copy constructor – not implemented More...
 
DtPointObjectPublisheroperator= (const DtPointObjectPublisher &orig)
 copy constructor – not implemented More...
 
const char * objectClassNameFromType (const DtSyntheticEnvironmentObjectType &type)
 
- Protected Member Functions inherited from DtObjectPublisher
 DtObjectPublisher (DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, bool okToDeleteStateRep=true, const DtDDMRegionSet *regionSet=0)
 Constructor which does not include the DtExerciseConn. More...
 
virtual void setExerciseConn (DtExerciseConn *conn)
 Allows the DtExerciseConn to be set after initial publisher creation. More...
 
virtual void processRemoveObject (DtHlaObject *obj)
 Called by removeObjectCb to detachHlaObject when our underlying DtHlaObject goes away. More...
 

Static Protected Attributes

static DtStateRepCreator theStateRepCreator
 
- Static Protected Attributes inherited from DtObjectPublisher
static unsigned short theDfltUpdateRateWarningThreshold
 Static member that holds the value of the number of updates to be sent to trigger a spam warning. More...
 

Additional Inherited Members

- Protected Attributes inherited from DtObjectPublisher
DtExerciseConnmyExConn
 
DtHlaObjectWithStateRepmyHlaObj
 
DtStateRepositorymyStateRep
 
DtStateRepositorymyAsSeenByRemote
 
DtHlaStateEncodermyEncoder
 
DtHlaStateDecodermyDecoder
 
DtObjectId myObjectId
 
bool myOkToDeleteStateRepFlag
 
DtString myName
 
bool myDeleteObjInDtorFlag
 
DtDDMRegionSet myPublishingRegions
 
DtTime myRealTimeLastUpdate
 
DtTime myLastSpamCheckTime
 
unsigned short myNumberOfUpdatesPerSecond
 
unsigned short myUpdateRateWarningThreshold
 
bool myCanWarn
 

Detailed Description

class DtPointObjectPublisher:

Instances of DtPointObjectPublisher are used for local or source simulations of point objects. The type of point object published depends on the object type Object Type: BreachablePointObject – Domain = 1 (land), Kind = 1 (obstacle) or 2 (prepared position), Category = 1 or 2 BurstPointObject – Domain = 0 (other), Kind = 5 (tactical smoke), Category = 1 or 2 CraterObject – Domain = 1 (land), Kind = 1 (obstacle), Category = 3 RibbonBridgeObject – Domain = 1 (land), Kind = 4 (passageway), Category = 3 StructureObject – Domain = 1 (land), Kind = 3 (cult. feature) or 4 (passageway), Category = 1 or 2 Object types not specified will be published as OtherPointObjects

Member Typedef Documentation

typedef DtPointObjectRepository*(* DtPointObjectPublisher::DtStateRepCreator)()

Function prototype for functions that create DtEnvironmentObjectRepositories.

Constructor & Destructor Documentation

DtPointObjectPublisher::DtPointObjectPublisher ( DtPointObjectRepository stateRepToUse,
DtExerciseConn conn,
const char *  name = 0,
const DtDDMRegionSet regionSetToUse = 0 
)

Constructor – state rep must contain objectType.

DtPointObjectPublisher::DtPointObjectPublisher ( RTI::ObjectClassHandle  h,
DtExerciseConn conn,
const char *  name = 0,
const DtDDMRegionSet regionSetToUse = 0 
)

Constructor.

DtPointObjectPublisher::DtPointObjectPublisher ( const DtSyntheticEnvironmentObjectType type,
DtExerciseConn conn,
const char *  name = 0,
const DtDDMRegionSet regionSetToUse = 0 
)

Constructor.

virtual DtPointObjectPublisher::~DtPointObjectPublisher ( )
virtual

destructor

DtPointObjectPublisher::DtPointObjectPublisher ( const char *  name = 0,
const DtDDMRegionSet regionSetToUse = 0 
)
protected

Constructor which does not include the DtExerciseConn and does not register the HLA object.

This is typically not desired, but may be useful in certain cases when a derived publisher wants to better control how the object is published.

DtPointObjectPublisher::DtPointObjectPublisher ( const DtPointObjectPublisher orig)
protected

copy constructor – not implemented

Member Function Documentation

const char* DtPointObjectPublisher::objectClassNameFromType ( const DtSyntheticEnvironmentObjectType type)
protected
DtPointObjectPublisher& DtPointObjectPublisher::operator= ( const DtPointObjectPublisher orig)
protected

copy constructor – not implemented

DtPointObjectRepository * DtPointObjectPublisher::pointObjectStateRep ( )
inlinevirtual

Returns a pointer to the DtPointObjectRepository - through which you can set or inspect current state information.

References DtObjectPublisher::myStateRep.

DtPointObjectRepository * DtPointObjectPublisher::posr ( )
inlinevirtual
static DtStateRepCreator DtPointObjectPublisher::setStateRepCreator ( DtStateRepCreator  creator)
static

Give us a function to be used for creating SRs.

Member Data Documentation

DtStateRepCreator DtPointObjectPublisher::theStateRepCreator
staticprotected

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

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)