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

Table of Contents

This document describes the public API changes in the vrftasks library between VR-Forces 5.2 and VR-Forces 5.3.

The vrftasks library defines the task, set-data request, report, and admin content classes that are exchanged over the simulation control protocol, so changes here affect remote control applications, plug-ins, and any code that constructs or interprets VR-Forces messages.

The 5.3 release adds hit zone targeting parameters to the weapon tasks, generalizes the sensor aiming request into an aimable system request that also serves search lights and laser lights, adds sound playback and sound query messages, and removes the Tactical Data Link messaging request along with the rest of the internal TDL subsystem.

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

Breaking Changes

DtSetAimSensorRequest was generalized into an aimable system request

DtSetAimSensorRequest no longer models a sensor field of view specifically. It now models any aimable system, which allows the new search light and laser light requests to derive from it. The header it pulls in, the enumeration type it uses, and two of its accessors were renamed accordingly.

The included header changed from vrfExtObjects/sensorFieldOfViewEnums.h to vrfExtObjects/aimableSystemEnums.h. Code that relied on setAimSensorRequest.h to transitively provide the sensor field of view enumerations must include the enumeration header it needs directly.

5.2 declaration 5.3 declaration
DtSensorTrackingMode aimingMode() const DtAimableSystemTrackingMode aimingMode() const
void setAimingMode(DtSensorTrackingMode) void setAimingMode(DtAimableSystemTrackingMode)
DtString sensorFieldOfViewId() const DtString aimableSystemId() const
void setSensorFieldOfViewId(const DtString&) void setAimableSystemId(const DtString&)
// 5.2
DtSensorTrackingMode mode = request.aimingMode();
request.setSensorFieldOfViewId("eo-sensor-1");
// 5.3
request.setAimableSystemId("eo-sensor-1");

The enumerators of DtAimableSystemTrackingMode are declared in vrfExtObjects/aimableSystemEnums.h; consult that header for the current names.

The rename affects classes that derive from DtSetAimSensorRequest and override these virtual methods; an override that still declares a DtSensorTrackingMode parameter no longer overrides the base method. The aimingPoint, objectToTrack, aimingAzimuth, and aimingElevation accessors are unchanged. The protected reader/writer members were reordered and mySensorFieldOfViewId was renamed to myAimableSystemId, which affects derived classes that reference them directly.

DtSetLocationRequest::keepGroundClamped was replaced by explicit altitude controls

The single ground clamp flag proved ambiguous and was replaced by a set of independent altitude controls. keepGroundClamped() was removed outright. setKeepGroundClamped(bool) was retained only as an inline forwarding call to the new setter, so existing code that sets the flag still compiles, but code that reads it does not.

// 5.2
virtual void setKeepGroundClamped(bool);
virtual bool keepGroundClamped() const;
// 5.3
virtual void setKeepGroundClamped(bool b) { setKeepCurrentAltitudeAboveTerrain(b); }
virtual void setKeepCurrentAltitudeAboveTerrain(bool b);
virtual bool keepCurrentAltitudeAboveTerrain() const;
virtual void setKeepCurrentAltitude(bool);
virtual bool keepCurrentAltitude() const;
virtual void setUseAltitudeAboveTerrain(bool);
virtual bool useAltitudeAboveTerrain() const;
virtual void setAltitudeAboveTerrain(double);
virtual double altitudeAboveTerrain() const;

Replace calls to keepGroundClamped() with keepCurrentAltitudeAboveTerrain(). Note that the meaning of the flag changed: in 5.2 it clamped the object to the ground, while in 5.3 it preserves the object's current altitude above the terrain. To place an object at a specific height above the terrain, call setUseAltitudeAboveTerrain(true) together with setAltitudeAboveTerrain. To hold an air vehicle at its current absolute altitude, call setKeepCurrentAltitude(true).

The protected member myKeepGroundClamped was removed and replaced by myAltitudeAboveTerrain, myClampAboveTerrain, myKeepCurrentAltitudeAboveTerrain, and myKeepCurrentAltitude.

setNavigationPreference.h navigation preference constants were removed

