VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfcontrol Library API Changes

Table of Contents

The vrfcontrol library is the VR-Forces remote control API.

It is the library a toolkit application links against to drive one or more VR-Forces simulation back-ends from an external process, and DtVrfRemoteController remains its primary entry point.

The 5.3 release changes this library in three significant ways. First, the TDL (Tactical Data Link) message interface was removed outright, which deletes several public methods from DtVrfRemoteController. Second, scenario creation, saving, and checkpointing gained named checkpoint and run-id support, and ground clamping on object creation was replaced by an explicit altitude-above-terrain pair; both changes alter existing public signatures. Third, and by far the largest change in volume, a substantial body of scenario-query functionality that previously lived only in the GUI layer (vrfGuiCore) was reimplemented in vrfcontrol so that headless remote control applications can use it. That work introduces DtScenarioManager as a new service locator and adds roughly twenty new public classes for spot reports, current tasks, scripted tasks, resources, model sets, and per-entity capability queries.

Changes that are internal to an implementation or limited to comments are not listed.

Breaking Changes

DtVrfRemoteController TDL message support was removed

DtVrfTDLMessageInterface is no longer part of the remote control API. The forward declaration, the accessor, the factory hook, the owning member, and the two TDL request methods were all deleted:

// Removed in 5.3
virtual DtVrfTDLMessageInterface* vrfTDLMessageInterface() const;
virtual void createOrSetVrfTDLMessageInterface(DtVrfTDLMessageInterface* iface);
virtual void setTDLMessagesGloballyEnabled(bool enabled);
virtual void requestSendTDLMessages(const DtUUID& uuid, int onOff,
const DtSimulationAddress& addr = DtSimSendToAll) const;

The protected members myVrfTDLMsgIf and myOwnsVrfTDLMessageInterface were removed at the same time, so subclasses that referenced them will not compile.

init lost its TDL parameter:

// 5.2
virtual void init(DtCommunicationManager* exConn, DtVrfMessageInterface* msgInterface = 0,
DtVrfTDLMessageInterface* tdlMessageInterface = 0);
// 5.3
virtual void init(DtCommunicationManager* exConn, DtVrfMessageInterface* msgInterface = 0);

Calls that passed only the first one or two arguments are unaffected. Calls that supplied a TDL interface, and any subclass that overrides init, must be updated. There is no replacement; TDL messaging is no longer exposed through the remote control API.

DtVrfRemoteController object creation replaced ground clamping with altitude above terrain

createEntity (both overloads) and sendVrfObjectCreateMsg replaced the single bool groundClamp parameter with a bool useAltitudeAboveTerrain flag followed by a double altitudeAboveTerrain offset. Because the new parameter is inserted in the middle of a long default-argument list, every call site that passed any argument at or after the old groundClamp position silently shifts by one position, and the compiler will report a type mismatch on the following argument (typically a DtUUID or DtString).

// 5.2
virtual void createEntity(
const DtEntityType& type, const DtVector& geocentricPosition, DtForceType force, DtReal heading,
const DtString& uniqueName = DtString::nullString(),
const DtString& label = DtString::nullString(),
const DtSimulationAddress& addr = DtSimSendToAll,
bool groundClamp = true,
const DtUUID& startingUUID = DtUUID::nullUUID(),
const DtString& globalId = DtString::nullString()) const;
// 5.3
virtual void createEntity(
const DtEntityType& type, const DtVector& geocentricPosition, DtForceType force, DtReal heading,
const DtString& uniqueName = DtString::nullString(),
const DtString& label = DtString::nullString(),
const DtSimulationAddress& addr = DtSimSendToAll,
bool useAltitudeAboveTerrain = true,
double altitudeAboveTerrain = 0.,
const DtUUID& startingUUID = DtUUID::nullUUID(),
const DtString& globalId = DtString::nullString()) const;

The previous groundClamp == true behavior is reproduced by useAltitudeAboveTerrain == true with an altitudeAboveTerrain of 0.0, which is the new default pair. Review each call site rather than performing a textual substitution, and add the explicit 0. argument wherever a trailing DtUUID or global id was being passed.

