![]() |
VR-Forces 4.0.4 Class Documentation
|
Derived from DtSimLocalEntityNetInterface, this class provides an interface between an aggregate local entity (such as a tank platoon, infantry brigade. More...

Public Member Functions | |
| DtSimAggregateLocalEntityNetInterface (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry=0, bool publishObject=true) | |
| read/writable contructor | |
| DtSimAggregateLocalEntityNetInterface (const DtSimAggregateLocalEntityNetInterface &orig, DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor | |
| const DtSimAggregateLocalEntityNetInterface & | operator= (const DtSimAggregateLocalEntityNetInterface &orig) |
| assignment operator | |
| virtual | ~DtSimAggregateLocalEntityNetInterface () |
| destructor | |
| bool | init () |
| Override to initialize myNextTickTime. | |
| virtual void | updateNet () |
| Ticks the publisher, then calls base class version. | |
| virtual void | tick () |
| Override base class tick. | |
| virtual void | setMinTickPeriod (double minTickPeriod) |
| specifies a minimum tick period (which can also be thought of as | |
| virtual double | minTickPeriod () const |
| access the minimum tick period | |
| virtual void | setMinTickPeriodVariance (double minTickPeriodVariance) |
| set the variance in the minimum tick time | |
| virtual double | minTickPeriodVariance () const |
| access the variance in the minimum tick period | |
| virtual void | setNextTickTime (double nextTickTime) |
| The next tick time is normally calculated internally. | |
| virtual double | nextTickTime () const |
| access the next tick time | |
| virtual void | updatePublisher () |
| Override of base class updatePublisher(). | |
| virtual bool | createPublisher () |
| Override of base class createPublisher(). Creates a DtVrfAggregatePublisher. | |
| virtual void | destroyPublisher () |
| Deletes a DtVrfAggregatePublisher. | |
| virtual bool | setAggregatePublisher (DtVrfAggregatePublisher *publisher) |
| If the user needs to supply a publisher other than the one created by the network interface, this call can be used. | |
| virtual void | setupNetworkRepository () |
| Initialize the DtExtAggregateStateRepository created by the DtVrfAggregatePublisher with values from the already initialized local aggregate state repository (DtSimAggregateLocalStateRepository). | |
| virtual DtVrfAggregatePublisher * | aggregatePublisher () const |
| Returns a pointer to the DtVrfAggregatePublisher either created by createPublisher() or set by setAggregatePublisher(). | |
| virtual DtExtAggregateStateRepository * | aggregateNetworkState () const |
| Returns a pointer to the DtExtAggregateStateRepository created by the DtVrfAggregatePublisher. | |
| virtual DtVrfAggregateStateRepository * | aggregateLocalState () const |
| virtual bool | setUserVariableDatum (int userRecordNumber, const DtVariableDatumRecord &record) |
| Adds a user specified variable datum record. | |
| virtual bool | getUserVariableDatum (int userRecordNumber, DtVariableDatumRecord &rec) |
| Returns a user specified variable datum record. | |
| virtual bool | encodeVariableDatum () |
| Sets information that is going to be used in the variable portion of the aggregate. | |
| virtual bool | isANetSubordinate (const DtGlobalObjectDesignator &globalId) |
| Returns true if the given global Id is one of our individual or aggregate subordinates, according to our network data (as specified in our aggregate state repository). | |
| virtual bool | isPseudoAggregate () const |
| Returns true if this interface supports a pseudo-aggregate entity, false otherwise (true aggregate). | |
| virtual bool | isAggregate () const |
| virtual DtString | type () const |
| Returns the type of net interface object. | |
| virtual void | setForceUpdate (bool flag) |
| Set to force an update all of attributes on the next tick. | |
Static Public Member Functions | |
| static DtSimAggregateLocalEntityNetInterface * | isAggregateLocalEntityNetInterface (const DtSimObjectNetInterface *objNetInterface) |
| This function will return the objNetInterface passed in, cast to a DtSimAggregateLocalEntityNetInterface*, provided the objNetInterface is indeed an aggregate local entity network interface. | |
| static DtSimObjectNetInterface * | creator (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry, bool publishObject) |
Protected Member Functions | |
| DtSimAggregateLocalEntityNetInterface () | |
| default constructor | |
| virtual bool | updateVrfDataAsSeenByRemote () |
| Updates into network state. | |
Protected Attributes | |
| DtVrfAggregatePublisher * | myAggregatePublisher |
| double | myMinTickPeriod |
| double | myMinTickPeriodVariance |
| double | myNextTickTime |
| bool | myFirstPause |
| bool | myForceUpdate |
Derived from DtSimLocalEntityNetInterface, this class provides an interface between an aggregate local entity (such as a tank platoon, infantry brigade.
default constructor
| DtSimAggregateLocalEntityNetInterface::DtSimAggregateLocalEntityNetInterface | ( | const DtString & | name, |
| DtVrfObject * | vrfObject, | ||
| DtReaderWriterRegistry * | parentRegistry = 0, |
||
| bool | publishObject = true |
||
| ) |
read/writable contructor
| DtSimAggregateLocalEntityNetInterface::DtSimAggregateLocalEntityNetInterface | ( | const DtSimAggregateLocalEntityNetInterface & | orig, |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
copy constructor
| virtual DtSimAggregateLocalEntityNetInterface::~DtSimAggregateLocalEntityNetInterface | ( | ) | [virtual] |
destructor
| const DtSimAggregateLocalEntityNetInterface& DtSimAggregateLocalEntityNetInterface::operator= | ( | const DtSimAggregateLocalEntityNetInterface & | orig | ) |
assignment operator
| bool DtSimAggregateLocalEntityNetInterface::init | ( | ) | [virtual] |
Override to initialize myNextTickTime.
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::updateNet | ( | ) | [virtual] |
Ticks the publisher, then calls base class version.
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::tick | ( | ) | [virtual] |
Override base class tick.
This version of tick checks to see if the time to tick has arrived (myNextTickTime <= exerciseClock()-> approximateElapsedRealTime()). If it has, it will then call the base class tick (which in turn calls onTick()), and recalculate the next tick time
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::setMinTickPeriod | ( | double | minTickPeriod | ) | [virtual] |
specifies a minimum tick period (which can also be thought of as
Reimplemented from DtSimLocalEntityNetInterface.
| virtual double DtSimAggregateLocalEntityNetInterface::minTickPeriod | ( | ) | const [virtual] |
access the minimum tick period
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::setMinTickPeriodVariance | ( | double | minTickPeriodVariance | ) | [virtual] |
set the variance in the minimum tick time
Reimplemented from DtSimLocalEntityNetInterface.
| virtual double DtSimAggregateLocalEntityNetInterface::minTickPeriodVariance | ( | ) | const [virtual] |
access the variance in the minimum tick period
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::setNextTickTime | ( | double | nextTickTime | ) | [virtual] |
The next tick time is normally calculated internally.
setNextTickTime can be used to force a tick (set nextTickTime to exerciseClock()-> approximateElapsedRealTime())
Reimplemented from DtSimLocalEntityNetInterface.
| virtual double DtSimAggregateLocalEntityNetInterface::nextTickTime | ( | ) | const [virtual] |
access the next tick time
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::updatePublisher | ( | ) | [virtual] |
Override of base class updatePublisher().
Updates the DtVrfAggregateStateRepository created by this class' publisher with current values from the local aggregate state repository (DtSimAggregateLocalStateRepository), and then ticks the aggregate publisher.
Implements DtSimLocalEntityNetInterface.
Reimplemented in DtSimPseudoAggregateLocalEntityNetInterface.
| virtual bool DtSimAggregateLocalEntityNetInterface::createPublisher | ( | ) | [virtual] |
Override of base class createPublisher(). Creates a DtVrfAggregatePublisher.
Implements DtSimLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::destroyPublisher | ( | ) | [virtual] |
Deletes a DtVrfAggregatePublisher.
Implements DtSimLocalEntityNetInterface.
| virtual bool DtSimAggregateLocalEntityNetInterface::setAggregatePublisher | ( | DtVrfAggregatePublisher * | publisher | ) | [virtual] |
If the user needs to supply a publisher other than the one created by the network interface, this call can be used.
If the myPublisher pointer is not null and if myPublisherUserSupplied flag is false then the interface will first destroy the current publisher; otherwise a warning is generated and false is returned. The interface's destructor will not destroy a user-supplied publisher - that is the responsibility of the publisher's creator. If you need to change a user-supplied publisher to a different one, first call setPublisher with a value of 0 (Null). This will set the myPublisherUserSupplied flag to false.
| virtual void DtSimAggregateLocalEntityNetInterface::setupNetworkRepository | ( | ) | [virtual] |
Initialize the DtExtAggregateStateRepository created by the DtVrfAggregatePublisher with values from the already initialized local aggregate state repository (DtSimAggregateLocalStateRepository).
Implements DtSimLocalEntityNetInterface.
| virtual DtVrfAggregatePublisher* DtSimAggregateLocalEntityNetInterface::aggregatePublisher | ( | ) | const [virtual] |
Returns a pointer to the DtVrfAggregatePublisher either created by createPublisher() or set by setAggregatePublisher().
| virtual DtExtAggregateStateRepository* DtSimAggregateLocalEntityNetInterface::aggregateNetworkState | ( | ) | const [virtual] |
Returns a pointer to the DtExtAggregateStateRepository created by the DtVrfAggregatePublisher.
| virtual DtVrfAggregateStateRepository* DtSimAggregateLocalEntityNetInterface::aggregateLocalState | ( | ) | const [virtual] |
| virtual bool DtSimAggregateLocalEntityNetInterface::setUserVariableDatum | ( | int | userRecordNumber, |
| const DtVariableDatumRecord & | record | ||
| ) | [virtual] |
Adds a user specified variable datum record.
The userRecordNumber starts at 0. User records are added after the base class records in the variable datum field.
| virtual bool DtSimAggregateLocalEntityNetInterface::getUserVariableDatum | ( | int | userRecordNumber, |
| DtVariableDatumRecord & | rec | ||
| ) | [virtual] |
Returns a user specified variable datum record.
| virtual bool DtSimAggregateLocalEntityNetInterface::encodeVariableDatum | ( | ) | [virtual] |
Sets information that is going to be used in the variable portion of the aggregate.
Notably appearance and subordinate order
| virtual bool DtSimAggregateLocalEntityNetInterface::isANetSubordinate | ( | const DtGlobalObjectDesignator & | globalId | ) | [virtual] |
Returns true if the given global Id is one of our individual or aggregate subordinates, according to our network data (as specified in our aggregate state repository).
Returns true if the global Id appears in either of the netSubordinateEntities() or netSubordinateAggregates() lists, false if not.
| virtual bool DtSimAggregateLocalEntityNetInterface::isPseudoAggregate | ( | ) | const [inline, virtual] |
Returns true if this interface supports a pseudo-aggregate entity, false otherwise (true aggregate).
Reimplemented in DtSimPseudoAggregateLocalEntityNetInterface.
| virtual bool DtSimAggregateLocalEntityNetInterface::isAggregate | ( | ) | const [inline, virtual] |
Implements DtSimLocalEntityNetInterface.
| virtual DtString DtSimAggregateLocalEntityNetInterface::type | ( | ) | const [virtual] |
Returns the type of net interface object.
Strings are defined in netIfTypes.h.
Implements DtSimObjectNetInterface.
Reimplemented in DtSimPseudoAggregateLocalEntityNetInterface.
| virtual void DtSimAggregateLocalEntityNetInterface::setForceUpdate | ( | bool | flag | ) | [virtual] |
Set to force an update all of attributes on the next tick.
Once updated the myForceUpdate flag will be set to false, so you must call this routine with true again to force an update
| static DtSimAggregateLocalEntityNetInterface* DtSimAggregateLocalEntityNetInterface::isAggregateLocalEntityNetInterface | ( | const DtSimObjectNetInterface * | objNetInterface | ) | [static] |
This function will return the objNetInterface passed in, cast to a DtSimAggregateLocalEntityNetInterface*, provided the objNetInterface is indeed an aggregate local entity network interface.
| static DtSimObjectNetInterface* DtSimAggregateLocalEntityNetInterface::creator | ( | const DtString & | name, |
| DtVrfObject * | vrfObject, | ||
| DtReaderWriterRegistry * | parentRegistry, | ||
| bool | publishObject | ||
| ) | [static] |
Reimplemented in DtSimPseudoAggregateLocalEntityNetInterface.
| virtual bool DtSimAggregateLocalEntityNetInterface::updateVrfDataAsSeenByRemote | ( | ) | [protected, virtual] |
Updates into network state.
double DtSimAggregateLocalEntityNetInterface::myMinTickPeriod [protected] |
Reimplemented from DtSimLocalEntityNetInterface.
double DtSimAggregateLocalEntityNetInterface::myMinTickPeriodVariance [protected] |
Reimplemented from DtSimLocalEntityNetInterface.
double DtSimAggregateLocalEntityNetInterface::myNextTickTime [protected] |
Reimplemented from DtSimLocalEntityNetInterface.