This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino This program supported the revision of 169 of rosserial.

Dependencies:  

Dependents:   rosserial_mbed robot_S2

Revision:
4:684f39d0c346
Parent:
3:1cf99502f396
--- a/ros/node_handle.h	Sat Nov 12 23:54:45 2011 +0000
+++ b/ros/node_handle.h	Wed Feb 29 23:00:21 2012 +0000
@@ -115,7 +115,6 @@
         bytes_ = 0;
         index_ = 0;
         topic_ = 0;
-        checksum_=0;
     };
 
 protected:
@@ -128,8 +127,6 @@
 
     bool configured_;
 
-    int total_receivers;
-
     /* used for syncing the time */
     unsigned long last_sync_time;
     unsigned long last_sync_receive_time;
@@ -244,7 +241,6 @@
         unsigned long offset = hardware_.time() - rt_time;
 
         t.deserialize(data);
-
         t.data.sec += offset/1000;
         t.data.nsec += (offset%1000)*1000000UL;
 
@@ -328,21 +324,25 @@
 
     void negotiateTopics() {
         configured_ = true;
+        
         rosserial_msgs::TopicInfo ti;
         int i;
-        for (i = 0; i < MAX_PUBLISHERS; i++) {
-            if (publishers[i] != 0) { // non-empty slot
+        for (i = 0; i < MAX_PUBLISHERS; i++)
+        {
+            if (publishers[i] != 0) // non-empty slot
+            {
                 ti.topic_id = publishers[i]->id_;
                 ti.topic_name = (char *) publishers[i]->topic_;
                 ti.message_type = (char *) publishers[i]->msg_->getType();
                 ti.md5sum = (char *) publishers[i]->msg_->getMD5();
                 ti.buffer_size = OUTPUT_SIZE;
-
                 publish( publishers[i]->getEndpointType(), &ti );
             }
         }
-        for (i = 0; i < MAX_SUBSCRIBERS; i++) {
-            if (subscribers[i] != 0) { // non-empty slot
+        for (i = 0; i < MAX_SUBSCRIBERS; i++)
+        {
+            if (subscribers[i] != 0) // non-empty slot
+            {
                 ti.topic_id = subscribers[i]->id_;
                 ti.topic_name = (char *) subscribers[i]->topic_;
                 ti.message_type = (char *) subscribers[i]->getMsgType();