-
-
Notifications
You must be signed in to change notification settings - Fork 67
DCS‐BIOS in a nutshell
-
DCS-BIOS Control
, a physical cockpit control defined within DCS-BIOS. E.g. Gear LeverGEAR_LEVER
. -
DCS-BIOS Module
, all controls pertaining to a DCS aircraft and all defined inside alua
file. E.g.P-51D.lua
DCS-BIOS exports (sends) cockpit data from Digital Combat Simulator (DCS) over a UDP socket.
- uint data, stating the position for a
switch
,dial
,knob
- string data, can be frequencies
127.000
or other information from a cockpit display e.g.Waypoint : 1
DCS-BIOS listens for commands from the user on a TCP socket. Depending on command type the syntax differs.
-
FLAPS_SWITCH INC\n
This is a command to increase the position ofFLAPS_SWITCH
-
COMPASS_BRIGHTNESS 30000\n
Set the position ofCOMPASS_BRIGHTNESS
to 30000. -
COMPASS_BRIGHTNESS -3000\n
DecreaseCOMPASS_BRIGHTNESS
by 3000. - and so on, an aircraft has many different controls.
Data is encoded so that as many controls as possible are included in the same byte.
Therefore each control has :
- address
- shift value
- mask value
so that it can be read from the byte stream in the receiving end.
String data starts with an address and for each character in the address increases. The data must be converted into a string in the receiving end. It is send in little endian mode.
This is a cockpit control defined within DCS-BIOS. All controls have some general information but they differ depending on what type of physical control they represent. It can also be a string that is displayed in a cockpit control.
The control's unique identifier e.g. FLAPS_SWITCH
is used when working with the lua
and JSON
files but it is not broadcast over the socket. Instead the client must listen for the control's address
.
Each aircraft (airframe) has a lua file containing definitions of all the DCS-BIOS controls. These have been made by someone digging through the DCS aircraft and finding out all the proper arguments for manipulating the cockpit controls. It takes some time making mapping all these controls.
These are auto-generated from the lua files
each time a mission starts. They are for communicating with DCS-BIOS.
-
input interfaces
, which differs depending of whether it is e.g. a dial or a button output information
This JSON snippet corresponds to the "GEN"
(Generator) definition in the above lua image.