gem-graph-client/doc/html/d4/d07/fsm_2dispatch_8c.html

498 lines
29 KiB
HTML
Raw Normal View History

2024-10-20 01:05:12 +02:00
<!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" lang="en-US">
<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.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Gem-graph: src/fsm/dispatch.c File Reference</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="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.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="projectlogo"><img alt="Logo" src="../../logo icon mini.png"/></td>
<td id="projectalign">
<div id="projectname">Gem-graph<span id="projectnumber">&#160;0.1.0</span>
</div>
<div id="projectbrief">A modelling tool based on rewriting of geometric graphs.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<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&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_2e581129b453fd71c794a7e24f5ee6d2.html">fsm</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">dispatch.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<p>fsm (Finite State Machine) tasks dispatcher
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &quot;<a class="el" href="../../dd/d01/fsm_8h.html">../../include/fsm.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="../../d8/d0c/util_8h.html">../../include/util.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="../../df/d05/widget_8h.html">../../include/widget.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a435d1a5171a7d69662d701234722fee2" id="r_a435d1a5171a7d69662d701234722fee2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a435d1a5171a7d69662d701234722fee2">fsm_journal_publication_request</a> ()</td></tr>
<tr class="memdesc:a435d1a5171a7d69662d701234722fee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The <a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a435d1a5171a7d69662d701234722fee2" title="The fsm_journal_publication_request() is called only once, by main(), just after closing the app and ...">fsm_journal_publication_request()</a> is called only once, by <a class="el" href="../../d0/d09/main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, just after closing the app and before ending the program. <br /></td></tr>
<tr class="separator:a435d1a5171a7d69662d701234722fee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c67f42f95d48ee2469c9a27d65db3e6" id="r_a8c67f42f95d48ee2469c9a27d65db3e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a8c67f42f95d48ee2469c9a27d65db3e6">fsm_journal_event</a> (int severity, int source, const char *file_source, const char *function_source, const char *string_value)</td></tr>
<tr class="memdesc:a8c67f42f95d48ee2469c9a27d65db3e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">It is mandatory for any event to call this function to be published in the journal. <br /></td></tr>
<tr class="separator:a8c67f42f95d48ee2469c9a27d65db3e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d91f5868f20ad3b72cfa63787d87444" id="r_a8d91f5868f20ad3b72cfa63787d87444"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a8d91f5868f20ad3b72cfa63787d87444">fsm_init</a> (char *initial_message_from_main)</td></tr>
<tr class="memdesc:a8d91f5868f20ad3b72cfa63787d87444"><td class="mdescLeft">&#160;</td><td class="mdescRight">fsm init is the first function called by <a class="el" href="../../d0/d09/main_8c.html" title="Gem-graph-client main file.">main.c</a> It initiates the journal and the four lists: 'measures', 'results', 'displayables results' and 'preferences'. <br /></td></tr>
<tr class="separator:a8d91f5868f20ad3b72cfa63787d87444"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a770bcaeb0bd6f81cddcc3cd506468fff" id="r_a770bcaeb0bd6f81cddcc3cd506468fff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a770bcaeb0bd6f81cddcc3cd506468fff">fsm_set_preferences_modified</a> (bool value)</td></tr>
<tr class="memdesc:a770bcaeb0bd6f81cddcc3cd506468fff"><td class="mdescLeft">&#160;</td><td class="mdescRight">setter for the static boolean: 'preferences_have_been_modified' <br /></td></tr>
<tr class="separator:a770bcaeb0bd6f81cddcc3cd506468fff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b0231a311d0e85723ef9fcf38be88e3" id="r_a0b0231a311d0e85723ef9fcf38be88e3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a0b0231a311d0e85723ef9fcf38be88e3">fsm_get_preferences_state</a> ()</td></tr>
<tr class="memdesc:a0b0231a311d0e85723ef9fcf38be88e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">getter for the static boolean: 'preferences_have_been_modified' <br /></td></tr>
<tr class="separator:a0b0231a311d0e85723ef9fcf38be88e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9123915ffd10fe1ae18254898b1c0ebf" id="r_a9123915ffd10fe1ae18254898b1c0ebf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a9123915ffd10fe1ae18254898b1c0ebf">fsm_get_exec_edit</a> ()</td></tr>
<tr class="memdesc:a9123915ffd10fe1ae18254898b1c0ebf"><td class="mdescLeft">&#160;</td><td class="mdescRight">some client pages (in particular "state" and "rules") will be displayed and behave differently depending on whether the fsm is in edit or run state. <br /></td></tr>
<tr class="separator:a9123915ffd10fe1ae18254898b1c0ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90ab14081a88752d3721947a4922ee25" id="r_a90ab14081a88752d3721947a4922ee25"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a90ab14081a88752d3721947a4922ee25">fsm_get_state_rules_data</a> ()</td></tr>
<tr class="memdesc:a90ab14081a88752d3721947a4922ee25"><td class="mdescLeft">&#160;</td><td class="mdescRight">The value of the static int choice_STATE_RULES_DATA can be one of the enum include/fsm enum fsm_enum_state_rules_data. <br /></td></tr>
<tr class="separator:a90ab14081a88752d3721947a4922ee25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae921ecd39af67bb8dc0deb2cdc86125d" id="r_ae921ecd39af67bb8dc0deb2cdc86125d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#ae921ecd39af67bb8dc0deb2cdc86125d">fsm_set_exec_edit</a> (int choice)</td></tr>
<tr class="memdesc:ae921ecd39af67bb8dc0deb2cdc86125d"><td class="mdescLeft">&#160;</td><td class="mdescRight">setter for the static value: 'choice_STATE_RULES_DATA' (in this file) <br /></td></tr>
<tr class="separator:ae921ecd39af67bb8dc0deb2cdc86125d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5a464b19589ba1972c9b3aa3397945a" id="r_af5a464b19589ba1972c9b3aa3397945a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#af5a464b19589ba1972c9b3aa3397945a">fsm_set_state_rules_data</a> (int choice)</td></tr>
<tr class="memdesc:af5a464b19589ba1972c9b3aa3397945a"><td class="mdescLeft">&#160;</td><td class="mdescRight">setter for the static value: 'choice_STATE_RULES_DATA' (in this file) <br /></td></tr>
<tr class="separator:af5a464b19589ba1972c9b3aa3397945a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>fsm (Finite State Machine) tasks dispatcher </p>
<p>This file is part of Gem-graph.</p>
<p>The Finite State Machine (fsm) describes all the possible states of the Gem-graph client and all the transitions between them. It manages several kinds of exclusive states:</p><ul>
<li>Run the model or edit it.</li>
<li>Select a single view of the model from all those possible. The different views show either the space, or the rule tree, or a single rule of interest, or measurements or results. NB an overview is possible, but it does not provide details.</li>
<li>Apply a selected measurement to the currently running model</li>
<li>Select some results for study or/and presentation.</li>
<li>Choose the user's preferred values for a set of parameters used to modify the appearance or behaviour of gem-graph.</li>
</ul>
<p>Each state of the fsm is a combination of each of these states.</p>
<p>The current state of the fsm must be</p><ul>
<li>saved at the end of a work session and</li>
<li>reread (available to the user) at the start of a new session.</li>
</ul>
<p>No state of the fsm should be defined in another module.</p>
<p>No fsm transition should be executed in another module.</p>
<p>The journal is created, edited and published from here. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a9123915ffd10fe1ae18254898b1c0ebf" name="a9123915ffd10fe1ae18254898b1c0ebf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9123915ffd10fe1ae18254898b1c0ebf">&#9670;&#160;</a></span>fsm_get_exec_edit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int fsm_get_exec_edit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>some client pages (in particular "state" and "rules") will be displayed and behave differently depending on whether the fsm is in edit or run state. </p>
<p>Any function which modifies the appearance or behavior of these pages must use this getter to access the choice_EXEC_EDIT value.</p>
<p>see include/fsm enum fsm_enum_exec_edit { EXEC, EDIT } The current int may be replaced by a boolean . TODO</p>
<dl class="section since"><dt>Since</dt><dd>2024-06</dd></dl>
<dl class="section see"><dt>See also</dt><dd>src/widget/one_rule/dispatch </dd>
<dd>
src/widget/state/dispatch * 2 </dd>
<dd>
src/signal</dd>
<dd>
choice_EXEC_EDIT and </dd>
<dd>
include/fsm/enum <a class="el" href="../../dd/d01/fsm_8h.html#a7804536bf1011457f3d850e350772dca" title="phantom documentation">fsm_enum_exec_edit</a> {}</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>choice_EXEC_EDIT </dd></dl>
</div>
</div>
<a id="a0b0231a311d0e85723ef9fcf38be88e3" name="a0b0231a311d0e85723ef9fcf38be88e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b0231a311d0e85723ef9fcf38be88e3">&#9670;&#160;</a></span>fsm_get_preferences_state()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool fsm_get_preferences_state </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>getter for the static boolean: 'preferences_have_been_modified' </p>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd>TODO A function must obtain this boolean when it stores the current state of the fsm (including <a class="el" href="../../d3/d0f/structpreferences.html">preferences</a>) before closing the current session.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>preferences_have_been_modified </dd></dl>
</div>
</div>
<a id="a90ab14081a88752d3721947a4922ee25" name="a90ab14081a88752d3721947a4922ee25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90ab14081a88752d3721947a4922ee25">&#9670;&#160;</a></span>fsm_get_state_rules_data()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int fsm_get_state_rules_data </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The value of the static int choice_STATE_RULES_DATA can be one of the enum include/fsm enum fsm_enum_state_rules_data. </p>
<p>To each value is associated a different page and different possible behaviors. Any function that modifies the client window must get this value.</p>
<p>see include/fsm enum fsm_enum_state_rules_data { SYNTH, STATE, RULES, DATA }</p>
<dl class="section since"><dt>Since</dt><dd>2024-06</dd></dl>
<dl class="section see"><dt>See also</dt><dd>src/widget/topbar/left </dd>
<dd>
src/signal</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>choice_STATE_RULES_DATA </dd></dl>
</div>
</div>
<a id="a8d91f5868f20ad3b72cfa63787d87444" name="a8d91f5868f20ad3b72cfa63787d87444"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d91f5868f20ad3b72cfa63787d87444">&#9670;&#160;</a></span>fsm_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fsm_init </td>
<td>(</td>
<td class="paramtype">char *&#160;</td>
<td class="paramname"><em>initial_message_from_main</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>fsm init is the first function called by <a class="el" href="../../d0/d09/main_8c.html" title="Gem-graph-client main file.">main.c</a> It initiates the journal and the four lists: 'measures', 'results', 'displayables results' and 'preferences'. </p>
<p>The items selected in these lists define the current state of the fsm.</p>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd>src/main/main()</dd>
<dd>
src/journal/fsm_journal_init() </dd>
<dd>
src/fsm/dispatch/fsm_journal_event() </dd>
<dd>
src/fsm/measures/manager/fsm_list_init_measures() </dd>
<dd>
src/fsm/results/manager/fsm_list_init_results() </dd>
<dd>
src/fsm/preferences/manager/fsm_list_init_displayables() </dd>
<dd>
src/fsm/preferences/manager/fsm_list_init_preferences()</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">*initial_message_from_main</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a8c67f42f95d48ee2469c9a27d65db3e6" name="a8c67f42f95d48ee2469c9a27d65db3e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c67f42f95d48ee2469c9a27d65db3e6">&#9670;&#160;</a></span>fsm_journal_event()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fsm_journal_event </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>severity</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>file_source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>function_source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>string_value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>It is mandatory for any event to call this function to be published in the journal. </p>
<p>Before publication, a filter can be applied here (and only here) to select only some events of interest (during debugging, for example).</p>
<p>If there are too many events, a filter can be applied here to select a few interesting events for publication in the log.</p>
<p>This filter can operate on any the following five parameters: severity, source, *file_source, *function_source, *string_value. </p><dl class="section see"><dt>See also</dt><dd>below (params)</dd></dl>
<p>Simple filters (on a single parameter) can be combined using the logical operators 'and' and 'or' and parentheses.</p>
<p>Use: $ grep -r "fsm_journal_event" to confirm the callergraph calls.</p>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d3/d0c/journal_8c.html" title="journal / log">src/journal.c</a>/fsm_journal_push_front()</dd>
<dd>
src/main/main() </dd>
<dd>
src/widget/topbar/modal.c </dd>
<dd>
src/widget/topbar/right.c </dd>
<dd>
src/widget/topbar/dialog.c </dd>
<dd>
src/widget/topbar/left.c </dd>
<dd>
src/widget/topbar/dispatch.c * 3 </dd>
<dd>
src/widget/one_rule/dispatch.c </dd>
<dd>
src/widget/one_rule/algebra/conditions.c * 2 </dd>
<dd>
src/widget/measure/dispatch.c </dd>
<dd>
src/widget/dispatch.c * 3 </dd>
<dd>
src/widget/all_rules/dispatch.c </dd>
<dd>
<a class="el" href="../../de/d07/fsm_2preferences_2manager_8c.html" title="fsm preferences manager">src/fsm/preferences/manager.c</a> * 8 </dd>
<dd>
<a class="el" href="../../d2/d03/fsm_2measures_2manager_8c.html" title="fsm measures manager">src/fsm/measures/manager.c</a> * 2 </dd>
<dd>
<a class="el" href="../../d1/d04/tools__list_8c.html" title="Gem-graph client * Finite State Machine (src/fsm/measure/tool_list.c) *Copyright © 2024 Libre en Comm...">src/fsm/measures/tools_list.c</a> * 4 </dd>
<dd>
<a class="el" href="../../d4/d07/fsm_2dispatch_8c.html" title="fsm (Finite State Machine) tasks dispatcher">src/fsm/dispatch.c</a> * 10 </dd>
<dd>
<a class="el" href="../../d2/d0e/fsm_2results_2manager_8c.html" title="fsm results manager">src/fsm/results/manager.c</a> </dd>
<dd>
src/util/tree.c </dd>
<dd>
<a class="el" href="../../d8/d06/signal_8c.html" title="events callbacks">src/signal.c</a> * 38</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">severity</td><td>&lt;&gt; </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>enum <a class="el" href="../../dd/d01/fsm_8h.html#ab761a6fdf1ac1e26a44f8f9524aa6da7" title="Conforms to canonical log levels: FATAL, ERROR, WARN, INFO, DEBUG, TRACE.">fsm_enum_journal_severity</a> in <a class="el" href="../../dd/d01/fsm_8h.html" title="fsm (Finite State Machine) management header">include/fsm.h</a> 'severity' is a pre-defined value that must be associated to each event. It ranges from zero to six : CRITICAL <a class="el" href="../../dd/d01/fsm_8h.html#ab761a6fdf1ac1e26a44f8f9524aa6da7a2fd6f336d08340583bd620a7f5694c90" title="a conditions that hinder the execution of a specific operation within an application and is unrecover...">ERROR</a> WARNING <a class="el" href="../../dd/d01/fsm_8h.html#ab761a6fdf1ac1e26a44f8f9524aa6da7a748005382152808a72b1a9177d9dc806" title="(or MESSAGE) a significant event occurs while the system is operating normally">INFO</a> MESSAGE <a class="el" href="../../dd/d01/fsm_8h.html#ab761a6fdf1ac1e26a44f8f9524aa6da7a0593585da9181e972974c1274d8f2b4f" title="a description of system states in sufficient detail to give developers clues as to the cause of an er...">DEBUG</a> <a class="el" href="../../dd/d01/fsm_8h.html#ab761a6fdf1ac1e26a44f8f9524aa6da7a7fa27e82c6c4f69434225ed81e5d151e" title="provides a systematic overview of code execution but comes at a cost in terms of performance">TRACE</a> 0 1 2 3 4 5 6</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">source</td><td>&lt;&gt; </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>enum <a class="el" href="../../dd/d01/fsm_8h.html#ae17fff59df266673b42b150568f1804c" title="arbitrary values that can help the logging filter work more efficiently">fsm_enum_journal_source</a> in <a class="el" href="../../dd/d01/fsm_8h.html" title="fsm (Finite State Machine) management header">include/fsm.h</a> 'source' is a pre-defined value that can be associated to each event. It is not mandatory. It can be set to 'NULL'.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">*file_source</td><td>&lt;&gt; the name of the file that emits the event. </td></tr>
<tr><td class="paramname">*function_source</td><td>&lt;&gt; the function that emits the event. </td></tr>
<tr><td class="paramname">*string_value</td><td>&lt;&gt; any value that can qualify the event and provides useful information when reading the log. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a435d1a5171a7d69662d701234722fee2" name="a435d1a5171a7d69662d701234722fee2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a435d1a5171a7d69662d701234722fee2">&#9670;&#160;</a></span>fsm_journal_publication_request()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fsm_journal_publication_request </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The <a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a435d1a5171a7d69662d701234722fee2" title="The fsm_journal_publication_request() is called only once, by main(), just after closing the app and ...">fsm_journal_publication_request()</a> is called only once, by <a class="el" href="../../d0/d09/main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, just after closing the app and before ending the program. </p>
<p>This is to guarantee the chronological order of the events in the journal.</p>
<p>The log is modified for each event but events can be send asynchronously. This is why the journal is only published once, before the end of "main()", Its chronological order is therefore guaranteed.</p>
<p><a class="el" href="../../d3/d0c/journal_8c.html" title="journal / log">src/journal.c</a>/fsm_journal_publish() (called here) is the last function of the program to be executed.</p>
<p>The <a class="el" href="../../d9/d03/structfsm__struct__journal.html" title="required to initialise a double-chained list">fsm_struct_journal</a> (gg_logs) is a static instance in this file. Therefore, all the functions that read or write it are in this file. This is to avoid uncontrolled operations on it.</p>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd>src/main/main()</dd>
<dd>
src/journal/fsm_journal_publish() </dd></dl>
</div>
</div>
<a id="ae921ecd39af67bb8dc0deb2cdc86125d" name="ae921ecd39af67bb8dc0deb2cdc86125d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae921ecd39af67bb8dc0deb2cdc86125d">&#9670;&#160;</a></span>fsm_set_exec_edit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fsm_set_exec_edit </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>choice</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>setter for the static value: 'choice_STATE_RULES_DATA' (in this file) </p>
<p>see include/fsm enum fsm_enum_exec_edit { EXEC, EDIT }</p>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd>src/signal * 2</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">choice</td><td>&lt; a boolean value which can be "EXEC" or "EDIT" </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a770bcaeb0bd6f81cddcc3cd506468fff" name="a770bcaeb0bd6f81cddcc3cd506468fff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a770bcaeb0bd6f81cddcc3cd506468fff">&#9670;&#160;</a></span>fsm_set_preferences_modified()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fsm_set_preferences_modified </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>setter for the static boolean: 'preferences_have_been_modified' </p>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd>TODO To be used by any function that modifies the current user <a class="el" href="../../d3/d0f/structpreferences.html">preferences</a></dd>
<dd>
<a class="el" href="../../d4/d07/fsm_2dispatch_8c.html#a8c67f42f95d48ee2469c9a27d65db3e6" title="It is mandatory for any event to call this function to be published in the journal.">fsm_journal_event()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>= TRUE if preferences_have_been_modified. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af5a464b19589ba1972c9b3aa3397945a" name="af5a464b19589ba1972c9b3aa3397945a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5a464b19589ba1972c9b3aa3397945a">&#9670;&#160;</a></span>fsm_set_state_rules_data()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fsm_set_state_rules_data </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>choice</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>setter for the static value: 'choice_STATE_RULES_DATA' (in this file) </p>
<p>see include/fsm enum fsm_enum_state_rules_data { SYNTH, STATE, RULES, DATA } Today (2024-10) the initial page is set to 'SYNTH'. </p><dl class="section see"><dt>See also</dt><dd>line 292 choice_STATE_RULES_DATA = SYNTH; NB This choice can be temporarily modified for debugging purpose: </dd>
<dd>
end of the function: <a class="el" href="../../d4/d07/fsm_2dispatch_8c.html" title="fsm (Finite State Machine) tasks dispatcher">fsm/dispatch.c</a> window_design_topbar_left()</dd></dl>
<dl class="section since"><dt>Since</dt><dd>2024-08</dd></dl>
<dl class="section see"><dt>See also</dt><dd>src/signal * 4</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">choice</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>