createOverlayObject gained the same pair at the end of its parameter list, after the existing ellipsoid flag:

bool ellipsoid = false,
bool useAltitudeAboveTerrain = false,
double altitudeAboveTerrain = 0.

Because both new parameters are appended and defaulted, existing calls compile unchanged. Subclasses that override createOverlayObject, createEntity, or sendVrfObjectCreateMsg must adopt the new signature or they will silently stop overriding the base implementation.

DtVrfRemoteController scenario save and close signatures changed

Named scenario checkpoints and run ids were added to the save, checkpoint, and close paths. The new parameters are appended and defaulted, so existing call sites continue to compile; overriding subclasses must be updated.

5.2 declaration 5.3 declaration
bool saveScenario(const DtFilename&, DtPreserveMappingsFcn, void*, DtString*, bool, bool, double) adds const DtString& checkpointName = "", const DtString& runId = ""
void sendSaveScenarioMessage(const DtSimulationAddress&, double, const DtFilename&) const adds const DtString& checkpointName = "", const DtString& runId = ""
void closeScenario(const DtSimulationAddress&, const DtFilename&, bool forceCloseAll) adds bool willLoadCheckpointAfterClose = false

saveScenarioCheckpoint was not modified; instead a second overload was added that takes a checkpoint name and run id. See the Additions section.

DtVrfRemoteController::setRandomNumberSeed was removed

// Removed in 5.3
virtual void setRandomNumberSeed(DtScenario* scen);

The companion methods setAutoReorganize and the frame rate mode variant are unchanged. Code that propagated a random number seed into a DtScenario through the controller has no direct replacement; set the seed on the scenario object itself before passing it to the controller.

DtVrfRemoteController::myScenarioRunId changed type

The protected member that identifies the current run changed from an integer to a UUID:

// 5.2
int myScenarioRunId;
// 5.3
DtUUID myScenarioRunId;

This affects subclasses only. Run ids are now expressed as DtString values in the public save and load methods, and internally as DtUUID.

Session status callbacks now receive DtSessionUpdateInformation

This is the most widely felt breaking change outside DtVrfRemoteController. The session status changed callback no longer receives a bare DtSessionStatus. It receives a new struct that carries the status along with a bitfield describing what changed:

// New in 5.3, declared in vrfcontrol/vrfBackendListener.h
{
int statusChange = 0;
};

DtSessionStatusChangedCallbackFcn was retargeted accordingly:

Every registered session status callback must change its parameter type and dereference .status to reach the data it previously received directly:

// 5.2
static void onSessionStatus(const DtSessionStatus& status, void* usr)
{
handle(status);
}
// 5.3
static void onSessionStatus(const DtSessionUpdateInformation& info, void* usr)
{
handle(info.status);
}

The registration methods on DtVrfBackendListener keep their names, and the protected callback list member mySessionStatusChangedCallbackList changed type to match. DtBackendSelectorManager was updated in the same way:

// 5.2
static void scenarioStatusChangedCallback(const DtSessionStatus&, void*);
// 5.3
static void scenarioStatusChangedCallback(const DtSessionUpdateInformation&, void*);

Note that DtBackendSelectorManager::processScenarioStatusChanged still takes a DtSessionStatus, so only the static trampoline changes in a subclass.

DtVrfBackendListener::updateSessionStatus gained a parameter

// 5.2
virtual void updateSessionStatus();
// 5.3
virtual void updateSessionStatus(bool checkSmsNamesOnly = false);

The parameter is defaulted, so callers are unaffected. Subclasses that override this method must add the parameter.

DtRemoteEnvironmentController::globalEnvironment return type changed

The accessor for the global environment object now returns the more general state data base type:

// 5.2
const makVrf::DtExternalCurrentFrameState* globalEnvironment() const;
// 5.3
const makVrf::DtStateData* globalEnvironment() const;

Code that stored the result in an explicitly typed pointer, or that called members specific to makVrf::DtExternalCurrentFrameState, must be updated. The protected member backing the accessor was renamed and retyped at the same time:

