You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Remote access to the Microsoft Flight Simulator 2020 "Gauge API."
14
+
## Remote access to the Microsoft Flight Simulator 2020 & 2024 "Gauge API."
15
15
16
16
**A WASM module-based Server and a full Client API combination.**
17
17
@@ -30,7 +30,7 @@ One of the motivations for this project was seeing multiple MSFS tool authors an
30
30
own product or need. There is nothing wrong with this, of course, but for the Sim user it can be a disadvantage on several levels. They may end up running
31
31
multiple versions of modules which all do essentially the same thing, and it may be confusing which WASM module they need to support which tool,
32
32
just to name two obvious issues. For the developer, programming the WASM modules comes with its own quirks, too, not to mention the time involved.
33
-
And regardless of the supposed isolated environment a WASM module is supposed to run in, it's still very easy to take down the whole Simulator with
33
+
And regardless of the supposed isolated environment a WASM module is supposed to run in, it's still very easy to take down the whole Simulator with
34
34
some errant code... ;-)
35
35
36
36
Since MS/Asobo have been, ahem, "slow" to add further remote access features to _SimConnect_ (or come up with some other method), this project is an attempt
@@ -44,25 +44,25 @@ On a more practical note, I am using it with the [MSFS Touch Portal Plugin](http
44
44
#### Remote Capabilities
45
45
-**Execute Calculator Code**:
46
46
- With or without a returned result; Result returned as numeric and string types.
47
-
- Formatted results from `format_calculator_string()` using
47
+
- Formatted results from `format_calculator_string()` using
-**Get Variable**: Return value result from any type of variable accessible to a standalone WASM module
50
-
(basically everything but Gauge and Instrument types, but also including Token vars).
49
+
-**Get Variable**: Return value result from any type of variable accessible to a standalone WASM module
50
+
(basically everything but Gauge and Instrument types, but also including Token vars).
51
51
- With optional Unit specifier for variable types which support it.
52
52
-**Set Variable**: Set the value of any settable variable type, with optional Unit specifier for variable types which support it.
53
53
-**Create Variable**: Create (and get/set) a new Local variable if it doesn't already exist.
54
54
-**List Local Variables**: Get a list of all available 'L' variables with their names and current IDs.
55
55
-**Lookup**: Return a numeric ID for a SimVar/Local/Token variable, Unit, or Key Event name.
56
56
-**Subscribe** to _Calculator Code_ and _Get Variable_ results:
57
-
- Get "push" notifications whenever result values change; Change monitoring can be configured at any rate down to the millisecond (~25ms minimum).
58
-
Can also be configured to use the "delta epsilon" feature of SimConnect (to ignore insignificant changes in value) or, conversely, to always send
57
+
- Get "push" notifications whenever result values change; Change monitoring can be configured at any rate down to the millisecond (~25ms minimum).
58
+
Can also be configured to use the "delta epsilon" feature of SimConnect (to ignore insignificant changes in value) or, conversely, to always send
59
59
updates even when values do not change.
60
60
- Optionally perform manual ("polled") updates of subscriptions at any interval of your choice.
61
61
- Any calculator code saved in subscriptions is **pre-compiled to a more efficient byte code** representation before being passed to the respective calculator
62
62
functions. This significantly improves performance for recurring calculations.
63
63
-**Register Named Events**:
64
-
- Save recurring "set events," like activating controls using calculator code, for more efficient and simpler re-use.
65
-
Saved calculator code is pre-compiled to a more efficient byte code representation before being passed to the calculator function.
64
+
- Save recurring "set events," like activating controls using calculator code, for more efficient and simpler re-use.
65
+
Saved calculator code is pre-compiled to a more efficient byte code representation before being passed to the calculator function.
66
66
This significantly improves performance for recurring events.
67
67
- Registered events can be executed "natively" via _WASim API_ by simply sending a short command with the saved event ID.
68
68
- Saved events can also be named and executed via standard SimConnect commands `SimConnect_MapClientEventToSimEvent(id, "event_name")` and `SimConnect_TransmitClientEvent(id)`.
@@ -82,8 +82,8 @@ On a more practical note, I am using it with the [MSFS Touch Portal Plugin](http
82
82
- No wasted data allocations, each data/variable subscription is stored independently avoiding complications with offsets or data overflows.
83
83
- Minimum possible impact on MSFS in terms of memory and CPU usage; practically zero effect for Sim user when no clients are connected (Server is idle).
84
84
- Server periodically checks that a client is still connected by sending "heartbeat" ping requests and enforcing a timeout if no response is received.
85
-
- Extensive logging at configurable levels (debug/info/warning/etc) to multiple destinations (file/console/remote) for both Server and Client.
86
-
- Uses an efficient **lazy logging** implementation which doesn't evaluate any arguments if the log message will be discarded anyway
85
+
- Extensive logging at configurable levels (debug/info/warning/etc) to multiple destinations (file/console/remote) for both Server and Client.
86
+
- Uses an efficient **lazy logging** implementation which doesn't evaluate any arguments if the log message will be discarded anyway
87
87
(eg. a DEBUG level message when minimum logging level is INFO).
88
88
- Logging levels can be set at startup via config files and changed at runtime for each facility (including remotely on the server).
89
89
- Includes a SimConnect request/exception tracking feature for detailed diagnostics.
@@ -127,7 +127,7 @@ API documentation generated from source comments is published here: https://wasi
127
127
A good place to start with the docs is probably the [`WASimClient`](https://wasimcommander.max.paperno.us/class_w_a_sim_commander_1_1_client_1_1_w_a_sim_client.html) page.
128
128
129
129
The GUI is written in C++ (using Qt library for UI), and while not the simplest example, _is_ a full implementation of almost all the available
130
-
API features. The main `WASimClient` interactions all happen in the `MainWindow::Private` class at the top of the
130
+
API features. The main `WASimClient` interactions all happen in the `MainWindow::Private` class at the top of the
To enable more verbose logging on the module at startup, edit the `server_conf.ini` file which is found in the module's install folder
174
-
(`Community\wasimcommander-module\modules`). There are comments in there indicating the options.
173
+
To enable more verbose logging on the module at startup, edit the `server_conf.ini` file which is found in the module's install folder
174
+
(`Community\wasimcommander-module\modules`). There are comments in there indicating the options.
175
175
176
176
Keep in mind that the server logging level can also be changed remotely at runtime, but
177
177
of course that only works if you can establish a connection to the module in the first place.
@@ -180,12 +180,12 @@ of course that only works if you can establish a connection to the module in the
180
180
181
181
Basically the log is the primary source of information here. By default it logs at the "Info" level to:
182
182
1) The current console window, assuming there is one (the host app is started from a console). So if using `WASimUI`, for example, just start it from a command prompt.
183
-
2) A file in whatever current directory it is running in (so, for the UI, that would be the UI's install folder).
183
+
2) A file in whatever current directory it is running in (so, for the UI, that would be the UI's install folder).
184
184
185
185
Of course if you're using `WASimUI`, it also provides a full logging interface and you can set all the log levels from there, for both client and server sides.
186
186
187
187
There should also be a `client_conf.ini` file alongside whatever is using the Client
188
-
where initial logging location, levels and network configuration (timeout and SimConnect.cfg index) is set.
188
+
where initial logging location, levels and network configuration (timeout and SimConnect.cfg index) is set.
189
189
The config file has comments indicating the available options.
190
190
191
191
-------------
@@ -197,7 +197,7 @@ Use the [Issues](https://github.com/mpaperno/WASimCommander/issues) feature for
197
197
198
198
Use [Discussions](https://github.com/mpaperno/WASimCommander/discussions) for any other topic.
199
199
200
-
There is also a [Discord support forum](https://discord.gg/QhUDFX6Kun) on my server,
200
+
There is also a [Discord support forum](https://discord.gg/QhUDFX6Kun) on my server,
201
201
along with [release announcement](https://discord.gg/StbmZ2ZgsF) and [general chat](https://discord.gg/meWyE4dcAt) channels.
202
202
203
203
Most flight simulator forums seem fairly strict about _not_ using their site to provide product support. So please use GitHub,
@@ -239,8 +239,8 @@ or the GNU Lesser General Public License (**LGPL**), as published by the Free So
239
239
Foundation, either **version 3** of the Licenses, or (at your option) any later version.
240
240
241
241
#### WASM Module Server and GUI Components
242
-
Licensed under the terms of the GNU General Public License (**GPL**) as published by
243
-
the Free Software Foundation, either **version 3** of the License, or (at your option)
242
+
Licensed under the terms of the GNU General Public License (**GPL**) as published by
243
+
the Free Software Foundation, either **version 3** of the License, or (at your option)
244
244
any later version.
245
245
246
246
#### General
@@ -255,8 +255,8 @@ and are available at <http://www.gnu.org/licenses/>.
255
255
256
256
Except as contained in this copyright notice, the names of the authors or
257
257
their institutions shall not be used in advertising or otherwise to
258
-
promote the sale, use, or other dealings in, any product using this
259
-
Software, or any derivative of this Software, without prior written
258
+
promote the sale, use, or other dealings in, any product using this
259
+
Software, or any derivative of this Software, without prior written
260
260
authorization from the authors.
261
261
262
262
This project may also use 3rd-party Open Source software under the terms
0 commit comments