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

Revision:
6:72d46dbdbe7a
Parent:
5:e8936f38a338
--- a/distantio.cpp	Wed Oct 14 09:42:32 2015 +0000
+++ b/distantio.cpp	Fri Oct 16 16:16:19 2015 +0000
@@ -69,8 +69,6 @@
 	strncpy(Log.groups[Log.current_group_id].name,groupname,NAMESIZE);
 }
 
-
-
 void dIO_decode(uint8_t* data,uint16_t datasize)
 {
 	// First check data size
@@ -164,7 +162,7 @@
 
 void dIO_send_alive()
 {
-	static uint8_t buffer[FRAMESIZE];
+	uint8_t buffer[FRAMESIZE];
 	buffer[0] = 0x03;
 	 
 	// Compute crc
@@ -181,7 +179,7 @@
  void dIO_emergency_send(void* ptr, uint16_t size, dio_type type, char* name, float recordingtime, uint16_t index)
  {
 
-	static uint8_t buffer[FRAMESIZE];
+	uint8_t buffer[FRAMESIZE];
 
 	// Response code 0x09
 	buffer[0] = 0x09;
@@ -244,7 +242,7 @@
 	if(index >= Log.amount)
 		return;
 
-	static uint8_t buffer[FRAMESIZE];
+	uint8_t buffer[FRAMESIZE];
 	uint8_t type;
 
 	// Respond returned-descriptor
@@ -295,7 +293,7 @@
 	if(index > Log.current_group_id)
 		return;
 
-	static uint8_t buffer[FRAMESIZE];
+	uint8_t buffer[FRAMESIZE];
 
 	// Respond returned-descriptor
 	buffer[0] = 0x00;
@@ -339,7 +337,7 @@
 	if(index >= Log.amount)
 		return;
 
-	static uint8_t buffer[FRAMESIZE];
+	uint8_t buffer[FRAMESIZE];
 
 	// Response code 0x01
 	buffer[0] = 0x01;