gtdc/tdc_variable.h
2008-03-19 17:34:33 +01:00

32 lines
735 B
C

#ifndef TDC_VARIABLE_H_
#define TDC_VARIABLE_H_
#include <stdint.h>
struct tdc_var {
uint32_t id;
uint32_t flags;
union {
uint8_t data;
uint8_t data_uint8;
uint16_t data_uint16;
uint32_t data_uint32;
uint64_t data_uint64;
float data_float;
double data_double;
};
void *privdata;
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);
int tdcvar_parse_value(struct tdc_var *var, char *data);
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_ */