VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
DtKeepStationTask Class Reference

DtKeepStationTask represents a the keep station mode of the follow entity task for an entity to perform. The keep station mode of following is specific to surface entities only. It inherits read/writableness from SimTask. The task includes the entity to follow, the heading from the entity and the heading mode. The heading is specified in terms of local coordinates.

If the entity to follow does not exist, the following entity stops. If at some later point during the simulation, the entity-to-follow comes into existence, then the entity starts following it. If the entity being followed gets destroyed, the following entity stops and sends a taskComplete(), indicating that it is finished executing the task and is ready for a new task.

An entity executing a DtKeepStationTask will not advance to another task unless one of the following things happens:

task-type: DtKeepStationTaskType

parameters: entity to follow - Echelon ID string (object name) of the entity to be followed.

          offset distance - Following distance expressed in nautical miles, relative
                            to the entity to be followed.
                            For example, the entity can be tasked to follow 5 nautical miles north of the entity

          heading - Heading in radians, measured clockwise from North.

          mode - The mode in which to set the heading:
          0 - Absolute - Sets the heading to be the heading given (true heading)
          1 - Relative to host - If embarked, sets the heading to be the heading
              on the host object
          2 - Sets the heading to be the heading + the delta given to be the
              new heading
          3 - Magnetic absolute heading.
Inheritance diagram for DtKeepStationTask:
Inheritance graph
[legend]

Public Member Functions

 DtKeepStationTask ()
 
 DtKeepStationTask (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtKeepStationTask (const DtString &writeName, const DtKeepStationTask &orig, DtReaderWriterRegistry *parentRegistry=0)
 
const DtKeepStationTask & operator= (const DtKeepStationTask &orig)
 
virtual ~DtKeepStationTask () override
 
virtual const
DtSimTaskMessageType & 
type () const override
 
virtual DtSimTask * clone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual DtString stringRep () const override
 
virtual const DtUUID & entityToFollow () const
 
virtual void setEntityToFollow (const DtUUID &entity)
 
virtual double offsetDistance () const
 
virtual void setOffsetDistance (double offsetDistance)
 
virtual double heading () const
 
virtual void setHeading (double heading)
 
virtual int mode () const
 
virtual void setMode (int)
 
virtual int netRepSize () const override
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize) override
 
virtual bool setToNet () override
 
- Public Member Functions inherited from DtSimTask
virtual ~DtSimTask () override
 
virtual bool init ()
 
virtual bool isTypeRegistered (const DtSimTaskMessageType &taskName)
 
virtual void setSubtask (bool flag)
 
virtual bool subtask () const
 
virtual void setAllowTaskVisualizations (bool flag)
 
virtual bool allowTaskVisualizations () const
 
virtual void putData (std::string &fp, int indentLevel=0) override
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
 
virtual char * netRep ()
 
virtual bool isOneClick () const
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriter & operator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs) const
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContainer & aliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const char * readerWriterType () const
 
virtual const char * xmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType > 
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriter * defaultRWValue () const
 
virtual DtReaderWriter * defaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistry & registry () const
 
DtReaderWriterRegistry & registry ()
 
virtual DtPropertyInterface * property ()
 
virtual const DtPropertyInterface * property () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindings * generateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Static Public Member Functions

static DtSimTask * creator ()
 
- Static Public Member Functions inherited from DtSimTask
static DtSimTask * createTask (DtlObjPtr mtlStream)
 
static DtSimTask * createTask (const DtSimTaskMessageType &taskType)
 
static void addTaskCreatorFcn (const DtSimTaskMessageType &taskName, DtSimTaskCreatorFcn fcn)
 
static void setFactory (DtSimTaskFactory *factory)
 
static DtSimTaskFactory * factory ()
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList & 
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const char * theXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactory * factory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWriter * createFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWriter * createFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWriter * createFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Attributes

DtRwUUID myEntityToFollow
 