The four file-scope string constants that named the built-in navigation preferences were removed from the header:

// removed in 5.3
const char DtNavigationPreferenceRoadsAvoid[] = "avoid-roads";
const char DtNavigationPreferenceRoadsPrefer[] = "prefer-roads";
const char DtNavigationPreferenceRoadsIgnore[] = "ignore-roads";
const char DtNavigationPreferencePathsIgnore[] = "ignore-paths";

There is no replacement symbol. DtSetNavigationPreference::setNavigationPreference takes an arbitrary DtString whose value must match one of the preference strings declared in the component descriptor in the system definition file, which allows sites to define their own preferences. Code that used the constants should pass the equivalent string literal, or better, read the permitted values from the system definition rather than hard-coding them.

// 5.2
request.setNavigationPreference(DtNavigationPreferenceRoadsPrefer);
// 5.3
request.setNavigationPreference("prefer-roads");

DtSystemListResponseAdmin::addSystem requires a hit zone identifier

The system list response now reports which hit zone each component system is associated with, so addSystem gained a fourth parameter. There is no default argument, so every call site must be updated.

// 5.2
virtual void addSystem(const DtString& name, const DtString& printableName,
const bool& enabledDisabled);
// 5.3
virtual void addSystem(const DtString& name, const DtString& printableName,
const bool& enabledDisabled, const DtHitZoneId& zoneId);

DtHitZoneId is declared in vrfutil/hitZoneId.h, which systemListResponseAdmin.h now includes. It pairs a zone function with a zone number and packs into an int. Pass a default-constructed DtHitZoneId when the system is not associated with a hit zone.

The ComponentSystem structure gained a public int myHitZoneId member that holds the packed identifier. Code that aggregate-initializes ComponentSystem must supply the additional member.

DtSetAutoLaunchEnabledRequest no longer has any effect

The class and its accessors are unchanged and code that uses it still compiles, but automatic countermeasure launching is now driven by the Evade_Missile reactive task. DtSetAutoLaunchEnabledRequest is retained only so that scenarios authored against 5.2 continue to load; sending it does not change entity behavior. Replace its use with the reactive task.

DtSetTDLMessagingType was removed from radioMessageTypes.h

The set message type constant for Tactical Data Link messaging was removed along with the request class:

// removed in 5.3
const DtSetMessageType DtSetTDLMessagingType("tdl-messaging-request");

See Removed Headers below.

Additions

Hit zone targeting on the weapon tasks

The weapon tasks can now name the hit zone function that the shot should be directed at, which lets a task target a specific subsystem of an entity rather than the entity as a whole. The same pair of accessors was added to four tasks:

virtual DtU8 hitZoneFunction() const;
virtual void setHitZoneFunction(DtU8 zoneFunction);
Header Class
fireBallisticGunTask.h DtFireBallisticGunTask
fireCruiseMissileTask.h DtFireCruiseMissileTask
fireForEffectOnTargetTask.h DtFireForEffectOnTargetTask
fireMissileLauncherTask.h DtFireMissileLauncherTask

The zone function values are the DtHitZoneFunction... constants declared in vrfutil/hitZoneId.h: DtHitZoneFunctionUnspecified, DtHitZoneFunctionWeapon, DtHitZoneFunctionSensor, DtHitZoneFunctionMovement, and DtHitZoneFunctionAny.

DtSetHitZoneStatusRequest

The new header vrftasks/setHitZoneStatusRequest.h defines DtSetHitZoneStatusRequest, a DtSetDataRequest that sets the damage state of an individual hit zone. Its message type is DtSetHitZoneStatusType.

virtual DtHitZoneId zoneId() const;
virtual void setZoneId(DtHitZoneId zoneId);
virtual bool damagedStatus() const;
virtual void setDamagedStatus(bool damaged);

It follows the standard request construction pattern: a default constructor, a constructor taking a write name and an optional DtReaderWriterRegistry*, a copy constructor of the same shape, and a static creator().

Ammunition selection on DtFireBallisticGunTask

The ballistic gun task can now specify the munition to fire, overriding the controller's default selection:

