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

This driver illustrates the use of state views to access sim data. More...

Inheritance diagram for DtStateViewDriver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtStateViewDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtStateViewDriver ()
 DTOR.
virtual const std::string & className () const
 Get the class name as a string.

Protected Member Functions

virtual bool onStart ()
 When late-joining display engines are connected to the master display engine, all drivers are stopped and restarted.
virtual bool onStop ()
 Called when the driver is stopped by the display engine.
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is connected; restarts the driver.
virtual bool onTick ()
 Stub implementation since this driver doesn't have anything that needs updating.
virtual void handleAttachToChanged (DtObserver *observer)
 Called by signal when an observer's attachment changes; used as a cue to start listening to the attached entity's state.
DtSimEntryfindSimEntry (DtUniqueID elementId)
 Find a sim entry corresponding to a visual object's unique element ID.
void disableCurrentStateView ()
 Disables the currently active state view.
virtual void slot_stateViewUpdated (DtVrlinkEntityStateView *stateView)
 Called when the currently active state view emits an update.
virtual void slot_simObjectRemoved (DtSimObjectEntry &)
 Called when a sim object is removed, so its state view can be removed from the cache if present.

Protected Attributes

DtVrlinkEntityStateViewmyStateView
 The currently active state view.

Detailed Description

This driver illustrates the use of state views to access sim data.

When the DtAttachManager emits its attachment changed signal, the DtStateViewDriver will get a state view onto the currently attached entity and print out some information from the sim state at a 1hz update rate.


Constructor & Destructor Documentation

DtStateViewDriver::DtStateViewDriver ( DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

DTOR.


Member Function Documentation

virtual const std::string& DtStateViewDriver::className ( ) const [virtual]

Get the class name as a string.

Implements makVrv::DtDriver.

virtual bool DtStateViewDriver::onStart ( ) [protected, virtual]

When late-joining display engines are connected to the master display engine, all drivers are stopped and restarted.

It is critical to implement these methods correctly to make late-joining display engines work correctly. Called when the driver is started by the display engine Restores state that existed the last time the driver was stopped

Implements makVrv::DtDriver.

virtual bool DtStateViewDriver::onStop ( ) [protected, virtual]

Called when the driver is stopped by the display engine.

Implements makVrv::DtDriver.

virtual void DtStateViewDriver::slot_displayEngineAdded ( const DtDeRecord igRecord) [protected, virtual]

Called when a display engine is connected; restarts the driver.

Reimplemented from makVrv::DtDriver.

virtual bool DtStateViewDriver::onTick ( ) [protected, virtual]

Stub implementation since this driver doesn't have anything that needs updating.

Implements makVrv::DtDriver.

virtual void DtStateViewDriver::handleAttachToChanged ( DtObserver observer) [protected, virtual]

Called by signal when an observer's attachment changes; used as a cue to start listening to the attached entity's state.

Find a sim entry corresponding to a visual object's unique element ID.

Disables the currently active state view.

virtual void DtStateViewDriver::slot_stateViewUpdated ( DtVrlinkEntityStateView stateView) [protected, virtual]

Called when the currently active state view emits an update.

virtual void DtStateViewDriver::slot_simObjectRemoved ( DtSimObjectEntry ) [protected, virtual]

Called when a sim object is removed, so its state view can be removed from the cache if present.


Member Data Documentation

The currently active state view.


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)