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 | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

The DtDriver for CIGI. Provides communication between the IG (DtDe) and the DtCigiConnection which does most of the actual processing of CIGI messages (except for those that need the DtDe, like HAT/HOT/LOS, etc)

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

Public Member Functions

 DtCigiDriver (DtAgentManager &agentManager, const std::string &uniqueName)
 
virtual ~DtCigiDriver ()
 
virtual const std::string & className () const
 
const DtCigiConnectionInitializerconnectionSettings () const
 
virtual void setConnectionSettings (const DtCigiConnectionInitializer &settings)
 
virtual DtConfiguration createConfiguration (bool saveAllParameters) const override
 
virtual void realizeConfiguration (const DtConfiguration &config)
 
virtual void run ()
 
virtual DtAgentManagerInterfacesceneInterface ()
 
virtual bool useThreadFlag () const
 
virtual void queueDriverFunction (boost::function< void()> func)
 
virtual void queueConnectionFunction (boost::function< void()> func)
 
void reportSmoothingEnabledChanged (bool enabled)
 
virtual DtIgSettingsControllerigSettingsController ()
 
virtual const
DtIgSettingsController
isSettingsController () const
 
virtual DtCigiViewControllerviewController ()
 
virtual const
DtCigiViewController
viewController () const
 
virtual DtCigiIntersectionHandlerintersectionHandler ()
 
virtual const
DtCigiIntersectionHandler
intersectionHandler () const
 
virtual const
DtCigiPositionHandler
positionHandler () const
 
virtual DtCigiPositionHandlerpositionHandler ()
 
virtual const
DtCigiSensorController
sensorController () const
 
virtual DtCigiSensorControllersensorController ()
 
virtual const DtCigiSymbolHandlersymbolHandler () const
 
virtual DtCigiSymbolHandlersymbolHandler ()
 
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 
virtual ~DtDriver ()
 
DtAgentManageragentManager ()
 
bool started () const
 
virtual const std::string & instanceName () const
 
virtual bool autoStart () const
 
virtual void setAutoStart (bool autoStart)
 
virtual bool isWindowDependent () const
 
virtual void setIsWindowDependent (bool dep)
 
virtual void setIsUserControllable (bool)
 
virtual bool isUserControllable () const
 
virtual void setIsPersistent (bool per)
 
virtual bool isPersistent () const
 
virtual bool isOnDriverSelectionList () const
 
virtual void setOnDriverSelectionList (bool)
 
bool objectFromAgentManager (const DtUniqueID &id) const
 

Public Attributes

vrvSignalsLib::signal< void(DtCigiConnection *)> signal_sessionCreated
 
vrvSignalsLib::signal< void(DtCigiConnection *)> signal_sessionAboutToBeDestroyed
 

Protected Types

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

Protected Member Functions

virtual bool onStart ()
 
virtual bool onStop ()
 
virtual bool onTick ()
 
virtual void startThread ()
 
virtual void stopThread ()
 
virtual void setConnectionState (bool connected)
 
virtual void slot_onLoadDatabase (const std::string &filename)
 
virtual void performLoadDatabase (const std::string &filename)
 
virtual void slot_terrainPatchCreated ()
 
virtual void slot_firstTickAfterTerrainPatchCreated ()
 
virtual void slot_onCoordinateSystemChanged (const std::string &name, const std::string &params)
 
virtual void runFunctionQueue (FunctionCallQueue &queue)
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 
void reportElementDestroyed (DtElementID id)
 
void start ()
 
void stop ()
 
bool tick ()
 
virtual void setInstanceName (const std::string &name)
 
virtual void installAccessories ()
 
virtual void uninstallAccessories ()
 

Protected Attributes

bool myUseThreadFlag
 
DtThread * myThread
 
DtCigiConnectionmyConnection
 
bool myConnectedFlag
 
DtCigiConnectionInitializermyInitializer
 
DtAsynchronousEventQueuemyAsynchronousEventQueue
 
DtAsynchronousAgentManagermyAsynchronousInterface
 
DtDemyDe
 
FunctionCallQueue myDriverThreadFunctions
 
FunctionCallQueue myConnectionThreadFunctions
 
DtSignalConnectionManager myDynamicSignals
 
DtCigiViewControllermyViewController
 
DtCigiSensorControllermySensorController
 
DtIgSettingsControllermyComponentController
 
DtCigiIntersectionHandlermyIntersectionHandler
 
DtCigiPositionHandlermyPositionHandler
 
DtCigiSymbolHandlermySymbolHandler
 
double myNextFrameTime
 
vrvSignalsLib::connection myPreTickConnection
 
vrvSignalsLib::connection myTerrainPatchCreatedConnection
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Static Protected Attributes

static std::string theCigiDriverClassName
 
