DD2-monitor/viz/curses/waterfall.c

60 lines
1019 B
C
Raw Normal View History

2019-01-10 11:44:47 +11:00
/*
* DD2 Monitoring
*
* ncurses waterfall interface
*/
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <getopt.h>
#include <ncurses.h>
#include "ecran.h"
extern int verbosity;
/* ---------------------------------------------------------------- */
WINDOW *open_waterfall(char *title, int flags)
{
WINDOW *win;
int l, c, w, h;
l = 2; c = 1;
w = COLS - 2; h = LINES -3;
win = newwin(h, w, l, c);
return win;
}
/* ---------------------------------------------------------------- */
int plot_waterfall(WINDOW *wf, float values[4])
{
#define TL 1000
int foo;
char tag, ligne[TL+1];
for(foo=0; foo<TL; foo++) *(ligne+foo) = '-';
for(foo=0; foo<4; foo++) {
tag = "ATOX"[foo];
}
return -1;
}
/* ---------------------------------------------------------------- */
int close_waterfall(WINDOW *wf, int notused)
{
if (NULL == wf) {
fprintf(stderr, "%s wf is null\n", __func__);
return -1;
}
return 0;
}
/* ---------------------------------------------------------------- */