gh-pages
nirenjan 2023-01-21 10:41:43 +00:00
parent b3de97f984
commit 34a13c7568
4 changed files with 18 additions and 31 deletions

View File

@ -104,7 +104,7 @@ $(function() {
<div class="ttc" id="agroup__libx52misc_html_gga93b777d9cea6e733b63c222e6115ccb7a8c4729a9500f0b9032d874ca7942b708"><div class="ttname"><a href="group__libx52misc.html#gga93b777d9cea6e733b63c222e6115ccb7a8c4729a9500f0b9032d874ca7942b708">LIBX52_SUCCESS</a></div><div class="ttdeci">@ LIBX52_SUCCESS</div><div class="ttdef"><b>Definition:</b> libx52.h:165</div></div> <div class="ttc" id="agroup__libx52misc_html_gga93b777d9cea6e733b63c222e6115ccb7a8c4729a9500f0b9032d874ca7942b708"><div class="ttname"><a href="group__libx52misc.html#gga93b777d9cea6e733b63c222e6115ccb7a8c4729a9500f0b9032d874ca7942b708">LIBX52_SUCCESS</a></div><div class="ttdeci">@ LIBX52_SUCCESS</div><div class="ttdef"><b>Definition:</b> libx52.h:165</div></div>
<div class="ttc" id="agroup__libx52str_html_gaa29a1022b0c3eb4894ddfd4934c3cf0e"><div class="ttname"><a href="group__libx52str.html#gaa29a1022b0c3eb4894ddfd4934c3cf0e">libx52_strerror</a></div><div class="ttdeci">const char * libx52_strerror(libx52_error_code error)</div><div class="ttdoc">Return a string representation of the error code.</div></div> <div class="ttc" id="agroup__libx52str_html_gaa29a1022b0c3eb4894ddfd4934c3cf0e"><div class="ttname"><a href="group__libx52str.html#gaa29a1022b0c3eb4894ddfd4934c3cf0e">libx52_strerror</a></div><div class="ttdeci">const char * libx52_strerror(libx52_error_code error)</div><div class="ttdoc">Return a string representation of the error code.</div></div>
<div class="ttc" id="alibx52_8h_html"><div class="ttname"><a href="libx52_8h.html">libx52.h</a></div><div class="ttdoc">Functions, structures and enumerations for the Saitek X52 MFD &amp; LED driver library.</div></div> <div class="ttc" id="alibx52_8h_html"><div class="ttname"><a href="libx52_8h.html">libx52.h</a></div><div class="ttdoc">Functions, structures and enumerations for the Saitek X52 MFD &amp; LED driver library.</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md36"></a> </div><!-- fragment --><h1><a class="anchor" id="autotoc_md35"></a>
Joystick Updates</h1> Joystick Updates</h1>
<p>Most libx52 functions to update the joystick state do not directly write to the connected joystick, but only update internal data structures within the device context. In order to actually update the joystick, the application must call <a class="el" href="group__libx52misc.html#ga5d1fdbcab1b1a6cf8a10c206f8e79f73">libx52_update</a>. This function writes the updates to the joystick and resets any internal state.</p> <p>Most libx52 functions to update the joystick state do not directly write to the connected joystick, but only update internal data structures within the device context. In order to actually update the joystick, the application must call <a class="el" href="group__libx52misc.html#ga5d1fdbcab1b1a6cf8a10c206f8e79f73">libx52_update</a>. This function writes the updates to the joystick and resets any internal state.</p>
<p><b>Example</b> </p> <p><b>Example</b> </p>
@ -114,11 +114,11 @@ Joystick Updates</h1>
<div class="line"><a class="code" href="group__libx52misc.html#ga5d1fdbcab1b1a6cf8a10c206f8e79f73">libx52_update</a>(dev);</div> <div class="line"><a class="code" href="group__libx52misc.html#ga5d1fdbcab1b1a6cf8a10c206f8e79f73">libx52_update</a>(dev);</div>
<div class="ttc" id="agroup__libx52mfdled_html_ga4f2b73685a4eb307895e08a02903bb39"><div class="ttname"><a href="group__libx52mfdled.html#ga4f2b73685a4eb307895e08a02903bb39">libx52_set_text</a></div><div class="ttdeci">int libx52_set_text(libx52_device *x52, uint8_t line, const char *text, uint8_t length)</div><div class="ttdoc">Set the text on an MFD line.</div></div> <div class="ttc" id="agroup__libx52mfdled_html_ga4f2b73685a4eb307895e08a02903bb39"><div class="ttname"><a href="group__libx52mfdled.html#ga4f2b73685a4eb307895e08a02903bb39">libx52_set_text</a></div><div class="ttdeci">int libx52_set_text(libx52_device *x52, uint8_t line, const char *text, uint8_t length)</div><div class="ttdoc">Set the text on an MFD line.</div></div>
<div class="ttc" id="agroup__libx52misc_html_ga5d1fdbcab1b1a6cf8a10c206f8e79f73"><div class="ttname"><a href="group__libx52misc.html#ga5d1fdbcab1b1a6cf8a10c206f8e79f73">libx52_update</a></div><div class="ttdeci">int libx52_update(libx52_device *x52)</div><div class="ttdoc">Update the X52.</div></div> <div class="ttc" id="agroup__libx52misc_html_ga5d1fdbcab1b1a6cf8a10c206f8e79f73"><div class="ttname"><a href="group__libx52misc.html#ga5d1fdbcab1b1a6cf8a10c206f8e79f73">libx52_update</a></div><div class="ttdeci">int libx52_update(libx52_device *x52)</div><div class="ttdoc">Update the X52.</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md37"></a> </div><!-- fragment --><h1><a class="anchor" id="autotoc_md36"></a>
Error handling</h1> Error handling</h1>
<p>Most libx52 functions return a standard <a class="el" href="group__libx52misc.html#ga93b777d9cea6e733b63c222e6115ccb7">libx52_error_code</a> integer value that indicates the status of the operation. As long as the operation succeeded, the function will return <a class="el" href="group__libx52misc.html#gga93b777d9cea6e733b63c222e6115ccb7a8c4729a9500f0b9032d874ca7942b708">LIBX52_SUCCESS</a>. Other values returned indicate a failure of some sort.</p> <p>Most libx52 functions return a standard <a class="el" href="group__libx52misc.html#ga93b777d9cea6e733b63c222e6115ccb7">libx52_error_code</a> integer value that indicates the status of the operation. As long as the operation succeeded, the function will return <a class="el" href="group__libx52misc.html#gga93b777d9cea6e733b63c222e6115ccb7a8c4729a9500f0b9032d874ca7942b708">LIBX52_SUCCESS</a>. Other values returned indicate a failure of some sort.</p>
<p><a class="el" href="group__libx52str.html#gaa29a1022b0c3eb4894ddfd4934c3cf0e">libx52_strerror</a> can convert the return code into a descriptive string that may be displayed to users.</p> <p><a class="el" href="group__libx52str.html#gaa29a1022b0c3eb4894ddfd4934c3cf0e">libx52_strerror</a> can convert the return code into a descriptive string that may be displayed to users.</p>
<h2><a class="anchor" id="autotoc_md38"></a> <h2><a class="anchor" id="autotoc_md37"></a>
Internationalization of error strings</h2> Internationalization of error strings</h2>
<p><a class="el" href="group__libx52str.html#gaa29a1022b0c3eb4894ddfd4934c3cf0e">libx52_strerror</a> automatically handles internationalization. As long as your application sets up the locale correctly, and the error strings have been translated to that locale, the returned strings will correspond to the translated values for your locale. </p> <p><a class="el" href="group__libx52str.html#gaa29a1022b0c3eb4894ddfd4934c3cf0e">libx52_strerror</a> automatically handles internationalization. As long as your application sets up the locale correctly, and the error strings have been translated to that locale, the returned strings will correspond to the translated values for your locale. </p>
</div></div><!-- contents --> </div></div><!-- contents -->

View File

@ -82,7 +82,6 @@ $(function() {
</li> </li>
<li class="level1"><a href="#autotoc_md26">Retrieve configuration parameter</a></li> <li class="level1"><a href="#autotoc_md26">Retrieve configuration parameter</a></li>
<li class="level1"><a href="#autotoc_md27">Set configuration parameter</a></li> <li class="level1"><a href="#autotoc_md27">Set configuration parameter</a></li>
<li class="level1"><a href="#autotoc_md28">Apply configuration</a></li>
</ul> </ul>
</div> </div>
<div class="textblock"><p>The <code>config</code> commands deal with <b>x52d</b> configuration subsystem, and have the following subcommands.</p> <div class="textblock"><p>The <code>config</code> commands deal with <b>x52d</b> configuration subsystem, and have the following subcommands.</p>
@ -183,7 +182,7 @@ Retrieve configuration parameter</h1>
Set configuration parameter</h1> Set configuration parameter</h1>
<p>The <code>config set</code> command requests the <b>x52d</b> daemon to set the given (section, key) parameter to the given value. The daemon will treat it the same way as if it was being read from the configuration file, i.e., it will follow identical parsing logic, including ignoring unknown keys and not reporting errors for them.</p> <p>The <code>config set</code> command requests the <b>x52d</b> daemon to set the given (section, key) parameter to the given value. The daemon will treat it the same way as if it was being read from the configuration file, i.e., it will follow identical parsing logic, including ignoring unknown keys and not reporting errors for them.</p>
<p>A side effect of this is that the client could request a set for any arbitrary section and key pair, and if that pair was not recognized, it would be ignored, but the daemon would still send an <code>OK</code> response.</p> <p>A side effect of this is that the client could request a set for any arbitrary section and key pair, and if that pair was not recognized, it would be ignored, but the daemon would still send an <code>OK</code> response.</p>
<p>Finally, this will only set the value within the configuration memory structures, and will not invoke any callback to update the rest of the threads or device state. The client will need to call the <code>apply</code> subcommand to actually invoke the necessary callbacks.</p> <p>This will set the value within the configuration memory structures, and will immediately invoke the relevant callback to update the rest of the threads or device state.</p>
<p><b>Arguments</b> </p> <p><b>Arguments</b> </p>
<ul> <ul>
<li><code>config</code></li> <li><code>config</code></li>
@ -203,21 +202,7 @@ Set configuration parameter</h1>
</ul> </ul>
<p><b>Error example</b></p> <p><b>Error example</b></p>
<div class="fragment"><div class="line">ERR\0Error 22 setting <span class="stringliteral">&#39;led.fire&#39;</span>=<span class="stringliteral">&#39;none&#39;</span>: Invalid argument\0</div> <div class="fragment"><div class="line">ERR\0Error 22 setting <span class="stringliteral">&#39;led.fire&#39;</span>=<span class="stringliteral">&#39;none&#39;</span>: Invalid argument\0</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md28"></a> </div><!-- fragment --> </div></div><!-- contents -->
Apply configuration</h1>
<p>The <code>config apply</code> command will invoke all the callbacks and ensure that the configuration is applied to the running state.</p>
<p><b>Arguments</b> </p>
<ul>
<li><code>config</code></li>
<li><code>apply</code></li>
</ul>
<p><b>Returns</b> </p>
<ul>
<li><code>OK</code></li>
<li><code>config</code></li>
<li><code>apply</code> </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc --> </div><!-- PageDoc -->
<!-- start footer part --> <!-- start footer part -->
<hr class="footer"/><address class="footer"><small> <hr class="footer"/><address class="footer"><small>

View File

@ -72,27 +72,29 @@ $(function() {
</div><!--header--> </div><!--header-->
<div class="contents"> <div class="contents">
<div class="toc"><h3>Table of Contents</h3> <div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#autotoc_md29">Modules</a></li> <ul><li class="level1"><a href="#autotoc_md28">Modules</a></li>
<li class="level1"><a href="#autotoc_md30">Logging levels</a></li> <li class="level1"><a href="#autotoc_md29">Logging levels</a></li>
<li class="level1"><a href="#autotoc_md31">Show logging configuration</a></li> <li class="level1"><a href="#autotoc_md30">Show logging configuration</a></li>
<li class="level1"><a href="#autotoc_md32">Set logging configuration</a></li> <li class="level1"><a href="#autotoc_md31">Set logging configuration</a></li>
</ul> </ul>
</div> </div>
<div class="textblock"><p>The <code>logging</code> commands allow the user to fine tune the logging configuration of <code>x52d</code> as well as adjust the log levels for either all the modules, or for each of the modules individually.</p> <div class="textblock"><p>The <code>logging</code> commands allow the user to fine tune the logging configuration of <code>x52d</code> as well as adjust the log levels for either all the modules, or for each of the modules individually.</p>
<p>While the <code>-v</code> and <code>-q</code> command line options allow you to either increase the logging verbosity or suppress it entirely, they are required to be specified at program startup. On the other hand, having the <code>logging</code> commands allows the user to fine tune the logging while the daemon is running.</p> <p>While the <code>-v</code> and <code>-q</code> command line options allow you to either increase the logging verbosity or suppress it entirely, they are required to be specified at program startup. On the other hand, having the <code>logging</code> commands allows the user to fine tune the logging while the daemon is running.</p>
<h1><a class="anchor" id="autotoc_md29"></a> <h1><a class="anchor" id="autotoc_md28"></a>
Modules</h1> Modules</h1>
<p><code>x52d</code> is split into several modules as far as logging is concerned. The list of modules is below:</p> <p><code>x52d</code> is split into several modules as far as logging is concerned. The list of modules is below:</p>
<ul> <ul>
<li><code>Config</code> </li> <li><code>Config</code> </li>
<li><code>Cllient</code> </li>
<li><code>Clock</code> </li> <li><code>Clock</code> </li>
<li><code>Command</code> </li> <li><code>Command</code> </li>
<li><code>Device</code> </li> <li><code>Device</code> </li>
<li><code>IO</code> </li> <li><code>IO</code> </li>
<li><code>LED</code> </li> <li><code>LED</code> </li>
<li><code>Mouse</code> </li> <li><code>Mouse</code> </li>
<li><code>Notify</code> </li>
</ul> </ul>
<h1><a class="anchor" id="autotoc_md30"></a> <h1><a class="anchor" id="autotoc_md29"></a>
Logging levels</h1> Logging levels</h1>
<p>The following is a list of supported logging levels. Each level logs the ones above it as well as the current level</p> <p>The following is a list of supported logging levels. Each level logs the ones above it as well as the current level</p>
<ul> <ul>
@ -105,7 +107,7 @@ Logging levels</h1>
<li><code>trace</code> - Log trace messages - useful for tracing program flow.</li> <li><code>trace</code> - Log trace messages - useful for tracing program flow.</li>
<li><code>default</code> - Not a level, but used when configuring module log levels, makes the module log level fallback to the global log level.</li> <li><code>default</code> - Not a level, but used when configuring module log levels, makes the module log level fallback to the global log level.</li>
</ul> </ul>
<h1><a class="anchor" id="autotoc_md31"></a> <h1><a class="anchor" id="autotoc_md30"></a>
Show logging configuration</h1> Show logging configuration</h1>
<p>The <code>logging show</code> command takes in an optional module name, as listed in the Modules section above. It returns the module name, if specified, and the log level for that module. If the module is configured to fallback to the global level, then it will return the global level.</p> <p>The <code>logging show</code> command takes in an optional module name, as listed in the Modules section above. It returns the module name, if specified, and the log level for that module. If the module is configured to fallback to the global level, then it will return the global level.</p>
<p><b>Arguments</b> </p> <p><b>Arguments</b> </p>
@ -120,7 +122,7 @@ Show logging configuration</h1>
<li><code><em>module-name</code></em> (if specified)</li> <li><code><em>module-name</code></em> (if specified)</li>
<li><em>log-level</em> </li> <li><em>log-level</em> </li>
</ul> </ul>
<h1><a class="anchor" id="autotoc_md32"></a> <h1><a class="anchor" id="autotoc_md31"></a>
Set logging configuration</h1> Set logging configuration</h1>
<p>The <code>logging set</code> command takes in the optional module name and the log level and sets the log level for that module, if specified, or the global level otherwise.</p> <p>The <code>logging set</code> command takes in the optional module name and the log level and sets the log level for that module, if specified, or the global level otherwise.</p>
<p><b>Arguments</b> </p> <p><b>Arguments</b> </p>

View File

@ -70,15 +70,15 @@ $(function() {
<div class="textblock"><p> <div class="textblock"><p>
<b>x52ctl</b> - Command line controller to X52 daemon <b>x52ctl</b> - Command line controller to X52 daemon
</p> </p>
<h1><a class="anchor" id="autotoc_md33"></a> <h1><a class="anchor" id="autotoc_md32"></a>
SYNOPSIS</h1> SYNOPSIS</h1>
<p><code><b>x52ctl</b> [<em>-i</em>] [<em>-s</em> socket-path] [command] </code></p> <p><code><b>x52ctl</b> [<em>-i</em>] [<em>-s</em> socket-path] [command] </code></p>
<h1><a class="anchor" id="autotoc_md34"></a> <h1><a class="anchor" id="autotoc_md33"></a>
DESCRIPTION</h1> DESCRIPTION</h1>
<p>x52ctl is a program that can be used to communicate with the X52 daemon. It can be used either as a one-shot program that can be run from another program or script, or it can be run interactively.</p> <p>x52ctl is a program that can be used to communicate with the X52 daemon. It can be used either as a one-shot program that can be run from another program or script, or it can be run interactively.</p>
<p>Commands are sent to the running daemon, and responses are written to standard output.</p> <p>Commands are sent to the running daemon, and responses are written to standard output.</p>
<p>If not running interactively, then you must specify a command, or the program will exit with a failure exit code. If running interactively, the program will request input and send that to the daemon, until the user either enters the string "quit", or terminates input by using Ctrl+D.</p> <p>If not running interactively, then you must specify a command, or the program will exit with a failure exit code. If running interactively, the program will request input and send that to the daemon, until the user either enters the string "quit", or terminates input by using Ctrl+D.</p>
<h1><a class="anchor" id="autotoc_md35"></a> <h1><a class="anchor" id="autotoc_md34"></a>
OPTIONS</h1> OPTIONS</h1>
<ul> <ul>
<li><code><b>-i</code></b> Run in interactive mode. Any additional non-option arguments are ignored.</li> <li><code><b>-i</code></b> Run in interactive mode. Any additional non-option arguments are ignored.</li>