// 5.2
const makVrf::DtExternalCurrentFrameState* myGlobalWeatherSR;
// 5.3
const makVrf::DtStateData* myGlobalWeather;

The WeatherObjects map of per-object weather state is unchanged and still holds const makVrf::DtExternalCurrentFrameState* values, so the per-object query path is unaffected.

Moved Headers

Several headers were relocated out of the GUI layer into vrfcontrol so that headless remote control applications can use them. These are not pure moves: the classes were taken out of the makVrf namespace, the makVrv::DtDe and makVrv::DtVirtualBaseClass dependencies were removed, and the export macro changed from DT_DLL_VRFGUICORE to DT_DLL_vrfcontrol. Treat them as reimplementations that require both an include path change and a code review.

5.2 header 5.3 header
vrfGuiCore/emitterModesRequestor.h vrfcontrol/remoteControlEmitterModesRequestor.h
vrfGuiCore/spotReportDataHandler.h vrfcontrol/spotReportDataHandler.h

The corresponding class renames are:

5.2 class 5.3 class
makVrf::DtEmitterModesRequestor DtRemoteControlEmitterModesRequestor
makVrf::DtSpotReportDataHandler DtSpotReportDataHandler (global namespace)

DtSpotReportDataHandler also changed shape. Its constructor took a display engine and a unique id and its principal update method was a pure virtual taking an opaque pointer. It now takes the owning manager and updates from a typed spot report:

// 5.2
virtual bool update(void*) = 0;
// 5.3
virtual bool updateFromNetwork(const DtSpotReport*);

Two further GUI headers were removed without a same-named replacement:

Independently of the move, the TDL headers vrfGuiCore/tdlGenericNetworkMessage.h, vrfGuiCore/tdlNetworkMessageHandler.h, vrfGuiCore/vrfTDLMessageDataElement.h, vrfGuiCore/vrfTDLMessageDataHandler.h, vrfGuiCore/vrfTDLMessageDataProcessor.h, vrfGuiCore/vrfTDLMessageDataVisualHandler.h, vrfGuiCore/vrfTDLMessageManager.h, and vrfGuiCore/vrfTDLSettingsRecord.h were deleted along with the TDL interface described above.

Additions

DtScenarioManager (vrfcontrol/scenarioManager.h)

DtScenarioManager is the anchor for nearly everything else added in 5.3. It is a singleton root constructed from a DtVrfRemoteController and it exposes the collaborating services that the new manager and requestor classes need, so that those classes do not each have to reach into the controller:

DtVrfMessageInterface* messageInterface() const;
DtRemoteEnvironmentController* remoteEnvironmentController() const;
DtVrfBackendListener* listener() const;
DtVrfObjectMessageExecutive* objectMessageExecutive() const;
makVrfEvents::DtEventManager* eventManager() const;
DtRadioMessageListener* radioMessageListener() const;
makVrf::DtStateDataManager* stateDataManager() const;
DtCommunicationManager* communicationManager() const;

It also provides the simulation clock and addressing helpers that remote control code repeatedly needs: simTime, dateAndTimeOfDay, generateRequestId, and preferredBackendAddress, which returns the first back-end that has a scenario loaded and is ready to simulate. Scenario state transitions are published through signal_scenarioStatusChanged.

Every new manager and requestor class takes a DtScenarioManager& in its constructor, defaulted to DtScenarioManager::NullManager(), and exposes a static Instance(DtScenarioManager&) accessor. Construct one DtScenarioManager for your controller and pass it to each service you need.

Spot report framework

Five new headers replace the GUI-only spot report pipeline with one usable from a remote control application.

vrfcontrol/spotReportManager.h defines DtSpotReportManager, which owns all spot reports indexed by spotter and contact, drives certainty-level aging, and manages a set of perspectives that each present a filtered view of the report set. Its key entry points are requestSpotReports, observedBy, observing, spotReportDataHandlerFor, setCertaintyLevels, certaintyLevelForTime, setSpotReportGatherTime, and the perspective lifecycle methods createAndManagePerspective, managePerspective, unmanagePerspective, and registerPerspectiveCreator. Report lifecycle events are published through signal_spotReportCreated, signal_reportUpdated, signal_reportAboutToBeDeleted, signal_contactDeleted, signal_spotterDeleted, and signal_allSpotReportsRemoved.