virtual void setAmmoType(const DtEntityType& ammoType);
virtual const DtEntityType& ammoType() const;
virtual bool ammoTypeSpecified() const;

Fire for effect altitude and structure options

DtFireForEffectTask gained two options that control how the impact altitude is computed:

virtual void setApplyHeightAboveTerrain(bool);
virtual bool applyHeightAboveTerrain() const;
virtual void setAllowTargetInsideStructure(bool);
virtual bool allowTargetInsideStructure() const;

applyHeightAboveTerrain gates the existing heightAboveTerrain value, and allowTargetInsideStructure permits an aim point that falls inside a structure.

DtLaunchExpendableResourceTask target type

The expendable resource type is now optional. When it is not set, the task can instead name the type of the threat being defended against, and the controller chooses a suitable expendable:

virtual const DtEntityType& targetType() const;
virtual void setTargetType(const DtEntityType& targType);

Aiming point on the follow tasks

DtFollowEntityTask gained an optional aiming reference, which is either a geocentric point or an entity whose location is resolved each tick:

virtual const DtRwLocationReference& aimingPoint() const;
virtual void setAimingPoint(const DtRwLocationReference& point);
virtual bool aimingPointSpecified() const;
virtual void clearAimingPoint();

DtAbsoluteFollowEntityTask

The new header vrftasks/absoluteFollowEntityTask.h defines DtAbsoluteFollowEntityTask, a DtSimTask that follows an entity at a fixed world-frame offset rather than an offset expressed in the followed entity's body frame. Its message type is DtAbsoluteFollowEntityTaskType.

task.setEntityToFollow(leadEntity);
task.setAbsoluteBearing(bearingRadiansFromTrueNorth);
task.setRelativeAltitude(100.0);
task.setAimingPoint(aimPoint);

The offset accessors are entityToFollow, absoluteBearing (radians clockwise from true north), horizontalDistance (meters), and relativeAltitude (meters above the followed entity). It carries the same optional aimingPoint reference as DtFollowEntityTask.

DtOrbitTask relative altitude

The orbit task can now hold an altitude offset relative to the orbit center or orbited object:

virtual void setRelativeAltitude(double relativeAltitude);
virtual double relativeAltitude() const;

The convenience constructor gained a corresponding trailing parameter with a default value, so existing calls compile unchanged:

// 5.2
DtOrbitTask(const DtVector& newCenter, const DtUUID& entity, double newRadius, bool isClockwise);
// 5.3
DtOrbitTask(const DtVector& newCenter, const DtUUID& entity, double newRadius, bool isClockwise,
double relativeAltitude = 0.0);

DtSetAimSearchLightRequest and DtSetAimLaserLightRequest

Two new requests derive from DtSetAimSensorRequest and reuse its aiming point, tracked object, azimuth, elevation, aiming mode, aimable system ID, and power state parameters.

vrftasks/setAimSearchLightRequest.h defines DtSetAimSearchLightRequest, whose message type is DtSetAimSearchLightType, and which adds:

virtual double intensity() const;
virtual void setIntensity(double intensity);
virtual double coneAngle() const;
virtual void setConeAngle(double coneAngle);

vrftasks/setAimLaserLightRequest.h defines DtSetAimLaserLightRequest, whose message type is DtSetAimLaserLightType, and which adds:

virtual double spread() const;
virtual void setSpread(double spread);
virtual double wavelength() const;
virtual void setWavelength(double wavelength);
virtual int signal() const;
virtual void setSignal(int type);

DtSetTerrainAvoidanceRequest

The new header vrftasks/setTerrainAvoidanceRequest.h defines DtSetTerrainAvoidanceRequest, which enables or disables terrain avoidance on a rotary-wing pilot or any other component registered for DtSetTerrainAvoidanceType:

virtual bool terrainAvoidanceEnabled() const;
virtual void setTerrainAvoidanceEnabled(bool enabled);

DtSetSignalFlagsRequest

The new header vrftasks/setSignalFlagsRequest.h defines DtSetSignalFlagsRequest, which sets the signal flags flown by a vessel. Flags are organized as a list of halyards, each holding several flags, represented by DtRwNavigationSignalFlagVectorList from vrfutil/rwNavigationSignalFlagVector.h. Its message type is DtSetSignalFlagsType.

