Adding changes and files for doorlock driver
[iot2.git] / iotjava / iotruntime / zigbee / IoTZigbee.java
index a047be5b69b821f103ccdf25eb2412978070c0ce..a08754677e6b4b17d11cece0ddaf57c152f2b369 100644 (file)
@@ -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);
        }