creation of dir : src/fsm that contains : dispatch.c measure.c result.c
This commit is contained in:
parent
0d95832c96
commit
3d2f7db7a6
|
@ -29,9 +29,9 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "../include/fsm.h"
|
#include "../../include/fsm.h"
|
||||||
#include "../include/prefer.h"
|
#include "../../include/prefer.h"
|
||||||
#include "../include/widget.h"
|
#include "../../include/widget.h"
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -88,90 +88,6 @@ 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 defined and maintained here.
|
|
||||||
// Each possible measurement can be activated or silenced.
|
|
||||||
|
|
||||||
// The measures relate to
|
|
||||||
// - the number of occurrences of a rule or group of rules,
|
|
||||||
// - 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
|
|
||||||
// - (non limitative, may be)
|
|
||||||
|
|
||||||
// When a list of measurements is established, it is possible to evaluate
|
|
||||||
// if the results of a measurement are correlated with some other results.
|
|
||||||
|
|
||||||
|
|
||||||
// structure de données : tableau ? Si oui, chaque "item" comprtera :
|
|
||||||
|
|
||||||
// - 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
/* 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.
|
|
||||||
|
|
||||||
// The list of results currently displayed is defined in : prefer.c
|
|
||||||
|
|
||||||
// structure de données : tableau ?
|
|
||||||
// - identifiant (clé) (+/- pointeur vers : date de création, auteur,...)
|
|
||||||
// - type de données 1
|
|
||||||
// - type de données 2
|
|
||||||
// - ... ?
|
|
||||||
// - pointeur vers le premier groupe de données
|
|
||||||
// - pointeur vers le second groupe de données
|
|
||||||
// - ... ?
|
|
||||||
// - pointeur vers une liste de données similaires
|
|
||||||
// - 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* D E B U G G E R S */
|
/* D E B U G G E R S */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
|
@ -0,0 +1,93 @@
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* *
|
||||||
|
* Gem-graph client *
|
||||||
|
* *
|
||||||
|
* State machine *
|
||||||
|
* *
|
||||||
|
* Copyright © 2024 Libre en Communs <contact@a-lec.org> *
|
||||||
|
* Copyright © 2024 Adrien Bourmault <neox@a-lec.org> *
|
||||||
|
* Copyright © 2024 Jean Sirmai <jean@a-lec.org> *
|
||||||
|
* *
|
||||||
|
* This file is part of Gem-graph. *
|
||||||
|
* *
|
||||||
|
* This program is free software: you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU Affero General Public License *
|
||||||
|
* as published by the Free Software Foundation, *
|
||||||
|
* either version 3 of the License, *
|
||||||
|
* or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; *
|
||||||
|
* without even the implied warranty of MERCHANTABILITY *
|
||||||
|
* or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU Affero General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU Affero General Public License *
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||||
|
* *
|
||||||
|
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "../../include/fsm.h"
|
||||||
|
#include "../../include/prefer.h"
|
||||||
|
#include "../../include/widget.h"
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Each state of the finite state machine (fsm) must be */
|
||||||
|
/* - saved at the end of a work session and */
|
||||||
|
/* - reread (available) at the start of a new session. */
|
||||||
|
/* */
|
||||||
|
/* No state of the fsm should be defined in another module. */
|
||||||
|
/* No fsm transition needs to be executed in another module. */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* M E A S U R E M E N T S */
|
||||||
|
/******************************************************************************/
|
||||||
|
// An editable list of measurements is defined and maintained here.
|
||||||
|
// Each possible measurement can be activated or silenced.
|
||||||
|
|
||||||
|
// The measures relate to
|
||||||
|
// - the number of occurrences of a rule or group of rules,
|
||||||
|
// - 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
|
||||||
|
// - (non limitative, may be)
|
||||||
|
|
||||||
|
// When a list of measurements is established, it is possible to evaluate
|
||||||
|
// if the results of a measurement are correlated with some other results.
|
||||||
|
|
||||||
|
|
||||||
|
// structure de données : tableau ? Si oui, chaque "item" comprtera :
|
||||||
|
|
||||||
|
// - 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;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
* *
|
||||||
|
* Gem-graph client *
|
||||||
|
* *
|
||||||
|
* State machine *
|
||||||
|
* *
|
||||||
|
* Copyright © 2024 Libre en Communs <contact@a-lec.org> *
|
||||||
|
* Copyright © 2024 Adrien Bourmault <neox@a-lec.org> *
|
||||||
|
* Copyright © 2024 Jean Sirmai <jean@a-lec.org> *
|
||||||
|
* *
|
||||||
|
* This file is part of Gem-graph. *
|
||||||
|
* *
|
||||||
|
* This program is free software: you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU Affero General Public License *
|
||||||
|
* as published by the Free Software Foundation, *
|
||||||
|
* either version 3 of the License, *
|
||||||
|
* or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; *
|
||||||
|
* without even the implied warranty of MERCHANTABILITY *
|
||||||
|
* or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU Affero General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU Affero General Public License *
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||||
|
* *
|
||||||
|
* * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "../../include/fsm.h"
|
||||||
|
#include "../../include/prefer.h"
|
||||||
|
#include "../../include/widget.h"
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Each state of the finite state machine (fsm) must be */
|
||||||
|
/* - saved at the end of a work session and */
|
||||||
|
/* - reread (available) at the start of a new session. */
|
||||||
|
/* */
|
||||||
|
/* No state of the fsm should be defined in another module. */
|
||||||
|
/* No fsm transition needs to be executed in another module. */
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* 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.
|
||||||
|
|
||||||
|
// The list of results currently displayed is defined in : prefer.c
|
||||||
|
|
||||||
|
// structure de données : tableau ?
|
||||||
|
// - identifiant (clé) (+/- pointeur vers : date de création, auteur,...)
|
||||||
|
// - type de données 1
|
||||||
|
// - type de données 2
|
||||||
|
// - ... ?
|
||||||
|
// - pointeur vers le premier groupe de données
|
||||||
|
// - pointeur vers le second groupe de données
|
||||||
|
// - ... ?
|
||||||
|
// - pointeur vers une liste de données similaires
|
||||||
|
// - 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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue