Etherios Cloud Connector very first porting for mbed. Tested in an LPC1768

Etherios Cloud Connector for Embedded v2.1.0.3 library for mbed. Early porting.

This port is centered mainly in the platform code. So it should work properly with the provided examples of send_data, device_request, data_points, RCI and firmware_update (stub implementation, not a real one... yet ;-)). Filesystem is not implemented yet, and some examples might need changes.

To run, it needs the following libraries: - mbed - mbed-rtos - EthernetInterface

Find more information (and the source code!) about Etherios Cloud Connector for Embedded here: http://www.etherios.com/products/devicecloud/support/connector and in: http://www.etherios.com

Revision:
0:1c358ea10753
diff -r 000000000000 -r 1c358ea10753 private/rci_binary_debug.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/private/rci_binary_debug.h	Tue Dec 03 13:34:02 2013 +0000
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013 Digi International Inc.,
+ * All rights not expressly granted are reserved.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
+ * =======================================================================
+ */
+
+#if !(defined RCI_DEBUG)
+
+static void rci_debug_printf(char const * const format, ...)
+{
+    (void) format;
+}
+
+#define rci_input_state_t_as_string(value)      NULL
+#define rci_output_state_t_as_string(value)     NULL
+#define rci_traverse_state_t_as_string(value)     NULL
+
+#else
+
+#define rci_debug_printf    connector_debug_printf
+
+#define enum_to_case(name)  case name:  result = #name;             break
+
+static char const * rci_input_state_t_as_string(rci_input_state_t const value)
+{
+    char const * result=NULL;
+    switch (value)
+    {
+        enum_to_case(rci_input_state_command_id);
+        enum_to_case(rci_input_state_command_attribute);
+        enum_to_case(rci_input_state_group_id);
+        enum_to_case(rci_input_state_group_attribute);
+        enum_to_case(rci_input_state_field_id);
+        enum_to_case(rci_input_state_field_type);
+        enum_to_case(rci_input_state_field_no_value);
+        enum_to_case(rci_input_state_field_value);
+        enum_to_case(rci_input_state_done);
+    }
+    return result;
+}
+
+static char const * rci_output_state_t_as_string(rci_output_state_t const value)
+{
+    char const * result=NULL;
+    switch (value)
+    {
+        enum_to_case(rci_output_state_command_id);
+        enum_to_case(rci_output_state_group_id);
+        enum_to_case(rci_output_state_group_attribute);
+        enum_to_case(rci_output_state_field_id);
+        enum_to_case(rci_output_state_field_value);
+        enum_to_case(rci_output_state_field_terminator);
+        enum_to_case(rci_output_state_group_terminator);
+        enum_to_case(rci_output_state_response_done);
+        enum_to_case(rci_output_state_done);
+    }
+    return result;
+}
+
+static char const * rci_traverse_state_t_as_string(rci_traverse_state_t const value)
+{
+    char const * result=NULL;
+    switch (value)
+    {
+        enum_to_case(rci_traverse_state_none);
+        enum_to_case(rci_traverse_state_command_id);
+        enum_to_case(rci_traverse_state_group_id);
+        enum_to_case(rci_traverse_state_element_id);
+        enum_to_case(rci_traverse_state_element_end);
+        enum_to_case(rci_traverse_state_group_end);
+        enum_to_case(rci_traverse_state_all_groups);
+        enum_to_case(rci_traverse_state_all_group_instances);
+        enum_to_case(rci_traverse_state_all_elements);
+    }
+    return result;
+}
+
+#endif
+