gtdc/tdc_variable.h

32 lines
735 B
C
Raw Normal View History

2008-03-18 19:30:21 +01:00
#ifndef TDC_VARIABLE_H_
#define TDC_VARIABLE_H_
#include <stdint.h>
struct tdc_var {
uint32_t id;
uint32_t flags;
union {
2008-03-19 02:54:27 +01:00
uint8_t data;
2008-03-18 19:30:21 +01:00
uint8_t data_uint8;
uint16_t data_uint16;
uint32_t data_uint32;
uint64_t data_uint64;
float data_float;
double data_double;
};
2008-03-19 03:13:06 +01:00
void *privdata;
2008-03-18 19:30:21 +01:00
char name[0];
};
void tdcvar_get_value(struct tdc_var *var, char *buf, int size, int viewmode);
void tdcvar_get_type(struct tdc_var *var, char *buf, int size);
2008-03-19 17:34:33 +01:00
int tdcvar_parse_value(struct tdc_var *var, char *data);
2008-03-18 19:30:21 +01:00
struct tdc_var * tdcvar_create(int id, uint32_t flags, char *name, int len);
void tdcvar_update(struct tdc_var *var, uint8_t *data, int len);
void tdcvar_destroy(struct tdc_var *var);
#endif /* TDC_VARIABLE_H_ */