- Static Protected Attributes inherited from makVrv::DtDriver
static const std::string theOnDriverSelectionList
 

Member Typedef Documentation

typedef DtLockedBufferedQueue<boost::function<void ()> > makVrv::DtCigiDriver::FunctionCallQueue
protected

Typedefs for the function lists.

typedef std::vector<boost::function<void ()> > makVrv::DtCigiDriver::FunctionCallList
protected

Constructor & Destructor Documentation

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

Constructor.

virtual makVrv::DtCigiDriver::~DtCigiDriver ( )
virtual

Destructor.

Member Function Documentation

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

Get this Driver's class name.

Implements makVrv::DtDriver.

const DtCigiConnectionInitializer & makVrv::DtCigiDriver::connectionSettings ( ) const
inline

Returns the CIGI connection settings.

References myInitializer.

virtual void makVrv::DtCigiDriver::setConnectionSettings ( const DtCigiConnectionInitializer settings)
virtual

Set the connection settings.

virtual DtConfiguration makVrv::DtCigiDriver::createConfiguration ( bool  saveAllParameters) const
overridevirtual

Create a configuration for the driver. Note: The saveAllParameters flag is not used by the DtCigiDriver.

Reimplemented from makVrv::DtDriver.

virtual void makVrv::DtCigiDriver::realizeConfiguration ( const DtConfiguration config)
virtual

Realize the driver via a generic configuration.

Reimplemented from makVrv::DtDriver.

virtual void makVrv::DtCigiDriver::run ( )
virtual

Function that will be called when the thread is started. Runs the loop that ticks the driver, processes CIGI messages, updates the IG, and sends any responses/start-of-frame.

virtual DtAgentManagerInterface& makVrv::DtCigiDriver::sceneInterface ( )
virtual

Returns the scene interface. Returns an asynchronous interface if running a separate thread.

Reimplemented from makVrv::DtDriver.

virtual bool makVrv::DtCigiDriver::useThreadFlag ( ) const
virtual

Returns whether the CIGI Driver is using a separate thread for CIGI message processing.

virtual void makVrv::DtCigiDriver::queueDriverFunction ( boost::function< void()>  func)
virtual

Queues a function to be run from the driver thread.

virtual void makVrv::DtCigiDriver::queueConnectionFunction ( boost::function< void()>  func)
virtual

Queues a function to be run from the connection thread.

void makVrv::DtCigiDriver::reportSmoothingEnabledChanged ( bool  enabled)
virtual DtIgSettingsController& makVrv::DtCigiDriver::igSettingsController ( )
virtual

Accessors for CIGI control objects.

virtual const DtIgSettingsController& makVrv::DtCigiDriver::isSettingsController ( ) const
virtual

Accessors for CIGI control objects.

virtual DtCigiViewController& makVrv::DtCigiDriver::viewController ( )
virtual

Accessors for CIGI control objects.

virtual const DtCigiViewController& makVrv::DtCigiDriver::viewController ( ) const
virtual

Accessors for CIGI control objects.

virtual DtCigiIntersectionHandler& makVrv::DtCigiDriver::intersectionHandler ( )
virtual

Accessors for CIGI control objects.

virtual const DtCigiIntersectionHandler& makVrv::DtCigiDriver::intersectionHandler ( ) const
virtual

Accessors for CIGI control objects.

virtual const DtCigiPositionHandler& makVrv::DtCigiDriver::positionHandler ( ) const
virtual

Accessors for CIGI control objects.

virtual DtCigiPositionHandler& makVrv::DtCigiDriver::positionHandler ( )
virtual

Accessors for CIGI control objects.

virtual const DtCigiSensorController& makVrv::DtCigiDriver::sensorController ( ) const
virtual

Accessors for CIGI control objects.

virtual DtCigiSensorController& makVrv::DtCigiDriver::sensorController ( )
virtual

Accessors for CIGI control objects.

virtual const DtCigiSymbolHandler& makVrv::DtCigiDriver::symbolHandler ( ) const
virtual

Accessors for CIGI control objects.

virtual DtCigiSymbolHandler& makVrv::DtCigiDriver::symbolHandler ( )
virtual

Accessors for CIGI control objects.

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

Start the driver processing.

Implements makVrv::DtDriver.

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

Stop the driver processing.

Implements makVrv::DtDriver.

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

Tick the driver. Runs the driver functions if multi-threaded. Otherwise, processes any incoming messages, and sends any responses.

Implements makVrv::DtDriver.

virtual void makVrv::DtCigiDriver::startThread ( )
protectedvirtual

Starts a separate thread that executes the run method.

virtual void makVrv::DtCigiDriver::stopThread ( )
protectedvirtual

Stops the separate thread.

