VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
3.4 - The Network Interface

Table of Contents

All networked objects have an instance of a DtSimObjectNetInterface (netIface.h).

DtSimObjectNetInterface is an abstract base class from which local and remote network interfaces are derived. The network interface represents the interface between an object's VR-Forces state repository and its network (VR-Link) representation. The simulated object may be local or remote. If the object is local, the network interface is responsible for updating a VR-Link publisher with data from its VR-Forces state repository each tick. If the object is remote, the network interface updates a VR-Forces state repository with data from its VR-Link reflected object. the figure illustrates local and remote network interfaces within a VR-Forces application.

networkinterfaces.png
Network interfaces

Local network interfaces send data over the network through VR-Link publishers. Depending on the kind of object being simulated, it may use a DtEntityPublisher, DtAggregatePublisher, or DtEnvironmentProcessPublisher. Remote network interfaces maintain one of the following VR-Link reflected objects: a DtReflectedEntity, DtReflectedAggregate, or a DtReflectedEnviromentProcess.

The following figure illustrates use of local and remote network interfaces in two VR-Forces applications. If back-end 1:3002 is simulating a tank, the DtVrfObject representing the tank has a local network interface. In back-end 2:3001, a DtVrfObject with a remote network interface is created to represent the tank. In both applications, the DtVrfObject representing the tank has a state repository. On back-end 1:3002, the local network interface for the DtVrfObject sends state information over the network. On back-end 2:3001, the remote network interface for the DtVrfObject receives state information from the network.

localandremotenetworkinterfaces.png
Local and Remote Network Interfaces

3.4.1 Local Network Interfaces

A local network interface contains a VR-Link publisher and an associated VR-Link network state repository (not to be confused with the simulation state repository). Each tick, an object’s local network interface takes state information from the object’s state repository and copies it to its network state repository. The VR-Link publisher is responsible for sending updates, as necessary, in the form of DIS PDUs or RPR FOM object attribute updates. It also sends VR-Forces-specific interface messages (DtVrfObjectDataState) to supplement the standard DIS/RPR FOM data with application-specific information. This additional data includes the object name and object label.

3.4.2 Remote Network Interfaces

A remote network interface contains a VR-Link reflected object and its associated VR-Link network state repository (not to be confused with the simulation state repository, owned by a DtVrfObject). Each tick, the network interface takes state information maintained in the VR-Link network state repository and updates the object’s simulation state repository. Receipt of standard DIS/RPR FOM data is handled at the VR-Link level in the network interface’s reflected object member data. Remote network interfaces also register for DtVrfObjectDataState interface messages, and update the object’s simulation state with VR-Forces application-specific data.

3.4.3 Configuring an Object with a Network Interface

You configure the network interface for a type of object by editing its entry in the object parameter database. When you configure an object’s network interface, the string you enter determines the class that gets created when the object is instantiated, as listed in the following table. Network interface type strings are defined in vrfNetIfTypes.h.

Network Interface Classes
String Class
Individual platform-level entity
individual-local-entity-net-interface DtSimIndividualLocalEntityNetInterface
vrf-individual-remote-entity-net-interface DtVrfIndividualRemoteEntityNetInterface
Pseudo-aggregate entity
pseudo-aggregate-local-entity-net-interface DtSimPseudoAggregateLocalEntityNet-Interface
vrf-aggregate-remote-entity-net-interface DtVrfAggregateRemoteEntityNetInterface
Control object
local-environmental-net-interface DtSimLocalEnvironmentalNetInterface
vrf-remote-environmental-net-interface DtVrfRemoteEnvironmentalNetInterface
Note
Locally simulated units use a network interface of type pseudo-aggregate-local-entity-net-interface.

3.4.4 Tuning the Network Interface

You can tune the local and remote network interface subcomponents. Specify the net-interface-min-tick-period and net-interface-min-tick-period-variance parameters in the local and remote subcomponents blocks. If you reduce the rate at which the network interfaces are ticked, you can limit how often VR-Forces needs to do coordinate system conversion from network (geocentric) to database coordinates. The object parameter database has examples of setting these parameters.

[<< State Repositories] [Home] [Top of Page] [Creating and Managing Objects >>]


Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)