Skip to content

Commit 8d0185e

Browse files
committed
Merge branch 'next'
2 parents 377a159 + 67ff6df commit 8d0185e

File tree

32 files changed

+1485
-577
lines changed

32 files changed

+1485
-577
lines changed

CHANGELOG.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,66 @@
11
# WASimCommander - Change Log
22

3-
## 1.2.0.0 (07-Nov-2022)
3+
## 1.3.0.0 (15-Nov-2024)
4+
5+
### WASimModule
6+
* The server will now handle connection, ping, and custom calculator events initiated with `SimConnect_TransmitClientEvent_EX1()` (as well as the older `TransmitClientEvent()` version). ([8f42b51d])
7+
* Updated reference list of KEY event names for MSFS SDK v0.23.1.0 ([b115d8b6]) and v0.24.3.0 ([495274d5]).
8+
9+
### WASimClient (C++) and WASimClient_CLI (managed .NET)
10+
* Added ability to use "custom named simulator events" (such as "Custom.Event") directly from `WASimClient`, w/out needing a separate `SimConnect` session ([61912e66]):
11+
* Added `registerCustomKeyEvent()` method for mapping event names to numeric IDs (similar in purpose to `SimConnect_MapClientEventToSimEvent()` function). See [documentation][registerCustomKeyEvent] for details.
12+
* `sendKeyEvent()` can now be used to trigger registered custom events (similar to `SimConnect_TransmitClientEvent[_EX1]()` functions), by ID or name. See [documentation][sendKeyEvent] for details.
13+
* Note: This is a client-side feature, not involving the server-side `WASimModule` at all, provided for convenience.
14+
* Added basic test/example of usage in `CPP_BasicConsole` and `CS_BasicConsole` project code.
15+
* Many thanks to [Hans Billiet] for the motivation and [original code][hb-custom-events]!
16+
* Added ability to set Sim Vars using `string` values using the new [setVariable(var, stringValue)] overload or `setSimVarVariable()` methods (see below). ([9603c9f4])
17+
This is also a client-only side feature since the only way to set string values is with SimConnect (or the in-game JS API).
18+
* Added convenience methods for setting Sim Vars ('A' type) specifically. There are 4 overloads of [setSimVarVariable()] for setting numeric or string values, with or w/out an index. ([62991392])
19+
* Fixed that the key event name lookup cache used with `sendKeyEvent(eventName)` string overload wasn't entirely thread-safe. Thanks to [Hans Billiet] for reporting! ([03753d8b])
20+
* Added new [`DataRequest()` constructor][DataRequest_5] overloads for calculated result type w/out `valueSize` argument where the size is determined based on the desired calculation result type. ([9f7aa9c5])
21+
22+
### WASimClient_CLI (managed .NET)
23+
* Fixed possible `null` `String` references in `RegisteredEvent` and `VariableRequest` structs when created with some constructor overloads (for example when attempting to send a `new VariableRequest(localVariableId)`). Thanks to [Hans Billiet] for reporting! ([1632ed18])
24+
* Added .NET8 builds to SDK distribution. This is also now the default .NET version for the VS solution's Release & Debug build configurations.
25+
26+
### WASimUI
27+
* Can now set Sim Var string type values in the "Variables" section. The "string" unit type must be selected to show the text value entry box. ([8616c608])
28+
* Updated database of imported Event IDs and Simulator Variables from published online SDK docs as of Mar-1-2024. ([35a495c6])
29+
30+
### Documentation
31+
* Split [WASimClient's][WASimClient_docs] "high level API" methods overview into more specific groups.
32+
* Added/improved some details about `WASimClient`'s event callbacks and possible concurrency issues. ([e474c7fd])
33+
34+
### Other
35+
* All distributed pre-built libraries and module are built against MSFS SDK v0.24.3.0.
36+
37+
**[Full Change Log](https://github.com/mpaperno/WASimCommander/compare/v1.2.0.0...v1.3.0.0)**
38+
39+
[8f42b51d]: https://github.com/mpaperno/WASimCommander/commit/8f42b51d1d94f704e001940abe2ff3f1434a9481
40+
[b115d8b6]: https://github.com/mpaperno/WASimCommander/commit/b115d8b64e77eaf8112de7a15c9d0dfc2fa29904
41+
[03753d8b]: https://github.com/mpaperno/WASimCommander/commit/03753d8b834bfd0239aee2df1043c3b0377d4a55
42+
[1632ed18]: https://github.com/mpaperno/WASimCommander/commit/1632ed1883108f0ba5ff03610ce4fc902d84387c
43+
[35a495c6]: https://github.com/mpaperno/WASimCommander/commit/35a495c6a3dc9beb13ffc05bdeab105f3b7a9fae
44+
[61912e66]: https://github.com/mpaperno/WASimCommander/commit/61912e66f5e51791d51fce42bb96de38f7d5b6a0
45+
[e474c7fd]: https://github.com/mpaperno/WASimCommander/commit/e474c7fdb9074d29064392354e2829c3d2267dee
46+
[9603c9f4]: https://github.com/mpaperno/WASimCommander/commit/9603c9f4fffed62be94a44a42a0ae8fda7c218c6
47+
[62991392]: https://github.com/mpaperno/WASimCommander/commit/62991392226c05a972b4db7b3f8aaaf5329a60e8
48+
[8616c608]: https://github.com/mpaperno/WASimCommander/commit/8616c6080308f4dbb1963ce6787ab0221babab20
49+
[9f7aa9c5]: https://github.com/mpaperno/WASimCommander/commit/9f7aa9c588fb5976363692c3ca160cfe4bbd97fd
50+
[495274d5]: https://github.com/mpaperno/WASimCommander/commit/495274d5ca509d6663f7575f8888360ccd6907f8
51+
[custom-key-events]: https://github.com/mpaperno/WASimCommander/compare/dbd4c469611750a8a9e7222740428fd4851b516f..e98fbd42b8e6aea34e0e013d261c8a48ebd47fcf
52+
[hb-custom-events]: https://github.com/HansBilliet/WASimCommander/compare/b1519c988bf44ce43af8a50880092391566af48a...83adc91fb73fa29dcc07f1461435dafe41f7d366
53+
[registerCustomKeyEvent]: https://wasimcommander.max.paperno.us/class_w_a_sim_commander_1_1_client_1_1_w_a_sim_client.html#a6e7bf0b7c6b741081bc2ce43d937ba11
54+
[sendKeyEvent]: https://wasimcommander.max.paperno.us/class_w_a_sim_commander_1_1_client_1_1_w_a_sim_client.html#adf5b8df4cb657fefaa97f97b0ebea42c
55+
[setVariable(var, stringValue)]: https://wasimcommander.max.paperno.us/class_w_a_sim_commander_1_1_client_1_1_w_a_sim_client.html#a725be5c00b1d6861826c898d095db118
56+
[setSimVarVariable()]: https://wasimcommander.max.paperno.us/class_w_a_sim_commander_1_1_client_1_1_w_a_sim_client.html#a5f0f7e3575c605a44516a407251567fe
57+
[DataRequest_5]: https://wasimcommander.max.paperno.us/struct_w_a_sim_commander_1_1_data_request.html#a5d2d8f43b6e0aeb0de5771af73a995da
58+
[WASimClient_docs]: https://wasimcommander.max.paperno.us/class_w_a_sim_commander_1_1_client_1_1_w_a_sim_client.html
59+
[Hans Billiet]: https://github.com/HansBilliet
60+
61+
62+
---
63+
## 1.2.0.0 (07-Nov-2023)
464

565
### WASimModule
666
* Fix binary data representation in results for named variable requests with 1-4 byte integer value sizes (`int8` - `int32` types) -- the result data would be encoded as a float type instead. ([8c7724e6])

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ On a more practical note, I am using it with the [MSFS Touch Portal Plugin](http
4646
- With or without a returned result; Result returned as numeric and string types.
4747
- Formatted results from `format_calculator_string()` using
4848
[RPN String Formatting](https://docs.flightsimulator.com/html/Additional_Information/Reverse_Polish_Notation.htm#strings)
49-
- **Get Variable**: Return numeric result from any type of variable accessible to a standalone WASM module
49+
- **Get Variable**: Return value result from any type of variable accessible to a standalone WASM module
5050
(basically everything but Gauge and Instrument types, but also including Token vars).
5151
- With optional Unit specifier for variable types which support it.
52-
- **Set Variable**: Set the numeric value of any settable variable type, with optional Unit specifier for variable types which support it.
52+
- **Set Variable**: Set the value of any settable variable type, with optional Unit specifier for variable types which support it.
5353
- **Create Variable**: Create (and get/set) a new Local variable if it doesn't already exist.
5454
- **List Local Variables**: Get a list of all available 'L' variables with their names and current IDs.
5555
- **Lookup**: Return a numeric ID for a SimVar/Local/Token variable, Unit, or Key Event name.
@@ -69,6 +69,7 @@ On a more practical note, I am using it with the [MSFS Touch Portal Plugin](http
6969
- Event names can be completely custom (including a `.` (period) as per SimConnect convention), or derive from the connected Client's name (to ensure uniqueness).
7070
- **Send Simulator "Key Events"** directly by ID or name (instead of going through the SimConnect mapping process or executing calculator code). Much more efficient than the other methods.
7171
- **New in v1.1.0:** Send Key Events with up to 5 values (like the new `SimConnect_TransmitClientEvent_EX1()`).
72+
- **New in v1.3.0:** Send Custom Key Events (the ones with a "." in the name that are defined by particular models) by name or ID with up to 5 values.
7273
- **Remote Logging**: Log messages (errors, warnings, debug, etc) can optionally be sent to the Client, with specific minimum level (eg. only warnings and errors).
7374
- **Ping** the Server to check that the WASM module is installed and running before trying to connect or use its features.
7475

@@ -131,6 +132,30 @@ API features. The main `WASimClient` interactions all happen in the `MainWindow:
131132

132133
More to come... or [Just Read The Source](https://github.com/mpaperno/WASimCommander/tree/main/src) :-)
133134

135+
#### Using .NET Libraries
136+
137+
Please note that when using the .NET builds in your project, it is **vital to include the `Ijwhost.dll`** in your runtime directory along with `WASimCommander.WASimClient.dll`.
138+
139+
While the latter will get copied to your build output automatically as a dependency, the `Ijwhost.dll` will *not*. This will result in a runtime error that says
140+
`Could not load file or assembly 'WASimCommander.WASimClient.dll'. The specified module could not be found.` even though it is clearly there in the runtime directory.
141+
142+
Likewise you will probably want to copy the default `client_conf.ini` configuration file to your build output/runtime as well (this file defines some default options like logging).
143+
144+
Both files should be included in the build as "content" files. This can be done via the VS UI or by editing the project file directly.
145+
As an example, assuming you copied the WASimCommander managed libraries to a `./lib` folder of your source, the following two entries
146+
from a .csproj file illustrate the settings:
147+
148+
```xml
149+
<ContentWithTargetPath Include=".\lib\WASimCommander\Ijwhost.dll">
150+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
151+
<TargetPath>Ijwhost.dll</TargetPath>
152+
</ContentWithTargetPath>
153+
<ContentWithTargetPath Include=".\lib\WASimCommander\client_conf.ini">
154+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
155+
<TargetPath>client_conf.ini</TargetPath>
156+
</ContentWithTargetPath>
157+
```
158+
134159
-------------
135160
### Troubleshooting
136161

build/build.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Param(
99
[string[]]$Targets = "all",
1010
[string]$RootPath = "..",
11-
[string[]]$Configuration = @("Debug", "Debug-DLL", "Release-DLL", "Release-net6", "Release-net7", "Release-netfw", "Release"),
11+
[string[]]$Configuration = @("Debug", "Debug-DLL", "Release-DLL", "Release-net5", "Release-net6", "Release-net7", "Release-netfw", "Release"),
1212
[string]$Platform = "x64",
1313
[string[]]$Projects = "all",
1414
[string]$BuildType = "Clean,Rebuild",
@@ -35,7 +35,7 @@ $ModulePackage = "${PackagePath}\module"
3535
$DocsDistroPath = "$RootPath\..\gh-pages"
3636

3737
$testApps = @{
38-
"$BuildPath\CS_BasicConsole\Release-$Platform\$Platform\Release\net6.0-windows" = "$PackagePath\bin\CS_BasicConsole";
38+
"$BuildPath\CS_BasicConsole\Release-net8-$Platform\$Platform\Release-net8\net8.0-windows" = "$PackagePath\bin\CS_BasicConsole";
3939
"$BuildPath\CPP_BasicConsole\Release-$Platform" = "$PackagePath\bin\CPP_BasicConsole"
4040
"$SrcPath\Testing\Py_BasicConsole" = "$PackagePath\bin\Py_BasicConsole"
4141
}
@@ -148,15 +148,18 @@ if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
148148
# Managed DLL
149149
$csLibPath = "${LibPath}\managed"
150150

151-
# .NET 5 (default Release build)
152-
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-$Platform" "${csLibPath}\net5" *.dll *.pdb *.xml *.ini $copyOptions
151+
# .NET 5
152+
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-net5-$Platform" "${csLibPath}\net5" *.dll *.pdb *.xml *.ini $copyOptions
153153
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
154154
# .NET 6
155155
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-net6-$Platform" "${csLibPath}\net6" *.dll *.pdb *.xml *.ini $copyOptions
156156
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
157157
# .NET 7
158158
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-net7-$Platform" "${csLibPath}\net7" *.dll *.pdb *.xml *.ini $copyOptions
159159
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
160+
# .NET 8 (default Release build)
161+
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-$Platform" "${csLibPath}\net8" *.dll *.pdb *.xml *.ini $copyOptions
162+
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }
160163
# .NET Framework
161164
robocopy "$BuildPath\${CLIENT_NAME}_CLI\Release-netfw-$Platform" "${csLibPath}\net46" *.dll *.pdb *.xml *.ini $copyOptions
162165
if ($LastExitCode -ge 8) { Write-Output($LastExitCode); Exit 1 }

build/version.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
$VER_MAJOR = 1
3-
$VER_MINOR = 2
3+
$VER_MINOR = 3
44
$VER_PATCH = 0
55
$VER_BUILD = 0
66
$VER_COMIT = 0

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wasimcommander.max.paperno.us

docs/Doxyfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,14 @@ CLANG_OPTIONS = -std=c++17 \
183183
GENERATE_HTML = YES
184184
HTML_OUTPUT = html
185185
HTML_HEADER = header.html
186-
HTML_FOOTER =
186+
HTML_FOOTER = footer.html
187187
HTML_EXTRA_STYLESHEET = doxyawesome/doxygen-awesome.css \
188188
customdoxygen.css
189189
HTML_EXTRA_FILES = doxyawesome/doxygen-awesome-darkmode-toggle.js \
190190
doxyawesome/doxygen-awesome-paragraph-link.js \
191-
.nojekyll
191+
.nojekyll \
192+
CNAME
193+
192194
HTML_COLORSTYLE_HUE = 235
193195
HTML_COLORSTYLE_SAT = 19
194196
HTML_COLORSTYLE_GAMMA = 185

docs/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
55
<ul>
66
$navpath
7-
<li class="footer">$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion </li>
7+
<li class="footer">Generated for $projectname &#160;$projectnumber by <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion </li>
88
</ul>
99
</div>
1010
<!--END GENERATE_TREEVIEW-->
1111
<!--BEGIN !GENERATE_TREEVIEW-->
1212
<hr class="footer"/><address class="footer"><small>
13-
$generatedby&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion
13+
Generated for $projectname &#160;$projectnumber by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion
1414
</small></address>
1515
<!--END !GENERATE_TREEVIEW-->
1616
</body>

docs/version.Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# THIS FILE IS GENERATED BY A SCRIPT, CHANGES WILL NOT PERSIST. EDIT THE CORRESPONDING .in TEMPLATE FILE INSTEAD.
44

55
PROJECT_NAME = "WASimCommander"
6-
PROJECT_NUMBER = v1.2.0.0
6+
PROJECT_NUMBER = v1.3.0.0
77
PROJECT_BRIEF = "Remote access to the Microsoft Flight Simulator 2020 Gauge API."

0 commit comments

Comments
 (0)