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: c_api/telemetry_core.h
- Revision:
- 5:cd94bb58e096
- Child:
- 7:d224bddd5405
diff -r 8e3de1a314e1 -r cd94bb58e096 c_api/telemetry_core.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c_api/telemetry_core.h Wed Mar 09 12:15:13 2016 +0000 @@ -0,0 +1,29 @@ +#ifndef TELEMETRY_CORE_H_ +#define TELEMETRY_CORE_H_ + +#include "stddef.h" +#include "stdint.h" +#include "telemetry_utils.h" + +#define INCOMING_BUFFER_SIZE 128 +#define OUTGOING_BUFFER_SIZE 128 +#define TOPIC_BUFFER_SIZE 64 + +void init_telemetry(TM_transport * t); + +void publish(const char * topic, const char * msg); +void publish_u8(const char * topic, uint8_t msg); +void publish_u16(const char * topic, uint16_t msg); +void publish_u32(const char * topic, uint32_t msg); +void publish_i8(const char * topic, int8_t msg); +void publish_i16(const char * topic, int16_t msg); +void publish_i32(const char * topic, int32_t msg); +void publish_f32(const char * topic, float msg); + +// subscribe a function to be called everytime a frame is received +// second argument is a data structure that you can implement to access your program data inside the function +void subscribe(void (*callback)(TM_state * s, TM_msg * m), TM_state * s); + +void update_telemetry(float elapsedTime); + +#endif