Framework for reading and writing variables in real time on any MBED platform.
DistantIO
This is the C implementation of the DistantIO slave framework.
Library is working but slight API breaks may occur in the future. C++ version is also in development.
To get the master-side implementation, see https://github.com/Overdrivr/DistantIO
Diff: distantio.h
- Revision:
- 2:f2c816b681e3
- Parent:
- 1:aaffeb93f99b
- Child:
- 3:135f55b5334e
--- a/distantio.h Thu Oct 08 12:27:20 2015 +0000 +++ b/distantio.h Thu Oct 08 13:14:32 2015 +0000 @@ -1,11 +1,10 @@ -// Copyright (C) 2015 Rémi Bèges -// For conditions of distribution and use, see copyright notice in the LICENSE.md file +/* + * distantio.h + * + * Created on: Oct 13, 2014 + * Author: B48923 + */ -/* - * WARNING : IMPLEMENTATION FOR LITTLE-ENDIAN PROCESSOR - * TODO : HANDLE BOTH - */ - #ifndef DISTANTIO_H_ #define DISTANTIO_H_ @@ -39,6 +38,8 @@ char name[8]; uint8_t send; uint8_t groupID; + float refresh_rate; + float last_refreshed; }; typedef struct group group; @@ -60,13 +61,13 @@ void init_distantio(); uint8_t register_var(void* ptr, uint16_t size, dio_type type, uint8_t writeable, char* name); +uint8_t register_var(void* ptr, uint16_t size, dio_type type, uint8_t writeable, char* name, float refresh_rate); void start_group(char* groupname); void distantio_decode(uint8_t* data,uint16_t datasize); // To call often -void send_variables(); +void update(float current_time); void send_alive(); #endif /* DISTANTIO_H_ */ -