virtual const DtRwNavigationSignalFlagVectorList& signalFlags() const;
virtual void setSignalFlags(const DtRwNavigationSignalFlagVectorList& flags);

Additional surface vessel lights

DtSetSurfaceVesselLightingRequest gained four light groups, each with the same getter, setter, and specified-predicate triple used by the existing light groups:

Light group Accessors
Aground agroundLightsOn, setAgroundLightsOn, agroundLightsOnSpecified
Constrained by draft constrainedByDraftLightsOn, setConstrainedByDraftLightsOn, constrainedByDraftLightsOnSpecified
Man overboard operation mobOperationLightsOn, setMobOperationLightsOn, mobOperationLightsOnSpecified
Signal signalLightsOn, setSignalLightsOn, signalLightsOnSpecified

Sound playback and sound queries

vrftasks/playSoundTask.h defines DtPlaySoundTask, a DtSimTask that plays a sound on an entity. Its message type is DtPlaySoundTaskType and the sound is identified by a DIS/RPR entity type enumeration:

virtual const DtEntityType& soundType() const;
virtual void setSoundType(const DtEntityType& type);

vrftasks/soundListRequestAdmin.h defines DtSoundListRequestAdmin, an admin content with no payload that queries the sounds available on an entity. Its message type is DtRequestSoundListAdminType.

vrftasks/soundListResponseAdmin.h defines DtSoundListResponseAdmin, the corresponding response, whose message type is DtSoundListResponseAdminType. The header also declares two supporting typedefs:

typedef std::list<DtRwSoundType> DtSoundTypeList;

The response exposes the list directly through const and non-const soundTypes() accessors, plus addSoundType(const DtRwSoundType&) and clearSoundTypes().

Notify level query

vrftasks/requestNotifyLevelAdmin.h defines the functor DtRequestNotifyLevelAdminTypeFunctor and the typedef DtRequestNotifyLevelAdmin, which is a DtNoDataAdminContent specialization that asks for an entity's current notify level. Its message type is DtRequestNotifyLevelAdminType.

vrftasks/requestNotifyLevelResponseAdmin.h defines DtRequestNotifyLevelResponseAdmin, the corresponding DtAdminContent response, whose message type is DtRequestNotifyLevelResponseAdminType:

virtual void setNotifyLevel(int);
virtual int notifyLevel() const;

DtSpotReport comparison, sender, and SIDC

DtSpotReport gained equality operators, so reports can be compared directly rather than field by field:

bool operator==(const DtSpotReport&) const;
bool operator!=(const DtSpotReport& rhs) const;

It also gained the sending simulation address and the perceived symbol identification code of the contact:

virtual void setSender(const DtSimulationAddress&);
virtual const DtSimulationAddress& sender() const;
virtual void setContactSidc(const DtString& type);
virtual DtString contactSidc() const;

The protected member mySender was added. Note that mySender is a plain DtSimulationAddress rather than a reader/writer member.

DtSetSpotReportingRequestEnableToGuiIfOff

setSpotReportingRequest.h declares a fourth spot reporting mode constant:

When effective reporting is currently disabled, this mode enables reporting and routes reports only to the GUI, preserving the existing reporting and receiver settings. The normal receiver fields of the request are ignored in this mode. The existing constants DtSetSpotReportingRequestOff, DtSetSpotReportingRequestOn, and DtSetSpotReportingRequestUseGlobalSetting are unchanged.

DtScriptedTaskTask::setValue overload for entity type lists

A new overload accepts a vector of entity types, which allows a scripted task parameter to carry a list of munition or platform types:

virtual void setValue(const DtString& variableName, const std::vector<DtEntityType>&);

New message type constants

radioMessageTypes.h declares the following identifiers for the new messages described above, plus DtSetSidcSetType, which names the scripted set that assigns a symbol identification code.

