Overview
X-Plane provides a plugin system to allow hardware to interact with it. The plugin system provides a large number of DataRefs and Commands that can be used by the hardware. If you are familiar with other versions of the GoFlight Interface Tool, these are synonymous with Variables and Events.
What are Commands?
Commands should be seen as actions in the flight simulator, i.e. do something now. An example of a Command is sim/magnetos/magnetos_off which would set an aircrafts starter switch to the magnetos off position. Assigning a Command to some flight simulator hardware such as a button, switch, rotary or selector triggers the event to be sent when the hardware is used e.g. pushing a button would toggle the parking brakes.
Sending Commands will almost certainly change the value of at least one DataRef (see below) and sometimes it may change the value of many DataRefs.
A full list of standard Commands and their meaning can be found in your <X-Plane directory>\Resources\plugins\Commands.txt
What are DataRefs?
DataRefs should be seen as a way for the flight simulator to maintain knowledge of all things in the flight simulator. E.g. a real aircraft has actual moving flaps with sensors and hydraulic pressure readings etc. A flight simulator needs a way to mimic these things and record their state. An example of a DataRef is sim/cockpit/electrical/battery_on which maintains the current aircrafts battery state.
All DataRefs can be read i.e. their values retrieved and processed in some way. Some DataRefs can also be written i.e. their value forced to be a specific value.
DataRefs are ideal for flight simulator hardware that uses LED lights because they can be used in logical expressions that result in true or false (light on or light off). For example if the DataRef sim/cockpit/electrical/avionics_on was assigned to an LED light and the result of the logical expression returned true, the LED light would be lit and you would know that their was power to the aircrafts avionics.
DataRefs are also used for the LED displays of flight simulator hardware. E.g. the DataRef sim/cockpit/autopilot/heading_mag displays the desired heading programmed into the aircrafts Autopilot. Linking this DataRef to an LED display would show the value in the display e.g. 020 degrees.
A full list of DataRefs, their meaning and whether they are writable can be found here.