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
Diff: Telemetry.cpp
- Revision:
- 4:8e3de1a314e1
- Parent:
- 3:37d2d127bc83
- Child:
- 5:cd94bb58e096
--- a/Telemetry.cpp Mon Feb 22 17:17:52 2016 +0000 +++ b/Telemetry.cpp Mon Feb 22 17:55:46 2016 +0000 @@ -38,61 +38,58 @@ pc.baud(bauds); } -void Telemetry::publish(const char * topic, char * msg) +void Telemetry::pub(const char * topic, char * msg) { publish(topic,msg); } -void Telemetry::publish_u8(const char * topic, uint8_t msg) +void Telemetry::pub_u8(const char * topic, uint8_t msg) { publish_u8(topic,msg); } -void Telemetry::publish_u16(const char * topic, uint16_t msg) +void Telemetry::pub_u16(const char * topic, uint16_t msg) { publish_u16(topic,msg); } -void Telemetry::publish_u32(const char * topic, uint32_t msg) +void Telemetry::pub_u32(const char * topic, uint32_t msg) { publish_u32(topic,msg); } -void Telemetry::publish_i8(const char * topic, int8_t msg) +void Telemetry::pub_i8(const char * topic, int8_t msg) { publish_i8(topic,msg); } -void Telemetry::publish_i16(const char * topic, int16_t msg) +void Telemetry::pub_i16(const char * topic, int16_t msg) { publish_i16(topic,msg); } -void Telemetry::publish_i32(const char * topic, int32_t msg) +void Telemetry::pub_i32(const char * topic, int32_t msg) { publish_i32(topic,msg); } -void Telemetry::publish_f32(const char * topic, float msg) +void Telemetry::pub_f32(const char * topic, float msg) { publish_f32(topic,msg); } -void Telemetry::subscribe(void (*callback)(TM_state * s, TM_msg * m)) -{ - subscribe(callback); -} - -void Telemetry::set(TM_state* userData) +void Telemetry::sub(void (*callback)(TM_state * s, TM_msg * m), + TM_state* userData) { set_state(userData); + subscribe(callback); } void Telemetry::update() { update_telemetry(0); } - +/* uint32_t cast(TM_msg * m, char * buf, size_t bufSize) { return emplace(m,buf,bufSize); @@ -132,3 +129,4 @@ { return emplace_f32(m,dst); } +*/