X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=iotjava%2Fiotruntime%2Fzigbee%2FIoTZigbee.java;h=a08754677e6b4b17d11cece0ddaf57c152f2b369;hb=79a07095edcd2818516d3608302323e0c37d1f81;hp=a047be5b69b821f103ccdf25eb2412978070c0ce;hpb=72a8a1f7fc99b42b57686bef6b4c1ca91d05252a;p=iot2.git diff --git a/iotjava/iotruntime/zigbee/IoTZigbee.java b/iotjava/iotruntime/zigbee/IoTZigbee.java index a047be5..a087546 100644 --- a/iotjava/iotruntime/zigbee/IoTZigbee.java +++ b/iotjava/iotruntime/zigbee/IoTZigbee.java @@ -221,13 +221,14 @@ public final class IoTZigbee { socket.send(sendPacket); } - public void sendConfigureReportingCommand(int packetId, int clusterId, int profileId, int deviceEndpoint, int attributeId, int dataType, int minReportingInterval, int maxReportingInterval, byte[] reportableChange) throws IOException { + public void sendConfigureReportingCommand(int packetId, int clusterId, int profileId, int src_endpoint, int dest_endpoint, int attributeId, int dataType, int minReportingInterval, int maxReportingInterval, byte[] reportableChange) throws IOException { String message = "type: zcl_configure_reporting\n"; message += "packet_id: " + String.format("%04x", packetId) + "\n"; message += "device_address_long: " + zigbeeAddress.getAddress() + "\n"; message += "cluster_id: " + String.format("%04x", clusterId) + "\n"; message += "profile_id: " + String.format("%04x", profileId) + "\n"; - message += "device_endpoint: " + String.format("%02x", deviceEndpoint) + "\n"; + message += "src_endpoint: " + String.format("%02x", src_endpoint) + "\n"; + message += "device_endpoint: " + String.format("%02x", dest_endpoint) + "\n"; message += "attribute_id: " + String.format("%04x", attributeId) + "\n"; message += "data_type: " + String.format("%02x", dataType) + "\n"; message += "min_reporting_interval: " + String.format("%04x", minReportingInterval) + "\n"; @@ -245,6 +246,10 @@ public final class IoTZigbee { socket.send(sendPacket); } + public void sendConfigureReportingCommand(int packetId, int clusterId, int profileId, int dest_endpoint, int attributeId, int dataType, int minReportingInterval, int maxReportingInterval, byte[] reportableChange) throws IOException { + sendConfigureReportingCommand(packetId, clusterId, profileId, 0x00, dest_endpoint, attributeId, dataType, minReportingInterval, maxReportingInterval, reportableChange); + } + public void registerCallback(IoTZigbeeCallback callbackTo) { callbackList.add(callbackTo); }