Constant Kind Wire name
DtRequestNotifyLevelAdminType DtAdminContentMessageType notify-level-request
DtRequestNotifyLevelResponseAdminType DtAdminContentMessageType notify-level-response
DtRequestSoundListAdminType DtAdminContentMessageType sound-list-request
DtSoundListResponseAdminType DtAdminContentMessageType sound-list-response
DtSetSignalFlagsType DtSetMessageType set-signal-flags
DtSetAimSearchLightType DtSetMessageType set-aim-search-light
DtSetAimLaserLightType DtSetMessageType set-aim-laser-light
DtSetTerrainAvoidanceType DtSetMessageType set-terrain-avoidance
DtSetHitZoneStatusType DtSetMessageType set-hit-zone-status
DtSetSidcSetType DtSimTaskMessageType set_sidc
DtAbsoluteFollowEntityTaskType DtSimTaskMessageType absolute-follow-entity
DtPlaySoundTaskType DtSimTaskMessageType play-sound-task

The following identifier was removed:

Constant Kind Wire name
DtSetTDLMessagingType DtSetMessageType tdl-messaging-request

Removed Headers

vrftasks/setTDLMessagingRequest.h

The header and the DtSetTDLMessagingRequest class it declared were removed together with the internal Tactical Data Link subsystem. The associated message type constant DtSetTDLMessagingType was removed from radioMessageTypes.h at the same time.

There is no replacement. Applications that sent TDL messaging requests must implement the equivalent data link behavior themselves, either as a plug-in that defines its own set data request type or by using DtSetTargetRequest and the standard engagement messages where those are sufficient. The \link tdlmessagesim TDL Message Sim \endlink example that demonstrated the request was removed as well.

Summary of Header Changes

Header Breaking Additions
absoluteFollowEntityTask.h None New header; DtAbsoluteFollowEntityTask
fireBallisticGunTask.h None hitZoneFunction; ammoType
fireCruiseMissileTask.h None hitZoneFunction
fireForEffectOnTargetTask.h None hitZoneFunction
fireForEffectTask.h None applyHeightAboveTerrain; allowTargetInsideStructure
fireMissileLauncherTask.h None hitZoneFunction
followEntityTask.h None aimingPoint
launchExpendableResourceTask.h None targetType
orbitTask.h None relativeAltitude; constructor default argument
playSoundTask.h None New header; DtPlaySoundTask
radioMessageTypes.h DtSetTDLMessagingType removed Twelve new message type constants
requestNotifyLevelAdmin.h None New header; DtRequestNotifyLevelAdmin
requestNotifyLevelResponseAdmin.h None New header; DtRequestNotifyLevelResponseAdmin
scriptedTaskTask.h None setValue overload for std::vector<DtEntityType>
setAimLaserLightRequest.h None New header; DtSetAimLaserLightRequest
setAimSearchLightRequest.h None New header; DtSetAimSearchLightRequest
setAimSensorRequest.h Tracking mode type and aimable system ID accessors renamed; enum header changed objectToTrackRelativeOffset; powerOn
setAutoLaunchEnabledRequest.h Deprecated; no longer affects behavior None
setHitZoneStatusRequest.h None New header; DtSetHitZoneStatusRequest
setLocationRequest.h keepGroundClamped removed keepCurrentAltitudeAboveTerrain; keepCurrentAltitude; useAltitudeAboveTerrain; altitudeAboveTerrain
setNavigationPreference.h Navigation preference string constants removed None
setSignalFlagsRequest.h None New header; DtSetSignalFlagsRequest
setSpotReportingRequest.h None DtSetSpotReportingRequestEnableToGuiIfOff
setSurfaceVesselLightingRequest.h None Aground, constrained by draft, man overboard, and signal light groups
setTDLMessagingRequest.h Header removed None
setTerrainAvoidanceRequest.h None New header; DtSetTerrainAvoidanceRequest
soundListRequestAdmin.h None New header; DtSoundListRequestAdmin
soundListResponseAdmin.h None New header; DtSoundListResponseAdmin; DtRwSoundType and DtSoundTypeList typedefs
spotReport.h None operator==; operator!=; sender; contactSidc
systemListResponseAdmin.h addSystem gained a required DtHitZoneId parameter ComponentSystem::myHitZoneId

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)