31#include <vrfMsgTransport/event.h>
33#include <vrfutil/rwUUID.h>
35#include <vlpi/entityIdentifier.h>
39class DtReflectedExtEntityList;
40class DtReflectedExtEntity;
41class DtReflectedControlObject;
42class DtReflectedControlObjectList;
43class DtReflectedEnvironmentProcess;
44class DtReflectedObject;
47class DtSensorDataEntry;
52class DtVrlinkVrfRemoteController;
103 makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection* connection,
104 makVrf::DtVrlinkVrfRemoteController* vrfRemoteController,
105 DtReflectedExtEntityList* reflectedExtEntityList,
106 DtReflectedControlObjectList* reflectedControlObjectList);
111 virtual void tick(
double dt)
override;
202 virtual DtUUID
lookupUUID(
const DtEntityIdentifier& entityId);
214 virtual DtUUID
findUUID(DtReflectedExtEntity* reflectedEntity);
Provides attribute handling system for hierarchical data storage and manipulation.
Base class for all simulation event connectors in VREngage.
Definition simEventConnector.h:53
Handle class for safe access to attributes.
Definition attributeHandle.h:30
Type-specific handle class for attributes.
Definition attributeHandle.h:229
virtual void installSetAttrFunctions()
Register SetAttrFunc functions in mySetAttrMap for reading Entity Attributes from reflected ESR data.
std::unordered_set< std::string > myResourceMonitoringSet
Resource readers.
Definition reflectedEntityConnector.h:335
static void controlObjectRemovedCallback(DtReflectedControlObject *obj, void *usr)
Invoked by VR-Link when a control object is removed from the reflected list.
virtual DtEntityIdentifier findEntityIdFromUUID(const DtUUID &uuid)
Resolves a UUID to an entity identifier via the object identification resolver.
virtual void updateReflectedEntityAttributes()
Function pointer for setting a Reflected Entity Attribute from reflected ESR data.
virtual void handleActionMenuControlObjectDiscovered(DtReflectedControlObject *obj)
Constructs and queues an EntityDiscoveredMessage for an action menu control object.
virtual bool processEnvProcessDiscoveryCriteria(DtReflectedEnvironmentProcess *envProcess)
Evaluates whether an environment process meets the discovery criteria.
std::function< void(const DtArticulatedPart &, DtAttributeHandle &)> SetPartParamAttrFunc
Articulated part readers.
Definition reflectedEntityConnector.h:315
std::map< DtString, ReadStatePropFunc > myRwToAttrMap
Map of State Property names with corresponding functions to read the property and set an Attribute.
Definition reflectedEntityConnector.h:308
std::map< std::string, ReadSensorParamFunc > myReadSensorParamMap
Sensor readers.
Definition reflectedEntityConnector.h:343
makVrf::DtVrlinkVrfRemoteController * myVrfRemoteController
Non-owning pointer to the VRF remote controller.
Definition reflectedEntityConnector.h:235
DtReflectedExtEntityInfo * myCachedReflectedEntityInfo
Single-entry cache for the most recently accessed entity's reflected info.
Definition reflectedEntityConnector.h:249
std::function< void(const DtReflectedExtEntity &, DtAttributeHandle &)> SetAttrFunc
Function pointer for setting a Reflected Entity Attribute from reflected ESR data.
Definition reflectedEntityConnector.h:271
DtReflectedControlObjectList * myReflectedControlObjectList
Non-owning pointer to the reflected control object list.
Definition reflectedEntityConnector.h:244
std::function< void(const DtString &, DtAttributeHandle &)> ConvertExtDataFunc
Extended Data convenience conversions.
Definition reflectedEntityConnector.h:296
DtReflectedEntityConnector()
Default constructor. Initializes all pointers to nullptr.
virtual void processSensorUpdate(const DtIfSensorData &sensorData)
Member handler for sensor data from update callback.
virtual void updateAttributesForEntity(DtReflectedExtEntity *ree, DtAttributeHandle &entityAttr)
Function pointer for setting a Reflected Entity Attribute from reflected ESR data.
std::map< std::string, SetAttrFunc > mySetAttrMap
Map of individual Reflected Entity Attribute names with corresponding set functions to read ESR data.
Definition reflectedEntityConnector.h:278
std::map< std::string, SetPartParamAttrFunc > mySetPartParamAttrMap
Articulated part readers.
Definition reflectedEntityConnector.h:316
static void entityRemovedCallback(DtReflectedExtEntity *obj, void *usr)
Invoked by VR-Link when an entity is removed from the reflected list.
virtual DtReflectedExtEntityInfo * lookupReflectedEntityInfo(const DtEntityIdentifier &entityId)
Entity caching and UUID lookup.
std::map< DtString, ConvertExtDataFunc > myExtDataConversionMap
Map of State Property names with corresponding functions to read the property and set an Attribute.
Definition reflectedEntityConnector.h:298
virtual void debugFillAllEntities()
std::map< std::string, std::unordered_set< std::string > > mySensorMonitoringMap
Sensor readers.
Definition reflectedEntityConnector.h:356
boost::signals2::connection myResourceResponseConnection
Connection for resource response events from the VR-Forces backend.
Definition reflectedEntityConnector.h:331
virtual void install(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection, makVrf::DtVrlinkVrfRemoteController *vrfRemoteController, DtReflectedExtEntityList *reflectedExtEntityList, DtReflectedControlObjectList *reflectedControlObjectList)
Installs the entity tracking connector with shared infrastructure.
static void controlObjectAddedCallback(DtReflectedControlObject *obj, void *usr)
Static VR-Link control object callbacks.
virtual void shutdown() override
Shuts down the connector.
DtReflectedExtEntityList * myReflectedExtEntityList
Non-owning pointer to the reflected extended entity list.
Definition reflectedEntityConnector.h:239
static void sensorUpdateCallback(DtSimMessage *msg, void *usr)
Static callback wrapper for sensor update.
std::function< void(const DtIfSensorData &, DtAttributeHandle &)> ReadSensorParamFunc
Sensor readers.
Definition reflectedEntityConnector.h:342
DtAttributeHandleType< std::set< std::string > > myEntityStateStore
Reflected Entity Attribute system.
Definition reflectedEntityConnector.h:264
virtual DtVreMessageResult handleRequestEntitiesByType(DtVreMessage *msg)
Message handlers.
virtual DtUUID findUUID(DtReflectedExtEntity *reflectedEntity)
Extracts the UUID from a reflected entity via the object identification resolver.
DtAttributeHandle myLocalStatusAttr
Definition reflectedEntityConnector.h:253
static void entityAddedCallback(DtReflectedExtEntity *obj, void *usr)
Static VR-Link entity callbacks.
std::map< std::string, ReadResourceParamFunc > myReadResourceParamMap
Resource readers.
Definition reflectedEntityConnector.h:324
std::function< void(const DtPropertyInterface &, DtAttributeHandle &)> ReadStatePropFunc
State Property readers.
Definition reflectedEntityConnector.h:306
virtual void fillResourceAttribute(const DtSimResource &resource, DtAttributeHandle resourceAttr) const
Resource readers.
std::function< void(const DtSimResource &, DtAttributeHandle &)> ReadResourceParamFunc
Resource readers.
Definition reflectedEntityConnector.h:323
virtual ~DtReflectedEntityConnector() override
Virtual destructor. Frees myCachedReflectedEntityInfo.
std::map< std::string, ReadAppearanceFunc > myReadAppearanceMap
Function pointer for setting a Reflected Entity Attribute from reflected ESR data.
Definition reflectedEntityConnector.h:288
virtual DtUUID lookupUUID(const DtEntityIdentifier &entityId)
Returns the UUID for an entity using the single-entry cache.
virtual void tick(double dt) override
Performs periodic processing (currently a no-op)
virtual void handleActionMenuControlObjectRemoved(DtReflectedControlObject *obj)
Constructs and queues an EntityRemovedMessage for an action menu control object.
static bool envProcessDiscoveryConditionCallback(DtReflectedObject *envProcess, void *userData)
Discovery condition callback for environment processes.
virtual void processResourceResponse(const makVrfEvents::DtEvent &evt)
Resource readers.
std::function< void(const DtAppearance &, DtAttributeHandle &)> ReadAppearanceFunc
Appearance readers.
Definition reflectedEntityConnector.h:287
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Provides a template-based factory system for object creation.
Defines export macros and protocol namespace for vrePlayerStationConnector.
#define VRL_DLL
Empty definition for non-Windows platforms.
Definition export.h:52
!
Definition glsVreMessageUtil.h:50
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Definition connectorAccessory.h:38
Defines the base DtSimEventConnector class for VREngage simulation events.
Structure containing information about a reflected extended entity.
Definition util.h:40
Utility functions for VREngage player station connector.