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

Table of Contents

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

The library defines the event classes that VR-Forces applications exchange over the network, the managers that route them, and the database event logging interfaces. The changes in 5.3 fall into four groups: the collision event was restructured to carry the full contents of a DIS collision, two new event types were added, the database logger switched its scenario run identifier from an integer to a UUID, and the internal Tactical Data Link message interface was removed.

It covers the following public headers:

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

Breaking Changes

DtCollisionEvent was restructured

DtCollisionEvent previously carried only the identifier of the entity that was collided with and the collision point in entity coordinates. In 5.3 it carries the full set of fields defined for a DIS collision: both participating entities, the event identifier, the collision type, the velocity and mass of the issuing entity, and the collision point. The accessor that named the single participant was ambiguous once both participants were present, so it was renamed.

5.2 declaration 5.3 declaration
const DtUUID& collideId() const const DtUUID& collidingEntityId() const
void setCollideId(const DtUUID&) void setCollidingEntityId(const DtUUID&)
DtUUID myCollideId (protected) DtUUID myCollidingEntityId (protected)

The convenience constructor was removed. Construct the event with the default constructor and set the fields individually:

// 5.2
makVrfEvents::DtCollisionEvent event(collidedWithId, collisionPoint);
// 5.3
event.setCollidingEntityId(collidedWithId);
event.setEntityCoords(collisionPoint);

Code that reads a received collision event must be updated to use collidingEntityId(). Because the issuing entity is now carried explicitly, code that previously inferred the other participant from the sender of the event should read it from issuingEntityId() instead.

The parameter name of setEntityCoords changed from velocity to coords. This has no effect on callers, but note that the velocity of the issuing entity is now a separate field accessed through velocity() and setVelocity(); code that was storing a velocity in setEntityCoords because no other field existed must move it to setVelocity.

collisionEvent.h now includes <vlpi/disEnums.h> for the DtCollisionType enumeration used by collisionType() and setCollisionType().

DtCommunicationManager::setUsePerfCounter was removed

The following virtual method was removed from DtCommunicationManager:

virtual void setUsePerfCounter(bool);

There is no replacement. The clock created by the communication manager selects its time source internally. Classes that derived from DtCommunicationManager and overrode this method must remove the override, and call sites must remove the call.

DtCommunicationManager::reserve is a high-water mark, not a cumulative total

The signature of virtual void reserve(unsigned int) is unchanged, but the documented contract was corrected. In 5.2 the method was described as cumulative, so that two successive calls with 1000 reserved capacity for 2000 objects. The state data manager in fact treats the argument as a high-water mark: it grows to accommodate the largest single request seen so far, and a repeated call with the same or a smaller value does nothing. Code that relied on the cumulative description and issued incremental reservations must be changed to pass the total capacity required:

// 5.2 usage that relied on accumulation
commMgr->reserve(1000);
commMgr->reserve(1000); // expected 2000 total
// 5.3
commMgr->reserve(2000);

The method is not thread safe. Individual network interface implementations may apply their own reservation semantics in addition to the state data manager.

Database scenario run identifier changed from int to DtUUID

The scenario run identifier that links all database events from a single run is now a DtUUID rather than an int. This changes a virtual function signature, a protected member, and the schema of every default database table that records the identifier.

// 5.2
virtual void setScenarioLoadInformation(int runId, const DtFilename& scenarioName, DtTime simTime);
// 5.3
virtual void setScenarioLoadInformation(const DtUUID& runId, const DtFilename& scenarioName,
DtTime simTime);

The change applies to both DtVrfDatabaseLoggerInterface and the DtVrfDatabaseLogger override. Any class that derives from either and overrides setScenarioLoadInformation must change its signature, or the override will no longer bind and the base implementation will be called instead.

The protected member DtVrfDatabaseLoggerInterface::myRunId changed type from int to DtUUID. Derived classes that read or assign it must be updated.

