![]() |
VR-Forces Developer's Guide
|
Manages HLA object instance name reservations for simulation objects and their components.
The DtNameReservationManager is responsible for generating and managing unique HLA object instance names for simulation objects and their various attached components (sensors, radios, emitters, etc.). It uses a configurable naming scheme to ensure proper name reservation patterns for different object types in an HLA federation. The manager is configured by editing the file appData/settings/vrfSim/nameReservationConfig.mtl. Please see that file for details on how to configure the naming scheme and reservation patterns for different object types and components.
Classes | |
| class | NameGenerator |
| struct | ObjectReservationInfo |
Protected Types | |
| using | DtReservedNameQueue = std::queue< std::wstring > |
| using | DtReservedNameSet = std::set< std::wstring > |
Protected Member Functions | |
| void | loadNameReservationConfig (const DtFilename &configFile) |
| void | getNamesForObjectType (ObjectReservationInfo &reservations, unsigned numberToReserve, std::set< std::wstring > &names) |
| ObjectReservationInfo * | getObjectReservationInfo (const DtString &objectType) |
| virtual void | reservedNamesSucceeded (const std::set< std::wstring > &theNames) |
| virtual void | reservedNamesFailed (const std::set< std::wstring > &theNames) |
Static Protected Member Functions | |
| static void | nameSetReservationSucceededCb (const std::set< std::wstring > &nameSet, void *userData) |
| static void | nameSetReservationFailedCb (const std::set< std::wstring > &nameSet, void *userData) |
|
protected |
|
protected |
| makVrf::DtNameReservationManager::DtNameReservationManager | ( | DtVrlinkNetworkInterface * | vrlNetIf, |
| const DtFilename & | configFile = DtFilename::nullFilename() |
||
| ) |
Constructor.
| vrlNetIf | Pointer to the VRLink network interface that owns this manager |
|
virtual |
Destructor.
|
virtual |
Called every frame to tick the name reservation manager. Will reserve any pending names as needed.
|
virtual |
Ensures all configured simulation object types have the specified number of names reserved. Will reserve more names as needed.
|
virtual |
Get the HLA object instance name to use for a simulation object.
| simObject | The simulation object state data |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getSimObjectDesignator | ( | const DtStateData & | simObject | ) |
|
virtual |
Get the HLA object instance name for extended attributes object associated with a sim object.
| simObject | The simulation object state data |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getExtendedAttributesObjectDesignator | ( | const DtGlobalObjectDesignator & | simObject | ) |
|
virtual |
Get the HLA object instance name for DiGuy object associated with a sim object.
| simObject | The simulation object state data |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getDiGuyObjectDesignator | ( | const DtGlobalObjectDesignator & | simObject | ) |
|
virtual |
Get the HLA object instance name for a laser designator component.
| simObject | The parent simulation object state data |
| stateComp | The laser designator state component data |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getLaserDesignatorDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| unsigned | designatorCode | ||
| ) |
|
virtual |
Get the HLA object instance name for a sensor field of view component.
| simObject | The parent simulation object state data |
| stateComp | The sensor field of view state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getSensorFieldOfViewDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| const DtString & | sfovId | ||
| ) |
|
virtual |
Get the HLA object instance name for a radio transmitter component.
| simObject | The parent simulation object state data |
| stateComp | The radio transmitter state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getRadioTransmitterDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| unsigned | radioId | ||
| ) |
|
virtual |
Get the HLA object instance name for a nav aid component.
| simObject | The parent simulation object state data |
| stateComp | The nav aid state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getNavAidDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| unsigned | radioId | ||
| ) |
|
virtual |
Get the HLA object instance name for a radio receiver component.
| simObject | The parent simulation object state data |
| stateComp | The radio receiver state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getRadioReceiverDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| unsigned | radioId | ||
| ) |
|
virtual |
Get the HLA object instance name for a search light component.
| simObject | The parent simulation object state data |
| stateComp | The search light state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getSearchLightDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| const DtString & | searchId | ||
| ) |
|
virtual |
Get the HLA object instance name for a laser light component.
| simObject | The parent simulation object state data |
| stateComp | The laser light state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getLaserLightDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| const DtString & | laserId | ||
| ) |
|
virtual |
Get the HLA object instance name for an emitter system component.
| simObject | The parent simulation object state data |
| stateComp | The emitter system state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getEmitterDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| unsigned | emitterNumber | ||
| ) |
|
virtual |
Get the next available HLA object instance name for an emitter beam.
| emitter | The emitter system state component that owns the beam |
| beamId | The identifier for the specific emitter beam |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getEmitterBeamDesignator | ( | const DtGlobalObjectDesignator & | emitter, |
| unsigned | beamId | ||
| ) |
|
virtual |
Get the HLA object instance name for an IFF (Identification Friend or Foe) component.
| simObject | The parent simulation object state data |
| stateComp | The IFF state component |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getIffDesignator | ( | const DtGlobalObjectDesignator & | simObject | ) |
|
virtual |
Get the HLA object instance name for IFF data associated with a specific mode.
| simObject | The parent simulation object state data |
| stateComp | The IFF state component |
| mode | The IFF mode type for which to get the data object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getIffDataDesignator | ( | const DtGlobalObjectDesignator & | simObject, |
| DtModeType | mode | ||
| ) |
|
virtual |
Get the HLA object instance name for a propulsion noise component.
| simObject | The parent simulation object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getPropulsionNoiseDesignator | ( | const DtGlobalObjectDesignator & | simObject | ) |
|
virtual |
Get the HLA object instance name for an active sonar component.
| simObject | The parent simulation object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getActiveSonarDesignator | ( | const DtGlobalObjectDesignator & | simObject | ) |
|
virtual |
Get the HLA object instance name for an active sonar beam component.
| activeSonar | The parent active sonar object name |
| beamId | The identifier for the specific sonar beam |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getActiveSonarBeamDesignator | ( | const DtGlobalObjectDesignator & | activeSonar, |
| unsigned | beamId | ||
| ) |
|
virtual |
Get the HLA object instance name for an aerodrome object.
| stateData | The aerodrome state data |
| aerodromObject | The parent aerodrome object name |
| runwayId | The identifier for the specific runway |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getRunwayDesignator | ( | const DtGlobalObjectDesignator & | aerodromObject, |
| const DtGlobalObjectDesignator & | runwayId | ||
| ) |
|
virtual |
Get the HLA object instance name for a troposphere layer component.
| area | The parent area object name |
| layerId | The identifier for the specific troposphere layer |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getTroposphereLayerDesignator | ( | const DtGlobalObjectDesignator & | area, |
| const DtGlobalObjectDesignator & | layerId | ||
| ) |
|
virtual |
Get the HLA object instance name for a land surface component.
| area | The parent area object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getLandSurfaceDesignator | ( | const DtGlobalObjectDesignator & | area | ) |
|
virtual |
Get the HLA object instance name for a water surface component.
| area | The parent area object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getWaterSurfaceDesignator | ( | const DtGlobalObjectDesignator & | area | ) |
|
virtual |
Get the HLA object instance name for a subsurface layer component.
| area | The parent area object name |
| layerId | The identifier for the specific subsurface layer |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getSubsurfaceLayerDesignator | ( | const DtGlobalObjectDesignator & | area, |
| const DtGlobalObjectDesignator & | layerId | ||
| ) |
|
virtual |
Get the HLA object instance name for a turbulence layer component.
| area | The parent area object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getTurbulenceLayerDesignator | ( | const DtGlobalObjectDesignator & | area | ) |
|
virtual |
Get the HLA object instance name for a wind corridor component.
| area | The parent area object name |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getWindCorridorDesignator | ( | const DtGlobalObjectDesignator & | area | ) |
|
virtual |
Get the HLA object instance name for a time and date object.
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getTimeAndDateDesignator | ( | ) |
|
virtual |
Get the HLA object instance name for a dynamic terrain object.
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getDynamicTerrainDesignator | ( | ) |
|
virtual |
Get the HLA object instance name for a generic object.
| objectType | String identifier specifying the type of object |
| hostObject | The name of the parent object (if any) |
| id | The id of this object to differentiate it from other objects of the same type associated with the same host (if needed) |
| DtGlobalObjectDesignator makVrf::DtNameReservationManager::getOtherObjectDesignator | ( | const DtString & | objectType, |
| const DtGlobalObjectDesignator & | hostObject, | ||
| const DtGlobalObjectDesignator & | id | ||
| ) |
|
virtual |
Check if a name reservation is still pending for a given name.
|
virtual |
Check if a name is already reserved.
|
inlinevirtual |
Get mutex used to protect name reservation RTI calls.
|
protected |
Load name reservation configuration from a file This method reads the name reservation patterns and rules from a configuration file to determine how names should be generated for different object types. Non-virtual because it's called in constructor.
| configFile | Path to the name reservation configuration file |
|
protected |
Gets the next names to reserve for a specific type of object based on its configuration.
|
protected |
Get the object reservation info for a specific object type.
|
protectedvirtual |
Called when a name request succeeds.
|
staticprotected |
|
protectedvirtual |
Called when a name request Failed.
|
staticprotected |
|
protected |
Pointer to the VRLink network interface that owns this manager.
|
protected |
The loaded name reservation configuration.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
staticprotected |
|
staticprotected |
"sim-object";
|
staticprotected |
"extended-attributes";
|
staticprotected |
"di-guy";
|
staticprotected |
"laser-designator";
|
staticprotected |
"sensor-field-of-view";
|
staticprotected |
"radio-transmitter";
|
staticprotected |
"radio-receiver";
|
staticprotected |
"nav-aid";
|
staticprotected |
"laser-light";
|
staticprotected |
"search-light";
|
staticprotected |
"emitter-system";
|
staticprotected |
"emitter-beam";
|
staticprotected |
"propulsion-noise";
|
staticprotected |
"active-sonar";
|
staticprotected |
"active-sonar-beam";
|
staticprotected |
"iff";
|
staticprotected |
"iff-mode1";
|
staticprotected |
"iff-mode2";
|
staticprotected |
"iff-mode3A";
|
staticprotected |
"iff-mode3C";
|
staticprotected |
"iff-mode4";
|
staticprotected |
"iff-mode5";
|
staticprotected |
"iff-modeS";
|
staticprotected |
"iff-tcas";
static const DtString theAerodromeConfigType; // "aerodrome";
|
staticprotected |
"runway";
static const DtString theMetocServiceConfigType; // "metoc-service";
|
staticprotected |
"troposphere-layer";
|
staticprotected |
"land-surface";
|
staticprotected |
"water-surface";
|
staticprotected |
"sub-surface-layer";
|
staticprotected |
"turbulence-layer";
|
staticprotected |
"wind-corridor";
|
staticprotected |
"time-and-date";