VR-Link JAVA API Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
8.4 - Intercepting Incoming Entity State PDUs

In 4 - The Protocol Independent Interface, we mention that processing incoming state updates for a particular entity must account for the protocol, because the concept of an HLA attribute update is fairly different from the concept of a DIS entity state PDU.

In DIS, there are two ways to intercept incoming entity state PDUs:

When an entity state PDU arrives, it is dispatched to a callback that DtReflectedEntityList registers with the DtExerciseConn. Within this callback, the reflected entity list calls the appropriate DtReflectedEntity's processEntityState() function, depending on the entity ID in the PDU.

DtReflectedEntity's default implementation of this virtual function is to update its own DtEntityStateRepository based on the contents of the PDU. But by subclassing DtReflectedEntity, you can provide an alternate implementation. Your version of this function should probably call down to DtReflectedEntity::processEntityState() to make sure that the entity state repository is properly updated even if there is additional work you want to perform here.

Remember that when subclassing DtReflectedEntity, you must also subclass DtReflectedEntityList so that it knows to create your new type of DtReflectedEntity. For examples of subclassing these two classes, please see 4.6.1 Creating Reflected Entity Lists.

[<< Configuring Your Connection to the DIS Network] [Home] [Setting Different Heartbeats in DIS 7 >>]


Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)