In vrfDefaultDatabaseEvents.h, every scenarioRunId parameter changed from intParam to uuidParam. This affects the ScenarioRun, Fire, Detonation, Object, Engagement, EngagementAttack, EngagementDefense, EngagementCasualtyReport, and EngagementDamageReport table prototypes. Custom event prototypes that add a scenarioRunId column to join against these tables must use uuidParam as well:

// 5.2
.addParameter("scenarioRunId", intParam, DtVrfDatabaseEvent::PrimaryKey)
// 5.3
.addParameter("scenarioRunId", uuidParam, DtVrfDatabaseEvent::PrimaryKey)

Databases created by 5.2 are not schema-compatible with 5.3 for these tables. Applications that query the logged data must treat scenarioRunId as a string-formatted UUID rather than an integer.

Database column widths for identifier types were narrowed

The paramType specializations in vrfDatabaseEventParam.inl now emit narrower column declarations. These specializations determine the DDL generated for a table, so existing databases and any external tooling that assumes the previous widths are affected.

Parameter type 5.2 column type 5.3 column type
DtEntityIdentifier VARCHAR(255) VARCHAR(20)
DtUUID VARCHAR(255) VARCHAR(40)
DtSimulationAddress VARCHAR(255) VARCHAR(20)

Applications that override DtTemplatedDatabaseEventParam<T>::paramType for these types are unaffected. Applications that rely on the generated schema should recreate their tables.

vrfTDLMessageInterface.h was removed

The internal Tactical Data Link subsystem was removed in 5.3. See the Removed Headers section below.

Additions

DtTransferAcknowledgeEvent

The new header vrfMsgTransport/transferAcknowledgeEvent.h defines makVrfEvents::DtTransferAcknowledgeEvent, which completes the ownership transfer handshake. It is sent in response to a transfer response and reports whether the transfer will in fact proceed.

namespace makVrfEvents
{
class DtTransferAcknowledgeEvent : public DtEvent
{
public:
DtTransferAcknowledgeEvent();
virtual ~DtTransferAcknowledgeEvent() override;
DtTransferAcknowledgeEvent(const DtTransferAcknowledgeEvent& orig);
DtTransferAcknowledgeEvent& operator=(const DtTransferAcknowledgeEvent&);
void setWillTransfer(bool);
bool willTransfer() const;
void setTransactionId(unsigned long long);
unsigned long long transactionId() const;
void setUUID(const DtUUID&);
const DtUUID& uuid() const;
virtual DtEvent* clone() const override;
};
}

The transaction identifier matches the identifier of the transfer request and response that preceded it, so a listener can correlate the acknowledgement with the transaction it initiated.

DtSoundEvent

The new header vrfMsgTransport/soundEvent.h defines makVrfEvents::DtSoundEvent, which reports a sound produced by a simulation object. The event carries the source object, the entity type describing the sound, the position of the sound relative to the source, its world location, and its loudness in decibels.

namespace makVrfEvents
{
class DtSoundEvent : public DtEvent
{
public:
DtSoundEvent();
DtSoundEvent(const DtUUID& sourceObjectIdentifier, const DtEntityType& soundType,
const DtVector& relativePosition, const DtVector& worldLocation,
const double& decibelLevel);
DtSoundEvent(const DtSoundEvent&);
DtSoundEvent& operator=(const DtSoundEvent&);
virtual const DtUUID& sourceObjectIdentifier() const;
virtual void setSourceObjectIdentifier(const DtUUID& id);
virtual const DtEntityType& soundType() const;
virtual void setSoundType(const DtEntityType& t);
virtual const DtVector& relativePosition() const;
virtual void setRelativePosition(const DtVector& position);
virtual const DtVector& worldLocation() const;
virtual void setWorldLocation(const DtVector& location);
virtual double decibelLevel() const;
virtual void setDecibelLevel(double level);
virtual DtEvent* clone() const override;
};
}

New event type identifiers

Two enumerators were added to makVrfEvents::DtEvent::EventType. The existing enumerators and the value of UserEvent are unchanged, so no existing identifier was renumbered.

