}
}
+ //made by changwoo
+ public void sendChangeSwtichRequest(int packetId, int clusterId, int profileId, int value, int deviceEndpoint) throws IOException {
+ String message = "type: zcl_change_switch_request\n";
+ message += "packet_id: " + String.format("%04x", packetId) + "\n";
+ message += "value: " + String.format("%01x", value) + "\n";
+ message += "cluster_id: " + String.format("%04x", clusterId) + "\n";
+ message += "profile_id: " + String.format("%04x", profileId) + "\n";
+ message += "device_address_long: " + zigbeeAddress.getAddress() + "\n";
+ message += "device_endpoint: " + String.format("%02x", deviceEndpoint) + "\n";
+ DatagramPacket sendPacket = new DatagramPacket(message.getBytes(), message.getBytes().length, InetAddress.getByName(strHostAddress), iDstPort);
+ socket.send(sendPacket);
+ }
+
+ //made by changwoo
+ public void sendBroadcastingRouteRecordRequest(int packetId) throws IOException {
+ String message = "type: zdo_broadcast_route_record_request\n";
+ message += "packet_id: " + String.format("%04x", packetId) + "\n";
+ message += "device_address_long: " + zigbeeAddress.getAddress() + "\n";
+ DatagramPacket sendPacket = new DatagramPacket(message.getBytes(), message.getBytes().length, InetAddress.getByName(strHostAddress), iDstPort);
+ socket.send(sendPacket);
+ }
+
+ //made by changwoo
+ public void sendEnrollmentResponse(int packetId, int clusterId, int profileId, int deviceEndpoint) throws IOException {
+ String message = "type: zcl_enrollment_response\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";
+ DatagramPacket sendPacket = new DatagramPacket(message.getBytes(), message.getBytes().length, InetAddress.getByName(strHostAddress), iDstPort);
+ socket.send(sendPacket);
+ }
+
+ //made by changwoo
+ public void sendWriteAttributesCommand(int packetId, int clusterId, int profileId, int deviceEndpoint) throws IOException {
+ String message = "type: zcl_write_attributes\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";
+ DatagramPacket sendPacket = new DatagramPacket(message.getBytes(), message.getBytes().length, InetAddress.getByName(strHostAddress), iDstPort);
+ socket.send(sendPacket);
+ }
+
+ //made by changwoo
+ public void sendManagementPermitJoiningRequest(int packetId, int clusterId, int deviceEndpoint) throws IOException {
+ String message = "type: management_permit_joining_request\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 += "device_endpoint: " + String.format("%02x", deviceEndpoint) + "\n";
+ DatagramPacket sendPacket = new DatagramPacket(message.getBytes(), message.getBytes().length, InetAddress.getByName(strHostAddress), iDstPort);
+ socket.send(sendPacket);
+ }
public void sendBindRequest(int packetId, int clusterId, int deviceEndpoint) throws IOException {
String message = "type: zdo_bind_request\n";