VR-Link API Documentation for HLA 1516
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
DtEmitterSystemPublisher Class Reference

Instances of DtEmitterSystemPublisher are used for local or source simulations of emitter systems, (i.e. More...

+ Inheritance diagram for DtEmitterSystemPublisher:
+ Collaboration diagram for DtEmitterSystemPublisher:

Public Types

typedef
DtEmitterSystemRepository *(* 
DtStateRepCreator )()
 Function prototype for functions that create DtEmitterSystemRepositories.

Public Member Functions

 DtEmitterSystemPublisher (DtEmitterSystemRepository *stateRepToUse, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor.
 DtEmitterSystemPublisher (RTI::ObjectClassHandle h, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor.
 DtEmitterSystemPublisher (DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor.
 DtEmitterSystemPublisher (DtHlaObjectWithStateRep *obj, DtExerciseConn *conn)
 Constructor that creates a publisher for an existing DtHlaObject.
virtual ~DtEmitterSystemPublisher ()
 destructor
virtual DtEmitterSystemRepository * emitterSystemRep ()
 Returns a pointer to the DtEmitterSystemRepository - through which you can set or inspect current state information.
virtual DtEmitterSystemRepository * esr ()
 Synonym for emitterSystemRep().
virtual const char * classToUse () const
 Returns the name of the FOM object class to use.
virtual void tick ()
 syncBeamList and update beam objects as well as main system object.
virtual void forceUpdate ()
 if called, at the next tick all attributes will be sent to the RTI This call differs from the base callback by also including a force update of all beam children.
virtual void forceUpdate (const RTI::AttributeHandleSet &set)
 If the attribute set is specified, forceUpdate will call through to DtObjectPublisher::forceUpdate and the beams children will not be updated.
- Public Member Functions inherited from DtObjectPublisher
 DtObjectPublisher (DtExerciseConn *conn, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, bool okToDeleteStateRep=true, const DtDDMRegionSet *regionSet=0)
 Constructor.
virtual ~DtObjectPublisher ()
 Destructor.
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.
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.
virtual void setHlaObject (DtHlaObjectWithStateRep *obj, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0)
 This version takes an existing DtHlaObject, and uses it.
virtual void detachHlaObject ()
 Detach HLA object - bringing the DtObjectPublisher back to the state it was in before setHlaObject was called.
virtual DtStateRepository * stateRep ()
 Returns a pointer to the DtStateRepository - through which you can set or inspect current state information.
virtual DtStateRepository * sr ()
 Synonym for stateRep().
virtual DtStateRepository * approximateRemoteStateRep ()
 Returns a pointer to the approximate remote DtStateRepository – This state repository contains the contents of the last sent message.
virtual DtHlaStateDecoder * decoder ()
 Returns a pointer to the Decoder being used to decode state messages that we send back into the asSeenByRemote SR.
virtual DtHlaStateEncoder * encoder ()
 Returns a pointer to the Encoder being used to encode current state into an outgoing message.
virtual DtHlaObjectWithStateRep * hlaObject ()
 Get the object's hlaObject.
virtual DtExerciseConn * exerciseConn ()
 Get our exercise connection.
virtual const DtObjectId & id () const
 Get the object's local identifier.
virtual const DtObjectId & objectId () const
 Get the object's local identifier.
virtual const DtObjectId & localId () const
 Get the object's local identifier.
virtual const DtString & name () const
 Get the object's name.
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.
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.
virtual bool deleteObjInDtorFlag () const
virtual const DtDDMRegionSet & publishingRegions () const
virtual void addRegion (DtDDMRegionSP regionToAdd)
 Adds the specified region to the set of publishing regions, and calls associateRegionForUpdates on the RTI Ambassador.
virtual void removeRegion (DtDDMRegionSP regionToRemove)
 Removes the specified region from the set of publishing regions, and calls unassociateRegionForUpdates on the RTI Ambassador.
 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.
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.
- Static Public Member Functions inherited from DtObjectPublisher
static void removeObjectCb (DtHlaObject *obj, void *pub)
 Callback to be called when our underlying DtHlaObject goes away.

Protected Member Functions

virtual void syncBeamList ()
 Update myBeamPubs so that it has a publisher for all beamSRs in my systemSR, but no others.
virtual DtEmitterBeamPublisher * publisherForBsr (DtEmitterBeamRepository *bsr)
 Returns the publisher responsible for publishing the indicated BSR, NULL if there is none.
virtual int numBeams () const
 Return number of beam publishers.
- Protected Member Functions inherited from DtObjectPublisher
virtual void processRemoveObject (DtHlaObject *obj)
 Called by removeObjectCb to detachHlaObject when our underlying DtHlaObject goes away.

Protected Attributes

DtList myBeamPubs
 List of DtEmitterBeamPubs.
bool myTickedFirstTime
- Protected Attributes inherited from DtObjectPublisher
DtExerciseConn * myExConn
DtHlaObjectWithStateRep * myHlaObj
DtStateRepository * myStateRep
DtStateRepository * myAsSeenByRemote
DtHlaStateEncoder * myEncoder
DtHlaStateDecoder * myDecoder
DtObjectId myObjectId
bool myOkToDeleteStateRepFlag
DtString myName
bool myDeleteObjInDtorFlag
DtDDMRegionSet myPublishingRegions

Static Protected Attributes

static DtStateRepCreator theStateRepCreator

Private Member Functions

 DtEmitterSystemPublisher (const DtEmitterSystemPublisher &orig)
 copy constructor – not implemented
DtEmitterSystemPublisher & operator= (const DtEmitterSystemPublisher &orig)
 assignment operator – not implemented

Detailed Description

Instances of DtEmitterSystemPublisher are used for local or source simulations of emitter systems, (i.e.

these entities are not dependent on data being produced elsewhere on the network for their existence). These emitter systems send data to the network.

Member Typedef Documentation

typedef DtEmitterSystemRepository*(* DtEmitterSystemPublisher::DtStateRepCreator)()

Function prototype for functions that create DtEmitterSystemRepositories.

Constructor & Destructor Documentation

DtEmitterSystemPublisher::DtEmitterSystemPublisher ( DtEmitterSystemRepository *  stateRepToUse,
DtExerciseConn *  conn,
const char *  name = 0,
const DtDDMRegionSet *  regionSetToUse = 0 
)

Constructor.

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

Constructor.

DtEmitterSystemPublisher::DtEmitterSystemPublisher ( DtExerciseConn *  conn,
const char *  name = 0,
const DtDDMRegionSet *  regionSetToUse = 0 
)

Constructor.

DtEmitterSystemPublisher::DtEmitterSystemPublisher ( DtHlaObjectWithStateRep *  obj,
DtExerciseConn *  conn 
)

Constructor that creates a publisher for an existing DtHlaObject.

(DtHlaObjectWithStateRep is derived from DtHlaObject.) Typically used in conjunction with ownership management, when you want to take ownership and begin updating some attributes of an object that you have already discovered.

virtual DtEmitterSystemPublisher::~DtEmitterSystemPublisher ( )
virtual

destructor

DtEmitterSystemPublisher::DtEmitterSystemPublisher ( const DtEmitterSystemPublisher &  orig)
private

copy constructor – not implemented

Member Function Documentation

virtual const char* DtEmitterSystemPublisher::classToUse ( ) const
virtual

Returns the name of the FOM object class to use.

Default implementation is to ask the FOM Mapper.

DtEmitterSystemRepository * DtEmitterSystemPublisher::emitterSystemRep ( )
inlinevirtual

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

References DtObjectPublisher::myStateRep.

DtEmitterSystemRepository * DtEmitterSystemPublisher::esr ( )
inlinevirtual
virtual void DtEmitterSystemPublisher::forceUpdate ( )
virtual

if called, at the next tick all attributes will be sent to the RTI This call differs from the base callback by also including a force update of all beam children.

Reimplemented from DtObjectPublisher.

virtual void DtEmitterSystemPublisher::forceUpdate ( const RTI::AttributeHandleSet &  set)
virtual

If the attribute set is specified, forceUpdate will call through to DtObjectPublisher::forceUpdate and the beams children will not be updated.

This function is added to prevent it from being hidden

Reimplemented from DtObjectPublisher.

virtual int DtEmitterSystemPublisher::numBeams ( ) const
protectedvirtual

Return number of beam publishers.

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

assignment operator – not implemented

virtual DtEmitterBeamPublisher* DtEmitterSystemPublisher::publisherForBsr ( DtEmitterBeamRepository *  bsr)
protectedvirtual

Returns the publisher responsible for publishing the indicated BSR, NULL if there is none.

static DtStateRepCreator DtEmitterSystemPublisher::setStateRepCreator ( DtStateRepCreator  creator)
static

Give us a function to be used for creating SRs.

virtual void DtEmitterSystemPublisher::syncBeamList ( )
protectedvirtual

Update myBeamPubs so that it has a publisher for all beamSRs in my systemSR, but no others.

Called by tick() so that all beamPubs can be ticked after systemSR has been updated.

virtual void DtEmitterSystemPublisher::tick ( )
virtual

syncBeamList and update beam objects as well as main system object.

Reimplemented from DtObjectPublisher.

Member Data Documentation

DtList DtEmitterSystemPublisher::myBeamPubs
protected

List of DtEmitterBeamPubs.

bool DtEmitterSystemPublisher::myTickedFirstTime
protected
DtStateRepCreator DtEmitterSystemPublisher::theStateRepCreator
staticprotected

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

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)