measurements and results lists should be defined and maintained in fsm.c

This commit is contained in:
Jean Sirmai 2024-08-18 12:32:21 +02:00
parent 4c4df5f3ec
commit 154e2ad57b
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 53 additions and 25 deletions

View File

@ -34,23 +34,35 @@
#include "../include/widget.h"
/******************************************************************************/
/* Each state of the finite state machine (fsm) must be */
/* - saved at the end of a work session and */
/* - reread at the start of a new session. */
/* */
/* No state of the fsm should be stored elsewhere. */
/* No fsm transition needs to be executed elsewhere. */
/******************************************************************************/
/******************************************************************************/
/* S T A T E S */
/******************************************************************************/
static int choice_EXEC_EDIT = EXEC;
static int choice_STATE_RULES_DATA = STATE;
static int preferences_have_been_modified = FALSE;
int fsm_get_exec_edit () {return choice_EXEC_EDIT;}
int fsm_get_state_rules_data () {return choice_STATE_RULES_DATA;}
void fsm_set_preferences_state (bool value) {preferences_have_been_modified = value;}
bool fsm_get_preferences_state () {return preferences_have_been_modified;}
// preferences_have_been_modified
// and should be stored before closing the current session. TODO
static int choice_EXEC_EDIT = EXEC;
static int choice_STATE_RULES_DATA = STATE;
int fsm_get_exec_edit () {return choice_EXEC_EDIT;}
int fsm_get_state_rules_data () {return choice_STATE_RULES_DATA;}
/******************************************************************************/
/* T R A N S I T I O N S */
/******************************************************************************/
@ -76,6 +88,41 @@ void fsm_set_state_rules_data (int choice)
/******************************************************************************/
/* M E A S U R E M E N T S */
/******************************************************************************/
// An editable list of measurements is maintained. (add, remove)
// Each measurement can be activated or silenced.
// The measures relate to
// - the number of occurrences of the rule,
// - the number of objects or situations before/after the rule was applied,
// - the time (date) of the event,
// - the time elapsed between two events,
// - the occurrence of events C between events A and B
// When a list of measurements is established, it is possible to evaluate
// if the results of a measurement are correlated with some other results.
/******************************************************************************/
/* R E S U L T S */
/******************************************************************************/
// An editable list of displayable results is maintained. (add, remove, display)
// A preferred presentation should be available for each result.
// NB : "graph", "chart", "plot" and "diagram" are ambiguous terms.
/******************************************************************************/
/* D E B U G G E R S */
/******************************************************************************/
@ -106,22 +153,3 @@ static void debug_printing (int choice, int value, int sub_automaton)
}
}
/******************************************************************************/
/* N O N E X C L U S I V E S E L E C T I O N S */
/******************************************************************************/
// ?
/******************************************************************************/
/* M E A S U R E S */
/******************************************************************************/
// list of measurements requested by the user
// this list is editable (see widget / measure)
// the results of each measurement can be displayed in diagrams (charts,...)
// liste des diagrammes