DtRwReal myOffsetDistance
 
DtRwReal myHeading
 
DtRwInt myMode
 
- Protected Attributes inherited from DtSimTask
DtRwBoolean mySubtask
 
DtRwBoolean myAllowTaskVisualizations
 
char * myNetRep
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistry * myParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWriter * myDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString > 
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString > 
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Protected Member Functions inherited from DtSimTask
 DtSimTask ()
 
 DtSimTask (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtSimTask (const DtString &writeName, const DtSimTask &orig, DtReaderWriterRegistry *parentRegistry=0)
 
const DtSimTask & operator= (const DtSimTask &orig)
 
virtual char * createNetworkBuffer ()
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 
- Static Protected Attributes inherited from DtSimTask
static DtSimTaskFactory * myFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactory * theFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

DtKeepStationTask::DtKeepStationTask ( )

default constructor

DtKeepStationTask::DtKeepStationTask ( const DtString &  writeName,
DtReaderWriterRegistry *  parentRegistry = 0 
)

constructor If you have a task 'put' itself, the writeName will preface the task.

DtKeepStationTask::DtKeepStationTask ( const DtString &  writeName,
const DtKeepStationTask &  orig,
DtReaderWriterRegistry *  parentRegistry = 0 
)

Copy constructor; nothing to be copied. Here to thwart over-ambitious compilers that create one when it shouldn't.

virtual DtKeepStationTask::~DtKeepStationTask ( )
overridevirtual

Member Function Documentation

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

assignment operator

virtual const DtSimTaskMessageType& DtKeepStationTask::type ( ) const
overridevirtual

Returns DtFollowEntityType.

Implements DtSimTask.

virtual DtSimTask* DtKeepStationTask::clone ( const DtString &  name,
DtReaderWriterRegistry *  parentRegistry = 0 
) const
overridevirtual

Creates a copy of this follow entity task.

Implements DtSimTask.

virtual DtString DtKeepStationTask::stringRep ( ) const
overridevirtual

Get a readable string representation of this task.

Implements DtSimTask.

virtual const DtUUID& DtKeepStationTask::entityToFollow ( ) const
virtual

Object name of the entity to follow.

virtual void DtKeepStationTask::setEntityToFollow ( const DtUUID &  entity)
virtual
virtual double DtKeepStationTask::offsetDistance ( ) const
virtual

The offset distance from the leader entity. Defines the distance at which the following entity is positioned with reference to the entity being followed.

virtual void DtKeepStationTask::setOffsetDistance ( double  offsetDistance)
virtual
virtual double DtKeepStationTask::heading ( ) const
virtual

The heading from the leader entity. Defines the direction at which the following entity is positioned with reference to the entity being followed.

virtual void DtKeepStationTask::setHeading ( double  heading)
virtual
virtual int DtKeepStationTask::mode ( ) const
virtual

The mode in which to set the heading - e.g. magnetic North, true North, etc.

virtual void DtKeepStationTask::setMode ( int  )
virtual
virtual int DtKeepStationTask::netRepSize ( ) const
overridevirtual

Returns the size of the full network representation padded to an 8-byte boundary.

Reimplemented from DtSimTask.

virtual bool DtKeepStationTask::setFromNet ( const char *  contentBuffer,
unsigned  contentSize 
)
overridevirtual

Fills in the task from the network buffer.

Reimplemented from DtSimTask.

virtual bool DtKeepStationTask::setToNet ( )
overridevirtual

Fills in the network buffer (created by base class simTask) with the task contents.

Reimplemented from DtSimTask.

static DtSimTask* DtKeepStationTask::creator ( )
static

Member Data Documentation

DtRwUUID DtKeepStationTask::myEntityToFollow
protected
DtRwReal DtKeepStationTask::myOffsetDistance
protected
DtRwReal DtKeepStationTask::myHeading
protected
DtRwInt DtKeepStationTask::myMode
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)