VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtVrlinkDriver Class Reference

The base class for VR-Link based drivers. More...

Inheritance diagram for makVrv::DtVrlinkDriver:
Inheritance graph
[legend]

Public Member Functions

 DtVrlinkDriver (DtAgentManager &agentManager, const std::string &uniqueName, const std::string &className)
 CTOR.
virtual ~DtVrlinkDriver ()
 DTOR.
virtual const std::string & className () const
 Get this instance's class name.
virtual bool observersPublished () const
 Get observer publishing status for this driver.
virtual void setObserversPublished (bool isPublished)
 Turn on or off observer publishing for this driver.
virtual bool overrideGlobalViewControl () const
 Get whether this driver uses its own local view control enabled flag or the global value.
virtual void setOverrideGlobalViewControl (bool enabled)
 SGet whether this driver uses its own local view control enabled flag or the global value.
virtual bool viewControlEnabled () const
 Get view control status for this driver; returns either the local or the global setting, depending on the value of overrideGlobalViewControl.
virtual void setLocalViewControlEnabled (bool enabled)
 Turn on or off acceptance of view controls for this driver; used if override global view control is true.
virtual bool localViewControlEnabled () const
 Get acceptance of view controls for this driver; used if override global view control is true.
virtual void setConnectionFrameTime (double frameTime)
 Set the connection frame time.
virtual double connectionFrameTime () const
 Get the connection frame time.
void setUseTopoForFlatEarthVectorConversion (bool flag)
 We used to use a topo system to convert flat earth vectors.
bool useTopoForFlatEarthVectorConversion () const
virtual void queueDriverFunction (const boost::function< void()> &function)
 Put a function in the sim function queue, for threadsafe calling.
virtual void queueConnectionFunction (const boost::function< void()> &function)
 Put a function in the sim function queue, for threadsafe calling.
bool useThreadFlag () const
 Returns value of thread flag.
DtConnectionconnection ()
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtDriver ()
 DTOR.
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration.
virtual DtConfiguration createConfiguration () const
 Create a configuration for the driver.
DtAgentManageragentManager ()
 Get the master scene for this host.
virtual DtAgentManagerInterfacesceneInterface ()
 Get the scene manager interface for creating agents.
bool started () const
 Get this driver's active state.
virtual const std::string & instanceName () const
 Get this driver's instance name.
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent.
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent.
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user.
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user.
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs.
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs.
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list.
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list.
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager.

Public Attributes

boost::signal< void(DtConnection *)> signal_simulationCreated
 This signal is emitted when the simulation is created.
boost::signal< void(DtConnection *)> signal_simulationAboutToBeDestroyed
 This signal is emitted when the simulation is about to be destroyed.

Protected Types

enum  FunctionType { Create, Update, Destroy }
typedef DtLockedBufferedQueue
< boost::function< void()> > 
FunctionCallQueue
typedef std::vector
< boost::function< void()> > 
FunctionCallList

Protected Member Functions

virtual DtConnectioncreateConnection ()=0
 Abstract create simulation function called onStart.
virtual bool onStart ()
 Start the host output.
virtual bool onStop ()
 Stop the host output.
virtual void run ()
 Function that will be called when the thread is started.
void startPublishingObservers ()
 Start publishing observers.
void stopPublishingObservers ()
 Stop publishing observers.
virtual bool onTick ()
 Tick, this calls threadTick if the driver is not configured to use a separate thread.
void startThread ()
 Attempt to start the thread.
void stopThread ()
 Attempt to stop the thread, blocking until the thread stops.
void setConnectionState (bool state)
 Set the connection state of the driver.
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Respond when a display engine is added.
virtual void slot_globalViewControlEnabledSet (bool)
 Respond when the global view control setting changes.
virtual void slot_onObserverDestroyed (DtObserver *observer)
virtual void slot_onObserverCreated (DtObserver *observer)
virtual void startPublishingObserver (DtObserver *observer)
 Start publishing an observer on the current connection.
virtual void stopPublishingObserver (DtObserver *observer)
 Stop publishing an observer on the current connection.
virtual void updateObservers ()
 Update the observer position/orientations on the simulation.
virtual void slot_pause ()
 Slot called when the DtDe's pause signal is emitted.
virtual void slot_resume ()
 Slot called when the DtDe's resume signal is emitted/ If a connection exists, this will be communicated to it.
