WIP: cleaning (micro-commit)
This commit is contained in:
parent
06b57458c6
commit
0d95832c96
|
@ -60,3 +60,5 @@ void fsm_set_store_restore_reset (int target, int value);
|
||||||
bool fsm_get_preferences_state ();
|
bool fsm_get_preferences_state ();
|
||||||
void fsm_set_preferences_state (bool value);
|
void fsm_set_preferences_state (bool value);
|
||||||
|
|
||||||
|
void *fsm_add_measure (char *measure_name);
|
||||||
|
void *fsm_add_result (char *result_name);
|
||||||
|
|
|
@ -37,4 +37,4 @@ const char get_button_icon_name (int n);
|
||||||
|
|
||||||
void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire...
|
void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire...
|
||||||
|
|
||||||
void *fsm_add_measure (char *measure_name);
|
void *fsm_add_displayable (char *displayable_name);
|
||||||
|
|
52
src/fsm.c
52
src/fsm.c
|
@ -37,7 +37,7 @@
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Each state of the finite state machine (fsm) must be */
|
/* Each state of the finite state machine (fsm) must be */
|
||||||
/* - saved at the end of a work session and */
|
/* - saved at the end of a work session and */
|
||||||
/* - reread at the start of a new session. */
|
/* - reread (available) at the start of a new session. */
|
||||||
/* */
|
/* */
|
||||||
/* No state of the fsm should be defined in another module. */
|
/* No state of the fsm should be defined in another module. */
|
||||||
/* No fsm transition needs to be executed in another module. */
|
/* No fsm transition needs to be executed in another module. */
|
||||||
|
@ -50,6 +50,7 @@
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
static int preferences_have_been_modified = FALSE;
|
static int preferences_have_been_modified = FALSE;
|
||||||
|
|
||||||
void fsm_set_preferences_state (bool value) {preferences_have_been_modified = value;}
|
void fsm_set_preferences_state (bool value) {preferences_have_been_modified = value;}
|
||||||
bool fsm_get_preferences_state () {return preferences_have_been_modified;}
|
bool fsm_get_preferences_state () {return preferences_have_been_modified;}
|
||||||
// preferences_have_been_modified
|
// preferences_have_been_modified
|
||||||
|
@ -94,7 +95,7 @@ void fsm_set_state_rules_data (int choice)
|
||||||
/* M E A S U R E M E N T S */
|
/* M E A S U R E M E N T S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
// An editable list of measurements is defined and maintained here.
|
// An editable list of measurements is defined and maintained here.
|
||||||
// Each measurement can be activated or silenced.
|
// Each possible measurement can be activated or silenced.
|
||||||
|
|
||||||
// The measures relate to
|
// The measures relate to
|
||||||
// - the number of occurrences of a rule or group of rules,
|
// - the number of occurrences of a rule or group of rules,
|
||||||
|
@ -102,23 +103,40 @@ void fsm_set_state_rules_data (int choice)
|
||||||
// - the time (date) of the event,
|
// - the time (date) of the event,
|
||||||
// - the time elapsed between two events,
|
// - the time elapsed between two events,
|
||||||
// - the occurrence of events C between events A and B
|
// - the occurrence of events C between events A and B
|
||||||
|
// - (non limitative, may be)
|
||||||
|
|
||||||
// When a list of measurements is established, it is possible to evaluate
|
// When a list of measurements is established, it is possible to evaluate
|
||||||
// if the results of a measurement are correlated with some other results.
|
// if the results of a measurement are correlated with some other results.
|
||||||
|
|
||||||
|
|
||||||
// structure de données : tableau ?
|
// structure de données : tableau ? Si oui, chaque "item" comprtera :
|
||||||
// - identifiant (clé)
|
|
||||||
// - pointeur vers une liste de mesures similaires
|
|
||||||
// - active ? + / -
|
|
||||||
// - type de mesure (les 6 items suivants "couvrent" tous les types possibles)
|
|
||||||
// - pointeur vers le premier groupe de règles (une au moins)
|
|
||||||
// - pointeur vers le second groupe de règles (une au moins)
|
|
||||||
// - pointeur vers les objets ou situations (un au moins)
|
|
||||||
// - date
|
|
||||||
// - durée
|
|
||||||
// - pointeur vers un ensemble d'évènements intercurrents
|
|
||||||
|
|
||||||
|
// - identifiant (clé) (+/- pointeur vers : date de création, auteur,...)
|
||||||
|
|
||||||
|
// - type de mesure
|
||||||
|
// (les 6 items suivants documentent l'ensemble de toutes les valeurs
|
||||||
|
// à recueillir pour de tous les types de mesure possibles;
|
||||||
|
// tous ne peuvent être simultanément utilisés
|
||||||
|
// mais ils occupent peu de place dans le tableau)
|
||||||
|
// - pointeur vers le premier groupe de règles (une au moins)
|
||||||
|
// - pointeur vers un second groupe de règles (une au moins)
|
||||||
|
// - pointeur vers des objets ou situations (un au moins)
|
||||||
|
// - pointeur vers un ensemble d'évènements intercurrents
|
||||||
|
// - date de l'évènement
|
||||||
|
// - durée entre deux évènements
|
||||||
|
|
||||||
|
// - mesure active ? + / -
|
||||||
|
// - pointeur vers une liste de mesures similaires
|
||||||
|
// - pointeur vers des données, des représentations de données ?
|
||||||
|
|
||||||
|
|
||||||
|
static void *list_measures;
|
||||||
|
|
||||||
|
void *fsm_add_measure (char *measure_name)
|
||||||
|
{
|
||||||
|
printf("fsm_add_measure %p <<< %s (see fsm.c)\n", list_measures, measure_name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,7 +151,7 @@ void fsm_set_state_rules_data (int choice)
|
||||||
// The list of results currently displayed is defined in : prefer.c
|
// The list of results currently displayed is defined in : prefer.c
|
||||||
|
|
||||||
// structure de données : tableau ?
|
// structure de données : tableau ?
|
||||||
// - identifiant (clé))
|
// - identifiant (clé) (+/- pointeur vers : date de création, auteur,...)
|
||||||
// - type de données 1
|
// - type de données 1
|
||||||
// - type de données 2
|
// - type de données 2
|
||||||
// - ... ?
|
// - ... ?
|
||||||
|
@ -144,7 +162,13 @@ void fsm_set_state_rules_data (int choice)
|
||||||
// - concat ?
|
// - concat ?
|
||||||
|
|
||||||
|
|
||||||
|
static void *list_results;
|
||||||
|
|
||||||
|
void *fsm_add_result (char *result_name)
|
||||||
|
{
|
||||||
|
printf("fsm_add_result %p <<< %s (see fsm.c)\n", list_results, result_name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,10 +117,10 @@ void fsm_reset_all_situations_transparencies_at_value (int value)
|
||||||
/* D I S P L A Y E D R E S U L T S */
|
/* D I S P L A Y E D R E S U L T S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
static void *list_measures;
|
static void *list_displayables;
|
||||||
|
|
||||||
void *fsm_add_measure (char *measure_name)
|
void *fsm_add_displayable (char *displayable_name)
|
||||||
{
|
{
|
||||||
printf("fsm_add_measure %p <<< %s (see prefer.c)\n", list_measures, measure_name);
|
printf("fsm_add_displayable %p <<< %s (see prefer.c)\n", list_displayables, displayable_name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
#include "../../../include/base.h"
|
#include "../../../include/base.h"
|
||||||
#include "../../../include/signal.h"
|
#include "../../../include/signal.h"
|
||||||
#include "../../../include/widget.h"
|
#include "../../../include/widget.h"
|
||||||
#include "../../../include/prefer.h"
|
//#include "../../../include/prefer.h"
|
||||||
|
#include "../../../include/fsm.h"
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue