27#include <vlutil/vlTime.h>
38class DtVrlinkVrfRemoteController;
85 makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection* connection,
86 makVrf::DtVrlinkVrfRemoteController* vrfRemoteController);
94 virtual void tick(
double dt)
override;
Provides handle classes for safe access to attributes.
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 shutdown() override
Shuts down the connector.
void clearPendingRoleAssignment()
Clears any cached role assignment awaiting acknowledgement.
virtual DtVreMessageResult handleSetDefaultSmsList(DtVreMessage *message)
Handles a request to set the default simulation model set (SMS) list.
virtual void processAssignRolePlayerMessage(DtSimMessage *msg)
Processes role assignment messages received from the VRF backend.
DtAttributeHandleType< bool > myBackendIsHostAttr
Indicates whether this station is the backend host.
Definition sessionStatusConnector.h:330
virtual DtVreMessageResult handleVrfRewind(DtVreMessage *message)
Handles a request to rewind the simulation initiated by this station.
static void vreStatusMessageCallback(DtSimMessage *msg, void *usr)
Static callbacks for VRF backend messages.
virtual void install(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection, makVrf::DtVrlinkVrfRemoteController *vrfRemoteController)
Installs the session status connector with shared infrastructure.
DtAttributeHandleType< bool > mySessionPlayStateAttr
True if the session is currently playing (not paused)
Definition sessionStatusConnector.h:318
DtAttributeHandleType< std::vector< std::string > > myVreStatusStationsAttr
Remote station status attribute subtree.
Definition sessionStatusConnector.h:351
virtual void sendLocalStatusHeartbeat()
Builds and sends a VRE status heartbeat from the local attribute subtree.
std::string myStationId
Connector state.
Definition sessionStatusConnector.h:302
static constexpr double theHeartbeatIntervalS
Heartbeat interval in Seconds for outbound DtIfVreStatus messages.
Definition sessionStatusConnector.h:363
virtual DtVreMessageResult handleSessionPlayStateRequest(DtVreMessage *message)
Handles a request for the current session play state.
static void assignRolePlayerMessageCallback(DtSimMessage *msg, void *usr)
Static callback for role assignment messages from the VRF backend.
virtual ~DtSessionStatusConnector() override=default
Virtual destructor.
DtAttributeHandle myBackendsListAttr
Connector state.
Definition sessionStatusConnector.h:340
virtual void processVreStatusMessage(DtSimMessage *msg)
Instance methods for processing inbound VRF callbacks.
DtAttributeHandleType< VrfSessionStatusMessage::VrfSessionStatusData > mySessionStatusAttr
Current cached session status data.
Definition sessionStatusConnector.h:314
virtual void updateSessionStatus()
Internal status evaluation and broadcast methods.
DtAttributeHandleType< std::set< std::string > > mySessionSmsListAttr
Current set of simulation model set filenames for this session.
Definition sessionStatusConnector.h:326
VreAssignRolePlayerMessage::VreAssignRolePlayerData myPendingRoleAssignment
Latest role assignment for this station awaiting acknowledgement.
Definition sessionStatusConnector.h:357
virtual void processBackendRemoved(const DtSimulationAddress &addr)
Processes a backend removal notification for this connector.
virtual void sendSessionStatusMessage()
Sends the current session status to the frontend.
static void backendRemovedCallback(const DtSimulationAddress &addr, void *usr)
Static callback invoked when a backend simulation address is removed.
virtual DtVreMessageResult handleVrfRun(DtVreMessage *message)
Simulation control message handlers.
static void unassignRolePlayerMessageCallback(DtSimMessage *msg, void *usr)
Static callback for role unassignment messages from the VRF backend.
makVrf::DtVrlinkVrfRemoteController * myVrfRemoteController
Infrastructure pointer (NON-OWNING - owned by DtConnectorAccessory)
Definition sessionStatusConnector.h:289
DtAttributeHandle myVreStatusLocalAttr
Read handle for the local station status attribute subtree.
Definition sessionStatusConnector.h:338
virtual void sendSessionPlayState()
Sends the current session play state to the frontend.
virtual void sendSessionSmsUpdate()
Sends the current SMS list to the frontend and updates the communication manager.
virtual void processUnassignRolePlayerMessage(DtSimMessage *msg)
Processes role unassignment messages received from the VRF backend.
bool myHasPendingRoleAssignment
True when there is a cached assignment awaiting acknowledgement.
Definition sessionStatusConnector.h:354
virtual void tick(double dt) override
Performs periodic session status evaluation.
virtual DtVreMessageResult handleSessionSmsListRequest(DtVreMessage *message)
Handles a request for the current simulation model set (SMS) list.
DtAttributeHandleType< bool > myReengageOnRewindAttr
Read-only policy controlling automatic reengagement after rewind.
Definition sessionStatusConnector.h:322
virtual DtVreMessageResult handlePendingRoleAssignment(DtVreMessage *message)
Handles a request or response for the cached role assignment.
DtAttributeHandleType< DtSimulationAddress > myVreBackendAddrAttr
Simulation address of this station's VRE backend process.
Definition sessionStatusConnector.h:310
double myLastHeartbeatTime
Wall-clock timer tracking when the last outbound heartbeat was sent.
Definition sessionStatusConnector.h:360
virtual DtVreMessageResult handleVrfSessionStatusRequest(DtVreMessage *message)
Session status and SMS list message handlers.
virtual DtVreMessageResult handleVrfPause(DtVreMessage *message)
Handles a request to pause the simulation.
void cachePendingRoleAssignment(const VreAssignRolePlayerMessage::VreAssignRolePlayerData &assignmentData)
Caches the latest role assignment until it is acknowledged.
DtSessionStatusConnector()=default
Default constructor.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
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.
Data payload for VreAssignRolePlayerMessage.
Definition vreAssignRolePlayer.h:40