DtSpotReportManager is abstract. It declares a small set of pure virtuals that a transport-specific subclass must supply: createAndDeliverMessage, backendsLoaded, generateRequestId, simTime, dataFor, anyBackendsPlaying, numberOfBackends, and dateAndTimeOfDay.

vrfcontrol/remoteControlSpotReportManager.h provides that subclass. DtRemoteControlSpotReportManager implements all of the pure virtuals against a DtScenarioManager and registers the necessary message callbacks. This is the class an application instantiates.

vrfcontrol/spotReportPerspectiveInterface.h defines DtSpotReportPerspectiveInterface, the base class for a filtered view. A subclass implements the pure virtual accept(const DtSpotReport*) and is registered with the manager through the REGISTER_PERSPECTIVE macro (or REGISTER_PERSPECTIVE_OVERRIDE when deriving from an existing perspective). The interface provides refresh, flushData, handlerFor, spotReportHandlersByContact, and the signals signal_reportsUpdated and signal_handlerAboutToBeRemoved. The companion DtSpotReportPerspectiveCreatorInterface is the factory the macros generate.

Two concrete perspectives ship with the library. DtSpotReportByForcePerspective (vrfcontrol/spotReportByForcePerspective.h) accepts reports whose spotter belongs to one of a configured set of force types. DtSpotReportByForceAndUuidPerspective (vrfcontrol/spotReportByForceAndUuidPerspective.h) extends that with a set of accepted spotter UUIDs, an setAcceptAll override, and subordinate expansion via addAcceptableUuidWithSubordinates combined with setSubordinateResolver.

vrfcontrol/subordinateResolver.h defines the small abstract interface that the second perspective uses to walk command hierarchies:

{
public:
virtual ~DtSubordinateResolver() = default;
virtual bool isSubordinate(const DtUUID& childUuid, const DtUUID& rootUuid) const = 0;
};

Current task tracking

vrfcontrol/currentTaskManager.h defines DtCurrentTaskManager, which tracks the tasks and scripted sets currently running on simulation objects. Task state is reported through the nested TaskInformation structure, which carries the task or set, its subtasks, its status, the controller that owns it, and any conflicting task types.

Subscription is per object: subscribeForTaskInformation and unsubscribeForTaskInformation start and stop continuous updates, requestCurrentTasksFor performs a one-shot query for a single object or a batch, and tasksFor returns the cached EntityTaskInformation. Batched requests complete with signal_allRequestsReceived; individual changes raise signal_currentTaskChanged. One-shot requests may also supply a DtRequestTaskCallbackFcn (a std::function<void(DtUUID, const EntityTaskInformation&)>) invoked per object.

DtCurrentTaskManager declares sendMessage(const DtAdminMessage&) as a pure virtual. vrfcontrol/remoteControlCurrentTaskManager.h provides DtRemoteControlCurrentTaskManager, the concrete remote control implementation bound to a DtScenarioManager.

DtRemoteControlScriptedTaskManager

vrfcontrol/remoteControlScriptedTaskManager.h brings scripted task metadata management into the remote control API. The class tracks scenario-level and system-level scripts as a ScenarioSystemPair keyed by script id, together with action categories, doctrines, and per-force doctrine assignments.

Scripts are loaded from simulation model set directories with loadScripts, and the back-end is queried with requestScriptedTasks. Metadata is retrieved with the overload set scriptedTaskMetaData, which accepts DtSimTaskMessageType, DtSetMessageType, DtGenericMessageType, or a plain std::string, with and without an explicit system/scenario flag. Applicability queries include scriptedTasksValidFor, scriptedSetsValidFor, reactiveTasksValidFor, backgroundProcessesValidFor, and scriptsValidFor. Script error and modification state is exposed through scriptHasError, assignScriptError, clearScriptError, scriptIsModified, setScriptModified, and hasModifiedScripts.

