Open AngusJull opened 1 month ago
This is implemented with the types in sensor_api.h
where all types are shared. The types I think you're seeing in the collectors are just unions that make sending easier with a uint8_t type
header member.
I do like the idea of a union for this that's common and contains all the types:
typedef struct {
uint8_t type;
union {
float fl;
uint32_t u32;
vec3d_t v3;
/* ... more types ... */
} data;
} sensor_msg_t;
The collectors currently send data using their own privately defined structs. These should be swapped for a single definition (likely making use of the types in the sensor interface).