|
VR-Engage
2.3
|
Extends the base custom reflected entity list to provide VREngage-specific functionality, including parameter database handling and interaction with simulation model sets.
#include <vreVrvExtensions.h>
Public Member Functions | |
| DtVreCustomReflectedEntityList (makVrv::DT_PROTOCOL_NAMESPACE::DtEntityElementProcessor &listener) | |
| DtVreCustomReflectedEntityList (makVrv::DT_PROTOCOL_NAMESPACE::DtEntityElementProcessor &listener, const DtDDMRegionSet ®ionsToUse) | |
| virtual | ~DtVreCustomReflectedEntityList () override |
| virtual void | initialize () |
| virtual bool | readyToAdd (DtReflectedObject *obj) override |
| virtual void | entityRemoved (DtReflectedEntity *ent) override |
| virtual void | entityUpdated (DtReflectedEntity *ent) override |
| DtVrfParameterDb * | parameterDatabase () |
Protected Types | |
| using | InitializedTypeMap = std::map<DtReflectedObject*, DtEntityType> |
| using | MissingTypeSet = std::set<DtEntityType> |
Protected Member Functions | |
| virtual void | refreshReflectedEntityProperties () |
| virtual void | discoverEntityIfNecessary (DtReflectedObject *obj, DtExtEntityStateRepository *entSR) |
| virtual DtVreMessageResult | handleSessionSmsList (DtVreMessage *msg) |
| virtual void | drawStatePropertyTraceMenu () |
| virtual void | traceStatePropertyReception (DtExtEntityStateRepository *entSR) |
Protected Attributes | |
| DtSmsLoader | mySmsLoader |
| std::vector< std::string > | mySms |
| InitializedTypeMap | myInitializedWithType |
| MissingTypeSet | myMissingTypes |
| std::atomic< bool > | myStatePropertyTraceEnabled {false} |
| std::mutex | myTracedPropertyMutex |
| std::string | myTracedPropertyName |
| char | myTracedPropertyInputBuffer [64] = {} |
| std::map< const void *, std::pair< size_t, std::string > > | myTraceLastLogged |
|
protected |
Type alias for mapping reflected objects to entity types.
|
protected |
Type alias for the set of missing entity types.
|
inline |
Constructor for non-HLA protocols.
| listener | Reference to the entity element processor that will receive entity events |
|
inline |
Constructor for HLA protocol.
| listener | Reference to the entity element processor that will receive entity events |
| regionsToUse | Reference to the DDM regions to use for this entity list |
|
overridevirtual |
Virtual destructor.
Removes message handlers registered during initialization
|
virtual |
Initializes the reflected entity list.
Registers parameter factories, the SMS message handler, and debug controls. Called during reflected-list creation, after the connector's signal_exerciseConnectionCreated callback registers the network dispatch thread.
|
overridevirtual |
Determines whether a reflected object is ready to join the list.
| obj | Pointer to the reflected object to check. |
Initializes the state-property schema and applies retained extended attributes before the object is announced to list consumers.
|
overridevirtual |
Handles removal of a reflected entity.
| ent | Pointer to the entity being removed |
Removes cached initialization state before the entity pointer can be reused for a subsequently reflected entity.
|
overridevirtual |
Handles entity updates.
| ent | Pointer to the entity that was updated |
Overridden function to process entity updates
| DtVrfParameterDb * makVre::DtVreCustomReflectedEntityList::parameterDatabase | ( | ) |
Gets the parameter database associated with this entity list.
Returns the SMS loader's database. A non-null pointer alone does not indicate that the most recent load succeeded.
|
protectedvirtual |
Rebuilds reflected EESR state-property schemas after an SMS reload.
Clears cached entity-type initialization state, then reinitializes each reflected EESR from the current SMS parameter database. EESR initialization replays retained extended attributes into the rebuilt schema. Checks that the database and extended repositories are available.
|
protectedvirtual |
Discovers and initializes an entity with parameter data.
| obj | Pointer to the reflected object to discover |
| entSR | Pointer to the entity state repository |
Defers discovery until the SMS database and entity type are available. Initializes from matching SMS parameters and checks the resulting initialized flag and state/parameter property counts. Missing parameter types are logged once per SMS refresh.
|
protectedvirtual |
Handles simulation model set list messages.
| msg | Pointer to the message containing the SMS list |
Logs SMS receipt and load outcomes, and refreshes entity schemas after a successful reload. Checks database availability for an unchanged cached list.
|
protectedvirtual |
Draws the state-property reception trace controls in the debug menu.
Runs on the render thread as a DtVreDebugManager menu callback. All ImGui calls are confined to this method because ImGui is not thread safe. The controls only exchange data with the network thread through myStatePropertyTraceEnabled and the mutex-guarded myTracedPropertyName.
|
protectedvirtual |
Logs extended-attribute (state property) reception for a reflected entity.
| entSR | Pointer to the entity state repository to inspect. |
Runs on the network-processing thread from entityUpdated() before the base class consumes pending attribute updates; all reads are non-destructive (markAsRead=false). Logs the traced property's value when it changes and dumps the attribute inventory when its size changes. Does nothing unless enabled from the debug menu.
|
protected |
Loader for simulation model sets.
|
protected |
Simulation model set filenames from the most recent successful load.
|
protected |
Map of reflected objects to their entity types.
Tracks which entities have been initialized with which entity types
|
protected |
Set of entity types we know aren't in the parameter database.
This prevents entities with unknown parameter types from searching the parameter database every time there's a network update
|
protected |
Whether state-property reception tracing is enabled.
Written by the debug menu on the render thread and read by traceStatePropertyReception() on the network thread.
|
protected |
Guards myTracedPropertyName, which is shared between threads.
|
protected |
Name of the state property whose value changes are traced.
Empty means only attribute-inventory changes are logged. Guarded by myTracedPropertyMutex.
|
protected |
ImGui edit buffer for the traced property name.
Only touched on the render thread inside drawStatePropertyTraceMenu().
|
protected |
Last logged (attribute count, traced value) per state repository.
Used for change detection so the trace only logs transitions. Only touched on the network thread.