gtk2 sam7fc telemetrie application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
855B

  1. #ifndef TDC_VARIABLE_H_
  2. #define TDC_VARIABLE_H_
  3. #include <stdint.h>
  4. struct tdc_var {
  5. uint32_t id;
  6. uint32_t flags;
  7. union {
  8. uint8_t data;
  9. uint8_t data_uint8;
  10. uint16_t data_uint16;
  11. uint32_t data_uint32;
  12. uint64_t data_uint64;
  13. float data_float;
  14. double data_double;
  15. };
  16. void *privdata_vartab; /* GtkTreeIter */
  17. void *privdata_graphtab; /* struct xygraph */
  18. char name[0];
  19. };
  20. void tdcvar_get_value(struct tdc_var *var, char *buf, int size, int viewmode);
  21. void tdcvar_get_type(struct tdc_var *var, char *buf, int size);
  22. int tdcvar_parse_value(struct tdc_var *var, char *data);
  23. double tdcvar_get_double(struct tdc_var *var);
  24. struct tdc_var * tdcvar_create(int id, uint32_t flags, char *name, int len);
  25. void tdcvar_update(struct tdc_var *var, uint8_t *data, int len);
  26. void tdcvar_destroy(struct tdc_var *var);
  27. #endif /* TDC_VARIABLE_H_ */