+#include "LocalComm.h"
+#include "Error.h"
+#include "Table.h"
-class LocalComm {
- Table t1;
- Table t2;
+Array<char> *LocalComm::sendDataToLocalDevice(int64_t deviceId, Array<char> *data) {
+ printf("Passing Locally\n");
- LocalComm(Table _t1, Table _t2) {
- t1 = _t1;
- t2 = _t2;
- }
+ 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");
+ }
- char[] sendDataToLocalDevice(Long deviceId, char[] data) throws InterruptedException{
- System.out.println("Passing Locally");
-
- 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 char[0];
- }
+ return new Array<char>((uint32_t)0);
}