![]() |
VR-Forces 4.6 Class Documentation
|
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.
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.
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.
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.
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 |
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 >>]