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:
- 5:e8936f38a338
- Parent:
- 4:d675ad9c57ff
--- a/distantio.h Tue Oct 13 12:20:44 2015 +0000 +++ b/distantio.h Wed Oct 14 09:42:32 2015 +0000 @@ -87,7 +87,7 @@ /** Starts a new group. Any subsequent call to @dio_var will register the variable under this new group. * Groups also have descriptors that can be queried from master-side. - * @param groupname name of the variable group. + * @param groupname name of the variable group. Limited to 14 characters. * */ void dIO_group(char* groupname); @@ -112,4 +112,17 @@ */ void dIO_send_alive(); +/** Manual mode for sending special data in case of particular events. + * This is useful to debug issues happening much faster than human perception, because this data will be exported master-side to an excel file. + * This mode can also support arrays by calling it for each array index and specifying that index as last parameter. + * Master-side, data is sorted in a hierchical manner, first by name, then by recording time, then by index (see parameters). + * @param ptr Pointer to the data start adress + * @param size Size in bytes of the data. Use sizeof(..) to avoid mistakes. + * @param type Type of the variable. For a list of possible types @see dio_type + * @param name Quick custom name for the variable. Limited to 2 characters for now. + * @param recordingtime User-specified field intented for associating a specific time with the data + * @param index User-specified field for associating a specific index to the data. + */ + void dIO_emergency_send(void* ptr, uint16_t size, dio_type type, char* name, float recordingtime, uint16_t index = 0); + #endif /* DISTANTIO_H_ */