![]() |
VR-Forces 4.5 Class Documentation
|
This class is responsible for the actual processing of CIGI data. More...

Public Types | |
| enum | DtIgMode { ResetStandby = 0, Operate = 1, Debug = 2 } |
Public Member Functions | |
| virtual | ~DtCigiConnection () |
| Destructor. | |
| virtual void | init () |
| Create all the processors, visualizers, etc. | |
| virtual bool | tick () |
| Receives/processes any CIGI messages and queues up HAT/HOT/LOS responses. | |
| virtual bool | connect () |
| Connects to the host. | |
| virtual bool | disconnect () |
| Disconnects from the host. | |
| virtual void | restart () |
| Restart destroys all of the agents the connection has created and then recreates/ reinitializes them so that all display engines (including the new one) will be synchronized. | |
| virtual void | setConnectionInitializer (const DtCigiConnectionInitializer &init) |
| Set the initialization settings. | |
| virtual int | cigiMinorVersion () const |
| Returns the mior CIGI version being used by the connection. | |
| virtual void | sendCigiMessages () |
| Sends start of frame and any other responses that are queued up. | |
| virtual void | setCoordinateSystem (const std::string &name, const std::string ¶ms) |
| Sets the coordinate system. Called by the driver in a thread-safe manner. | |
| virtual DtCoordinateSystem & | coordinateSystem () |
| Returns the coordinate system. Used for coordinate conversions. | |
| virtual const makArchives::DtCigiSettingsRecord & | cigiSettings () const |
| Returns the CIGI Mappings being used. | |
| virtual void | setLastHostFrameNumber (unsigned int frameNumber) |
| Sets the last host frame number (contained in an IG control message). | |
| virtual unsigned int | lastHostFrameNumber () const |
| Returns the last host frame number. | |
| bool | useSynchronousMode () const |
| Get whether the connection is using synchronous communications. | |
| virtual void | setIgMode (DtIgMode mode) |
| Sets the IG mode (either standby or operating). | |
| DtIgMode | igMode () const |
| Gets the IG mode. | |
| virtual void | setDatabaseNumber (int number) |
| Sets the database number. Will be sent in the start of frame message. | |
| virtual int | databaseNumber () const |
| Returns the database number. | |
| virtual void | setLoadingDatabase () |
| Sets the database to the 'loading' state. | |
| virtual void | setDatabaseLoaded () |
| Sets the database to the 'loaded' state. | |
| virtual void | setExtrapolationEnabled (bool enabled) |
| Sets whether the IG is using extrapolation. | |
| virtual bool | extrapolationEnabled () const |
| Returns whether the IG is using extrapolation. | |
| virtual void | setTimestampValid (bool valid) |
| Sets whether the host's timestamp is valid. | |
| virtual bool | timestampValid () const |
| Returns whether the host's timestamp is valid. | |
| virtual void | setLastTimestamp (unsigned int timestamp) |
| Sets the last timestamp received by an IG control. | |
| virtual unsigned int | lastTimestamp () const |
| Returns the last timestamp sent by the host. | |
| virtual void | sendHatHotResponse (double height, unsigned int hotId, bool hat, unsigned int lastFrame, bool valid) |
| Queues up a HAT/HOT response to be sent out. | |
| virtual void | sendLosResponse (int losId, int entityId, bool visible, double range, int responseCount, int hostFrame) |
| Queues up a LOS response to be sent out. | |
| virtual void | sendUserPacket (CigiBasePacket *packet) |
| Specify a packet that will be included in the next CIGI message buffer. | |
| virtual unsigned int | currentIgFrame () const |
| Returns the current IG frame being sent out in SOF messages. | |
| virtual DtComponentSignaler & | componentSignaler () |
| Returns a reference to the component signaler. | |
| bool | cigiSessionExists () const |
| Query if there is a (connected) cigi session. | |
| virtual bool | registerUserPacket (CigiBasePacket *packet, unsigned int packetId, bool hostSend, bool igSend) |
| Register a user defined packet manager. | |
| virtual bool | useThreadFlag () const |
| Query if this connection is running in a separate thread. | |
| virtual void | queueDriverFunction (boost::function< void()> func) |
| Queues a function to be run from the driver (renderer) thread. | |
| virtual void | queueConnectionFunction (boost::function< void()> func) |
| Queues a function to be run from the connection thread. | |
| virtual DtCigiDriver & | cigiDriver () |
| Access the display engine. | |
| virtual const DtCigiEntityVisualizer & | entityManager () const |
| Returns the DtCigiEntityVisualizer. | |
| virtual DtCigiEntityVisualizer & | entityManager () |
| virtual const DtCigiIgControlProcessor & | igControlProcessor () const |
| Returns the DtIGControlProcessor. | |
| virtual DtCigiIgControlProcessor & | igControlProcessor () |
| virtual const DtCigiNetworkIO & | networkIO () const |
| Returns the DtCigiNetworkIO object. | |
| virtual DtCigiNetworkIO & | networkIO () |
| virtual const DtHatHotResponder & | hatHotResponder () const |
| Returns a reference to the height above/of terrain responder. | |
| virtual DtHatHotResponder & | hatHotResponder () |
| virtual const DtLosResponder & | losResponder () const |
| Returns a reference to the line-of-sight responder. | |
| virtual DtLosResponder & | losResponder () |
| virtual CigiIGSession & | session () |
| Access the cigi session. | |
| virtual const CigiIGSession & | session () const |
| virtual void | startOverloadTimer () |
| Asynchronous operation-related methods. | |
| virtual void | stopOverloadTimer () |
| Stop the overload timer. | |
| virtual bool | overloaded () |
| Check if the connection is currently overloaded. | |
| virtual void | setWarnOnOverload (bool b) |
| Set whether a message should be sent to the console when overlaod is detected. | |
| virtual bool | warnOnOverload () const |
| Get whether a console warning is sent when overload is detected. | |
| virtual void | setDropMessagesOnOverload (bool b) |
| Set whether CIGI messages should be dropped (by clearing the current network packet receive buffer) when overload is detected. | |
| virtual bool | dropMessagesOnOverload () const |
| Get whether CIGI messages are dropped on overload. | |
| virtual double | hostFrequency () const |
| The configured frequency of the host. | |
Public Member Functions inherited from makVrv::DtBaseConnection | |
| DtBaseConnection (DtSharedSettingsManager &, DtAgentManagerInterface &) | |
| CTOR. | |
| virtual | ~DtBaseConnection () |
| DTOR MUST call clearInstances first. | |
| virtual void | clearInstances () |
| Clear and delete all instances rooted in the connection MUST be called before the connection is destroyed. | |
| DtSharedSettingsManager & | settingsManager () |
| Get the settings manager. | |
| virtual DtAgentManagerInterface & | sceneInterface () |
| Get the scene manager interface for creating drivers. | |
| const DtSharedSettingsManager & | settingsManager () const |
| Get the settings manager. | |
| void | reportElementCreated (DtElementID id, DtElementID parentId, unsigned int type) |
| Report an element created. | |
| void | reportElementAttribute (DtElementID id, DtElementAttribute *attribute) |
| void | reportElementDestroyed (DtElementID id) |
| Report an element destroyed. | |
| const DtElementChanges & | currentElementChanges () const |
| Look at the current element changes. | |
| DtElementChanges * | takeElementChanges () |
| Take the current changes and internally start a new set of changes. | |
| DtTemporaryAgentManager & | temporaryEffects () |
| Get the temporary effects manager. | |
| DtBlinkingObjectManager & | blinkManager () |
| Get the blinking manager. | |
| DtRandomNumberGenerator & | randomNumberGenerator () |
| Get the simulation's random number generator. | |
| virtual const std::string & | tag () |
| Get the tag identifying which type of connection this is. | |
| const DtUnicode & | emptyString () const |
| Allocated empty string. | |
| virtual DtVirtualBaseClass * | findInstance (const std::string &instanceName) |
| Find an instance with the given name. | |
| bool | destroyingInstances () const |
| Check to see if the simulation is destroying instances. | |
| virtual void | registerInstance (const std::string &instanceName, DtVirtualBaseClass *instance) |
| Register an object as an instance of instanceName, and transfer memory ownership of the instance to the DtConnection. | |
Public Attributes | |
| boost::signal< void(DtViewStateProcessor::ObserverAction &)> | signal_viewChanged |
| Emitted when a view control change is received. | |
| boost::signal< void(int, DtUniqueID)> | signal_alphaChanged |
| Emitted when an entity's alpha has changed. | |
| boost::signal< void(int, DtCigiViewController::DtViewDefinitionAction) > | signal_receivedViewDefinition |
| Emitted when a CIGI View definition is received. | |
| boost::signal< void(int, DtCigiViewController::DtViewControlAction)> | signal_receivedViewControl |
| Emitted when a CIGI View Control is received. | |
| boost::signal< void(int, int, int, int, int)> | signal_timeSet |
| Emitted when the time is set via CIGI Celestial Sphere Control message. | |
| boost::signal< void(bool)> | signal_ephemerisEnableSet |
| Emitted when the ephemeris model is enabled / disabled via CIGI Celestial Sphere Control message. | |
| boost::signal< void(const std::string &)> | signal_loadDatabase |
| Emitted when the host tells the IG to load a database. | |
| boost::signal< void()> | signal_connected |
| Emitted when the connection finished connecting. | |
| boost::signal< void()> | signal_toBeDisconnected |
| Emitted when the connection will be disconnecting. | |
| boost::signal< void()> | signal_coordinateSystemChanged |
| Emitted when the coordinate system changed. | |
| boost::signal< void(bool)> | signal_deadReckoningAllowedChanged |
| Emitted when CIGI extrapolation is enabled. | |
| boost::signal< void()> | signal_preTick |
| Signal emitted at the beginning of the tick function. | |
| boost::signal< void()> | signal_postTick |
| Signal emitted at the end of the tick function. | |
Protected Types | |
| typedef std::map< std::string, DtVirtualBaseClass * > | InstanceMap |
Protected Types inherited from makVrv::DtBaseConnection | |
| typedef boost::unordered_map < std::string, DtVirtualBaseClass * > | InstanceMap |
Protected Member Functions | |
| DtCigiConnection (const DtCigiConnectionInitializer &init, DtAgentManagerInterface &sceneInterface, DtSharedSettingsManager &settingsManager, DtCigiDriver &driver) | |
| Constructor. | |
| virtual void | on_viewControlReceived (const CigiViewCtrlV3 &viewControl) |
| Slot processes view control messages. | |
Friends | |
| class | DtCigiConnectionCreator |
This class is responsible for the actual processing of CIGI data.
This holds the entity visualizer, the CIGI settings, the signal processor, etc. This class be be run in a separate thread from the CIGI driver. This is the actual 'simulation' thread.
|
protected |
|
virtual |
Destructor.
|
protected |
Constructor.
|
virtual |
Create all the processors, visualizers, etc.
|
virtual |
Receives/processes any CIGI messages and queues up HAT/HOT/LOS responses.
|
virtual |
Connects to the host.
|
virtual |
Disconnects from the host.
|
virtual |
Restart destroys all of the agents the connection has created and then recreates/ reinitializes them so that all display engines (including the new one) will be synchronized.
Currently all the agents created by the CIGI connection are created by CIGI entities; hence, this method calls DtCigiEntityVisualizer::restart(). If the connection is running in its own thread, it then ticks the agent manager to send all the new agent messages to the master and remote display engines
|
virtual |
Set the initialization settings.
|
virtual |
Returns the mior CIGI version being used by the connection.
|
virtual |
Sends start of frame and any other responses that are queued up.
|
virtual |
Sets the coordinate system. Called by the driver in a thread-safe manner.
|
virtual |
Returns the coordinate system. Used for coordinate conversions.
|
virtual |
Returns the DtCigiEntityVisualizer.
|
virtual |
|
virtual |
Returns the DtIGControlProcessor.
|
virtual |
|
virtual |
Returns the DtCigiNetworkIO object.
|
virtual |
|
virtual |
Returns the CIGI Mappings being used.
|
virtual |
Sets the last host frame number (contained in an IG control message).
|
virtual |
Returns the last host frame number.
|
inline |
Get whether the connection is using synchronous communications.
|
virtual |
Sets the IG mode (either standby or operating).
|
inline |
Gets the IG mode.
|
virtual |
Sets the database number. Will be sent in the start of frame message.
|
virtual |
Returns the database number.
|
virtual |
Sets the database to the 'loading' state.
The database number is negated in start of frame messages in the loading state.
|
virtual |
Sets the database to the 'loaded' state.
The database number is no longer negated when the database is loaded.
|
virtual |
Sets whether the IG is using extrapolation.
|
virtual |
Returns whether the IG is using extrapolation.
|
virtual |
Sets whether the host's timestamp is valid.
|
virtual |
Returns whether the host's timestamp is valid.
|
virtual |
Sets the last timestamp received by an IG control.
|
virtual |
Returns the last timestamp sent by the host.
|
virtual |
Queues up a HAT/HOT response to be sent out.
|
virtual |
Queues up a LOS response to be sent out.
|
virtual |
Specify a packet that will be included in the next CIGI message buffer.
Note that the user allocates and fills in this packet; the connection then takes ownership of it and deletes it after the message is constructed
|
virtual |
Returns a reference to the height above/of terrain responder.
|
virtual |
|
virtual |
Returns a reference to the line-of-sight responder.
|
virtual |
|
virtual |
Returns the current IG frame being sent out in SOF messages.
|
virtual |
Returns a reference to the component signaler.
|
virtual |
Access the cigi session.
These will throw DtException if the session does not exist.
|
virtual |
| bool makVrv::DtCigiConnection::cigiSessionExists | ( | ) | const |
Query if there is a (connected) cigi session.
|
virtual |
Register a user defined packet manager.
|
virtual |
Query if this connection is running in a separate thread.
|
virtual |
Queues a function to be run from the driver (renderer) thread.
|
virtual |
Queues a function to be run from the connection thread.
Used to respond to queries made in functions run from the driver function queue
|
virtual |
Access the display engine.
Typically, this can only be used if useThreadFlag is false
|
virtual |
Asynchronous operation-related methods.
Start the time used to test for overload. The overload timer is part of the connection rather than DtNetworkIO because it considers both the time processing CIGI messages and the time spent preparing the resulting asynchronous messages to the rendering thread.
|
virtual |
Stop the overload timer.
|
virtual |
Check if the connection is currently overloaded.
|
virtual |
Set whether a message should be sent to the console when overlaod is detected.
The default is true
|
virtual |
Get whether a console warning is sent when overload is detected.
|
virtual |
Set whether CIGI messages should be dropped (by clearing the current network packet receive buffer) when overload is detected.
The default is false
|
virtual |
Get whether CIGI messages are dropped on overload.
|
virtual |
The configured frequency of the host.
For asynchronous mode, the driver may run at a different (driver) frequency
|
protectedvirtual |
Slot processes view control messages.
|
friend |
| boost::signal<void (DtViewStateProcessor::ObserverAction&)> makVrv::DtCigiConnection::signal_viewChanged |
Emitted when a view control change is received.
| boost::signal<void (int, DtUniqueID)> makVrv::DtCigiConnection::signal_alphaChanged |
Emitted when an entity's alpha has changed.
| boost::signal<void (int, DtCigiViewController::DtViewDefinitionAction) > makVrv::DtCigiConnection::signal_receivedViewDefinition |
Emitted when a CIGI View definition is received.
| boost::signal<void (int, DtCigiViewController::DtViewControlAction)> makVrv::DtCigiConnection::signal_receivedViewControl |
Emitted when a CIGI View Control is received.
Emitted when the time is set via CIGI Celestial Sphere Control message.
| boost::signal<void (bool)> makVrv::DtCigiConnection::signal_ephemerisEnableSet |
Emitted when the ephemeris model is enabled / disabled via CIGI Celestial Sphere Control message.
| boost::signal<void (const std::string&)> makVrv::DtCigiConnection::signal_loadDatabase |
Emitted when the host tells the IG to load a database.
| boost::signal<void ()> makVrv::DtCigiConnection::signal_connected |
Emitted when the connection finished connecting.
| boost::signal<void ()> makVrv::DtCigiConnection::signal_toBeDisconnected |
Emitted when the connection will be disconnecting.
| boost::signal<void ()> makVrv::DtCigiConnection::signal_coordinateSystemChanged |
Emitted when the coordinate system changed.
| boost::signal<void (bool)> makVrv::DtCigiConnection::signal_deadReckoningAllowedChanged |
Emitted when CIGI extrapolation is enabled.
| boost::signal<void ()> makVrv::DtCigiConnection::signal_preTick |
Signal emitted at the beginning of the tick function.
| boost::signal<void ()> makVrv::DtCigiConnection::signal_postTick |
Signal emitted at the end of the tick function.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |