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

Responsible for maintaining and executing stealth commands. The stealth commands are of the format (in the stealth command vector) stealth command, display name, variables that are used for entry for the stealth command (see vrfScriptedTasksConstants.h)

When adding a stealth command a boost function is also associated with the command that will be used to execute that actual command. The variables that are sent will contain a match for the variable(s) supplied. Stealth commands act very much like a scripted task, but, instead of executing a lua script it sends a stealth command

Public Types

typedef std::pair
< DtSimulationAddress,
DtString
StealthObserver
 
typedef std::vector
< StealthObserver
StealthObservers
 

Public Member Functions

 DtStealthCommandsManager (DtSimulationServices *simManager)
 
virtual ~DtStealthCommandsManager ()
 
virtual bool init ()
 
virtual void addStealthCommand (const DtString &command, const DtString &displayName, DtStealthCommandExecutorFcn)
 
virtual void removeStealthCommand (const DtString &command)
 
virtual void addStealthSelectorToCommand (const DtString &command)
 
virtual void addObserverModeSelectorToCommand (const DtString &command)
 
virtual void addAttachSelectorToCommand (const DtString &command)
 
virtual void addTrackedEntitySelectorToCommand (const DtString &command)
 
virtual void addBodyPositionSelectorToCommand (const DtString &command)
 
virtual void addLocationSelectorToCommand (const DtString &command)
 
virtual void addOffsetOrientationSelectorToCommand (const DtString &command)
 
virtual void addObserverViewSelectorToCommand (const DtString &command)
 
virtual void addObserverTransitionTimeToCommand (const DtString &command)
 
StealthObservers getStealthObservers (const DtRwVariableBindings &) const
 
virtual void executeCommand (const DtString &, const DtRwVariableBindings &)
 
virtual void setObserverMode (const DtRwVariableBindings &)
 
virtual DtString attachToGlobalId (const DtRwVariableBindings &vars, const std::string &varname="attachto") const
 
