dcs-bios / dcs-bios-arduino-library

Arduino Library to talk to DCS-BIOS
MIT License
61 stars 29 forks source link

Protocol Extension: Events #19

Open jboecker opened 9 years ago

jboecker commented 9 years ago

Right now, the DCS-BIOS export protocol only deals with exporting state variables. For the following applications, a mechanism to transmit one-time messages would be useful:

A backwards-compatible way to implement this would be to reserve a part of the export address space (e.g. 0xf000 to 0xf0ff). This would allow sending events of up to 255 bytes in length by writing a length byte followed by the message starting at address 0xf000. Multiple events may be sent in a single update by repeatedly overwriting the same location. The protocol parser's state machine can be extended to recognize specific, possibly panel-specific events.

Panels that do not care about any events do not need any modified logic, they will just see write accesses to addresses they don't care about and ignore the data.