rename files
[iotcloud.git] / version2 / src / C / LocalComm.cpp
diff --git a/version2/src/C/LocalComm.cpp b/version2/src/C/LocalComm.cpp
new file mode 100644 (file)
index 0000000..ac4c343
--- /dev/null
@@ -0,0 +1,17 @@
+#include "LocalComm.h"
+#include "Error.h"
+#include "Table.h"
+
+Array<char> *LocalComm::sendDataToLocalDevice(int64_t deviceId, Array<char> *data) {
+       printf("Passing Locally\n");
+
+       if (deviceId == t1->getMachineId()) {
+               // return t1.localCommInput(data);
+       } else if (deviceId == t2->getMachineId()) {
+               // return t2.localCommInput(data);
+       } else {
+               throw new Error("Cannot send to deviceId using this local comm");
+       }
+
+       return new Array<char>((uint32_t)0);
+}