![]() |
MAK Data Logger API Documentation for DIS
|
When you construct a remote control interface, the number of Loggers expected to connect is specified in the constructor.
The value can be modified later. If the number of Loggers specified is greater than 0, then only that many Loggers will be allowed to connect. The default value is 0, which indicates there are no restrictions on Logger connections.
Logger-side remote control messages can use a VR-Link exercise connection, a UDP back channel, or both. A controlling application attaches its DtRemoteControlInterface to one transport at a time: use setConnection(exconn, id) for the exercise connection or setConnection(id, socket) for the UDP back channel. The Logger's channels are enabled with the SetRemoteControlSettings command. To use the back channel, configure its UDP endpoint in the Logger configuration with SetBackChannelConnection (see 9 - Configuring the Logger to use the Remote Control API); the controlling application creates a socket for that endpoint.
The remote control interface:
The connect and heartbeat transmission interval is configurable in the Logger using the SetRemoteControlSettings command. For configuration details, see 9 - Configuring the Logger to use the Remote Control API. The interface's connection timeout (DtRemoteControlInterface::setConnectionTimeout()) controls how long a Logger can go without a heartbeat before it is considered stale and removed. The acknowledgment timeout (DtRemoteControlInterface::setAcknowledgeTimeout()) controls how long the interface waits for command acknowledgments; its current default is 5 seconds, and values less than or equal to zero are ignored.
For UDP back-channel traffic, DtRemoteControlInterface::setBackChannelTickBudget() limits the number of packets processed during each tick. A value less than or equal to zero disables the limit. The interface also provides DtRemoteControlInterface::setPassivelyAccepting(). When enabled, playback interfaces accept unsolicited playback state responses without requiring a matching outstanding command from that source.
You can install callbacks for when the interface receives the connect, disconnect, heartbeat, and timeout events, as well as when a Logger total state message is received. The following code (from the remote control example) outputs the content of a Logger connection when it has timed out:
[<< Introduction to the Remote Control Interface] [Home] [Top of Page] [Inspecting Logger State >>]