![]() |
VR-Forces 4.0.4 Class Documentation
|
The DtDriver for CIGI. More...

Public Member Functions | |
| DtCigiDriver (DtAgentManager &agentManager, const std::string &uniqueName) | |
| Constructor. | |
| virtual | ~DtCigiDriver () |
| Destructor. | |
| virtual const std::string & | className () const |
| Get this Driver's class name. | |
| const DtCigiConnectionInitializer & | connectionSettings () const |
| Returns the CIGI connection settings. | |
| virtual void | setConnectionSettings (const DtCigiConnectionInitializer &settings) |
| Set the connection settings. | |
| virtual DtConfiguration | createConfiguration () const |
| Create a configuration for the driver. | |
| virtual void | realizeConfiguration (const DtConfiguration &config) |
| Realize the driver via a generic configuration. | |
| virtual void | run () |
| Function that will be called when the thread is started. | |
| virtual DtAgentManagerInterface & | sceneInterface () |
| Returns the scene interface. | |
| virtual bool | useThreadFlag () const |
| Returns whether the CIGI Driver is using a separate thread for CIGI message processing. | |
| virtual void | addDriverFunction (boost::function< void()> func) |
| Adds a function to be run from the driver queue. | |
| virtual void | generateLosResponse (int losId, DtUniqueID entityId, bool visible, double range, int responseCount, int hostFrame) |
| Generate a line-of-sight response. | |
| virtual void | generateHatHotResponse (double height, unsigned int hotId, bool hat, unsigned int lastFrame, bool valid) |
| Generate a line-of-sight response. | |
Public Attributes | |
| boost::signal< void(DtCigiConnection *)> | signal_sessionCreated |
| This signal is emitted when the CIGI session is created. | |
| boost::signal< void(DtCigiConnection *)> | signal_sessionAboutToBeDestroyed |
| This signal is emitted when the CIGI session is about to be destroyed. | |
Protected Types | |
| typedef DtLockedBufferedQueue < boost::function< void()> > | FunctionCallQueue |
| Typedefs for the function lists. | |
| typedef std::vector < boost::function< void()> > | FunctionCallList |
Protected Member Functions | |
| virtual bool | onStart () |
| Start the driver processing. | |
| virtual bool | onStop () |
| Stop the driver processing. | |
| virtual bool | onTick () |
| Tick the driver. | |
| virtual void | startThread () |
| Starts a separate thread that executes the run method. | |
| virtual void | stopThread () |
| Stops the separate thread. | |
| virtual void | setConnectionState (bool connected) |
| Sets the connection state. | |
| virtual void | slot_onLoadDatabase (const std::string &filename) |
| Slot called when signal_loadDatabase is received from the DtCigiConnection. | |
| virtual void | performLoadDatabase (const std::string &filename) |
| Performs the database load and calls setDatabaseLoaded on the DtCigiConnection. | |
| virtual void | slot_onCoordinateSystemChanged (const std::string &name, const std::string ¶ms) |
| Slot called when the IG's coordinate system changes. | |
| virtual void | runFunctionQueue (FunctionCallQueue &queue) |
| Iterates through the function queue and executes the functions. | |
Protected Attributes | |
| bool | myUseThreadFlag |
| Determines whether the reading/processing/sending of CIGI messages should be performed in a separate thread or not. | |
| DtThread * | myThread |
| The (possible) other thread that performs CIGI operations. | |
| DtCigiConnection * | myConnection |
| The CIGI connection that performs network IO and message processing. | |
| DtLosResponder * | myLosResponder |
| The line-of-sight responder held by the connection. | |
| bool | myConnectedFlag |
| Whether we are connected to the network or not. | |
| DtCigiConnectionInitializer * | myInitializer |
| DtAsynchronousEventQueue * | myAsynchronousEventQueue |
| DtAsynchronousAgentManager * | myAsynchronousInterface |
| DtDe & | myDe |
| FunctionCallQueue | myDriverThreadFunctions |
| FunctionCallQueue | mySimulationThreadFunctions |
| DtSignalConnectionManager | myDynamicSignals |
| DtCigiViewController * | myViewController |
| Processes CIGI view control/definition messages. | |
| DtIgSettingsController * | myComponentController |
| Processes system/view component controls and other messages that change IG settings. | |
| DtCigiIntersectionHandler * | myIntersectionHandler |
| Processes HAT/HOT/LOS requests. | |
| double | myNextFrameTime |
| When we should next process CIGI messages. | |
Static Protected Attributes | |
| static std::string | theCigiDriverClassName |
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)
typedef DtLockedBufferedQueue<boost::function<void ()> > makVrv::DtCigiDriver::FunctionCallQueue [protected] |
Typedefs for the function lists.
typedef std::vector<boost::function<void ()> > makVrv::DtCigiDriver::FunctionCallList [protected] |
| makVrv::DtCigiDriver::DtCigiDriver | ( | DtAgentManager & | agentManager, |
| const std::string & | uniqueName | ||
| ) |
Constructor.
| virtual makVrv::DtCigiDriver::~DtCigiDriver | ( | ) | [virtual] |
Destructor.
| 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 | ( | ) | const [virtual] |
Create a configuration for the driver.
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::addDriverFunction | ( | boost::function< void()> | func | ) | [virtual] |
Adds a function to be run from the driver queue.
| virtual void makVrv::DtCigiDriver::generateLosResponse | ( | int | losId, |
| DtUniqueID | entityId, | ||
| bool | visible, | ||
| double | range, | ||
| int | responseCount, | ||
| int | hostFrame | ||
| ) | [virtual] |
Generate a line-of-sight response.
Calls DtLosResponder::generateLosResponse directly if the driver is in a single thread or queue the response on mySimulationThreadFunctions queue if run in a separate thread.
| losId | The ID of the LOS response |
| entityId | The unique ID of the entity that was intersected |
| visible | Set to true if there were no intersection |
| range | Distance from the source before an intersection was hit. |
| responseCount | The number of intersections made with the request. |
| hostFrame | The last host frame when the calculation was made. |
| virtual void makVrv::DtCigiDriver::generateHatHotResponse | ( | double | height, |
| unsigned int | hotId, | ||
| bool | hat, | ||
| unsigned int | lastFrame, | ||
| bool | valid | ||
| ) | [virtual] |
Generate a line-of-sight response.
Calls DtCigiConnection::sendHatHotResponse directly if the driver is in a single thread or queue the response on mySimulationThreadFunctions queue if run in a separate thread.
| height | The HAT/HOT |
| hotId | The ID of the HAT/HOT response |
| hat | HAT if true, HOT if false |
| lastFrame | The last host frame when the calculation was made. |
| valid | True if an intersection was made |
| virtual bool makVrv::DtCigiDriver::onStart | ( | ) | [protected, virtual] |
Start the driver processing.
Implements makVrv::DtDriver.
| virtual bool makVrv::DtCigiDriver::onStop | ( | ) | [protected, virtual] |
Stop the driver processing.
Implements makVrv::DtDriver.
| virtual bool makVrv::DtCigiDriver::onTick | ( | ) | [protected, virtual] |
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 | ( | ) | [protected, virtual] |
Starts a separate thread that executes the run method.
| virtual void makVrv::DtCigiDriver::stopThread | ( | ) | [protected, virtual] |
Stops the separate thread.
| virtual void makVrv::DtCigiDriver::setConnectionState | ( | bool | connected | ) | [protected, virtual] |
Sets the connection state.
| virtual void makVrv::DtCigiDriver::slot_onLoadDatabase | ( | const std::string & | filename | ) | [protected, virtual] |
Slot called when signal_loadDatabase is received from the DtCigiConnection.
| virtual void makVrv::DtCigiDriver::performLoadDatabase | ( | const std::string & | filename | ) | [protected, virtual] |
Performs the database load and calls setDatabaseLoaded on the DtCigiConnection.
| virtual void makVrv::DtCigiDriver::slot_onCoordinateSystemChanged | ( | const std::string & | name, |
| const std::string & | params | ||
| ) | [protected, virtual] |
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 | ) | [protected, virtual] |
Iterates through the function queue and executes the functions.
| boost::signal<void (DtCigiConnection*)> makVrv::DtCigiDriver::signal_sessionCreated |
This signal is emitted when the CIGI session is created.
| boost::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 [static, protected] |
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.
DtLosResponder* makVrv::DtCigiDriver::myLosResponder [protected] |
The line-of-sight responder held by the connection.
bool makVrv::DtCigiDriver::myConnectedFlag [protected] |
Whether we are connected to the network or not.
Referenced by connectionSettings().
DtDe& makVrv::DtCigiDriver::myDe [protected] |
Processes CIGI view control/definition messages.
Processes system/view component controls and other messages that change IG settings.
Processes HAT/HOT/LOS requests.
double makVrv::DtCigiDriver::myNextFrameTime [protected] |
When we should next process CIGI messages.