This discussion moved here from the general FS2020 forums (thread: https://forums.flightsimulator.com/t/state-of-affairs-when-using-external-controllers-not-good-imho/438814)
I'll paraphrase the expressed voices: the current state of Input Event is problematic for those of us who interface external simulation hardware with Flight Simulator: the state of things before SU5 was that much arcane gauge calculator code was needed to activate many of the cockpit controls, but we mostly managed. Since SU5, because of the overhaul of the Input Events (specifically, moving controls to the new B "variables"), much of our interface work has been broken with few ways to fix them.
It would appear that the Input Events (invoked either through >B: or F:InputEvent) exactly match our use case (have an in-cockpit control be activated by external hardware and reflect the appropriate state) but for some reason it is not possible to invoke input events from execute_calculator_code() requiring snippets of XML added to the planes in order to track local variables or similar.
The solution appears simple to us hardware developers (and users): allow invocation of B: input events so that we can flip controls from external inputs. In practice: this could be easily done in at least two ways:
A) The simple and sufficient way: simply allow execute_calculator_code() to use "(>B:Foo_Bar_Set)" and friends either directly or via "(>F:InputEvent)". At this time, attempts to do so fail with "Unknown Variable" errors.
B) The better long-term way which would obviate the need for standalone WASM modules whose sole purpose is to relay Gauge calculator code from external sources: allow invoking Input Events directly from SimConnect. Obviously this is more complicated since it requires extension of the current SimConnect api (and, presumably, wire protocol).