gem-graph-client/doc/docbook/d4/d08/measures_2manager_8c.xml

151 lines
7.3 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_measures_2manager_8c" xml:lang="en-US">
<title>src/fsm/measures/manager.c File Reference</title>
<indexterm><primary>src/fsm/measures/manager.c</primary></indexterm>
<para>
<para>fsm measures manager </para>
</para>
<programlisting linenumbering="unnumbered">#include &lt;stdbool.h&gt;<?linebreak?>#include &lt;stdio.h&gt;<?linebreak?>#include &lt;stdlib.h&gt;<?linebreak?>#include &quot;../../../include/fsm.h&quot;<?linebreak?></programlisting><simplesect>
<title>Functions </title>
<itemizedlist>
<listitem><para>void <link linkend="_measures_2manager_8c_1a6c711a88f128da33895ebd6cdf96ed66">fsm_add_measure</link> (char *measure_name)</para>
</listitem>
<listitem><para>void <link linkend="_measures_2manager_8c_1a5da29952715596bf17643f907bd64daf">fsm_list_init_measures</link> ()</para>
</listitem>
<listitem><para>void <link linkend="_measures_2manager_8c_1ae81ba1733710f5b2db1a5b253d7adaf7">fsm_rule_trig_measure</link> (int rule_id, int object_id, int measure_id)</para>
</listitem>
</itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>
<para>fsm measures manager </para>
<para>This file is part of Gem-graph. It inits the three lists used for measurements and results management: tools, data and displayables (disp) and provides access.</para>
<para>F R O M M E A S U R E M E N T S T O P R E S E N T A T I O N S How should the sequence from measurements to results presentation be organized ?</para>
<para>(1) create/edit some mesurement tools and/or activate existing ones (2) apply a mesurement tool to a situation to create a new data list data list = x, f(x), g(x),... these data are collected by the server and send to the client and possibly carry out any operations on these results (3) display (plot) the results and adjust the appearance of the tables <informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>
</entry></row></tbody></tgroup></informaltable>
As a consequence, three lists at least must be created and maintained :</para>
<para>(1) a mesurement tools list (see : fsm/measure/tool_list.c) which should mention if the tool is &apos;active&apos; or &apos;inactive NB each rule ou rules-tree edition may change some items of that list</para>
<para>(2) a data flows list (see : fsm/measure/flow_list.c) (it could either be named : fsm/measure/data_list.c) on which some operations could be performed : ex : filter, concat, inverse, scale, correlate, etc. NB each data flow should be available in a &apos;displayable form&apos;</para>
<para>(3) a displayed data list (see : fsm/measure/disp_list.c) NB some data may be displayed simultaneously in different pages ex : SYNTH &amp; RESULTS</para>
<para>NB these three lists should be stored in the XML model and restored at the beginning of a new session <informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>
</entry></row></tbody></tgroup></informaltable>
(4) a journal (a pile) stores chronologically the fsm events during a session run (rules exec, mainly) in a journal (.log) one by session <informaltable frame='bottom'><tgroup cols='1'><colspec align='center'/><tbody><row><entry align='center'>
</entry></row></tbody></tgroup></informaltable>
When a rule is adequately tagged, it triggers a measure : fsm_rule_trig_measure (rule_id, object_id, measure_id) {...} The measurement is then taken and the result stored. </para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_measures_2manager_8c_1a6c711a88f128da33895ebd6cdf96ed66"/><section>
<title>fsm_add_measure()</title>
<indexterm><primary>fsm_add_measure</primary><secondary>manager.c</secondary></indexterm>
<indexterm><primary>manager.c</primary><secondary>fsm_add_measure</secondary></indexterm>
<para><computeroutput>void fsm_add_measure (char * measure_name)</computeroutput></para>
<para><formalpara><title>Since</title>
<para>2024-09</para>
</formalpara>
<formalpara><title>See also</title>
<para>src/widget/measure/dispatch/widget_measure_event_occurences_nb() </para>
<para>src/widget/measure/dispatch/widget_measure_event_occurences_dates() </para>
<para>src/widget/measure/dispatch/widget_measure_event_occurences_situations() </para>
<para>src/widget/measure/dispatch/widget_measure_time_elapsed_between_two_events() </para>
<para>src/widget/measure/dispatch/widget_measure_third_event_occurences_in_between()</para>
<para>src/fsm/dispatch/fsm_journal_event() </para>
</formalpara>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>*measure_name</entry><entry>
<para></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
</para>
</section>
<anchor xml:id="_measures_2manager_8c_1a5da29952715596bf17643f907bd64daf"/><section>
<title>fsm_list_init_measures()</title>
<indexterm><primary>fsm_list_init_measures</primary><secondary>manager.c</secondary></indexterm>
<indexterm><primary>manager.c</primary><secondary>fsm_list_init_measures</secondary></indexterm>
<para><computeroutput>void fsm_list_init_measures ( )</computeroutput></para>
<para><formalpara><title>Since</title>
<para>2024-09</para>
</formalpara>
<formalpara><title>See also</title>
<para>src/fsm/dispatch/fsm_init() </para>
</formalpara>
</para>
</section>
<anchor xml:id="_measures_2manager_8c_1ae81ba1733710f5b2db1a5b253d7adaf7"/><section>
<title>fsm_rule_trig_measure()</title>
<indexterm><primary>fsm_rule_trig_measure</primary><secondary>manager.c</secondary></indexterm>
<indexterm><primary>manager.c</primary><secondary>fsm_rule_trig_measure</secondary></indexterm>
<para><computeroutput>void fsm_rule_trig_measure (int rule_id, int object_id, int measure_id)</computeroutput></para>
<para><formalpara><title>Since</title>
<para>2024-09 </para>
</formalpara>
<formalpara>
<title>
Parameters</title>
<para>
<table frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colwidth="1*"/>
<colspec colwidth="4*"/>
<tbody>
<row>
<entry>rule_id</entry><entry>
<para></para>
</entry>
</row>
<row>
<entry>object_id</entry><entry>
<para></para>
</entry>
</row>
<row>
<entry>measure_id</entry><entry>
<para></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</formalpara>
</para>
</section>
</section>
</section>