First class data visualization and communication library with embedded devices. Code is maintained at github.com/Overdrivr/Telemetry

Dependents:   telemetry_car_demo telemetry_demo_FRDM-TFC telemetry_example_01 telemetry_indexed_data_demo ... more

Committer:
Overdrivr
Date:
Thu Feb 11 08:10:08 2016 +0000
Revision:
2:b7a3ac7bcec8
Parent:
1:e51abb43c074
Replaced MODSERIAL by BufferedSerial for increasing amount of supported devices

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Overdrivr 1:e51abb43c074 1 #include "mbed.h"
Overdrivr 1:e51abb43c074 2 #include "telemetry/telemetry.hpp"
Overdrivr 0:3a30eba5d8f7 3
Overdrivr 1:e51abb43c074 4 // C++ Wrapper and driver implementation for telemetry (github.com/Overdrivr/Telemetry)
Overdrivr 0:3a30eba5d8f7 5
Overdrivr 1:e51abb43c074 6 class Telemetry
Overdrivr 0:3a30eba5d8f7 7 {
Overdrivr 1:e51abb43c074 8 public:
Overdrivr 2:b7a3ac7bcec8 9 Telemetry(TM_state* userData, uint32_t bauds = 9600);
Overdrivr 1:e51abb43c074 10
Overdrivr 1:e51abb43c074 11 uint32_t cast(TM_msg * m, char * buf, size_t bufSize);
Overdrivr 1:e51abb43c074 12 uint32_t cast_u8(TM_msg * m, uint8_t * dst);
Overdrivr 1:e51abb43c074 13 uint32_t cast_u16(TM_msg * m, uint16_t * dst);
Overdrivr 1:e51abb43c074 14 uint32_t cast_u32(TM_msg * m, uint32_t * dst);
Overdrivr 1:e51abb43c074 15 uint32_t cast_i8(TM_msg * m, int8_t * dst);
Overdrivr 1:e51abb43c074 16 uint32_t cast_i16(TM_msg * m, int16_t * dst);
Overdrivr 1:e51abb43c074 17 uint32_t cast_i32(TM_msg * m, int32_t * dst);
Overdrivr 1:e51abb43c074 18 uint32_t cast_f32(TM_msg * m, float * dst);
Overdrivr 1:e51abb43c074 19
Overdrivr 1:e51abb43c074 20 void pub(const char * topic, char * msg);
Overdrivr 1:e51abb43c074 21 void pub_u8(const char * topic, uint8_t msg);
Overdrivr 1:e51abb43c074 22 void pub_u16(const char * topic, uint16_t msg);
Overdrivr 1:e51abb43c074 23 void pub_u32(const char * topic, uint32_t msg);
Overdrivr 1:e51abb43c074 24 void pub_i8(const char * topic, int8_t msg);
Overdrivr 1:e51abb43c074 25 void pub_i16(const char * topic, int16_t msg);
Overdrivr 1:e51abb43c074 26 void pub_i32(const char * topic, int32_t msg);
Overdrivr 1:e51abb43c074 27 void pub_f32(const char * topic, float msg);
Overdrivr 1:e51abb43c074 28
Overdrivr 1:e51abb43c074 29 void sub(void (*callback)(TM_state * s, TM_msg * m));
Overdrivr 0:3a30eba5d8f7 30
Overdrivr 1:e51abb43c074 31 void update();
Overdrivr 1:e51abb43c074 32
Overdrivr 1:e51abb43c074 33 private:
Overdrivr 1:e51abb43c074 34 TM_transport transport;
Overdrivr 1:e51abb43c074 35 };
Overdrivr 0:3a30eba5d8f7 36
Overdrivr 1:e51abb43c074 37