BERG Cloud / BERGCloud

Dependents:   LittleCounter-Example

Revision:
6:79100379d4b4
Parent:
4:5a04c00b5b6f
diff -r 2e04a8b3fc25 -r 79100379d4b4 BERGCloudMbed.cpp
--- a/BERGCloudMbed.cpp	Tue Nov 26 17:45:12 2013 +0000
+++ b/BERGCloudMbed.cpp	Wed Apr 16 14:38:12 2014 +0000
@@ -168,5 +168,21 @@
   return true;
 }
 
+bool BERGCloudMbed::pollForCommand(BERGCloudMessageBuffer& buffer, string &commandName)
+{
+  bool result = false;
+  char tmp[31 + 1]; /* +1 for null terminator */
+
+  commandName = ""; /* Empty string */
+  result = pollForCommand(buffer, tmp, sizeof(tmp));
+
+  if (result)
+  {
+    commandName = string(tmp);
+  }
+
+  return result;
+}
+
 #endif // #ifdef BERGCLOUD_PACK_UNPACK