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 | Protected Attributes | Static Protected Attributes
DtIffPublisher Class Reference

class DtIffPublisher: More...

+ Inheritance diagram for DtIffPublisher:
+ Collaboration diagram for DtIffPublisher:

Public Types

typedef DtIffStateRepository *(* DtStateRepCreator )()
 Function prototype for functions that create DtEntityStateRepositories. More...
 
typedef DtGlobalObjectDesignator(* DtIffModeNameChooser )(DtIffPublisher &publisher, DtModeType modeType, void *userData)
 Function prototype for functions that choose IFF mode publisher names based on the parent IFF publisher, mode type, and user data. More...
 

Public Member Functions

 DtIffPublisher (DtIffStateRepository *stateRepToUse, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor – State Rep Must have the NavaidsSysType set. More...
 
 DtIffPublisher (DtIffAtcNavaidsSysType type, DtExerciseConn *conn, DtIffAtcNavaidsSysName systemName, DtEntityIdentifier entityId, DtVector32 relativePosition=DtVector32::zero(), std::vector< DtModeType > enabledModes={DtMode1, DtMode2, DtMode3A, DtMode3C, DtMode5, DtModeS, DtTCAS}, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor – State Rep Must have the NavaidsSysType set Accepts enableMode parameters to specify which modes are enabled for a given system. More...
 
 DtIffPublisher (RTI::ObjectClassHandle h, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor. More...
 
 DtIffPublisher (DtIffAtcNavaidsSysType type, DtExerciseConn *conn, const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor. More...
 
 DtIffPublisher (DtHlaObjectWithStateRep *obj, DtExerciseConn *conn)
 Constructor that creates a publisher for an existing DtHlaObject. More...
 
virtual ~DtIffPublisher ()
 destructor More...
 
virtual bool tick ()
 Tick the publisher, returns true if data is sent. More...
 
virtual DtIffStateRepository * iffStateRep ()
 Returns a pointer to the IffStateRepository - through which you can set current state information. More...
 
virtual DtIffStateRepository * isr ()
 Synonym for iffStateRep() More...
 
virtual void setIffModeNameChooser (DtIffModeNameChooser chooser, void *userData=0)
 Register a function that will be used to choose the names for any IFF mode publisher objects created by this IFF publisher. More...
 
virtual DtString chooseIffModeName (DtModeType modeType)
 Choose the name for an IFF mode publisher based on the mode type. 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 DtStateRepository * stateRep ()
 Returns a pointer to the DtStateRepository - through which you can set or inspect current state information. More...
 
virtual DtStateRepository * sr ()
 Synonym for stateRep(). More...
 
virtual DtStateRepository * approximateRemoteStateRep ()
 Returns a pointer to the approximate remote DtStateRepository – This state repository contains the contents of the last sent message. More...
 
virtual DtHlaStateDecoder * decoder ()
 Returns a pointer to the Decoder being used to decode state messages that we send back into the asSeenByRemote SR. More...
 
virtual DtHlaStateEncoder * encoder ()
 Returns a pointer to the Encoder being used to encode current state into an outgoing message. More...
 
virtual DtHlaObjectWithStateRep * hlaObject ()
 Get the object's hlaObject. More...
 
virtual DtExerciseConn * exerciseConn ()
 Get our exercise connection. More...
 
virtual const DtObjectId & id () const
 Get the object's local identifier. More...
 
virtual const DtObjectId & objectId () const
 Get the object's local identifier. More...
 
virtual const DtObjectId & localId () const
 Get the object's local identifier. More...
 
virtual const DtString & name () 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 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 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. 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

 DtIffPublisher (const char *name=0, const DtDDMRegionSet *regionSetToUse=0)
 Constructor which does not include the DtExerciseConn and does not register the HLA object. More...
 
 DtIffPublisher (const DtIffPublisher &orig)
 copy constructor – not implemented More...
 
DtIffPublisher & operator= (const DtIffPublisher &orig)
 assignment operator – not implemented More...
 
const char * objectClassNameFromType (DtIffAtcNavaidsSysType type)
 Non-virtual since called from constructor. More...
 
virtual void storeIffDataPublisherInfo (DtExerciseConn *conn, const DtDDMRegionSet *regionSetToUse, DtIffAtcNavaidsSysType type, std::vector< DtModeType > *enabledModesPtr=0)
 Stores information needed to create IFF Data publishers on first tick. More...
 
- 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...
 

Protected Attributes

DtMode1Publisher * myMode1Publisher
 
DtMode2Publisher * myMode2Publisher
 
DtMode3APublisher * myMode3APublisher
 
DtMode3CPublisher * myMode3CPublisher
 
DtMode4Publisher * myMode4Publisher
 
DtMode5Publisher * myMode5Publisher
 
DtModeSPublisher * myModeSPublisher
 
DtTCASDataPublisher * myTCASDataPublisher
 
DtSovietPublisher * mySovietPublisher
 
DtRRBPublisher * myRRBPublisher
 
std::map< DtModeType,
std::wstring > 
myReservedDataNames
 
bool myReserveDataModeNames
 
DtIffModeNameChooser myIffModeNameChooser
 Optional function used to choose IFF mode publisher names. More...
 
void * myIffModeNameChooserUserData
 Optional user data to pass to the IFF mode name chooser. More...
 
bool myIffDataPublishersInitialized
 Flag to track whether initial IFF data publishers have been created. More...
 
std::vector< DtModeType > myInitialEnabledModes
 Stored enabled modes from constructor for deferred initialization. More...
 
- 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
 
DtTime myRealTimeLastUpdate
 
DtTime myLastSpamCheckTime
 
unsigned short myNumberOfUpdatesPerSecond
 
unsigned short myUpdateRateWarningThreshold
 
bool myCanWarn
 

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

Detailed Description

class DtIffPublisher:

Instances of IffPublisher are used for local or source simulations of "Iff" objects. The publisher sends data to the network when necessary. This class is derived from DtObjectPublisher, which does most of the work. The derived class mostly exists to provide type safety, and to configure the base object.

Member Typedef Documentation

typedef DtGlobalObjectDesignator(* DtIffPublisher::DtIffModeNameChooser)(DtIffPublisher &publisher, DtModeType modeType, void *userData)

Function prototype for functions that choose IFF mode publisher names based on the parent IFF publisher, mode type, and user data.

typedef DtIffStateRepository*(* DtIffPublisher::DtStateRepCreator)()

Function prototype for functions that create DtEntityStateRepositories.

Constructor & Destructor Documentation

DtIffPublisher::DtIffPublisher ( DtIffStateRepository *  stateRepToUse,
DtExerciseConn *  conn,
const char *  name = 0,
const DtDDMRegionSet *  regionSetToUse = 0 
)

Constructor – State Rep Must have the NavaidsSysType set.

DtIffPublisher::DtIffPublisher ( DtIffAtcNavaidsSysType  type,
DtExerciseConn *  conn,
DtIffAtcNavaidsSysName  systemName,
DtEntityIdentifier  entityId,
DtVector32  relativePosition = DtVector32::zero(),
std::vector< DtModeType >  enabledModes = {DtMode1, DtMode2, DtMode3A, DtMode3C, DtMode5, DtModeS, DtTCAS},
const char *  name = 0,
const DtDDMRegionSet *  regionSetToUse = 0 
)

Constructor – State Rep Must have the NavaidsSysType set Accepts enableMode parameters to specify which modes are enabled for a given system.

It also accepts the IFF System Type, indicating publishing of transponder, interrogator or other, etc

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

Constructor.

DtIffPublisher::DtIffPublisher ( DtIffAtcNavaidsSysType  type,
DtExerciseConn *  conn,
const char *  name = 0,
const DtDDMRegionSet *  regionSetToUse = 0 
)

Constructor.

DtIffPublisher::DtIffPublisher ( 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 DtIffPublisher::~DtIffPublisher ( )
virtual

destructor

DtIffPublisher::DtIffPublisher ( 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.

DtIffPublisher::DtIffPublisher ( const DtIffPublisher &  orig)
protected

copy constructor – not implemented

Member Function Documentation

virtual DtString DtIffPublisher::chooseIffModeName ( DtModeType  modeType)
virtual

Choose the name for an IFF mode publisher based on the mode type.

If a custom mode name chooser has been set via setIffModeNameChooser(), it will be used. Otherwise, the default naming convention is applied. This function can be overridden in derived classes to provide custom naming behavior.

DtIffStateRepository * DtIffPublisher::iffStateRep ( )
inlinevirtual

Returns a pointer to the IffStateRepository - through which you can set current state information.

References DtObjectPublisher::myStateRep.

DtIffStateRepository * DtIffPublisher::isr ( )
inlinevirtual
const char* DtIffPublisher::objectClassNameFromType ( DtIffAtcNavaidsSysType  type)
protected

Non-virtual since called from constructor.

If you don't like the default mapping between entity type and object class, just pass the object class handle you want to the constructor.

DtIffPublisher& DtIffPublisher::operator= ( const DtIffPublisher &  orig)
protected

assignment operator – not implemented

virtual void DtIffPublisher::setIffModeNameChooser ( DtIffModeNameChooser  chooser,
void *  userData = 0 
)
virtual

Register a function that will be used to choose the names for any IFF mode publisher objects created by this IFF publisher.

The chooser will be passed a reference to this publisher, the mode type, and optional user data, and must return the desired mode publisher name.

static DtStateRepCreator DtIffPublisher::setStateRepCreator ( DtStateRepCreator  creator)
static

Give us a function to be used for creating SRs.

virtual void DtIffPublisher::storeIffDataPublisherInfo ( DtExerciseConn *  conn,
const DtDDMRegionSet *  regionSetToUse,
DtIffAtcNavaidsSysType  type,
std::vector< DtModeType > *  enabledModesPtr = 0 
)
protectedvirtual

Stores information needed to create IFF Data publishers on first tick.

Parameters
connThe exercise connection
regionSetToUseThe DtDDMRegion
typeThe IFF System Type, indicating publishing of transponder, interrogator or other, etc
enabledModesPtrOptional pointer to vector of enabled modes
virtual bool DtIffPublisher::tick ( )
virtual

Tick the publisher, returns true if data is sent.

Reimplemented from DtObjectPublisher.

Member Data Documentation

bool DtIffPublisher::myIffDataPublishersInitialized
protected

Flag to track whether initial IFF data publishers have been created.

DtIffModeNameChooser DtIffPublisher::myIffModeNameChooser
protected

Optional function used to choose IFF mode publisher names.

void* DtIffPublisher::myIffModeNameChooserUserData
protected

Optional user data to pass to the IFF mode name chooser.

std::vector<DtModeType> DtIffPublisher::myInitialEnabledModes
protected

Stored enabled modes from constructor for deferred initialization.

DtMode1Publisher* DtIffPublisher::myMode1Publisher
protected
DtMode2Publisher* DtIffPublisher::myMode2Publisher
protected
DtMode3APublisher* DtIffPublisher::myMode3APublisher
protected
DtMode3CPublisher* DtIffPublisher::myMode3CPublisher
protected
DtMode4Publisher* DtIffPublisher::myMode4Publisher
protected
DtMode5Publisher* DtIffPublisher::myMode5Publisher
protected
DtModeSPublisher* DtIffPublisher::myModeSPublisher
protected
bool DtIffPublisher::myReserveDataModeNames
protected
std::map<DtModeType, std::wstring> DtIffPublisher::myReservedDataNames
protected
DtRRBPublisher* DtIffPublisher::myRRBPublisher
protected
DtSovietPublisher* DtIffPublisher::mySovietPublisher
protected
DtTCASDataPublisher* DtIffPublisher::myTCASDataPublisher
protected
DtStateRepCreator DtIffPublisher::theStateRepCreator
staticprotected

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

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)