@Test public void testSendEndpoint1() { List<Integer> matchList = new ArrayList<Integer>(); matchList.add(1); MatchDescriptorResponse matchResponse = new MatchDescriptorResponse(ZdoStatus.SUCCESS, 1234, matchList); matchResponse.setDestinationAddress(new ZigBeeEndpointAddress(1234, 5)); System.out.println(matchResponse); ZigBeeSerializer serializer = new DefaultSerializer(); ZclFieldSerializer fieldSerializer = new ZclFieldSerializer(serializer); matchResponse.serialize(fieldSerializer); assertTrue(Arrays.equals(getPacketData("00 00 D2 04 01 01"), serializer.getPayload())); }
@Override public void serialize(final ZclFieldSerializer serializer) { super.serialize(serializer); serializer.serialize(status, ZclDataType.ZDO_STATUS); serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); serializer.serialize(matchList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); for (int cnt = 0; cnt < matchList.size(); cnt++) { serializer.serialize(matchList.get(cnt), ZclDataType.ENDPOINT); } }
MatchDescriptorResponse extends ZdoResponse { @Override public void serialize(final ZclFieldSerializer serializer) { super.serialize(serializer); serializer.serialize(status, ZclDataType.ZDO_STATUS); serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); serializer.serialize(matchList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); for (int cnt = 0; cnt < matchList.size(); cnt++) { serializer.serialize(matchList.get(cnt), ZclDataType.ENDPOINT); } } }
MatchDescriptorResponse extends ZdoResponse { @Override public void serialize(final ZclFieldSerializer serializer) { super.serialize(serializer); serializer.serialize(status, ZclDataType.ZDO_STATUS); serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); serializer.serialize(matchList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); for (int cnt = 0; cnt < matchList.size(); cnt++) { serializer.serialize(matchList.get(cnt), ZclDataType.ENDPOINT); } } @Deprecated  MatchDescriptorResponse();  MatchDescriptorResponse(
            ZdoStatus status,
            Integer nwkAddrOfInterest,
            List<Integer> matchList); }
MatchDescriptorResponse extends ZdoResponse { @Override public void serialize(final ZclFieldSerializer serializer) { super.serialize(serializer); serializer.serialize(status, ZclDataType.ZDO_STATUS); serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); serializer.serialize(matchList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); for (int cnt = 0; cnt < matchList.size(); cnt++) { serializer.serialize(matchList.get(cnt), ZclDataType.ENDPOINT); } } @Deprecated  MatchDescriptorResponse();  MatchDescriptorResponse(
            ZdoStatus status,
            Integer nwkAddrOfInterest,
            List<Integer> matchList); Integer getNwkAddrOfInterest(); @Deprecated void setNwkAddrOfInterest(final Integer nwkAddrOfInterest); List<Integer> getMatchList(); @Deprecated void setMatchList(final List<Integer> matchList); @Override void serialize(final ZclFieldSerializer serializer); @Override void deserialize(final ZclFieldDeserializer deserializer); @Override String toString(); }
MatchDescriptorResponse extends ZdoResponse { @Override public void serialize(final ZclFieldSerializer serializer) { super.serialize(serializer); serializer.serialize(status, ZclDataType.ZDO_STATUS); serializer.serialize(nwkAddrOfInterest, ZclDataType.NWK_ADDRESS); serializer.serialize(matchList.size(), ZclDataType.UNSIGNED_8_BIT_INTEGER); for (int cnt = 0; cnt < matchList.size(); cnt++) { serializer.serialize(matchList.get(cnt), ZclDataType.ENDPOINT); } } @Deprecated  MatchDescriptorResponse();  MatchDescriptorResponse(
            ZdoStatus status,
            Integer nwkAddrOfInterest,
            List<Integer> matchList); Integer getNwkAddrOfInterest(); @Deprecated void setNwkAddrOfInterest(final Integer nwkAddrOfInterest); List<Integer> getMatchList(); @Deprecated void setMatchList(final List<Integer> matchList); @Override void serialize(final ZclFieldSerializer serializer); @Override void deserialize(final ZclFieldDeserializer deserializer); @Override String toString(); static int CLUSTER_ID; }