A database event type defines a particular type of data to be logged to the database. Each event type will result in the creation of a new table in the database. Each event type is identified by an enumeration, DtVrfDatabaseEvent::EventType, which can be mapped to a table name.
The Database Tables Generated by VR-Forces section defines the default database tables created by VR-Forces. Plugin developers can also add their own event types resulting in new tables. It is not necessary to fully define the event and all of its parameters ahead of time, as we do here. The first time a database event is logged a table will automatically be created with matching parameters. However, doing so up front will ensure the table is created ahead of time and will force all future events of the same type to conform to the defined parameters.
Please see the example for details on how to connect VR-Forces to new types of databases or add new database events and tables.
Database Tables Generated by VR-Forces
This is the list of database tables VR-Forces generates. Each table has a name, description, and a list of its parameters.
Additionally, all tables will automatically have three parameters added if not specified:
- scenarioRunId (int) - the identifier for the current scenario run, so that all events from the same run can be linked.
- simTime (double) - the sim time at which the event occurred.
- simAddress (string) - the sim address of the sim engine recording the event.
Scenario Run
Table Name: ScenarioRun
Description: Logged whenever a scenario is created/loaded and run.
Valid For SMS: All
Parameters:
- scenarioRunId (int) [primary key] - the unique identifier for this scenario run.
- scenarioName (string) - the filename of the scenario.
- dateAndTimeStart (double) - the simulated time in the scenario in seconds since 1/1/1970 UTC.
- realWorldTimeStart (double) - the real-world time the scenario was started in seconds since 1/1/1970 UTC.
- simTime (double) - the sim time at which the scenario was first run.
- simAddress (string) - the sim address of the sim engine recording the event.
Sim Engine
Table Name: SimEngine
Description: Logged when a sim engine starts up and then updated at shutdown.
Valid For SMS: All
Parameters:
- pid (int) [primary key] - the PID of this sim engine.
- simAddress (string) - the sim address of the sim engine recording the event.
- host (string) - the host name of the machine on which this sim engine is running.
- startTime (double) - the real-world time the sim engine was started in seconds since 1/1/1970 UTC.
Fire
Table Name: Fire
Description: Logged whenever a munition is fired.
Valid For SMS: EntityLevel
Parameters:
- eventId (string) - the unique SISO event ID of the fire event. Matches the detonation and damage event IDs.
- firingObjectUuid (string) - the UUID of the entity that fired the munition.
- targetObjectUuid (string) - the UUID of the entity which is the target being fired at.
- munitionObjectUuid (string) - the UUID of the munition entity created, if fly-out is simulated.
- munitionTypeKind, munitionTypeDomain, munitionTypeCountry, munitionTypeCategory, munitionTypeSubategory, munitionTypeSpecific, munitionTypeExtra (intergers) - the SISO munition type.
- location (vector) - geocentric location the munition was fired from.
Detonation
Table Name: Detonation
Description: Logged whenever a detonation occurs.
Valid For SMS: EntityLevel
Parameters:
- eventId (string) - the unique SISO event ID of the detonation event. Matches the fire and damage event IDs.
- attackingObjectUuid (string) - the UUID of the entity that fired the munition which is detonating.
- targetObjectUuid (string) - the UUID of the entity which is hit by the detonation.
- munitionObjectUuid (string) - the UUID of the munition entity, if fly-out is simulated.
- munitionTypeKind, munitionTypeDomain, munitionTypeCountry, munitionTypeCategory, munitionTypeSubategory, munitionTypeSpecific, munitionTypeExtra (integers) - the SISO munition type.
- locationX, locationY, locationZ (doubles) - geocentric location of the detonation.
- result (int) - the SISO detonation result.
Damage
Table Name: Damage
Description: Logged whenever an entity takes damage.
Valid For SMS: EntityLevel
Parameters:
- eventId (string) - the unique SISO event ID of the detonation event. Matches the fire and detonation event IDs.
- damagedObjectUuid (UUID) - the UUID of the sim object that was damaged.
- munitionTypeKind, munitionTypeDomain, munitionTypeCountry, munitionTypeCategory, munitionTypeSubategory, munitionTypeSpecific, munitionTypeExtra (integers) - the SISO munition type.
- surface (string) - string indicating the surface of the entity that was hit.
- directHit (bool) - indicates if damage was due to a direct hit.
- destroyed (bool) - indicates if the damage destroyed the entity.
- mobilityKilled (bool) - indicates if the damage killed the entity's mobility.
- firepowerKilled (bool) - indicates if the damage killed the entity's firepower.
- sensorKilled (bool) - indicates if the damage killed the entity's sensors.
Object
Table Name: Object
Description: Logged whenever a new sim object is created.
Valid For SMS: All
Parameters:
- uuid (string) - the UUID of the object being created.
- globalId (string) - the global ID of the object.
- objectId (string) - the entity ID of the object.
- markingText (string) - the marking text of the object.
- objectTypeKind, objectTypeDomain, objectTypeCountry, objectTypeCategory, objectTypeSubategory, objectTypeSpecific, objectTypeExtra (integers) - the SISO object type.
- forceType (int) - the force type of the object.
- createdBySimEngine (string) - the sim address of the sim engine that created the object (if any).
Resource
Table Name: Resource
Description: Logs the amount of a resources an entity currently has.
Valid For SMS: All
Parameters:
- objectUuid (string) - the UUID of the sim object that owns this resource.
- resourceTypeKind, resourceTypeDomain, resourceTypeCountry, resourceTypeCategory, resourceTypeSubategory, resourceTypeSpecific, resourceTypeExtra (integers) - the SISO resource type.
- location (int) - The location in the resource manager of the resource
- fullAmount (double) - the amount of this resource the entity has when it is full.
- currentAmount (double) - the amount of this resource the entity currently has.
Detection
Table Name: Detection
Description: Logs information about what an entity currently knows about another object it has detected.
Valid For SMS: All
Parameters:
- detectingObjectUuid (string) - the UUID of the detecting sim object.
- sensorName (string) - the name of the sensor that detected this contact.
- sensorType (int) - indication of the type of sensor.
- sensorEnabled (bool) - whether the detecting sensor is currently enabled. If false, can explain why a contact is lost.
- contactObjectUuid (string) - the UUID of the detected contact.
- combatIdentificationLevel (int) - the CID level of the contact. Indicates how much the entity knows about the target.
- contactForce (int) - the force type of the contact, as known by the detecting entity.
- contactType (string) - the SISO entity type of the contact, as known by the detecting entity.
Engagement
Table Name: Engagement
Description: Logs information about an engagement a unit took part in. Engagements are simply records of attacks that involved the given unit over some particular period of time. When combat ends, and then later resumes, a new engagement is started. Engagements are unit specific, meaning different units may refer to an engagement with a different ID. A table entry will continue to be updated until the attack completes.
Valid For SMS: AggregateLevel
Parameters:
- unitUuid (string) - the UUID of the reporting unit.
- engagementId (int) - the identifier of this engagement.
- damageTaken (int) - the amount of cumulative Health damage taken by the reporting unit due to this attack.
- startTime (double) - the sim time at which this engagement started.
- endTime (double) - the sim time at which this engagement ended (if complete).
Engagement Attack
Table Name: Engagement Attack
Description: Logs information about a specific attack made by one unit against another, from the perspective of the attacking unit. Can be part of a larger engagement. A table entry will continue to be updated until the attack completes.
Valid For SMS: AggregateLevel
Parameters:
- attackerUuid (string) - the UUID of the attacking unit.
- attackerAttackId (int) - identifier assigned to this attack by the attacker. Can be used to associate this event with one in the egnagementDefense table.
- targetUuid (string) - the UUID of the unit that is the target of the attack.
- engagementId (int) - this is a unit specific ID used to associate multiple attacks as part of a single engagement. This is the engagement ID used by the attacker.
- damageType (string) - the type of damage, e.g "High-Explosive" or "Anti-Personnel".
- startTime (double) - the sim time at which this attack started.
- endTime (double) - the sim time at which this attack ended (if complete).
Engagement Defense
Table Name: Engagement Defense
Description: Logs information about a specific attack made by one unit against another, from the perspective of the defending unit. A table entry will continue to be updated until the attack completes.
Valid For SMS: AggregateLevel
Parameters:
- attackerUuid (string) - the UUID of the attacking unit.
- attackerAttackId (int) - identifier assigned to this attack by the attacker. Can be used to associate this event with one in the egnagementAttack table.
- targetUuid (string) - the UUID of the unit that is the target of the attack.
- targetEngagementId (int) - this is a unit specific ID used to associate multiple attacks as part of a single engagement. The attacker and defender will have independent IDs for the same engagement. This is the engagement ID used by the defender.
- damageType (string) - the type of damage, e.g "High-Explosive" or "Anti-Personnel".
- damage (int) - the amount of cumulative Health damage taken by the target unit due to this attack.
- startTime (double) - the sim time at which this attack started.
- endTime (double) - the sim time at which this attack ended (if complete).
Engagement Casualty Report
Table Name: EngagementCasualtyReport
Description: Logs information about casualties that occurred during an engagement. A table entry will continue to be updated until the engagement completes.
Valid For SMS: AggregateLevel
Parameters:
- unitUuid (string) - the UUID of the reporting unit.
- engagementId (int) - the engagement ID when the casualties occurred.
- numberKilled (int) - the number of personnel killed.
- numberWounded (int) - the number of personnel wounded.
- numberCaptured (int) - the number of personnel captured.
- numberMissing (int) - the number of personnel missing.
Engagement Damage Report
Table Name: EngagementDamageReport
Description: Logs information about damage that occurred during an engagement. As equipment is damaged, a table entry will be generated for each type of equipment. These entries will continue to be updated until the engagement completes.
Valid For SMS: AggregateLevel
Parameters:
- unitUuid (string) - the UUID of the reporting unit.
- engagementId (int) - the engagement ID when the damage occurred.
- equipmentType (string) - the type of equipment damaged.
- numberDamaged (int) - the number of the equipment that was lost due to damage.
ScenarioEvent
Table Name: ScenarioEvent
Description: Each time a scenario event starts or stops and event is logged.
Valid For SMS: All
Parameters:
- scenarioEventUuid (string) - the UUID of the scenario event object.
- scenarioEventName (string) - the name of the scenario event.
- stopOrStart (int) - 0 indicates an event stopping, 1 indicates an event starting.
- locationX, locationY, locationZ (doubles) - geocentric location of the event, if set.