journal concat message + value in /fsm/dispatch/ push() TODO
This commit is contained in:
parent
10e6d95f53
commit
d2ebb27a87
|
@ -84,7 +84,7 @@ enum value {
|
||||||
VALUE
|
VALUE
|
||||||
};
|
};
|
||||||
|
|
||||||
#define JOURNAL_DATE_MAX_LENGTH 255
|
#define JOURNAL_LOG_MAX_LENGTH 255
|
||||||
|
|
||||||
typedef struct unit {long yy_dd_mm;
|
typedef struct unit {long yy_dd_mm;
|
||||||
long usec;
|
long usec;
|
||||||
|
@ -95,7 +95,8 @@ typedef struct unit {long yy_dd_mm;
|
||||||
typedef struct {unit *first; unit *last;} journal; // journal unit access structure
|
typedef struct {unit *first; unit *last;} journal; // journal unit access structure
|
||||||
|
|
||||||
void fsm_journal_init (journal *jj); // init from main
|
void fsm_journal_init (journal *jj); // init from main
|
||||||
void fsm_journal_push (char *message); // def: fsm/dispatch
|
void fsm_journal_push (char *message,
|
||||||
|
const char *string_value); // def: fsm/dispatch
|
||||||
// call: any call that does not have
|
// call: any call that does not have
|
||||||
// the log address
|
// the log address
|
||||||
void fsm_journal_clear (journal *jj, char *message); // empty the journal
|
void fsm_journal_clear (journal *jj, char *message); // empty the journal
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <gtk-4.0/gtk/gtk.h>
|
#include <gtk-4.0/gtk/gtk.h>
|
||||||
|
|
||||||
|
|
||||||
// void on_auto_notification (const char *message); (see "signal.c")
|
// void on_auto_notification (char *message); (see "signal.c")
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "../../include/fsm.h"
|
#include "../../include/fsm.h"
|
||||||
|
#include "../../include/widget.h"
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -58,7 +59,13 @@ static journal gg_logs;
|
||||||
|
|
||||||
void fsm_journal_publication_request () {fsm_journal_publish (gg_logs);}
|
void fsm_journal_publication_request () {fsm_journal_publish (gg_logs);}
|
||||||
|
|
||||||
void fsm_journal_push (char *message) {fsm_journal_push_front (&gg_logs, message);}
|
void fsm_journal_push (char *message, const char *string_value)
|
||||||
|
{
|
||||||
|
char to_print [JOURNAL_LOG_MAX_LENGTH] = "";
|
||||||
|
strcat (to_print, message);
|
||||||
|
strcat (to_print, string_value);
|
||||||
|
fsm_journal_push_front (&gg_logs, message); // to_print); TODO concat strings
|
||||||
|
}
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -67,11 +74,11 @@ void fsm_journal_event (char *message, int severity, int source, const char *val
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
severity <= SPEW
|
severity < SPEW
|
||||||
&& source == MAIN
|
&& source == MAIN
|
||||||
)
|
)
|
||||||
|
|
||||||
fsm_journal_push (message); // TODO push (message + value)
|
fsm_journal_push (message, value); // TODO push (message + value)
|
||||||
}
|
}
|
||||||
#define MAIN___DIALOG___MODAL___TOPBAR___SYNTH___RULES___MEASURES___RESULTS___😄️ 0
|
#define MAIN___DIALOG___MODAL___TOPBAR___SYNTH___RULES___MEASURES___RESULTS___😄️ 0
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ void fsm_journal_seek (journal jj, long usec, char *message)
|
||||||
void fsm_journal_publish (journal jj)
|
void fsm_journal_publish (journal jj)
|
||||||
{
|
{
|
||||||
unit *a_unit = jj.last;
|
unit *a_unit = jj.last;
|
||||||
char buf [JOURNAL_DATE_MAX_LENGTH];
|
char buf [JOURNAL_LOG_MAX_LENGTH];
|
||||||
int nb = 0;
|
int nb = 0;
|
||||||
while (a_unit)
|
while (a_unit)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "../include/util.h"
|
#include "../include/util.h"
|
||||||
|
|
||||||
|
|
||||||
static void on_auto_notification (const char *message)
|
static void on_auto_notification (char *message)
|
||||||
{
|
{
|
||||||
fsm_journal_event ("signal auto notification()",
|
fsm_journal_event ("signal auto notification()",
|
||||||
DEBUG, AUTO_NOTIFICATION, message);
|
DEBUG, AUTO_NOTIFICATION, message);
|
||||||
|
|
Loading…
Reference in New Issue