VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtSimAggregateLocalEntityNetInterface Class Reference

Derived from DtSimLocalEntityNetInterface, this class provides an interface between an aggregate local entity (such as a tank platoon, infantry brigade. More...

Inheritance diagram for DtSimAggregateLocalEntityNetInterface:
Inheritance graph
[legend]

List of all members.

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 DtVrfAggregatePublisheraggregatePublisher () 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 DtSimObjectNetInterfacecreator (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry, bool publishObject)

Protected Member Functions

 DtSimAggregateLocalEntityNetInterface ()
 default constructor
virtual bool updateVrfDataAsSeenByRemote ()
 Updates into network state.

Protected Attributes

DtVrfAggregatePublishermyAggregatePublisher
double myMinTickPeriod
double myMinTickPeriodVariance
double myNextTickTime
bool myFirstPause
bool myForceUpdate

Detailed Description

Derived from DtSimLocalEntityNetInterface, this class provides an interface between an aggregate local entity (such as a tank platoon, infantry brigade.


Constructor & Destructor Documentation

default constructor

DtSimAggregateLocalEntityNetInterface::DtSimAggregateLocalEntityNetInterface ( const DtString name,
DtVrfObject vrfObject,
DtReaderWriterRegistry parentRegistry = 0,
bool  publishObject = true 
)

read/writable contructor

copy constructor

destructor


Member Function Documentation

const DtSimAggregateLocalEntityNetInterface& DtSimAggregateLocalEntityNetInterface::operator= ( const DtSimAggregateLocalEntityNetInterface orig)

assignment operator

Override to initialize myNextTickTime.

Reimplemented from DtSimLocalEntityNetInterface.

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

  1. / maximum tick rate). This is specified in seconds.

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.

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.

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.

Override of base class createPublisher(). Creates a DtVrfAggregatePublisher.

Implements DtSimLocalEntityNetInterface.

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.

Initialize the DtExtAggregateStateRepository created by the DtVrfAggregatePublisher with values from the already initialized local aggregate state repository (DtSimAggregateLocalStateRepository).

Implements DtSimLocalEntityNetInterface.

Returns a pointer to the DtVrfAggregatePublisher either created by createPublisher() or set by setAggregatePublisher().

Returns a pointer to the DtExtAggregateStateRepository created by the DtVrfAggregatePublisher.

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.

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.

Returns true if this interface supports a pseudo-aggregate entity, false otherwise (true aggregate).

Reimplemented in DtSimPseudoAggregateLocalEntityNetInterface.

virtual bool DtSimAggregateLocalEntityNetInterface::isAggregate ( ) const [inline, virtual]

Returns the type of net interface object.

Strings are defined in netIfTypes.h.

Implements DtSimObjectNetInterface.

Reimplemented in DtSimPseudoAggregateLocalEntityNetInterface.

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

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]

Updates into network state.


Member Data Documentation

Reimplemented from DtSimLocalEntityNetInterface.

Reimplemented from DtSimLocalEntityNetInterface.

Reimplemented from DtSimLocalEntityNetInterface.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)