virtual void makVrv::DtCigiDriver::setConnectionState ( bool  connected)
protectedvirtual

Sets the connection state.

virtual void makVrv::DtCigiDriver::slot_onLoadDatabase ( const std::string &  filename)
protectedvirtual

Slot called when signal_loadDatabase is received from the DtCigiConnection. When multi-threaded, this requests that performLoadDatabase run in the render thread; otherwise it calls performLoadDatabase directly.

virtual void makVrv::DtCigiDriver::performLoadDatabase ( const std::string &  filename)
protectedvirtual

Performs the database load and connects to DtTerrainPatchObjectSignaler::signal_terrainPatchCreated. That signal is raised when a terrain is loaded from disk (or a connection to an osgEarth server is established.

virtual void makVrv::DtCigiDriver::slot_terrainPatchCreated ( )
protectedvirtual

Called when signal_terrainPatchCreated is raised and connects to DtDe::signal_preTick. signal_preTick is the first tick after the terrain database is loaded; This gives OSG a chance to process the terrain for a (typically long) frame.

virtual void makVrv::DtCigiDriver::slot_firstTickAfterTerrainPatchCreated ( )
protectedvirtual
virtual void makVrv::DtCigiDriver::slot_onCoordinateSystemChanged ( const std::string &  name,
const std::string &  params 
)
protectedvirtual

Slot called when the IG's coordinate system changes. Updates the connection's coordinate system in a thread-safe manner.

virtual void makVrv::DtCigiDriver::runFunctionQueue ( FunctionCallQueue queue)
protectedvirtual

Iterates through the function queue and executes the functions.

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

Respond when a display engine is added. Unlike most drivers, that simply start and the restart, when connected this driver needs to maintain its host connection; Therefore, if started and connected, it calls DtVrlinkBaseConnection::restart() which will restart all CIGI-related agents without disconnecting from the host.

Reimplemented from makVrv::DtDriver.

Member Data Documentation

vrvSignalsLib::signal<void (DtCigiConnection*)> makVrv::DtCigiDriver::signal_sessionCreated

This signal is emitted when the CIGI session is created.

vrvSignalsLib::signal<void (DtCigiConnection*)> makVrv::DtCigiDriver::signal_sessionAboutToBeDestroyed

This signal is emitted when the CIGI session is about to be destroyed.

std::string makVrv::DtCigiDriver::theCigiDriverClassName
staticprotected
bool makVrv::DtCigiDriver::myUseThreadFlag
protected

Determines whether the reading/processing/sending of CIGI messages should be performed in a separate thread or not.

DtThread* makVrv::DtCigiDriver::myThread
protected

The (possible) other thread that performs CIGI operations.

DtCigiConnection* makVrv::DtCigiDriver::myConnection
protected

The CIGI connection that performs network IO and message processing. This object should be used in a threadsafe manner (i.e. through the function queue.

bool makVrv::DtCigiDriver::myConnectedFlag
protected

Whether we are connected to the network or not.

DtCigiConnectionInitializer* makVrv::DtCigiDriver::myInitializer
protected

Referenced by connectionSettings().

DtAsynchronousEventQueue* makVrv::DtCigiDriver::myAsynchronousEventQueue
protected
DtAsynchronousAgentManager* makVrv::DtCigiDriver::myAsynchronousInterface
protected
DtDe& makVrv::DtCigiDriver::myDe
protected
FunctionCallQueue makVrv::DtCigiDriver::myDriverThreadFunctions
protected
FunctionCallQueue makVrv::DtCigiDriver::myConnectionThreadFunctions
protected
DtSignalConnectionManager makVrv::DtCigiDriver::myDynamicSignals
protected
DtCigiViewController* makVrv::DtCigiDriver::myViewController
protected

Processes CIGI view control/definition messages.

DtCigiSensorController* makVrv::DtCigiDriver::mySensorController
protected

Handles sensor tracking.

DtIgSettingsController* makVrv::DtCigiDriver::myComponentController
protected

Processes system/view component controls and other messages that change IG settings.

DtCigiIntersectionHandler* makVrv::DtCigiDriver::myIntersectionHandler
protected

Processes HAT/HOT/LOS requests.

DtCigiPositionHandler* makVrv::DtCigiDriver::myPositionHandler
protected

Processes position requests, has access to DtDe.

DtCigiSymbolHandler* makVrv::DtCigiDriver::mySymbolHandler
protected

Processes CIGI Symbols, has access to DtDe.

double makVrv::DtCigiDriver::myNextFrameTime
protected

When we should next process CIGI messages.

vrvSignalsLib::connection makVrv::DtCigiDriver::myPreTickConnection
protected
vrvSignalsLib::connection makVrv::DtCigiDriver::myTerrainPatchCreatedConnection
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)