-
Notifications
You must be signed in to change notification settings - Fork 24
API documentation 0.1.0
https://wiki.hoggitworld.com/view/DCS_singleton_atmosphere
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetWind | GetWindRequest | GetWindResponse | https://wiki.hoggitworld.com/view/DCS_func_getWind |
GetWindWithTurbulence | GetWindWithTurbulenceRequest | GetWindWithTurbulenceResponse | https://wiki.hoggitworld.com/view/DCS_func_getWindWithTurbulence |
GetTemperatureAndPressure | GetTemperatureAndPressureRequest | GetTemperatureAndPressureResponse | https://wiki.hoggitworld.com/view/DCS_func_getWindWithTurbulence |
https://wiki.hoggitworld.com/view/DCS_singleton_coalition
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetPlayers | GetPlayersRequest | GetPlayersResponse | https://wiki.hoggitworld.com/view/DCS_func_getPlayers |
GetGroups | GetGroupsRequest | GetGroupsResponse | https://wiki.hoggitworld.com/view/DCS_func_getGroups |
Method Name | Request Type | Response Type | Description |
---|---|---|---|
SetAlarmState | SetAlarmStateRequest | EmptyResponse | https://wiki.hoggitworld.com/view/DCS_option_alarmState |
The Custom service is for APIs that do not map to the "standard library" of DCS APIs provided by Eagle Dynamics.
Expect to find APIs here that may be useful for mission frameworks etc.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
RequestMissionAssignment | MissionAssignmentRequest | MissionAssignmentResponse | DCT Function |
JoinMission | MissionJoinRequest | MissionJoinResponse | DCT Function |
Eval | EvalRequest | EvalResponse | Evaluate some Lua inside of the mission and return the result as a JSON string. Disabled by default. |
https://wiki.hoggitworld.com/view/DCS_Class_Group
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetUnits | group.GetUnitsRequest | group.GetUnitsResponse | https://wiki.hoggitworld.com/view/DCS_func_getUnits |
APis that are part of the hook environment
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetMissionName | hook.GetMissionNameRequest | hook.GetMissionNameResponse | https://wiki.hoggitworld.com/view/DCS_func_getMissionName |
StreamChat | hook.StreamChatRequest | hook.ChatMessage stream | Stream all chat messages. |
Contains the streaming APIs that streaming information out of the DCS server.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
StreamEvents | StreamEventsRequest | Event stream | Streams DCS game generated Events. See https://wiki.hoggitworld.com/view/Category:Events |
StreamUnits | StreamUnitsRequest | UnitUpdate stream | Streams unit updates Provides similar functionality as Tacview but at a much lower update rate so puts less load on the server. Suitable for things like online maps but not as a Tacview replacement. |
https://wiki.hoggitworld.com/view/DCS_singleton_timer
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetTime | GetTimeRequest | GetTimeResponse | https://wiki.hoggitworld.com/view/DCS_func_getTime |
GetAbsoluteTime | GetAbsoluteTimeRequest | GetAbsoluteTimeResponse | https://wiki.hoggitworld.com/view/DCS_func_getAbsTime |
GetTimeZero | GetTimeZeroRequest | GetTimeZeroResponse | https://wiki.hoggitworld.com/view/DCS_func_getTime0 |
https://wiki.hoggitworld.com/view/DCS_singleton_trigger
https://wiki.hoggitworld.com/view/DCS_Class_Unit
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetRadar | GetRadarRequest | GetRadarResponse | https://wiki.hoggitworld.com/view/DCS_func_getRadar |
GetPosition | GetUnitPositionRequest | GetUnitPositionResponse | https://wiki.hoggitworld.com/view/DCS_func_getPoint |
GetPlayerName | GetUnitPlayerNameRequest | GetUnitPlayerNameResponse | https://wiki.hoggitworld.com/view/DCS_func_getPlayerName |
GetUnitDescriptor | GetUnitDescriptorRequest | GetUnitDescriptorResponse |
https://wiki.hoggitworld.com/view/DCS_singleton_world
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetAirbases | GetAirbasesRequest | GetAirbasesResponse | https://wiki.hoggitworld.com/view/DCS_func_getAirbases |
GetMarkPanels | GetMarkPanelsRequest | GetMarkPanelsResponse | https://wiki.hoggitworld.com/view/DCS_func_getMarkPanels |
Field | Type | Label | Description |
---|---|---|---|
position | Position | The position on the map we want the wind information for. Requires lat/lon/alt fields to be populated, there are no default values |
Field | Type | Label | Description |
---|---|---|---|
temperature | float | The temperature in Kelvin | |
pressure | float | The pressure in Pascals |
Field | Type | Label | Description |
---|---|---|---|
position | Position | The position on the map we want the wind information for. Requires lat/lon/alt fields to be populated, there are no default values |
Field | Type | Label | Description |
---|---|---|---|
heading | float | The heading the wind is coming from. | |
strength | float | The strength of the wind in meters per second |
Field | Type | Label | Description |
---|---|---|---|
position | Position | The position on the map we want the wind information for. Requires lat/lon/alt fields to be populated, there are no default values |
Field | Type | Label | Description |
---|---|---|---|
heading | float | The heading the wind is coming from. | |
strength | float | The strength of the wind in meters per second |
Field | Type | Label | Description |
---|---|---|---|
coalition | Coalition | ||
category | group.GroupCategory | optional |
Field | Type | Label | Description |
---|---|---|---|
groups | Group | repeated |
Field | Type | Label | Description |
---|---|---|---|
coalition | Coalition |
Field | Type | Label | Description |
---|---|---|---|
units | Unit | repeated |
An instance of a DCS Airfield
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | optional | The DCS generated ID. Only used when the airfield is also a unit (e.g. an Aicraft Carrier) |
name | string | TODO: Fill this in | |
callsign | string | TODO: Fill this in | |
coalition | Coalition | The coalition the unit belongs to. This can change mid-mission if an airfield is captured | |
position | Position | The position of the center point of the airfield. | |
category | AirbaseCategory | What category the airfield belongs to. | |
display_name | string | TODO: Fill this in |
A generic empty response
A generic empty response used in APIs that do not return any values to the client
An instance of a DCS group
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | The DCS generated ID | |
name | string | The name of the group as assigned in the mission editor |
Field | Type | Label | Description |
---|---|---|---|
unknown | Unknown | ||
unit | Unit | ||
weapon | Weapon | ||
static | Static | ||
scenery | Scenery | ||
airbase | Airbase | ||
cargo | Cargo |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | ||
time | double | I have no idea what this time value means | |
initiator | Unit | ||
coalition | Coalition | optional | |
group_id | uint32 | optional | |
text | string | optional | |
position | Position |
Position of an object in DCS
Latitude and Longitude are in Decimal Degrees format (e.g. 41.33 / 37.21). Negative values are used for West of the meridian and south of the equator
Altitude is given in meters above Mean Sea Level (MSL) and can be a decimal value.
Field | Type | Label | Description |
---|---|---|---|
lat | double | Latitude in Decimal Degrees format | |
lon | double | Longitude in Decimal Degrees format | |
alt | double | Altitude in Meters above Mean Sea Level (MSL) |
Field | Type | Label | Description |
---|---|---|---|
unknown | Unknown | ||
unit | Unit | ||
weapon | Weapon | ||
static | Static | ||
scenery | Scenery | ||
airbase | Airbase | ||
cargo | Cargo |
An instance of a DCS Unit
A unit is an "active" unit in a DCS mission. This means it has an attached AI that moves and shoots. Units include aircraft, ground units, ships, weapons etc.
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | The DCS generated ID | |
name | string | The name of the unit as assigned in the mission editor | |
callsign | string | The DCS assigned callsign if one exists. e.g. "Enfield 11" | |
coalition | Coalition | The coalition the unit belongs to | |
type | string | The DCS type-name of the unit. e.g "MiG-29A", "ZSU_57_2" or "Hawk ln" | |
position | Position | The position of the unit | |
player_name | string | optional | The name of the player if one is in control of the unit |
group_name | string | The name of the group that the unit belongs to | |
number_in_group | uint32 | The number of this unit in the group. Does not change as units are destroyed | |
speed | double | The horizontal speed of the unit. If it is doing mach one straight up then the speed will be 0 | |
heading | double | The heading of the unit |
This type is returned if an object category cannot be determined
The base object includes the getName()
function so even for an unknown type we should be able to get the name
Field | Type | Label | Description |
---|---|---|---|
name | string |
An instance of a DCS weapon
These weapons include everything from autocannon HE shells up to massive ship-killer missiles
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | The DCS generated ID | |
type | string | The DCS type-name of the weapon. e.g "Matra_S530D", "HAWK_RAKETA" or "weapons.shells.53-UOR-281U" | |
position | Position | The position of the Weapon |
The category the object belongs to
Some of these are less than obvious. For example an oilrig counts as a HELIPAD airfield.
Name | Number | Description |
---|---|---|
AIRDROME | 0 | |
HELIPAD | 1 | |
SHIP | 2 |
Coalitions in DCS
The coalitions supported by DCS. The NEUTRAL coalition is a relatively new one and may not be as supported as the belligerant ones.
Name | Number | Description |
---|---|---|
NEUTRAL | 0 | |
RED | 1 | |
BLUE | 2 |
The category the object belongs to
All DCS objects are one of the following categories. DCS itself does not use the UNKNOWN enum value but we use it in GRPC as a fallback in case of issues determining the category.
See https://wiki.hoggitworld.com/view/DCS_Class_Object for more information
Name | Number | Description |
---|---|---|
UNKNOWN | 0 | |
UNIT | 1 | |
WEAPON | 2 | |
STATIC | 3 | |
SCENERY | 4 | |
BASE | 5 | |
CARGO | 6 |
Field | Type | Label | Description |
---|---|---|---|
group_name | string | ||
unit_name | string | ||
alarm_state | SetAlarmStateRequest.AlarmState |
Name | Number | Description |
---|---|---|
AUTO | 0 | |
GREEN | 1 | |
RED | 2 |
Field | Type | Label | Description |
---|---|---|---|
lua | string |
Field | Type | Label | Description |
---|---|---|---|
json | string |
Field | Type | Label | Description |
---|---|---|---|
unit_name | string | ||
mission_type | string |
Field | Type | Label | Description |
---|---|---|---|
unit_name | string | ||
mission_code | int32 |
Field | Type | Label | Description |
---|---|---|---|
group_name | string | ||
active | bool | optional | Whether the response should include only active units (true ), only inactive units (false ), or all units (nil ). |
Field | Type | Label | Description |
---|---|---|---|
units | dcs.Unit | repeated |
Name | Number | Description |
---|---|---|
AIRPLANE | 0 | |
HELICOPTER | 1 | |
GROUND | 2 | |
SHIP | 3 | |
TRAIN | 4 |
Field | Type | Label | Description |
---|---|---|---|
player_id | uint32 | The ID of the player sending the chat messaage. | |
message | string | The chat message. | |
all | bool | Whether the message was send to all or only to allies. |
Field | Type | Label | Description |
---|---|---|---|
name | string |
The DCS Event information. Contains event information and a timestamp.
Occurs when a ground unit captures either an airbase or a farp.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that captured the base. | |
place | Airbase | The airbase that was captured, can be a FARP or Airbase |
Occurs when any object is spawned into the mission.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that was spawned. | |
place | Airbase | optional | The airbase, farp or ship the unit took off from. |
Occurs when an aircraft crashes into the ground and is completely destroyed.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that crashed. |
Occurs when an object is completely destroyed.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that has been destroyed. |
Occurs when a system on an aircraft fails. This can be due to damage or due to random failures set up in the mission editor.
Field | Type | Label | Description |
---|---|---|---|
target | Target | The target the failure occurred for. |
A pilot detached from their ejection seat.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The ejection seat. | |
target | Target | The pilot. |
Occurs when a pilot ejects from its aircraft.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The unit a pilot ejected from. | |
target | Target | The ejection seat. |
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | Occurs when any aircraft shuts down its engines. | |
place | Airbase | The airbase, farp or ship the unit shut down their engine at. |
Occurs when any aircraft starts its engines.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that starts its engines. | |
place | Airbase | The airbase, farp or ship the unit started their engine at. |
Occurs when an object is hit by a weapon.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | optional | The object that fired the weapon. Not set when for example fyling an aircraft into a building (building will be the target and weapon_name the name of the aircraft). |
weapon | Weapon | The weapon that the target has been hit with. | |
target | Target | The object that has been hit. | |
weapon_name | string | The weapon the target got hit by. |
Occurs e.g. when a player controlled aircraft blacks out.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The unit the system failure occurred in. |
Occurs when an object is killed by a weapon.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that fired the weapon. | |
weapon | Weapon | The weapon that the target has been killed with. | |
target | Target | The object that has been killed. | |
weapon_name | string | The name of the weapon that killed the target (exists instead of weapon for weapons that trigger the shooting start and end events). |
Occurs when an aircraft lands at an airbase, farp or ship.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that landed. | |
place | Airbase | The airbase, farp or ship the unit landed at. |
A pilot detached from their ejection seat.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The ejected pilot. | |
place | Position | The position the pilot landed at. |
Occurs when an aircraft receives an LSO rating after recovering on an aircraft carrier.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The aircraft that received the rating. | |
comment | string | The rating. |
Occurs when marks get added to the mission by players or scripting functions.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that added the mark. | |
group_id | uint64 | The group the mark's visibility is restricted for. | |
coalition | Coalition | The coalition the mark's visibility is restricted for. | |
id | uint32 | The mark's id. | |
pos | Position | The position the mark has been added at. | |
text | string | The mark's label. |
Occurs when marks got changed.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that changed the mark. | |
group_id | uint64 | The group the mark's visibility is restricted for. | |
coalition | Coalition | The coalition the mark's visibility is restricted for. | |
id | uint32 | The mark's id. | |
pos | Position | The position of the changed mark. | |
text | string | The mark's label. |
Occurs when marks get removed.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that removed the mark. | |
group_id | uint64 | The group the mark's visibility is restricted for. | |
coalition | Coalition | The coalition the mark's visibility is restricted for. | |
id | uint32 | The mark's id. | |
pos | Position | The position the mark has been removed from. | |
text | string | The mark's label. |
Occurs when the mission stops.
Occurs when the mission starts.
Occurs when a pilot of an aircraft is killed. Can occur either if the player is alive and crashes (in this case both this and the [CrashEvent] event will be fired) or if a weapon kills the pilot without completely destroying the plane.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The unit the pilot has died in. |
Occurs when a player takes direct control of a unit.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The unit the player took control of. |
Occurs when a player relieves direct control of a unit.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The unit the player relieves control of. |
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that is receiving fuel. |
Occurs when an aircraft is finished taking fuel.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | he unit that was receiving fuel. |
A score change (doesn't contain any useful information)
Occurs when a unit stops firing a machine gun- or autocannon-based weapon. Event will always correspond with a [ShootingStartEvent] event.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that was shooting and has no stopped firing. | |
weapon_name | string | The name of the shoot weapon. |
Occurs when a unit begins firing a machine gun- or autocannon-based weapon (weapons with a high rate of fire). Other weapons are handled by [ShotEvent].
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that started firing. | |
weapon_name | string | The name of the shoot weapon. |
Occurs when a unit fires a weapon (but no machine gun- or autocannon-based weapons - those are handled by [ShootingStartEvent]).
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that fired the weapon. | |
weapon | Weapon | The weapon that has been fired. |
Occurs when an aircraft takes off from an airbase, farp, or ship.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that took off. | |
place | Airbase | The airbase, farp or ship the unit took off from. |
A unit got destroyed.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that got destroyed weapon. |
Fired for each payload of an aircraft spawened midair.
Field | Type | Label | Description |
---|---|---|---|
initiator | Initiator | The object that got spawned. | |
weapon_name | string | The name of the payload. |
Field | Type | Label | Description |
---|---|---|---|
poll_rate | uint32 | optional | The poll rate in seconds at which the gRPC server communicates with the DCS mission to retrieve the latest unit positions. The lower the poll_rate the higher the amount of requests send to to the DCS mission. Default: 5 |
max_backoff | uint32 | optional | The maximum backoff in seconds which the gRPC postpones polling units that haven't moved recently. This is an optimization to dynamically reduce the poll rate for stationary units. Set it to the same value as poll_rate to disable the backoff. Default: 30 |
Field | Type | Label | Description |
---|---|---|---|
unit | Unit | The unit is either new or its position changed. | |
gone | UnitUpdate.UnitGone | The unit does not exist anymore. |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | ||
name | string |
Field | Type | Label | Description |
---|---|---|---|
time | double |
Field | Type | Label | Description |
---|---|---|---|
time | double |
Field | Type | Label | Description |
---|---|---|---|
time | double |
Field | Type | Label | Description |
---|---|---|---|
position | Position | ||
power | uint32 |
Field | Type | Label | Description |
---|---|---|---|
flag | string |
Field | Type | Label | Description |
---|---|---|---|
value | uint32 |
Field | Type | Label | Description |
---|---|---|---|
position | Position | The altitude of Illumination Bombs is meters above ground. Ground level will be calculated server-side | |
power | uint32 |
Field | Type | Label | Description |
---|---|---|---|
text | string | ||
position | Position | ||
read_only | bool | ||
message | string |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | ||
text | string | ||
position | Position | ||
coalition | Coalition | ||
readOnly | bool | ||
message | string |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | ||
text | string | ||
position | Position | ||
group_id | uint32 | ||
read_only | bool | ||
message | string |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 |
Field | Type | Label | Description |
---|---|---|---|
text | string | ||
display_time | int32 | ||
clear_view | bool | ||
coalition | Coalition |
Field | Type | Label | Description |
---|---|---|---|
text | string | ||
display_time | int32 | ||
clear_view | bool | ||
groupId | uint32 |
Field | Type | Label | Description |
---|---|---|---|
text | string | ||
display_time | int32 | ||
clear_view | bool |
Field | Type | Label | Description |
---|---|---|---|
id | uint32 |
Field | Type | Label | Description |
---|---|---|---|
flag | string | ||
value | uint32 |
Field | Type | Label | Description |
---|---|---|---|
position | Position | Altitude paramter will be ignored. Signal flares always fire from ground level which will be calculated server-side | |
color | SignalFlareRequest.FlareColor | ||
azimuth | uint32 |
Field | Type | Label | Description |
---|---|---|---|
position | Position | Altitude paramter will be ignored. Smoke always eminated from ground level which will be calculated server-side | |
color | SmokeRequest.SmokeColor |
Putting this inside the request because we cannot have the same enum value in the same package.
Name | Number | Description |
---|---|---|
GREEN | 0 | |
RED | 1 | |
WHITE | 2 | |
YELLOW | 3 |
Putting this inside the request because we cannot have the same enum value in the same package.
Name | Number | Description |
---|---|---|
GREEN | 0 | |
RED | 1 | |
WHITE | 2 | |
ORANGE | 3 | |
BLUE | 4 |
Field | Type | Label | Description |
---|---|---|---|
name | string |
Field | Type | Label | Description |
---|---|---|---|
active | bool | ||
target | Target |
Field | Type | Label | Description |
---|---|---|---|
name | string |
TODO fill these in as and when we need em
Field | Type | Label | Description |
---|---|---|---|
attributes | string | repeated |
Field | Type | Label | Description |
---|---|---|---|
name | string |
Field | Type | Label | Description |
---|---|---|---|
player_name | string | optional |
Field | Type | Label | Description |
---|---|---|---|
name | string |
Field | Type | Label | Description |
---|---|---|---|
position | Position |
Field | Type | Label | Description |
---|---|---|---|
coalition | Coalition | optional |
Field | Type | Label | Description |
---|---|---|---|
airbases | Airbase | repeated |
Field | Type | Label | Description |
---|---|---|---|
mark_panels | MarkPanel | repeated |