1 /*
2  *	aprsc
3  *
4  *	(c) Heikki Hannikainen, OH7LZB <hessu@hes.iki.fi>
5  *
6  *     This program is licensed under the BSD license, which can be found
7  *     in the file LICENSE.
8  *
9  */
10 
11 #ifndef COUNTERDATA_H
12 #define COUNTERDATA_H
13 
14 /* store 48 hours, 1 sample per minute */
15 #define CDATA_SAMPLES	48*60
16 #define CDATA_INTERVAL	60
17 
18 struct cdata_t;
19 
20 extern struct cdata_t *cdata_alloc(const char *name);
21 extern void cdata_free(struct cdata_t *cd);
22 extern void cdata_counter_sample(struct cdata_t *cd, long long value);
23 extern void cdata_gauge_sample(struct cdata_t *cd, long long value);
24 extern long cdata_get_last_value(const char *name);
25 extern char *cdata_json_string(const char *name);
26 
27 #endif
28