![]() |
VR-Forces 4.1.1 Class Documentation
|
This class performs all of the network I/O for CIGI messages. More...
Classes | |
| struct | HatHotResponseData |
| The internal structure for a HAT/HOT Response. More... | |
| struct | LosResponseData |
| The internal structure for a LOS Response. More... | |
Public Member Functions | |
| DtCigiNetworkIO (const DtCigiConnectionInitializer &initializer) | |
| Constructor Creates the appropriate socket based on the connection type in the initializer and sets up the CIGI Session. | |
| virtual | ~DtCigiNetworkIO () |
| Destructor. | |
| virtual bool | receiveCigiMessages () |
| Receives any CIGI messages from the network and processes them. | |
| virtual bool | sendCigiMessages (unsigned int frameNumber, unsigned int lastHostFrameNumber, int igMode, int databaseNumber) |
| Sends CIGI messages to the host. | |
| virtual void | setSignalProcessor (DtCigiSignalProcessor &sigProcessor) |
| Set the object that will receive CIGI signals and emit signals for CIGI message processing. | |
| virtual void | sendHatHotResponse (double height, unsigned int hotId, bool hat, unsigned int lastHostFrameNumber, bool valid) |
| Queues up a HAT/HOT response for sending when sendCigiMessages is called. | |
| virtual void | sendLosResponse (int losId, int entityId, bool visible, double range, int responseCount, int hostFrame) |
| Queues up a LOS response for sending when sendCigiMessges is called. | |
Static Public Member Functions | |
| static bool | addSocketCb (DtInetSocket *sock, void *usr) |
| Callback when a TCP connection is added. Used only in TCP server mode. | |
| static bool | removeSocketCb (DtInetSocket *sock, void *usr) |
| Callback when a TCP connection is removed. Used only in TCP server mode. | |
Protected Member Functions | |
| virtual void | initializeUdpSocket (const DtInetEndpoint &endpoint, unsigned int listenPort, DtInetDevice *device) |
| Initialize a UDP socket. | |
| virtual void | initializeTcpSocket (const DtInetEndpoint &endpoint, DtInetDevice *device, int localPort) |
| Initialize a TCP client socket. | |
| virtual void | addSocket (DtInetTcpSocket *sock) |
| Called from addSocketCb. | |
| virtual void | removeSocket (DtInetTcpSocket *sock) |
| Called from removeSocketCb. | |
| virtual DtInetAddr | findFirstNetworkDeviceAddress (bool &found) const |
| DtCigiNetworkIO (const DtCigiNetworkIO &orig) | |
| Non-copyable. | |
| DtCigiNetworkIO & | operator= (const DtCigiNetworkIO &orig) |
| Non-copyable. | |
Protected Attributes | |
| DtInetSocket * | mySocket |
| The socket. May be a UDP or TCP socket. | |
| CigiIGSession * | myCigiIgSession |
| The CIGI Session. | |
| DtInetBufferChain | myReceiveBufferChain |
| The buffer chain used to receive CIGI messages. | |
| DtInetBuffer | myReceiveBuffer |
| The buffer used to receive CIGI messages. | |
| unsigned int | myReceiveBufferSize |
| The size of the buffer used to receive CIGI messages. | |
| DtInetEndpoint | myDestinationAddress |
| The address/port of the host. | |
| DtInetSocketMgr * | mySocketMgr |
| The socket manager holds the TCP server socket and manages connections in TCP server mode. | |
| bool | myUseTcpClient |
| Whether using TCP client mode. | |
| bool | myUseTcpServer |
| Whether we're using TCP server mode. | |
| bool | myUseSychronousMode |
| Whether we're using sychronous mode or not. | |
| std::vector< HatHotResponseData > | myHatHotResponses |
| The HAT/HOT Response queue. | |
| std::vector< LosResponseData > | myLosResponses |
| The LOS Response queue. | |
This class performs all of the network I/O for CIGI messages.
This includes setting up the CIGI session, managing sockets, and setting the signal processor so that messages can be processed by the IG and responses can be sent back to the host.
| makVrv::DtCigiNetworkIO::DtCigiNetworkIO | ( | const DtCigiConnectionInitializer & | initializer | ) |
Constructor Creates the appropriate socket based on the connection type in the initializer and sets up the CIGI Session.
|
virtual |
Destructor.
|
protected |
Non-copyable.
|
virtual |
Receives any CIGI messages from the network and processes them.
|
virtual |
Sends CIGI messages to the host.
Sends start-of-frame if in synchronous mode, and any HAT/HOT/LOS responses that are queued up. The parameters are only used when sending start-of-frame.
| frameNumber | The current IG frame. |
| lastHostFrameNumber | The host frame from the last IG Control received. |
| igMode | The mode of the IG (see the CIGI ICD for values) |
| databaseNumber | The database number currently loaded/loading. |
|
virtual |
Set the object that will receive CIGI signals and emit signals for CIGI message processing.
|
virtual |
Queues up a HAT/HOT response for sending when sendCigiMessages is called.
|
virtual |
Queues up a LOS response for sending when sendCigiMessges is called.
|
static |
Callback when a TCP connection is added. Used only in TCP server mode.
|
static |
Callback when a TCP connection is removed. Used only in TCP server mode.
|
protectedvirtual |
Initialize a UDP socket.
|
protectedvirtual |
Initialize a TCP client socket.
|
protectedvirtual |
Called from addSocketCb.
|
protectedvirtual |
Called from removeSocketCb.
|
protectedvirtual |
|
protected |
Non-copyable.
|
protected |
The socket. May be a UDP or TCP socket.
|
protected |
The CIGI Session.
|
protected |
The buffer chain used to receive CIGI messages.
|
protected |
The buffer used to receive CIGI messages.
|
protected |
The size of the buffer used to receive CIGI messages.
|
protected |
The address/port of the host.
|
protected |
The socket manager holds the TCP server socket and manages connections in TCP server mode.
|
protected |
Whether using TCP client mode.
If this and myUseTcpServer are false, UDP is being used.
|
protected |
Whether we're using TCP server mode.
If this and myUseTcpClient are false, UDP is being used.
|
protected |
Whether we're using sychronous mode or not.
Start of frame CIGI messages will only be sent in sychronous mode.
|
protected |
The HAT/HOT Response queue.
|
protected |
The LOS Response queue.