Forgive the stupid questions and feel free to throw RTDM manual comments and links to resources etc but…
Am just starting out driven by a desire to do a couple of things with this game that I can’t find anybody doing for me right now.
Use sim connect to pull the active ATC dialogue options from game so that the entire dialogue box can be displayed on a completely different (networked) device.
Sim connect to pull aircraft structural health data (if that even exists at all)*
Example - Does exceeding speed of landing gear deployment get registered as damage to landing gear? If so, can simconnect be used to display that state?
For all this I guess I’m going to need some direction towards resources.
(Unless you want to extend existing aircraft controls / displays / instrument you can probably ignore the WASM chapter for now)
SimConnect basically lets you interact in two ways with the simulator:
Simulation variables basically represent the state of the aircraft (attitude and position, control element states and their resulting effects (flaps position, gear up/down, ailerons, spoilers, …).
Events let you „set“ those values, but as most simulation variables are actually „settable“ (or „writeable“) as well that functional part is overlapping - and probably the reason why events have been declared „legacy“ by now.
(Note that not all simulation variables are writeable yet, and with events you can do things for which no equivalent set of simulation variables exist yet, e.g. „freezing“ the aircraft‘s position and attitude - time will tell how Asobo sorts this all out).
A common usage pattern looks like this:
Connect with the simulator (= „SimConnect server“)
Register your data structures (records) that you either want to send or receive (or both)
Register your „client events“
Send simulation variable requests or events
Dispatch the events (responses from previous requests, or spontaneous simulator events such as „Paused“, „Started“ etc.)
There are at least three ways how to get your „dispatcher function“ (= callback function) called:
Polling (some loop with a delay, e.g. polling frequency 30 Hz etc.)
Event-based dispatching (based on Windows messages → HWND window handle required)
Your own message based event queue
Refer to this thread here:
All three dispatching methods have been discussed there by now (but you need to „dig for information“ a little bit ;))
and see whether you find corresponding variables which let you query the desired „ATC state“. In the best case you can interact with ATC with the same set of simulation variables (if they are „writeable“, that is). Alternatively look at the events and see whether they let you set the desired ATC options.
And as far as the networking aspect is concerned: the SimConnect client (your app/add-on) apparently already communicates via sockets (or „pipes“ when run „locally“ on the same machine like the simulator („server“)).
That means you can actually also configure remote IP addresses and ports, for your client:
But again, this networking functionality has been declared „legacy“. And since the client SimConnect.dll only runs on Windows based operating systems (and possibly Xbox, I don‘t know) this networking solution is limited to Windows clients.
So most people write their own „wrappers“ around the SimConnect API (which is required anyway when using languages other than C/C++ or C#), and some of those wrappers provide network support already. Just browse the web for existing solutions