Instances of ExerciseConnection provide an application's interface or connection to the network. More...
Inheritance diagram for com.mak.vrlj.vl.ExerciseConnection:
Collaboration diagram for com.mak.vrlj.vl.ExerciseConnection:Public Member Functions | |
| abstract void | close () throws Exception |
| abstract void | drainInput () |
| Processes input from the exercise. More... | |
| abstract void | drainInput (double maxTime) |
| Processes input from the exercise. More... | |
| abstract Clock | getClock () |
| Get the Exercise Connection's clock. More... | |
| abstract int | getNextEventId () |
| abstract int | getSite () |
| abstract int | getApplication () |
| abstract EntityIdentifier | getNextEntityIdentifier () |
| Return the EntityIdentifier with the next sequential entity number. More... | |
| abstract ObjectPublisher <?extends BaseObject<?> > | getPublisher (String classname) |
| abstract ObjectPublisher <?extends BaseObject<?> > | getPublisher (BaseObject<?extends ObjectIdentifier > obj) |
| abstract ReflectedObjectCollection < ObjectIdentifier, BaseObject <?extends ObjectIdentifier > > | getReflectedCollection () |
| abstract void | send (Interaction inter) |
| Send an interaction to the network. More... | |
| void | receive (Interaction inter) |
| Receive an interaction from the network. More... | |
| void | addInteractionListener (String interactionName, InteractionListener<?extends Interaction > listener) |
| Add a listener for a named interaction. More... | |
| void | removeInteractionListener (String interactionName, InteractionListener<?extends Interaction > listener) |
| Remove a listener for a named interaction. More... | |
| void | setDefaultHeartbeatRate (float theRate) |
| Set the default Heartbeat Rate This is a DIS only settings This only applies to newly created publishers. More... | |
| void | setDefaultReflectedSmoothingPeriod (float thePeriod) |
| Set the default Reflected Smoothing Period. More... | |
| void | setDefaultThresholds (float theRotationalThreshold, float theTranslationThreshold) |
| Set the default Thresholds. More... | |
| void | setNotifyLevel (NotifyLevel theNotifyLevel) |
| Set the notify level for VR-Link's internal logging. More... | |
| void | setReflectedHeartbeatThreshold (float theRate) |
| Set the Reflected Heartbeat Threshold. More... | |
| void | setSingleReflectedSmoothingPeriod (GlobalObjectDesignator id, float thePeriod) |
| Set the Reflected Smoothing Period. More... | |
| void | vlPrint (String text, NotifyLevel notifyLevel) |
| Print using VR-Link's internal logging. More... | |
Instances of ExerciseConnection provide an application's interface or connection to the network.
In HLA, ExerciseConnection maintains an application's interface to the RTI via the RTI Ambassador. ExerciseConnection also maintains the RTI's connection to the federate via the federate ambassador. An application must continually call drainInput() on the ExerciseConnection so that the LRC (Local RTI Component) may process RTI messages, receive callbacks and perform other housekeeping activities.
In DIS, ExerciseConnection maintains an application's interface to the DIS exercise, and handles all outgoing and incoming PDUs. An application must continually call drainInput() on the ExerciseConnection so that the application may process PDUs, make callbacks and perform other housekeeping activities.
Interactions may be sent using send(), and received by adding a listener to getInteractionDispatcher().
All reflected objects received from the network are stored in a single ReflectedObjectCollection in getReflectedCollection() and may be accessed and iterated without the need to create any ReflectedMap objects if desired.
Objects may be published to the network by creating publishers using the PublisherFactory from getPublisherFactory().
| void com.mak.vrlj.vl.ExerciseConnection.addInteractionListener | ( | String | interactionName, |
| InteractionListener<?extends Interaction > | listener | ||
| ) |
Add a listener for a named interaction.
| interactionName | the interaction |
| listener | the listener |
|
pure virtual |
Implements com.mak.vrlj.vl.AutoCloseable.
|
pure virtual |
Processes input from the exercise.
It is from within drainInput that user callbacks are executed. This will use a default timeout typically specified in the constructor
|
pure virtual |
Processes input from the exercise.
It is from within drainInput that user callbacks are executed. If maxTime is negative, then we read all available input without bound on time spent before returning.
| maxTime | is the approximate maximum time to spend |
|
pure virtual |
|
pure virtual |
Get the Exercise Connection's clock.
This clock must be set every frame to allow dead reckoning and stamped send calls
Referenced by com.mak.vrlj.example.f18.VehicleSim.munitionTick(), and com.mak.vrlj.example.f18.VehicleSim.reactToDamage().
|
pure virtual |
Return the EntityIdentifier with the next sequential entity number.
|
pure virtual |
|
pure virtual |
Referenced by com.mak.vrlj.example.f18.VehicleSim.VehicleSim().
|
pure virtual |
|
pure virtual |
|
pure virtual |
| void com.mak.vrlj.vl.ExerciseConnection.receive | ( | Interaction | inter | ) |
Receive an interaction from the network.
| inter | the interaction to receive. |
| void com.mak.vrlj.vl.ExerciseConnection.removeInteractionListener | ( | String | interactionName, |
| InteractionListener<?extends Interaction > | listener | ||
| ) |
Remove a listener for a named interaction.
| interactionName | the interaction |
| listener | the listener |
|
pure virtual |
Send an interaction to the network.
| inter | the interaction to send. |
| void com.mak.vrlj.vl.ExerciseConnection.setDefaultHeartbeatRate | ( | float | theRate | ) |
Set the default Heartbeat Rate This is a DIS only settings This only applies to newly created publishers.
| theRate |
| void com.mak.vrlj.vl.ExerciseConnection.setDefaultReflectedSmoothingPeriod | ( | float | thePeriod | ) |
Set the default Reflected Smoothing Period.
| thePeriod |
| void com.mak.vrlj.vl.ExerciseConnection.setDefaultThresholds | ( | float | theRotationalThreshold, |
| float | theTranslationThreshold | ||
| ) |
Set the default Thresholds.
This only applies to newly created publishers.
| theRotationalThreshold | |
| theTranslationThreshold |
| void com.mak.vrlj.vl.ExerciseConnection.setNotifyLevel | ( | NotifyLevel | theNotifyLevel | ) |
Set the notify level for VR-Link's internal logging.
| theNotifyLevel |
| void com.mak.vrlj.vl.ExerciseConnection.setReflectedHeartbeatThreshold | ( | float | theRate | ) |
Set the Reflected Heartbeat Threshold.
| theRate |
| void com.mak.vrlj.vl.ExerciseConnection.setSingleReflectedSmoothingPeriod | ( | GlobalObjectDesignator | id, |
| float | thePeriod | ||
| ) |
Set the Reflected Smoothing Period.
| id | |
| thePeriod |
| void com.mak.vrlj.vl.ExerciseConnection.vlPrint | ( | String | text, |
| NotifyLevel | notifyLevel | ||
| ) |
Print using VR-Link's internal logging.
| text | |
| notifyLevel |