本文整理了Java中com.zsmartsystems.zigbee.serialization.ZigBeeSerializer.getPayload()
方法的一些代码示例,展示了ZigBeeSerializer.getPayload()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeSerializer.getPayload()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.serialization.ZigBeeSerializer
类名称:ZigBeeSerializer
方法名:getPayload
暂无
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Gets payload.
*
* @return the payload
*/
public int[] getPayload() {
return serializer.getPayload();
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testSendEndpoint2() {
MatchDescriptorResponse matchResponse = new MatchDescriptorResponse();
matchResponse.setStatus(ZdoStatus.SUCCESS);
List<Integer> matchList = new ArrayList<Integer>();
matchList.add(1);
matchList.add(2);
matchResponse.setMatchList(matchList);
matchResponse.setDestinationAddress(new ZigBeeEndpointAddress(1234, 5));
matchResponse.setNwkAddrOfInterest(1234);
System.out.println(matchResponse);
ZigBeeSerializer serializer = new DefaultSerializer();
ZclFieldSerializer fieldSerializer = new ZclFieldSerializer(serializer);
matchResponse.serialize(fieldSerializer);
assertTrue(Arrays.equals(getPacketData("00 00 D2 04 02 01 02"), serializer.getPayload()));
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testSendEndpoint1() {
MatchDescriptorResponse matchResponse = new MatchDescriptorResponse();
matchResponse.setStatus(ZdoStatus.SUCCESS);
List<Integer> matchList = new ArrayList<Integer>();
matchList.add(1);
matchResponse.setMatchList(matchList);
matchResponse.setDestinationAddress(new ZigBeeEndpointAddress(1234, 5));
matchResponse.setNwkAddrOfInterest(1234);
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()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
command.setPayloadType(0);
command.serialize(fieldSerializer);
assertTrue(Arrays.equals(getPacketData("00 48"), serializer.getPayload()));
command.setPayloadType(1);
command.serialize(fieldSerializer);
assertTrue(Arrays.equals(getPacketData("01 48 0C 11"), serializer.getPayload()));
command.setPayloadType(1);
command.serialize(fieldSerializer);
assertTrue(Arrays.equals(getPacketData("01 48 0C 11"), serializer.getPayload()));
command.setPayloadType(2);
command.serialize(fieldSerializer);
assertTrue(Arrays.equals(getPacketData("02 48 0C 11 06 00"), serializer.getPayload()));
command.setPayloadType(3);
command.serialize(fieldSerializer);
assertTrue(Arrays.equals(getPacketData("03 48 0C 11 06 00 07 03 02 01"), serializer.getPayload()));
内容来源于网络,如有侵权,请联系作者删除!