-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
104 lines (104 loc) · 6.73 KB
/
index.html
File metadata and controls
104 lines (104 loc) · 6.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimConnectRequestTracker: SimConnect-Request-Tracker</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">SimConnectRequestTracker
</div>
<div id="projectbrief">SimConnectRequestTracker provides methods for recording and retrieving data associated with SimConnect function calls.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div><div class="header">
<div class="headertitle"><div class="title">SimConnect-Request-Tracker </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p ><a class="anchor" id="md_README"></a></p>
<h1><a class="anchor" id="autotoc_md2"></a>
C++ utility class for tracking and reporting <tt>SimConnect</tt> function invocation (request) exceptions.</h1>
<p ><code><a class="el" href="class_sim_connect_request_tracker.html" title="SimConnectRequestTracker provides methods for recording and retrieving data associated with SimConnec...">SimConnectRequestTracker</a></code> provides methods for recording and retrieving data associated with <code>SimConnect</code> function calls.</p>
<p >When <code>SimConnect</code> sends an exception message (<code>SIMCONNECT_RECV_ID_EXCEPTION</code>), it only provides a "send ID" with which to identify what caused the exception in the first place. Since requests are asynchronous, there needs to be some way to record what the original function call was in order to find out what the exception is referring to.</p>
<p >This utility class provides a simple way to see the actual function call and parameters which caused an exception. It also provides a few static utility functions which may help with <code>SimConnect</code> exception handling in general.</p>
<h2><a class="anchor" id="autotoc_md3"></a>
Requirements</h2>
<ul>
<li>MSVC v142+ or MSFS WASM platform; C++17 or above.</li>
<li>MSFS SDK with SimConnect header and library for linking.</li>
</ul>
<p >Presumably both requirements would already be satisfied if you're working with SimConnect in the first place!</p>
<h2><a class="anchor" id="autotoc_md4"></a>
Usage</h2>
<p >This is a header-only "library" with one class. Simply <code>#include "SimConnectRequestTracker.h"</code> in your code. You probably want to include it <em>after</em> any system includes, especially <code>Windows.h</code> (or <code>MSFS_WindowsTypes.h</code> for WASM)... but this is not required.</p>
<p >The public API members are fully commented in the code. Generated reference documentation is available in Markdown: README.cpp.md and in HTML: <a href="doc/index.html">doc/index.html</a>. A couple <b>usage examples</b> are included there.</p>
<p >Actual working "examples" can be found in my <a href="https://github.com/mpaperno/WASimCommander/tree/main/src">WASimCommander project</a> code, which uses the request tracker both on the WASM module (<code>WASimModule</code>) and C++ client (<code>WASimClient</code>) sides via functions in the shared <a href="https://github.com/mpaperno/WASimCommander/blob/main/src/shared/SimConnectHelper.h"><code>SimConnectHelper</code></a> namespace.</p>
<h2><a class="anchor" id="autotoc_md5"></a>
C# Version</h2>
<p >I mean to publish a complete version of the tracker for use with C# as time allows. For now one could look at how I implemented the equivalent in my <em>MSFS Touch Portal Plugin</em> project, specifically in the <a href="https://github.com/mpaperno/MSFSTouchPortalPlugin/blob/next/MSFSTouchPortalPlugin/Services/SimConnectService.cs"><code>SimConnectService</code></a> class. Look for the <em>DLL Imports</em> and <em>SimConnect Request Tracking</em> <code>#region</code> markers.</p>
<h2><a class="anchor" id="autotoc_md6"></a>
Copyright and Disclaimer</h2>
<p >SimConnect-Request-Tracker<br />
Code and documentation: Copyright Maxim Paperno, all rights reserved.</p>
<p >This program and associated files may be used under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p >This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p >A copy of the GNU General Public License is included in this repository and is also available at <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
</ul>
</div>
</body>
</html>