Enumerator Value Class
TransferAcknowledgeEvent 36 DtTransferAcknowledgeEvent
SoundEvent 37 DtSoundEvent

No event type identifiers were removed.

Applications that define their own event types starting at UserEvent (128) are unaffected. Applications that hard-coded a numeric value above 35 for a custom event type instead of basing it on UserEvent will now collide with these identifiers and must be renumbered.

DtEventManager signals for the new event types

Two signal accessors were added to DtEventManager, following the existing pattern:

EventSignal& signalForTransferAcknowledgeEvent();
EventSignal& signalForSoundEvent();

Note that vrfMsgTransport/events.h was not updated to include the two new headers. Code that relies on events.h to pull in every event class must include vrfMsgTransport/soundEvent.h and vrfMsgTransport/transferAcknowledgeEvent.h directly.

DtSensorFieldOfViewControlEvent power state

The sensor field of view control event can now carry the power state of the sensor:

virtual void setPowerOn(bool val);
bool powerOn() const;

A protected member bool myPowerOn was added alongside the existing state. Derived classes that define a member with the same name must rename it.

DtVrfDatabaseEvent::HitZoneDamageEvent

A new database event type was added to DtVrfDatabaseEvent::EventType:

Enumerator Value Table
HitZoneDamageEvent 18 HitZoneDamage

The value is below the UserEvent (500) base, so user-defined event types are unaffected. The corresponding table name and prototype are registered in vrfDefaultDatabaseEvents.h as theHitZoneDamageTableName and theHitZoneDamagePrototype. The table records the event identifier, the damaged object UUID, the hit zone function and number, the munition type, whether the hit was direct, and the resulting damage state.

percentDamaged column on the Damage table

theDamagePrototype gained a parameter:

.addParameter("percentDamaged", doubleParam);

It records the percentage of damage an entity has taken when the entity uses a multi-hit damage system. Applications that query the Damage table with an explicit column list are unaffected; applications that assume a fixed column count must be updated.

Removed Headers

Header Replacement
vrfMsgTransport/vrfTDLMessageInterface.h None

vrfTDLMessageInterface.h declared DtVrfTDLMessageInterface, the transport that sent Tactical Data Link messages as data interactions over a VR-Link exercise connection, together with the DtVrfTDLMessageCallbackFcn and DtVrfTDLMessageInterfaceCreatorFcn function pointer typedefs. It was part of the internal Tactical Data Link subsystem, which was removed in its entirety in 5.3. There is no replacement class. Applications that sent or received TDL messages through this interface must implement the equivalent behavior directly on top of makVrfEvents::DtDataEvent and DtCommunicationManager, or use DtVrfMessageInterface for application-defined message traffic.

Summary of Header Changes

Header Breaking Additions
collisionEvent.h Convenience constructor removed; collideId/setCollideId renamed; protected member renamed issuingEntityId, eventId, collisionType, velocity, mass accessors
communicationManager.h setUsePerfCounter removed; reserve contract corrected None
event.h None TransferAcknowledgeEvent and SoundEvent enumerators
eventManager.h None signalForTransferAcknowledgeEvent, signalForSoundEvent
sensorFieldOfViewControlEvent.h None setPowerOn, powerOn
soundEvent.h None New header: DtSoundEvent
transferAcknowledgeEvent.h None New header: DtTransferAcknowledgeEvent
vrfDatabaseEvent.h None HitZoneDamageEvent enumerator
vrfDatabaseEventParam.inl Identifier column widths narrowed None
vrfDatabaseLogger.h setScenarioLoadInformation signature changed None
vrfDatabaseLoggerInterface.h setScenarioLoadInformation signature and myRunId type changed None
vrfDefaultDatabaseEvents.h scenarioRunId changed from intParam to uuidParam in nine tables HitZoneDamage table; percentDamaged column on Damage
vrfTDLMessageInterface.h Header removed, no replacement None

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)