void indicatorMouseDown (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
void indicatorMouseUp (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
void indicatorMouseDblClick (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual void runFunctionQueue (FunctionCallQueue &queue)
 Execute a function queue.
virtual void connectToDynamicSignals ()
 Connect to signals.
virtual void disconnectFromDynamicSignals ()
 Disconnect to any signals connected to in connectToDynamicSignals()
virtual void slot_onViewChanged (DtViewStateProcessor::ObserverAction &action)
virtual void slot_onCurrentSelectionChanged (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected)
virtual void slot_onVertexSelected (const DtUniqueID &selected, const DtUniqueID &parentOfSelected)
virtual void slot_onVertexDeselected (const DtUniqueID &deselected, const DtUniqueID &parentOfDeselected)
virtual void slot_onEntityInfoToggled (const DtSelectionManager::IdSet &entityIds)
virtual void slot_onEntityIndicatorMouseDown (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
 Slot for handling entity indicator clicks; passes them to the input driver.
virtual void slot_onEntityIndicatorMouseUp (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual void slot_onEntityIndicatorMouseDblClick (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual void slot_onTacticalGraphicIndicatorMouseDown (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
 Slot for handling tacticalGraphic indicator clicks; passes them to the input driver.
virtual void slot_onTacticalGraphicIndicatorMouseUp (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual void slot_onTacticalGraphicIndicatorMouseDblClick (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual void slot_onCoordinateSystemChanged (const std::string &coordinateSystem, const std::string &coordinateParameters)
 Slot for handling coordinate system changes.
virtual void toggleEntitySelected (const DtUniqueID &id)
 Toggle selection of an entity.
virtual void performObserverAction (const DtViewStateProcessor::ObserverAction &action)
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 Function for apply changes from a changes object and deleting it.
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 Report an element created.
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 Report an element attribute changed.
void reportElementDestroyed (DtElementID id)
 Report an element destroyed.
void start ()
 Start the driver.
void stop ()
 Stop the driver.
bool tick ()
 Tick the host driver.
virtual void setInstanceName (const std::string &name)
 set the Instance name.
virtual void installAccessories ()
 Installs accessories on this driver.
virtual void uninstallAccessories ()
 Removes accessories from this driver.

Protected Attributes

std::string myClassName
DtConnectionmyConnection
DtAsynchronousEventQueuemyAsynchronousEventQueue
bool myConnectionState
DtSignalConnectionManager myDynamicSignals
double myObserverUpdateTimeInterval
double myLastObserverUpdateTime
double myLastSimTime
bool myObserversPublished
bool myLocalViewControlEnabled
bool myGlobalViewControlEnabled
bool myOverrideGlobalViewControlEnabled
bool myUseTopoForFlatEarthVectorConversion
double myConnectionFrameTime
DtSelectionManagermySelectionManager
bool myUseThreadFlag
DtThreadStartSP myStart
DtThread * myThread
FunctionCallQueue myConnectionThreadFunctions
FunctionCallQueue myDriverThreadFunctions
DtAsynchronousAgentManagermyAsynchronousInterface
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
bool myStartedFlag
std::string myName
DtConfiguration myConfiguration
bool myPersistentFlag
bool myUserControllableFlag
bool myRequestStateDiffPendingFlag
DtElementChanges myChanges

Detailed Description

The base class for VR-Link based drivers.

Member Typedef Documentation

typedef DtLockedBufferedQueue<boost::function<void ()> > makVrv::DtVrlinkDriver::FunctionCallQueue
protected
typedef std::vector<boost::function<void ()> > makVrv::DtVrlinkDriver::FunctionCallList
protected

Member Enumeration Documentation

Enumerator:
Create 
Update 
Destroy 

Constructor & Destructor Documentation

makVrv::DtVrlinkDriver::DtVrlinkDriver ( DtAgentManager agentManager,
const std::string &  uniqueName,
const std::string &  className 
)

CTOR.

virtual makVrv::DtVrlinkDriver::~DtVrlinkDriver ( )
virtual

DTOR.

Member Function Documentation

virtual const std::string& makVrv::DtVrlinkDriver::className ( ) const
virtual

Get this instance's class name.

Implements makVrv::DtDriver.

virtual bool makVrv::DtVrlinkDriver::observersPublished ( ) const
virtual

Get observer publishing status for this driver.

virtual void makVrv::DtVrlinkDriver::setObserversPublished ( bool  isPublished)
virtual

Turn on or off observer publishing for this driver.

virtual bool makVrv::DtVrlinkDriver::overrideGlobalViewControl ( ) const
virtual

Get whether this driver uses its own local view control enabled flag or the global value.

virtual void makVrv::DtVrlinkDriver::setOverrideGlobalViewControl ( bool  enabled)
virtual

SGet whether this driver uses its own local view control enabled flag or the global value.

virtual bool makVrv::DtVrlinkDriver::viewControlEnabled ( ) const
virtual

Get view control status for this driver; returns either the local or the global setting, depending on the value of overrideGlobalViewControl.

virtual void makVrv::DtVrlinkDriver::setLocalViewControlEnabled ( bool  enabled)
virtual

Turn on or off acceptance of view controls for this driver; used if override global view control is true.

virtual bool makVrv::DtVrlinkDriver::localViewControlEnabled ( ) const
virtual

Get acceptance of view controls for this driver; used if override global view control is true.

virtual void makVrv::DtVrlinkDriver::setConnectionFrameTime ( double  frameTime)
virtual

Set the connection frame time.

This is 1/frequency for the connection tick. Default is 1/60.

virtual double makVrv::DtVrlinkDriver::connectionFrameTime ( ) const
virtual

Get the connection frame time.

This is 1/frequency for the connection tick. Default is 1/60.

void makVrv::DtVrlinkDriver::setUseTopoForFlatEarthVectorConversion ( bool  flag)

We used to use a topo system to convert flat earth vectors.

Now we find the point at the end of the vector, convert start and end points, and subtract for a more accurate result. However, when receiving data from a sim using the old method (including older versions of VR-Forces and DI-Guy) user's may want to revert to the old scheme.

bool makVrv::DtVrlinkDriver::useTopoForFlatEarthVectorConversion ( ) const
virtual void makVrv::DtVrlinkDriver::queueDriverFunction ( const boost::function< void()> &  function)
virtual

Put a function in the sim function queue, for threadsafe calling.

virtual void makVrv::DtVrlinkDriver::queueConnectionFunction ( const boost::function< void()> &  function)
virtual

Put a function in the sim function queue, for threadsafe calling.

Referenced by DtExConnInterface::sendCommentInteraction().

bool makVrv::DtVrlinkDriver::useThreadFlag ( ) const
inline

Returns value of thread flag.

DtConnection* makVrv::DtVrlinkDriver::connection ( )
inline
virtual DtConnection* makVrv::DtVrlinkDriver::createConnection ( )
protectedpure virtual

Abstract create simulation function called onStart.

Implemented in makVrv::DtDisDriver, makVrv::DtHla1516Driver, makVrv::DtHla13Driver, and makVrv::DtHla1516eDriver.

virtual bool makVrv::DtVrlinkDriver::onStart ( )
protectedvirtual

Start the host output.

Create all object for an existing host connection.

Implements makVrv::DtDriver.

virtual bool makVrv::DtVrlinkDriver::onStop ( )
protectedvirtual

Stop the host output.

All scene object created by the host should be destroyed.

Implements makVrv::DtDriver.

virtual void makVrv::DtVrlinkDriver::run ( )
protectedvirtual

Function that will be called when the thread is started.

void makVrv::DtVrlinkDriver::startPublishingObservers ( )
protected

Start publishing observers.

void makVrv::DtVrlinkDriver::stopPublishingObservers ( )
protected

Stop publishing observers.

virtual bool makVrv::DtVrlinkDriver::onTick ( )
protectedvirtual

Tick, this calls threadTick if the driver is not configured to use a separate thread.

Implements makVrv::DtDriver.

void makVrv::DtVrlinkDriver::startThread ( )
protected

Attempt to start the thread.

Exceptions
DtCorruptedStateif the thread does not start.
void makVrv::DtVrlinkDriver::stopThread ( )
protected

Attempt to stop the thread, blocking until the thread stops.

void makVrv::DtVrlinkDriver::setConnectionState ( bool  state)
protected

Set the connection state of the driver.

virtual void makVrv::DtVrlinkDriver::slot_displayEngineAdded ( const DtDeRecord igRecord)
protectedvirtual

Respond when a display engine is added.

Reimplemented from makVrv::DtDriver.

virtual void makVrv::DtVrlinkDriver::slot_globalViewControlEnabledSet ( bool  )
protectedvirtual

Respond when the global view control setting changes.

virtual void makVrv::DtVrlinkDriver::connectToDynamicSignals ( )
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::disconnectFromDynamicSignals ( )
protectedvirtual

Disconnect to any signals connected to in connectToDynamicSignals()

virtual void makVrv::DtVrlinkDriver::slot_onViewChanged ( DtViewStateProcessor::ObserverAction action)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onCurrentSelectionChanged ( const DtSelectionManager::IdSet selected,
const DtSelectionManager::IdSet deselected 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onVertexSelected ( const DtUniqueID selected,
const DtUniqueID parentOfSelected 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onVertexDeselected ( const DtUniqueID deselected,
const DtUniqueID parentOfDeselected 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onEntityInfoToggled ( const DtSelectionManager::IdSet entityIds)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onEntityIndicatorMouseDown ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protectedvirtual

Slot for handling entity indicator clicks; passes them to the input driver.

virtual void makVrv::DtVrlinkDriver::slot_onEntityIndicatorMouseUp ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onEntityIndicatorMouseDblClick ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onTacticalGraphicIndicatorMouseDown ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protectedvirtual

Slot for handling tacticalGraphic indicator clicks; passes them to the input driver.

virtual void makVrv::DtVrlinkDriver::slot_onTacticalGraphicIndicatorMouseUp ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onTacticalGraphicIndicatorMouseDblClick ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onCoordinateSystemChanged ( const std::string &  coordinateSystem,
const std::string &  coordinateParameters 
)
protectedvirtual

Slot for handling coordinate system changes.

virtual void makVrv::DtVrlinkDriver::toggleEntitySelected ( const DtUniqueID id)
protectedvirtual

Toggle selection of an entity.

virtual void makVrv::DtVrlinkDriver::performObserverAction ( const DtViewStateProcessor::ObserverAction action)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onObserverDestroyed ( DtObserver observer)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onObserverCreated ( DtObserver observer)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::startPublishingObserver ( DtObserver observer)
protectedvirtual

Start publishing an observer on the current connection.

virtual void makVrv::DtVrlinkDriver::stopPublishingObserver ( DtObserver observer)
protectedvirtual

Stop publishing an observer on the current connection.

virtual void makVrv::DtVrlinkDriver::updateObservers ( )
protectedvirtual

Update the observer position/orientations on the simulation.

virtual void makVrv::DtVrlinkDriver::slot_pause ( )
protectedvirtual

Slot called when the DtDe's pause signal is emitted.

If a connection exists, this will be communicated to it.

virtual void makVrv::DtVrlinkDriver::slot_resume ( )
protectedvirtual

Slot called when the DtDe's resume signal is emitted/ If a connection exists, this will be communicated to it.

void makVrv::DtVrlinkDriver::indicatorMouseDown ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protected
void makVrv::DtVrlinkDriver::indicatorMouseUp ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protected
void makVrv::DtVrlinkDriver::indicatorMouseDblClick ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
protected
virtual void makVrv::DtVrlinkDriver::runFunctionQueue ( FunctionCallQueue queue)
protectedvirtual

Execute a function queue.

Member Data Documentation

boost::signal<void (DtConnection*)> makVrv::DtVrlinkDriver::signal_simulationCreated

This signal is emitted when the simulation is created.

boost::signal<void (DtConnection*)> makVrv::DtVrlinkDriver::signal_simulationAboutToBeDestroyed

This signal is emitted when the simulation is about to be destroyed.

std::string makVrv::DtVrlinkDriver::myClassName
protected
bool makVrv::DtVrlinkDriver::myUseThreadFlag
protected
DtThreadStartSP makVrv::DtVrlinkDriver::myStart
protected
DtThread* makVrv::DtVrlinkDriver::myThread
protected
FunctionCallQueue makVrv::DtVrlinkDriver::myConnectionThreadFunctions
protected
FunctionCallQueue makVrv::DtVrlinkDriver::myDriverThreadFunctions
protected
DtAsynchronousAgentManager* makVrv::DtVrlinkDriver::myAsynchronousInterface
protected
DtConnection* makVrv::DtVrlinkDriver::myConnection
protected
DtAsynchronousEventQueue* makVrv::DtVrlinkDriver::myAsynchronousEventQueue
protected
bool makVrv::DtVrlinkDriver::myConnectionState
protected
DtSignalConnectionManager makVrv::DtVrlinkDriver::myDynamicSignals
protected
double makVrv::DtVrlinkDriver::myObserverUpdateTimeInterval
protected
double makVrv::DtVrlinkDriver::myLastObserverUpdateTime
protected
double makVrv::DtVrlinkDriver::myLastSimTime
protected
bool makVrv::DtVrlinkDriver::myObserversPublished
protected
bool makVrv::DtVrlinkDriver::myLocalViewControlEnabled
protected
bool makVrv::DtVrlinkDriver::myGlobalViewControlEnabled
protected
bool makVrv::DtVrlinkDriver::myOverrideGlobalViewControlEnabled
protected
bool makVrv::DtVrlinkDriver::myUseTopoForFlatEarthVectorConversion
protected
double makVrv::DtVrlinkDriver::myConnectionFrameTime
protected
DtSelectionManager& makVrv::DtVrlinkDriver::mySelectionManager
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)