895 lines
20 KiB
Groff
895 lines
20 KiB
Groff
.TH "include/fsm.h" 3 "Version 0.1.0" "Gem-graph" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
include/fsm.h \- fsm (Finite State Machine) management header
|
|
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
\fC#include <stdbool\&.h>\fP
|
|
.br
|
|
\fC#include <stddef\&.h>\fP
|
|
.br
|
|
\fC#include <string\&.h>\fP
|
|
.br
|
|
\fC#include <gtk\-4\&.0/gtk/gtk\&.h>\fP
|
|
.br
|
|
|
|
.SS "Classes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "struct \fBfsm_struct_journal_unit\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "struct \fBfsm_struct_journal\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "struct \fBfsm_struct_list_tool\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "struct \fBfsm_struct_list_data\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "struct \fBfsm_struct_list_disp\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.in -1c
|
|
.SS "Macros"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "#define \fBJOURNAL_LOG_MAX_LENGTH\fP 255"
|
|
.br
|
|
.ti -1c
|
|
.RI "#define \fBn_rules\fP 128"
|
|
.br
|
|
.ti -1c
|
|
.RI "#define \fBn_objects\fP 32"
|
|
.br
|
|
.ti -1c
|
|
.RI "#define \fBn_situations\fP 128"
|
|
.br
|
|
.in -1c
|
|
.SS "Typedefs"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "typedef struct \fBfsm_struct_journal_unit\fP \fBfsm_struct_journal_unit\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "typedef struct \fBfsm_struct_list_tool\fP \fBfsm_struct_list_tool\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "typedef struct \fBfsm_struct_list_data\fP \fBfsm_struct_list_data\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.ti -1c
|
|
.RI "typedef struct \fBfsm_struct_list_disp\fP \fBfsm_struct_list_disp\fP"
|
|
.br
|
|
.RI "phantom documentation used to test the functioning of doxygen "
|
|
.in -1c
|
|
.SS "Enumerations"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "enum \fBfsm_enum_journal_severity\fP { \fBCRITICAL\fP, \fBERROR\fP, \fBWARNING\fP, \fBINFO\fP, \fBMESSAGE\fP, \fBDEBUG\fP, \fBSPEW\fP }"
|
|
.br
|
|
.ti -1c
|
|
.RI "enum \fBfsm_enum_journal_source\fP { \fBSOURCE\fP, \fBTARGET\fP, \fBJOURNAL\fP, \fBFSM\fP, \fBPREFER\fP, \fBMAIN\fP, \fBAPP\fP, \fBWIDGETS\fP, \fBSIGNAL\fP, \fBMAIN_WINDOW\fP, \fBDIALOG_WINDOW\fP, \fBMODAL_WINDOW\fP, \fBTEXT_WINDOW\fP, \fBAUTO_NOTIFICATION\fP, \fBTOPBAR\fP, \fBTOPBAR_LEFT\fP, \fBTOPBAR_RIGHT\fP, \fBTOPBAR_CENTER\fP, \fBSYNTH_PAGE\fP, \fBSTATE_PAGE\fP, \fBRULES_PAGE\fP, \fBMEASURES_PAGE\fP, \fBRESULTS_PAGE\fP, \fBSenumYNTH_GLAREA\fP, \fBSYNTH_ALL_RESULTS\fP, \fBSYNTH_TIME_DEP_RESULTS\fP, \fBSYNTH_TIME_INDEP_RESULTS\fP, \fBSTATE_TOP\fP, \fBSTATE_BOTTOM\fP, \fBSTATE_GLAREA\fP, \fBSTATE_CAMERA\fP, \fBRULE_GEOMETRY\fP, \fBRULE_GLAREA\fP, \fBRULE_CAMERA\fP, \fBRULE_ALGEBRA\fP, \fBRULE_CONDITION\fP, \fBRULE_ASSIGN\fP, \fBRULE_ID\fP, \fBRULES_TREE\fP, \fBRULES_COMPARE\fP, \fBRULES_USE\fP, \fBMEASURES_TOOLS\fP, \fBMEASURES__ACTIVITY\fP, \fBMEASURES__DISPLAY\fP, \fBRESULTS\fP, \fBTIME_DEP_RESULTS\fP, \fBTIME_INDEP_RESULTS\fP, \fBWIDGET\fP, \fBBUTTON\fP, \fBSCROLL\fP, \fBGLAREA\fP, \fBTEXT\fP, \fBLABEL\fP, \fBTREE\fP, \fBSLIDER\fP, \fBEXPANDER\fP, \fBENTRY\fP, \fBSWITCH_STATE_RULES_DATA\fP, \fBSLIDER_X\fP, \fBSLIDER_Y\fP, \fBSLIDER_Z\fP, \fBSLIDER_A\fP, \fBSLIDER_B\fP, \fBSLIDER_C\fP }"
|
|
.br
|
|
.ti -1c
|
|
.RI "enum \fBfsm_enum_exec_edit\fP { \fBEXEC\fP, \fBEDIT\fP }"
|
|
.br
|
|
.ti -1c
|
|
.RI "enum \fBfsm_enum_state_rules_data\fP { \fBSYNTH\fP, \fBSTATE\fP, \fBRULES\fP, \fBDATA\fP }"
|
|
.br
|
|
.ti -1c
|
|
.RI "enum \fBfsm_enum_store_restore_reset\fP { \fBSTORE\fP, \fBRESTORE\fP, \fBRESET\fP }"
|
|
.br
|
|
.ti -1c
|
|
.RI "enum \fBfsm_enum_measure_type\fP { \fBDATE_RULE_EXEC\fP, \fBRULE_EXEC_NB\fP, \fBOBJECT_NB\fP, \fBELAPSED_TIME\fP }"
|
|
.br
|
|
.in -1c
|
|
.SS "Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_publish\fP (\fBfsm_struct_journal\fP jj)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_init\fP (\fBfsm_struct_journal\fP *jj)"
|
|
.br
|
|
.RI "2024-09-22 What types of events should be reported ? (fsm, widgets, \&.\&.\&. ) For what purpose ? What information must be collected and transmitted ? How do you name and classify this information ? How do you present it ? "
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_push_front\fP (\fBfsm_struct_journal\fP *jj, const char *file_source, const char *function_source, const char *string_value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_clear\fP (\fBfsm_struct_journal\fP *jj, const char *file_source, const char *function_source, const char *string_value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "long \fBfsm_journal_pop_back\fP (\fBfsm_struct_journal\fP *jj, const char *file_source, const char *function_source, const char *string_value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "int \fBfsm_journal_length\fP (\fBfsm_struct_journal\fP jj)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_seek\fP (\fBfsm_struct_journal\fP jj, long usec, const char *file_source, const char *function_source, const char *string_value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_publication_request\fP ()"
|
|
.br
|
|
.RI "The \fBfsm_journal_publication_request()\fP is called only once, by \fBmain()\fP, just after closing the app and before ending the program\&. "
|
|
.ti -1c
|
|
.RI "void \fBfsm_journal_event\fP (int severity, int source, const char *file_source, const char *function_source, const char *string_value)"
|
|
.br
|
|
.RI "It is mandatory for any event to call this function to be published in the journal\&. "
|
|
.ti -1c
|
|
.RI "void \fBfsm_init\fP (char *message)"
|
|
.br
|
|
.RI "fsm init is the first function called by \fBmain\&.c\fP It initiates the journal and the four lists: 'measures', 'results', 'displayables results' and 'preferences'\&. "
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_init_preferences\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_init_measures\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_init_results\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_init_displayables\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "int \fBfsm_get_exec_edit\fP ()"
|
|
.br
|
|
.RI "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\&. "
|
|
.ti -1c
|
|
.RI "int \fBfsm_get_state_rules_data\fP ()"
|
|
.br
|
|
.RI "The value of the static int choice_STATE_RULES_DATA can be one of the enum include/fsm enum fsm_enum_state_rules_data\&. "
|
|
.ti -1c
|
|
.RI "void \fBfsm_set_exec_edit\fP (int value)"
|
|
.br
|
|
.RI "setter for the static value: 'choice_STATE_RULES_DATA' (in this file) "
|
|
.ti -1c
|
|
.RI "void \fBfsm_set_state_rules_data\fP (int value)"
|
|
.br
|
|
.RI "setter for the static value: 'choice_STATE_RULES_DATA' (in this file) "
|
|
.ti -1c
|
|
.RI "void \fBfsm_set_store_restore_reset\fP (int choice, int value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "bool \fBfsm_get_preferences_state\fP ()"
|
|
.br
|
|
.RI "getter for the static boolean: 'preferences_have_been_modified' "
|
|
.ti -1c
|
|
.RI "void \fBfsm_set_preferences_modified\fP (bool value)"
|
|
.br
|
|
.RI "setter for the static boolean: 'preferences_have_been_modified' "
|
|
.ti -1c
|
|
.RI "void \fBfsm_add_measure\fP (char *measure_name)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_add_result\fP (char *result_name)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_add_displayable\fP (char *displayable_name)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_reset_all_situations_values\fP (int value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_tools_insert\fP (\fBfsm_struct_list_tool\fP **tl, int value)"
|
|
.br
|
|
.ti -1c
|
|
.RI "int \fBfsm_list_tools_pop\fP (\fBfsm_struct_list_tool\fP **tl)"
|
|
.br
|
|
.ti -1c
|
|
.RI "int \fBfsm_list_tools_length\fP (\fBfsm_struct_list_tool\fP *tl)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_tools_clear\fP (\fBfsm_struct_list_tool\fP **tl)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_tools_view\fP (\fBfsm_struct_list_tool\fP *tl)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_list_tools_test\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_rule_trig_measure\fP (int rule_id, int object_id, int measure_id)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_add_data\fP (\fBfsm_struct_list_data\fP d, int *p_data, int *p_target)"
|
|
.br
|
|
.ti -1c
|
|
.RI "int \fBfsm_get_data\fP (\fBfsm_struct_list_data\fP d, int from, int to)"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBfsm_remove_data\fP (\fBfsm_struct_list_data\fP d, int *p_data)"
|
|
.br
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
fsm (Finite State Machine) management header
|
|
|
|
This file is part of Gem-graph\&.
|
|
.SH "Enumeration Type Documentation"
|
|
.PP
|
|
.SS "enum \fBfsm_enum_journal_severity\fP"
|
|
|
|
.IP "\(bu" 2
|
|
* * * - J O U R N A L M E T A R U L E S - * * * *
|
|
.PP
|
|
ref: sudo cat /var/log/messages
|
|
.PP
|
|
structure d'un log:
|
|
.IP "\(bu" 2
|
|
date
|
|
.IP "\(bu" 2
|
|
rang (n° d'ordre)
|
|
.IP "\(bu" 2
|
|
fichier
|
|
.IP "\(bu" 2
|
|
fonction
|
|
.IP "\(bu" 2
|
|
valeur, paramètre, descriptif, contexte,\&.\&.\&. (tout ce qui peut contribuer à améliorer la compréhension du journal) any value that can qualify the event and provides useful information when reading the log\&.
|
|
.PP
|
|
.PP
|
|
.PP
|
|
.PP
|
|
Un seul \fBfsm_journal_event()\fP par fonction ? sauf si cette fonction génère plusieurs autres fonctions d'intérêt ?
|
|
.PP
|
|
S'il y a deux \fBfsm_journal_event()\fP (begin / end) dans une fonction, ils doivent avoir la même étiquette (les mêmes valeurs) : SEVERITY & SOURCE
|
|
.PP
|
|
.IP "\(bu" 2
|
|
* * * - J O U R N A L M E T A R U L E S - * * *
|
|
.br
|
|
|
|
.PP
|
|
|
|
.SH "Function Documentation"
|
|
.PP
|
|
.SS "void fsm_add_displayable (char * displayable_name)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIdisplayable_name\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_add_measure (char * measure_name)"
|
|
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-09
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/widget/measure/dispatch/widget_measure_event_occurences_nb()
|
|
.PP
|
|
src/widget/measure/dispatch/widget_measure_event_occurences_dates()
|
|
.PP
|
|
src/widget/measure/dispatch/widget_measure_event_occurences_situations()
|
|
.PP
|
|
src/widget/measure/dispatch/widget_measure_time_elapsed_between_two_events()
|
|
.PP
|
|
src/widget/measure/dispatch/widget_measure_third_event_occurences_in_between()
|
|
.PP
|
|
src/fsm/dispatch/fsm_journal_event()
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI*measure_name\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "int fsm_get_exec_edit ()"
|
|
|
|
.PP
|
|
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\&. Any function which modifies the appearance or behavior of these pages must use this getter to access the choice_EXEC_EDIT value\&.
|
|
.PP
|
|
see include/fsm enum fsm_enum_exec_edit { EXEC, EDIT } The current int may be replaced by a boolean \&. TODO
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-06
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/widget/one_rule/dispatch
|
|
.PP
|
|
src/widget/state/dispatch * 2
|
|
.PP
|
|
src/signal
|
|
.PP
|
|
choice_EXEC_EDIT and
|
|
.PP
|
|
include/fsm/enum fsm_enum_exec_edit {}
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
choice_EXEC_EDIT
|
|
.RE
|
|
.PP
|
|
|
|
.SS "bool fsm_get_preferences_state ()"
|
|
|
|
.PP
|
|
getter for the static boolean: 'preferences_have_been_modified'
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
TODO A function must obtain this boolean when it stores the current state of the fsm (including \fBpreferences\fP) before closing the current session\&.
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
preferences_have_been_modified
|
|
.RE
|
|
.PP
|
|
|
|
.SS "int fsm_get_state_rules_data ()"
|
|
|
|
.PP
|
|
The value of the static int choice_STATE_RULES_DATA can be one of the enum include/fsm enum fsm_enum_state_rules_data\&. To each value is associated a different page and different possible behaviors\&. Any function that modifies the client window must get this value\&.
|
|
.PP
|
|
see include/fsm enum fsm_enum_state_rules_data { SYNTH, STATE, RULES, DATA }
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-06
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/widget/topbar/left
|
|
.PP
|
|
src/signal
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
choice_STATE_RULES_DATA
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_init (char * initial_message_from_main)"
|
|
|
|
.PP
|
|
fsm init is the first function called by \fBmain\&.c\fP It initiates the journal and the four lists: 'measures', 'results', 'displayables results' and 'preferences'\&. The items selected in these lists define the current state of the fsm\&.
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/main/main()
|
|
.PP
|
|
src/journal/fsm_journal_init()
|
|
.PP
|
|
src/fsm/dispatch/fsm_journal_event()
|
|
.PP
|
|
src/fsm/measures/manager/fsm_list_init_measures()
|
|
.PP
|
|
src/fsm/results/manager/fsm_list_init_results()
|
|
.PP
|
|
src/fsm/preferences/manager/fsm_list_init_displayables()
|
|
.PP
|
|
src/fsm/preferences/manager/fsm_list_init_preferences()
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI*initial_message_from_main\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_journal_clear (\fBfsm_struct_journal\fP * jj, const char * file_source, const char * function_source, const char * string_value)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "void fsm_journal_event (int severity, int source, const char * file_source, const char * function_source, const char * string_value)"
|
|
|
|
.PP
|
|
It is mandatory for any event to call this function to be published in the journal\&. Before publication, a filter can be applied here (and only here) to select only some events of interest (during debugging, for example)\&.
|
|
.PP
|
|
If there are too many events, a filter can be applied here to select a few interesting events for publication in the log\&.
|
|
.PP
|
|
This filter can operate on any the following five parameters: severity, source, *file_source, *function_source, *string_value\&.
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
below (params)
|
|
.RE
|
|
.PP
|
|
Simple filters (on a single parameter) can be combined using the logical operators 'and' and 'or' and parentheses\&.
|
|
.PP
|
|
Use: $ grep -r 'fsm_journal_event' to confirm the callergraph calls\&.
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
\fBsrc/journal\&.c\fP/fsm_journal_push_front()
|
|
.PP
|
|
src/main/main()
|
|
.PP
|
|
src/widget/topbar/modal\&.c
|
|
.PP
|
|
src/widget/topbar/right\&.c
|
|
.PP
|
|
src/widget/topbar/dialog\&.c
|
|
.PP
|
|
src/widget/topbar/left\&.c
|
|
.PP
|
|
\fBsrc/widget/topbar/dispatch\&.c\fP * 3
|
|
.PP
|
|
src/widget/one_rule/dispatch\&.c
|
|
.PP
|
|
\fBsrc/widget/one_rule/algebra/conditions\&.c\fP * 2
|
|
.PP
|
|
src/widget/measure/dispatch\&.c
|
|
.PP
|
|
\fBsrc/widget/dispatch\&.c\fP * 3
|
|
.PP
|
|
src/widget/all_rules/dispatch\&.c
|
|
.PP
|
|
\fBsrc/fsm/preferences/manager\&.c\fP * 8
|
|
.PP
|
|
\fBsrc/fsm/measures/manager\&.c\fP * 2
|
|
.PP
|
|
src/fsm/measures/tools_list\&.c * 4
|
|
.PP
|
|
\fBsrc/fsm/dispatch\&.c\fP * 10
|
|
.PP
|
|
\fBsrc/fsm/results/manager\&.c\fP
|
|
.PP
|
|
src/util/tree\&.c
|
|
.PP
|
|
\fBsrc/signal\&.c\fP * 38
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIseverity\fP <>
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
enum \fBfsm_enum_journal_severity\fP in \fBinclude/fsm\&.h\fP 'severity' is a pre-defined value that must be associated to each event\&. It ranges from zero to six : CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 0 1 2 3 4 5 6
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIsource\fP <>
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
enum fsm_enum_journal_source in \fBinclude/fsm\&.h\fP 'source' is a pre-defined value that can be associated to each event\&. It is not mandatory\&. It can be set to 'NULL'\&.
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI*file_source\fP <> the name of the file that emits the event\&.
|
|
.br
|
|
\fI*function_source\fP <> the function that emits the event\&.
|
|
.br
|
|
\fI*string_value\fP <> any value that can qualify the event and provides useful information when reading the log\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_journal_init (\fBfsm_struct_journal\fP * jj)"
|
|
|
|
.PP
|
|
2024-09-22 What types of events should be reported ? (fsm, widgets, \&.\&.\&. ) For what purpose ? What information must be collected and transmitted ? How do you name and classify this information ? How do you present it ? date clé (rank) fichier source fonction source +/- valeur
|
|
.br
|
|
|
|
.PP
|
|
.nf
|
|
time_t current_time = time(NULL);
|
|
|
|
.fi
|
|
.PP
|
|
Check if the time retrieval was successful if (current_time == ((time_t)-1)) printf('Error getting current time\&.\\n'); Convert to local time format and print printf(' Current timestamp: %ld %s\\n', current_time, message); printf(' Current time: %s', ctime(¤t_time));
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "int fsm_journal_length (\fBfsm_struct_journal\fP jj)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "long fsm_journal_pop_back (\fBfsm_struct_journal\fP * jj, const char * file_source, const char * function_source, const char * string_value)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "void fsm_journal_publication_request ()"
|
|
|
|
.PP
|
|
The \fBfsm_journal_publication_request()\fP is called only once, by \fBmain()\fP, just after closing the app and before ending the program\&. This is to guarantee the chronological order of the events in the journal\&.
|
|
.PP
|
|
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\&.
|
|
.PP
|
|
\fBsrc/journal\&.c\fP/fsm_journal_publish() (called here) is the last function of the program to be executed\&.
|
|
.PP
|
|
The \fBfsm_struct_journal\fP (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\&.
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/main/main()
|
|
.PP
|
|
src/journal/fsm_journal_publish()
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_journal_publish (\fBfsm_struct_journal\fP jj)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "void fsm_journal_push_front (\fBfsm_struct_journal\fP * jj, const char * file_source, const char * function_source, const char * string_value)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "void fsm_journal_seek (\fBfsm_struct_journal\fP jj, long usec, const char * file_source, const char * function_source, const char * string_value)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fI\fP .RE
|
|
.PP
|
|
return
|
|
.SS "void fsm_list_init_displayables ()"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_list_init_measures ()"
|
|
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-09
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/fsm/dispatch/fsm_init()
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_list_init_preferences ()"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_reset_all_situations_values (int value)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIvalue\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_rule_trig_measure (int rule_id, int object_id, int measure_id)"
|
|
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-09
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIrule_id\fP
|
|
.br
|
|
\fIobject_id\fP
|
|
.br
|
|
\fImeasure_id\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_set_exec_edit (int choice)"
|
|
|
|
.PP
|
|
setter for the static value: 'choice_STATE_RULES_DATA' (in this file) see include/fsm enum fsm_enum_exec_edit { EXEC, EDIT }
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/signal * 2
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIchoice\fP < a boolean value which can be 'EXEC' or 'EDIT'
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_set_preferences_modified (bool value)"
|
|
|
|
.PP
|
|
setter for the static boolean: 'preferences_have_been_modified'
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
TODO To be used by any function that modifies the current user \fBpreferences\fP
|
|
.PP
|
|
\fBfsm_journal_event()\fP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIvalue\fP = TRUE if preferences_have_been_modified\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_set_state_rules_data (int choice)"
|
|
|
|
.PP
|
|
setter for the static value: 'choice_STATE_RULES_DATA' (in this file) see include/fsm enum fsm_enum_state_rules_data { SYNTH, STATE, RULES, DATA } Today (2024-10) the initial page is set to 'SYNTH'\&.
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
line 292 choice_STATE_RULES_DATA = SYNTH; NB This choice can be temporarily modified for debugging purpose:
|
|
.PP
|
|
end of the function: \fBfsm/dispatch\&.c\fP window_design_topbar_left()
|
|
.RE
|
|
.PP
|
|
\fBSince\fP
|
|
.RS 4
|
|
2024-08
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
src/signal * 4
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIchoice\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SS "void fsm_set_store_restore_reset (int choice, int value)"
|
|
|
|
.PP
|
|
\fBDate\fP
|
|
.RS 4
|
|
|
|
.RE
|
|
.PP
|
|
\fBAuthor\fP
|
|
.RS 4
|
|
.RE
|
|
.PP
|
|
\fBSee also\fP
|
|
.RS 4
|
|
.PP
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIchoice\fP
|
|
.br
|
|
\fIvalue\fP
|
|
.RE
|
|
.PP
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for Gem-graph from the source code\&.
|