virtual void resetStealth (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void detachStealth (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachMimic (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachTether (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachTetherLocationTrack (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachMimicLocationTrack (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachFollow (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachTrack (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void attachTetherTrack (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void setLocation (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void setObserverView (DtSimulationServices *, const DtString &command, const DtRwVariableBindings &)
 
virtual void createSensorFieldOfView (const DtUUID &, const DtString &frontEnd, bool create, bool createControls, const DtString &sensorGimbal)
 
DtSimulationServicessimulationServices () const
 

Protected Types

typedef std::map< DtString,
DtStealthCommandExecutorFcn
StealthCommandExecutors
 

Protected Member Functions

virtual void initializeResetCommand ()
 
virtual void initializeDetachCommand ()
 
virtual void initializeMimicCommand ()
 
virtual void initializeTetherCommand ()
 
virtual void initializeFollowCommand ()
 
virtual void initializeTrackCommand ()
 
virtual void initializeTetherTrackCommand ()
 
virtual void initializeTetherLocationTrackCommand ()
 
virtual void initializeMimicLocationTrackCommand ()
 
virtual void initializeSetLocationCommand ()
 
virtual void initializeUseViewModeCommand ()
 
virtual void processStealthCommandsRequest (DtIfRequestStealthCommands *msg)
 

Static Protected Member Functions

static void stealthCommandsRequestCallback (DtSimMessage *msg, void *usr)
 

Protected Attributes

DtSimulationServicesmySimulationServices
 
DtStealthCommands myStealthCommands
 
StealthCommandExecutors myStealthCommandExecutors
 

Member Typedef Documentation

typedef std::pair<DtSimulationAddress, DtString> DtStealthCommandsManager::StealthObserver

Returns stealth address/observer name pairs to send messages to.

Constructor & Destructor Documentation

DtStealthCommandsManager::DtStealthCommandsManager ( DtSimulationServices simManager)

CTOR.

virtual DtStealthCommandsManager::~DtStealthCommandsManager ( )
virtual

DTOR.

Member Function Documentation

virtual bool DtStealthCommandsManager::init ( )
virtual

Calls register callbacks and default stealth commands.

virtual void DtStealthCommandsManager::addStealthCommand ( const DtString command,
const DtString displayName,
DtStealthCommandExecutorFcn   
)
virtual

Adds a new stealth command. Once added you can add/remove variables to that command using the keyword. If the keyword exists will replace the existing command.

virtual void DtStealthCommandsManager::removeStealthCommand ( const DtString command)
virtual

Removes the stealth command with the given keyword.

virtual void DtStealthCommandsManager::addStealthSelectorToCommand ( const DtString command)
virtual

Adds a stealth command selector variable to the given command. Variable name will be "observer" and the display string "Select Observer". This control will also add a "Broadcast" check box.

virtual void DtStealthCommandsManager::addObserverModeSelectorToCommand ( const DtString command)
virtual

Adds an observer mode (Stealth, Plan View, etc.) selector to the command with a variable called "observermode".

virtual void DtStealthCommandsManager::addAttachSelectorToCommand ( const DtString command)
virtual

Adds a selector to select an entity/aggegate to attach to. Will create a variable called "attachto".

virtual void DtStealthCommandsManager::addTrackedEntitySelectorToCommand ( const DtString command)
virtual

Adds a selector to select an entity/aggegate to attach to. Will create a variable called "track".

virtual void DtStealthCommandsManager::addBodyPositionSelectorToCommand ( const DtString command)
virtual

Adds a body position entry for offset. Will create a variable called "bodypositionoffset".

virtual void DtStealthCommandsManager::addLocationSelectorToCommand ( const DtString command)
virtual

Adds a location entry. Will create a variable called "location".

virtual void DtStealthCommandsManager::addOffsetOrientationSelectorToCommand ( const DtString command)
virtual

Adds an offset orientation entry for offset. Will create a variable called "orientationoffset".

virtual void DtStealthCommandsManager::addObserverViewSelectorToCommand ( const DtString command)
virtual

Adds a selector for a saved (or current) observer view to use.

virtual void DtStealthCommandsManager::addObserverTransitionTimeToCommand ( const DtString command)
virtual

Adds a time control to set the transition time to move the camera from the current to the new position.

StealthObservers DtStealthCommandsManager::getStealthObservers ( const DtRwVariableBindings ) const
virtual void DtStealthCommandsManager::executeCommand ( const DtString ,
const DtRwVariableBindings  
)
virtual

Executes the given stealth command by it's registered executor function.

virtual void DtStealthCommandsManager::setObserverMode ( const DtRwVariableBindings )
virtual

Sets the observer mode to the given mode for all the observers in the variable bindings.

virtual DtString DtStealthCommandsManager::attachToGlobalId ( const DtRwVariableBindings vars,
const std::string &  varname = "attachto" 
) const
virtual

Returns global object identifier of attached entity.

virtual void DtStealthCommandsManager::resetStealth ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth reset to reset the stealth to the appropriate origin/orientation. Variables: observers - String list of observers to send message to. If blank sends to all.

virtual void DtStealthCommandsManager::detachStealth ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth detach to detach the stealth observers - String list of observers to send message to. If blank sends to all.

virtual void DtStealthCommandsManager::attachMimic ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth mimic attach command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) attachto - Entity to attach to.

virtual void DtStealthCommandsManager::attachTether ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth tether attach command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) attachto - Entity to attach to bodypositionoffset - Location offset from the origin of the entity to place the camera orientationoffset - Orientation offset to place the location.

virtual void DtStealthCommandsManager::attachTetherLocationTrack ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth tether location track command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) attachto - Entity to attach to bodypositionoffset - Location offset from the origin of the entity to place the camera orientationoffset - Orientation offset to place the location location - Location to track.

virtual void DtStealthCommandsManager::attachMimicLocationTrack ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth mimic location track command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) attachto - Entity to attach to bodypositionoffset - Location offset from the origin of the entity to place the camera orientationoffset - Orientation offset to place the location location - Location to track.

virtual void DtStealthCommandsManager::attachFollow ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth follow attach command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) attachto - Entity to attach to bodypositionoffset - Location offset from the origin of the entity to place the camera orientationoffset - Orientation offset to place the location.

virtual void DtStealthCommandsManager::attachTrack ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth track attach command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) tracked - Entity to attach to bodypositionoffset - Location offset from the origin of the entity to place the camera orientationoffset - Orientation offset to place the location.

virtual void DtStealthCommandsManager::attachTetherTrack ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the stealth tether track attach command Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) attachto - Entity to attach to bodypositionoffset - Location offset from the origin of the entity to place the camera orientationoffset - Orientation offset to place the location.

virtual void DtStealthCommandsManager::setLocation ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Executes the absolute command which will detach the stealth and set it to the specified location and orientation Variables: observers - String list of observers to send message to. If blank sends to all observermode - Mode to setthe observers to (Stealth, Plan View, etc) location - Location to place the camera orientationoffset - Orientation offset to place the location.

virtual void DtStealthCommandsManager::setObserverView ( DtSimulationServices ,
const DtString command,
const DtRwVariableBindings  
)
virtual

Sets the observer to the current view. Variables: observers - String list of observers to send message to. If blank sends to all observerview - View record to use transitiontime - Time used to transition to the final view.

virtual void DtStealthCommandsManager::createSensorFieldOfView ( const DtUUID ,
const DtString frontEnd,
bool  create,
bool  createControls,
const DtString sensorGimbal 
)
virtual

Given the UUID of the potential simulation object and the front-end address (blank for all), create or destroye the sensor gimbal view for that UUID.

DtSimulationServices* DtStealthCommandsManager::simulationServices ( ) const
inline
virtual void DtStealthCommandsManager::initializeResetCommand ( )
protectedvirtual

Initializes stealth reset command.

virtual void DtStealthCommandsManager::initializeDetachCommand ( )
protectedvirtual

Initializes stealth detach command.

virtual void DtStealthCommandsManager::initializeMimicCommand ( )
protectedvirtual

Initializes stealth mimic attach command.

virtual void DtStealthCommandsManager::initializeTetherCommand ( )
protectedvirtual

Initializes stealth tether attach command.

virtual void DtStealthCommandsManager::initializeFollowCommand ( )
protectedvirtual

Initializes stealth follow attach command.

virtual void DtStealthCommandsManager::initializeTrackCommand ( )
protectedvirtual

Initializes stealth track attach command.

virtual void DtStealthCommandsManager::initializeTetherTrackCommand ( )
protectedvirtual

Initializes stealth tether track attach command.

virtual void DtStealthCommandsManager::initializeTetherLocationTrackCommand ( )
protectedvirtual

Initializes stealth tether location track attach command.

virtual void DtStealthCommandsManager::initializeMimicLocationTrackCommand ( )
protectedvirtual

Initializes stealth mimic location track attach command.

virtual void DtStealthCommandsManager::initializeSetLocationCommand ( )
protectedvirtual

Initializes stealth set location command.

virtual void DtStealthCommandsManager::initializeUseViewModeCommand ( )
protectedvirtual

Initializes command to use the the current view or allow the user to select a view mode to use as part of the command. Note that once the view mode is selected the information for that mode is transcribed into the command such that if it changes later (the view mode) the plan statement will not update.

static void DtStealthCommandsManager::stealthCommandsRequestCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Request and return current sim commands.

virtual void DtStealthCommandsManager::processStealthCommandsRequest ( DtIfRequestStealthCommands msg)
protectedvirtual

Member Data Documentation

DtSimulationServices* DtStealthCommandsManager::mySimulationServices
protected
DtStealthCommands DtStealthCommandsManager::myStealthCommands
protected
StealthCommandExecutors DtStealthCommandsManager::myStealthCommandExecutors
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)