Requesting metadata for an unknown script id throws the nested DtRemoteControlScriptedTaskManager::ScriptedTaskManagerException, which derives from DtException. Call setNoScriptedTaskMetaDataThrowsException(false) to receive an empty metadata object instead.

The class publishes a broad set of signals: signal_scriptedTaskAdded, signal_scriptedTaskAboutToBeRemoved, signal_scriptedTaskManagerAboutToChange, signal_receivedScriptedTasks, signal_scriptIdChanged, signal_doctrinesReceived, signal_assignedDoctrineChanged, signal_scriptSaveError, signal_scriptErrorChange, signal_scriptModified, and signal_scriptModifiedCleared.

Resource monitoring

Two headers cover consumable and equipment resources.

vrfcontrol/remoteControlResourceManager.h defines DtRemoteControlResourceManager, the shared subscription point. It provides requestResourcesFor for one-shot queries, startMonitoring and stopMonitoring for reference-counted continuous monitoring, and setUpdateRate/updateRateFor for per-entity update rates, with responses delivered through signal_resourceResponse.

vrfcontrol/remoteControlResourceRequestor.h defines DtRemoteControlResourceRequestor, an abstract helper intended for inheritance by a component that displays or consumes resource data. It manages the subscription bookkeeping on the caller's behalf and delivers results through five pure virtuals that the subclass implements: resourcesChanged, resourceCheckingDisabled, addResource, resourceCheckComplete, and resourceUpdated. canSetResources reports whether the monitored objects share enough common resources to be set as a group.

DtRemoteControlModelSetManager

vrfcontrol/remoteControlModelSetManager.h exposes simulation model set metadata to the remote control application. It tracks the loaded model set as the session status changes and provides dictionary (the SISO/VR-Forces enumeration dictionary), parameterDatabase (the SMS parameter database), modelSet, and rollUpRules (the aggregate roll-up rules read from the SMS files, which replaces the removed makVrf::DtAggregateRollUpManager).

Per-entity capability requestors

The remaining additions follow a single, consistent pattern. Each is a DtVrfSingleton constructed from a DtScenarioManager, each caches back-end responses per entity, each exposes an update/request method that issues the query and a getter that reads the cache, and each raises a boost::signals2 signal when a response arrives. None of them block.

Header Class Query Read Signal
remoteControlWeaponListRequestor.h DtRemoteControlWeaponListRequestor updateWeaponSystems weaponSystemsForEntity, weaponSystems signal_weaponListReceived
remoteControlSystemListRequestor.h DtRemoteControlSystemListRequestor updateSystems systemsForEntityType, systems signal_systemListReceived, signal_systemListAndStateReceived
remoteControlFormationRequestor.h DtRemoteControlFormationRequestor updateAvailableFormations formationsFor signal_formationsReceived
remoteControlNavigationPreferencesRequestor.h DtRemoteControlNavigationPreferencesRequestor updateAvailablePreferences preferencesFor signal_preferencesReceived
remoteControlEmbarkationSlotInformationRequestor.h DtRemoteControlEmbarkationSlotInformationRequestor queryEmbarkationInfoFor embarkationSlotsFor signal_embarkationInfoReceived
remoteControlSensorInfoRequestor.h DtRemoteControlSensorInfoRequestor startMonitoring, stopMonitoring sensorInfoFor signal_contactInfoReceived

DtRemoteControlSensorInfoRequestor also introduces the plain data types DtSensorInformation and DtSensorContactInformation, and DtRemoteControlNavigationPreferencesRequestor introduces the nested DtNavigationPrefernceDataRecord, which is also available through a global typedef of the same name.

Emitter mode requestors

DtRemoteControlEmitterModesRequestor (vrfcontrol/remoteControlEmitterModesRequestor.h) is the common base for emitters that expose selectable modes. It caches emitter names, ids, available modes, and the current mode per entity, and provides currentModeFor, emitterNameFor, emitterIdsFor, modesFor, hasModesFor, hasEmitterFor, and the group intersection helpers groupIdsAndModes and groupModes. Responses raise signal_modesReceived. The class declares requestModes(const DtUUID&) as a pure virtual; it issues no requests itself.

