journal simplifying (before systematic usage)
This commit is contained in:
parent
dc4820fe17
commit
6061e78958
|
@ -55,7 +55,7 @@ enum severity {CRITICAL, ERROR, WARNING, INFO, MESSAGE, DEBUG, SPEW};
|
||||||
//
|
//
|
||||||
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW (see: fsm.h)
|
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW (see: fsm.h)
|
||||||
// 0 1 2 3 4 5 6 (fsm_journal_event)
|
// 0 1 2 3 4 5 6 (fsm_journal_event)
|
||||||
|
/*
|
||||||
#define CRITICAL 0 // THE HIGHER THE PRIORITY, THE LOWER THE INDEX
|
#define CRITICAL 0 // THE HIGHER THE PRIORITY, THE LOWER THE INDEX
|
||||||
#define ERROR 1
|
#define ERROR 1
|
||||||
#define WARNING 2
|
#define WARNING 2
|
||||||
|
@ -63,7 +63,7 @@ enum severity {CRITICAL, ERROR, WARNING, INFO, MESSAGE, DEBUG, SPEW};
|
||||||
#define INFO 4
|
#define INFO 4
|
||||||
#define DEBUG 5
|
#define DEBUG 5
|
||||||
#define SPEW 6 // THE_LOWER THE PRIORITY, THE HIGHER THE INDEX
|
#define SPEW 6 // THE_LOWER THE PRIORITY, THE HIGHER THE INDEX
|
||||||
|
*/
|
||||||
/* * * * * * * - F I L T E R S - * * * * * * *
|
/* * * * * * * - F I L T E R S - * * * * * * *
|
||||||
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
||||||
* *
|
* *
|
||||||
|
@ -93,10 +93,11 @@ enum severity {CRITICAL, ERROR, WARNING, INFO, MESSAGE, DEBUG, SPEW};
|
||||||
* FSM 90
|
* FSM 90
|
||||||
* *
|
* *
|
||||||
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
||||||
* * * * * * * - F I L T E R S - * * * * * * */
|
* * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
|
||||||
/* * * * * - M E T A R U L E S J O U R N A L - * * * *
|
|
||||||
|
/* * * * * - J O U R N A L M E T A R U L E S - * * * *
|
||||||
*
|
*
|
||||||
* Un seul fsm_journal_event() par fonction
|
* Un seul fsm_journal_event() par fonction
|
||||||
* sauf si elle génère plusieurs autres fonctions d'intérêt (à surveiller)
|
* sauf si elle génère plusieurs autres fonctions d'intérêt (à surveiller)
|
||||||
|
@ -104,7 +105,7 @@ enum severity {CRITICAL, ERROR, WARNING, INFO, MESSAGE, DEBUG, SPEW};
|
||||||
* S'il y a deux fsm_journal_event() (begin / end) dans une fonction
|
* S'il y a deux fsm_journal_event() (begin / end) dans une fonction
|
||||||
* ils doivent avoir la même étiquette : MESSAGE, SOURCE, TARGET
|
* ils doivent avoir la même étiquette : MESSAGE, SOURCE, TARGET
|
||||||
*
|
*
|
||||||
* * * * * - M E T A R U L E S J O U R N A L - * * * */
|
* * * * * - J O U R N A L M E T A R U L E S - * * * */
|
||||||
|
|
||||||
|
|
||||||
enum source {
|
enum source {
|
||||||
|
|
|
@ -66,7 +66,7 @@ void fsm_journal_event (char *message, int priority, int source, int target)
|
||||||
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 😄️
|
// CRITICAL ERROR WARNING INFO MESSAGE DEBUG SPEW 😄️
|
||||||
// 0 1 2 3 4 5 6
|
// 0 1 2 3 4 5 6
|
||||||
|
|
||||||
if (priority == 0 //<= DEBUG
|
if (priority < 6
|
||||||
|
|
||||||
#define MAIN___DIALOG___MODAL___TOPBAR___SYNTH___RULES___MEASURES___RESULTS___😄️ 0
|
#define MAIN___DIALOG___MODAL___TOPBAR___SYNTH___RULES___MEASURES___RESULTS___😄️ 0
|
||||||
/* * * * * * * - S O U R C E - * * * * * * *
|
/* * * * * * * - S O U R C E - * * * * * * *
|
||||||
|
@ -94,30 +94,20 @@ void fsm_journal_event (char *message, int priority, int source, int target)
|
||||||
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
||||||
* * * * * * * - S O U R C E - * * * * * * */
|
* * * * * * * - S O U R C E - * * * * * * */
|
||||||
|
|
||||||
|| source == 16
|
&& source == 0
|
||||||
|
|
||||||
/* * * * * * * - T A R G E T - * * * * * * *
|
/* * * * * * * - T A R G E T - * * * * * * *
|
||||||
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
||||||
*
|
*
|
||||||
* ANY 0
|
* ANY WIDGET BUTTON SCROLL GLAREA TEXT LABEL TREE
|
||||||
* WIDGET
|
* EXPANDER TOPBAR
|
||||||
* BUTTON
|
* AUTO_NOTIFICATION
|
||||||
* SCROLL
|
* FSM
|
||||||
* GLAREA
|
|
||||||
* TEXT
|
|
||||||
* LABEL
|
|
||||||
* TREE
|
|
||||||
* EXPANDER
|
|
||||||
* TOPBAR
|
|
||||||
*
|
|
||||||
* AUTO_NOTIFICATION 80
|
|
||||||
*
|
|
||||||
* FSM 90
|
|
||||||
* *
|
* *
|
||||||
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
* This list is duplicated in both /fsm.h and /fsm/dispatch *
|
||||||
* * * * * * * - T A R G E T - * * * * * * */
|
* * * * * * * - T A R G E T - * * * * * * */
|
||||||
|
|
||||||
|| target == 41)
|
&& target == 0)
|
||||||
|
|
||||||
fsm_journal_push (message);
|
fsm_journal_push (message);
|
||||||
}
|
}
|
||||||
|
@ -132,21 +122,21 @@ void fsm_init (char *initial_message_from_main)
|
||||||
fsm_journal_init (&gg_logs);
|
fsm_journal_init (&gg_logs);
|
||||||
fsm_journal_event (initial_message_from_main, MESSAGE, SOURCE, TARGET);
|
fsm_journal_event (initial_message_from_main, MESSAGE, SOURCE, TARGET);
|
||||||
|
|
||||||
fsm_journal_event ("fsm/dispatch initialisation fsm has began", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/dispatch fsm initialisation has began", MESSAGE, SOURCE, TARGET);
|
||||||
|
|
||||||
fsm_measures_list_init();
|
|
||||||
fsm_journal_event ("fsm/dispatch measures list init()", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/dispatch measures list init()", MESSAGE, SOURCE, TARGET);
|
||||||
|
fsm_measures_list_init();
|
||||||
|
|
||||||
fsm_results_list_init();
|
|
||||||
fsm_journal_event ("fsm/dispatch results list init()", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/dispatch results list init()", MESSAGE, SOURCE, TARGET);
|
||||||
|
fsm_results_list_init();
|
||||||
|
|
||||||
fsm_displayable_list_init();
|
|
||||||
fsm_journal_event ("fsm/dispatch displayable list init()", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/dispatch displayable list init()", MESSAGE, SOURCE, TARGET);
|
||||||
|
fsm_displayable_list_init();
|
||||||
|
|
||||||
fsm_preferences_list_init();
|
|
||||||
fsm_journal_event ("fsm/dispatch preferences list init()", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/dispatch preferences list init()", MESSAGE, SOURCE, TARGET);
|
||||||
|
fsm_preferences_list_init();
|
||||||
|
|
||||||
fsm_journal_event ("fsm/dispatch initialisation fsm has ended", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/dispatch fsm initialisation has ended", MESSAGE, SOURCE, TARGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -163,8 +153,8 @@ void fsm_set_preferences_modified (bool value)
|
||||||
char str2[20]; sprintf(str2, " (%d)\n", value); strcat(str1, str2);
|
char str2[20]; sprintf(str2, " (%d)\n", value); strcat(str1, str2);
|
||||||
fsm_journal_event (str1, INFO, SOURCE, TARGET);
|
fsm_journal_event (str1, INFO, SOURCE, TARGET);
|
||||||
|
|
||||||
fsm_journal_event ("fsm/dispatch preferences modified value = ?\n\
|
fsm_journal_event ("fsm/dispatch preferences modified value = ?",
|
||||||
> Je ne sais ni concatener les strings ni utiliser 'itoa'", INFO, SOURCE, TARGET);
|
INFO, SOURCE, TARGET);
|
||||||
preferences_have_been_modified = value;
|
preferences_have_been_modified = value;
|
||||||
/*
|
/*
|
||||||
if (value) fsm_journal_event (
|
if (value) fsm_journal_event (
|
||||||
|
|
|
@ -136,11 +136,11 @@ void fsm_add_displayable (char *displayable_name)
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
void fsm_preferences_list_init ()
|
void fsm_preferences_list_init ()
|
||||||
{
|
{
|
||||||
fsm_journal_event ("fsm/prefer preferences list required()", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/prefer setting up preferences list", MESSAGE, SOURCE, TARGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fsm_displayable_list_init ()
|
void fsm_displayable_list_init ()
|
||||||
{
|
{
|
||||||
fsm_journal_event ("fsm/prefer displayable list required()", MESSAGE, SOURCE, TARGET);
|
fsm_journal_event ("fsm/prefer setting up displayable list", MESSAGE, SOURCE, TARGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,8 +140,8 @@ int main (int argc, char **argv)
|
||||||
GtkApplication *app = gtk_application_new ("org.gem-graph",
|
GtkApplication *app = gtk_application_new ("org.gem-graph",
|
||||||
G_APPLICATION_DEFAULT_FLAGS);
|
G_APPLICATION_DEFAULT_FLAGS);
|
||||||
|
|
||||||
fsm_journal_event ("main \
|
fsm_journal_event ("main \
|
||||||
g signal connect (app <--> on_windows_startup)", INFO, MAIN, WIDGETS);
|
g signal connect (app <--> on_windows_startup)", INFO, MAIN, WIDGETS);
|
||||||
// ! WARNING ! 'on_windows_activation()'
|
// ! WARNING ! 'on_windows_activation()'
|
||||||
// and 'on_windows_startup()' are in: src/widget/dispatch.c
|
// and 'on_windows_startup()' are in: src/widget/dispatch.c
|
||||||
// NOT in: src/signal.c
|
// NOT in: src/signal.c
|
||||||
|
|
|
@ -274,8 +274,8 @@ void on_toggle_exec_edit (GtkWidget *toggled_button, gpointer user_data)
|
||||||
|
|
||||||
static void switch_state_rules_data()
|
static void switch_state_rules_data()
|
||||||
{
|
{
|
||||||
fsm_journal_event ("signal switch state rules data() has began",
|
fsm_journal_event ("signal switch state rules data()",
|
||||||
INFO, SOURCE, TARGET);
|
DEBUG, SOURCE, TARGET);
|
||||||
switch (fsm_get_state_rules_data()) {
|
switch (fsm_get_state_rules_data()) {
|
||||||
|
|
||||||
case (SYNTH) :
|
case (SYNTH) :
|
||||||
|
@ -322,8 +322,6 @@ static void switch_state_rules_data()
|
||||||
fsm_journal_event ("signal default in : switch state rules data()",
|
fsm_journal_event ("signal default in : switch state rules data()",
|
||||||
INFO, SOURCE, TARGET);
|
INFO, SOURCE, TARGET);
|
||||||
}
|
}
|
||||||
fsm_journal_event ("signal switch state rules data() has ended",
|
|
||||||
INFO, SOURCE, TARGET);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Il doit y avoir plus élégant,... ET SURTOUT MOINS DANGEREUX !!!
|
// TODO Il doit y avoir plus élégant,... ET SURTOUT MOINS DANGEREUX !!!
|
||||||
|
|
Loading…
Reference in New Issue