X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=version2%2Fsrc%2FC%2FLocalComm.h;h=4ea7458b3b89105f4f9dddd92f2c6dac40cb2a06;hb=bd73414f3ef76dbb9d060e67b6d31f32278b2ffb;hp=ceb86891c757c745eb442576fa94211d7a4262f1;hpb=f0a95f7a96e808259ced5e9f61e029773c7a85e6;p=iotcloud.git diff --git a/version2/src/C/LocalComm.h b/version2/src/C/LocalComm.h index ceb8689..4ea7458 100644 --- a/version2/src/C/LocalComm.h +++ b/version2/src/C/LocalComm.h @@ -1,24 +1,24 @@ class LocalComm { - private Table t1; - private Table t2; + private Table t1; + private Table t2; - public LocalComm(Table _t1, Table _t2) { - t1 = _t1; - t2 = _t2; - } + public LocalComm(Table _t1, Table _t2) { + t1 = _t1; + t2 = _t2; + } - public char[] sendDataToLocalDevice(Long deviceId, char[] data) throws InterruptedException{ - System.out.println("Passing Locally"); + public Array *sendDataToLocalDevice(Long deviceId, Array *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"); - } + 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 char[0]; + } }