Three concrete subclasses implement requestModes for their respective emitter families, each also a singleton with an Instance(DtScenarioManager&) accessor:

The GUI-layer requestors of the same purpose now derive from these classes, so an application that links both layers shares a single cache.

DtVrfRemoteController terrain intersection

A new asynchronous terrain intersection query was added, along with its callback type and request record:

(bool intersectionResult, const DtVector& intersectionPoint, void* usr);
{
DtTerrainIntersectCallbackFcn myCallback = nullptr;
void* myUserData = nullptr;
};
virtual bool terrainIntersection(const DtVector& worldStart, const DtVector& worldEnd,

Start and end points are geocentric. The result is delivered to the callback when the back-end responds; the return value only indicates whether the request was sent. The protected terrainIntersectResponseCb and processTerrainIntersectResponse hooks are available for subclasses that need to alter response handling.

DtVrfRemoteController scenario checkpoint methods

Named checkpoints can now be loaded and saved:

virtual void loadScenarioCheckpoint(const DtString& checkpointName, const DtString& runId,
double simTime);
virtual bool saveScenarioCheckpoint(const DtFilename& filename, const DtString& checkpointName,
const DtString& runId, double simTime, bool saveToZip = false, DtString* saveError = 0);

loadScenarioCheckpoint searches all back-ends for the named checkpoint. If runId is empty, the most recent run by date is used in every back-end that holds a checkpoint of that name. The existing saveScenarioCheckpoint overload without a checkpoint name is unchanged and continues to save an in-memory snapshot.

DtVrfRemoteController::runUntil

A new execution control method advances the scenario to a specific simulation time:

virtual void runUntil(double) const;

It sits alongside the existing step, setTimeMultiplier, and exit controls.

DtVrfBackendListener state queries

Three query methods were added:

virtual bool anyBackendsLoaded() const;
virtual bool anyBackendsPlaying() const;
virtual double simTime() const;

anyBackendsLoaded and anyBackendsPlaying complement the existing allBackendsLoaded and allBackendsCanSimulate. simTime returns the simulation time reported by the simulating back-ends, or 0 when none are simulating.

Note also a behavior change in doTimeouts: a negative timeout interval now disables back-end timeouts entirely rather than expiring every status object immediately.

DtRemoteEnvironmentController date and time dead reckoning

The environment controller can now dead reckon the scenario date and time of day between updates from the back-end:

virtual void setDeadReckonDateAndTimeOfDay(bool b);

The default is off, preserving the 5.2 behavior. The protected hooks initializeDateTimeOfDay and deadReckonDateAndTimeOfDay are available to subclasses that need to change the interpolation.

Summary of Header Changes

Header Breaking Additions
backendSelectorManager.h scenarioStatusChangedCallback takes DtSessionUpdateInformation None
remoteEnvironmentController.h globalEnvironment return type; myGlobalWeatherSR renamed and retyped setDeadReckonDateAndTimeOfDay
vrfBackendListener.h DtSessionStatusChangedCallbackFcn retargeted to DtSessionUpdateInformation; updateSessionStatus gained a parameter DtSessionUpdateInformation; anyBackendsLoaded; anyBackendsPlaying; simTime
vrfRemoteController.h TDL interface removed (vrfTDLMessageInterface, createOrSetVrfTDLMessageInterface, setTDLMessagesGloballyEnabled, requestSendTDLMessages, init parameter); groundClamp replaced by altitude-above-terrain pair in createEntity and sendVrfObjectCreateMsg; save/close signature changes; setRandomNumberSeed removed; myScenarioRunId retyped terrainIntersection and DtTerrainIntersectCallbackFcn; loadScenarioCheckpoint; named saveScenarioCheckpoint; runUntil; createOverlayObject altitude parameters

Return to VR-Forces 5.3 API Migration Guide.

[Home]


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)