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.
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.
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.
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.
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.
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.
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).
Fuel Resource
Table Name: FuelResource
Description: Logs the amount of fuel an entity currently has.
Parameters:
- entity (string) - the UUID of the entity that owns this resource.
- resourceName (string) - the name 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.
Weapon Resource
Table Name: WeaponResource
Description: Logs the amount of a weapon resource an entity currently has.
Parameters:
- entity (string) - the UUID of the entity that owns this resource.
- resourceName (string) - the name 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.
Other Resource
Table Name: OtherResource
Description: Logs the amount of a another resource an entity currently has. Used for resources other than fuel and weapons.
Parameters:
- entity (string) - the UUID of the entity that owns this resource.
- resourceName (string) - the name 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.
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.