- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getProfile()
方法的一些代码示例,展示了ZigBeeApsFrame.getProfile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeApsFrame.getProfile()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeApsFrame
类名称:ZigBeeApsFrame
方法名:getProfile
暂无
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
switch (apsFrame.getProfile()) { // TODO: Use ZigBeeProfileType
case 0x0000:
command = receiveZdoCommand(fieldDeserializer, apsFrame);
break;
default:
logger.debug("Received message with unknown profile {}", String.format("%04X", apsFrame.getProfile()));
break;
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public void sendCommand(final ZigBeeApsFrame apsFrame) {
synchronized (networkManager) {
final short sender;
if (apsFrame.getProfile() == 0) {
sender = 0;
} else {
sender = (short) getSendingEndpoint(apsFrame.getProfile());
}
// TODO: How to differentiate group and device addressing?????
boolean groupCommand = false;
if (!groupCommand) {
networkManager.sendCommand(new AF_DATA_REQUEST(apsFrame.getDestinationAddress(),
(short) apsFrame.getDestinationEndpoint(), sender, apsFrame.getCluster(),
apsFrame.getApsCounter(), (byte) 0x30, (byte) apsFrame.getRadius(), apsFrame.getPayload()));
} else {
networkManager.sendCommand(new AF_DATA_REQUEST_EXT(apsFrame.getDestinationAddress(), sender,
apsFrame.getCluster(), apsFrame.getApsCounter(), (byte) (0), (byte) 0, apsFrame.getPayload()));
}
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive1() {
ZToolPacket data = getPacket("FE 11 45 81 00 14 D4 F1 02 00 4B 12 00 00 00 00 02 8F 22 2A 2F 15");
ZigBeeApsFrame apsFrame = ZdoIeeeAddress.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("00 00 14 D4 F1 02 00 4B 12 00 00 00 02 00 8F 22 2A 2F"),
apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive2() {
ZToolPacket data = getPacket(
"FE 18 45 84 21 A4 00 21 A4 12 02 04 01 01 00 00 02 00 00 03 00 03 05 00 06 00 08 00 C4");
ZigBeeApsFrame apsFrame = ZdoSimpleDescriptor.create(data);
assertEquals(42017, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("A4 00 21 A4 12 02 04 01 01 00 00 02 00 00 03 00 03 05 00 06 00 08 00"),
apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket("FE 07 45 83 00 00 00 00 00 10 C1 10");
ZigBeeApsFrame apsFrame = ZdoPowerDescriptor.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("00 00 00 00 10 C1"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket("FE 0D 45 C1 2A 2F 2A 2F F9 41 F6 02 00 4B 12 00 00 9C");
ZigBeeApsFrame apsFrame = ZdoEndDeviceAnnounce.create(data);
assertEquals(0x2f2a, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("2F 2A 2F F9 41 F6 02 00 4B 12 00 00"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket("FE 0B 45 B2 00 00 00 01 00 01 2A 2F 00 35 38 F4");
ZigBeeApsFrame apsFrame = ZdoManagementRouting.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("00 00 01 00 01 2A 2F 00 35 38"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket("FE 03 45 B4 E6 D2 00 C6");
ZigBeeApsFrame apsFrame = ZdoManagementLeave.create(data);
assertEquals(53990, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("D2 00"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket("FE 12 45 82 00 00 00 00 00 00 40 0F 00 00 50 A0 00 01 00 A0 00 00 CB");
ZigBeeApsFrame apsFrame = ZdoNodeDescriptor.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("00 00 00 00 00 40 0F 00 00 50 A0 00 01 00 A0 00 00"),
apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive2() {
ZToolPacket data = getPacket("FE 0F 45 81 00 86 06 00 00 00 EE 1F 00 21 A4 00 01 00 00 3E");
ZigBeeApsFrame apsFrame = ZdoIeeeAddress.create(data);
assertEquals(42017, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(
Arrays.equals(getPacketData("00 00 86 06 00 00 00 EE 1F 00 21 A4 01 00 00 00"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket(
"FE 32 45 B1 00 00 00 02 00 02 14 D4 F1 02 00 4B 12 00 0B 88 DC 00 01 88 17 00 8F 22 15 02 01 3B 14 D4 F1 02 00 4B 12 00 EC A1 A5 01 00 8D 15 00 35 38 15 02 01 58 B5");
ZigBeeApsFrame apsFrame = ZdoManagementLqi.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(
getPacketData(
"00 00 02 00 02 14 D4 F1 02 00 4B 12 00 0B 88 DC 00 01 88 17 00 8F 22 15 02 01 3B 14 D4 F1 02 00 4B 12 00 EC A1 A5 01 00 8D 15 00 35 38 15 02 01 58"),
apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive1() {
ZToolPacket data = getPacket(
"FE 2E 45 84 00 00 00 00 00 28 01 04 01 00 00 00 00 10 00 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 09 00 0F 00 0A 00 0C 00 15 00 00 01 01 01 CF");
ZigBeeApsFrame apsFrame = ZdoSimpleDescriptor.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(
getPacketData(
"00 00 00 00 28 01 04 01 00 00 00 00 10 00 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 09 00 0F 00 0A 00 0C 00 15 00 00 01 01 01"),
apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
ZToolPacket data = getPacket("FE 15 45 FF 00 00 00 01 80 00 00 00 1B 00 5B 23 EB 09 00 4B 12 00 00 00 00 F6");
ZigBeeApsFrame apsFrame = ZdoCallbackIncoming.create(data);
assertEquals(0x8001, apsFrame.getCluster());
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("1B 00 5B 23 EB 09 00 4B 12 00 00 00 00"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testReceive() {
String packetString = "FE 08 45 85 00 00 00 00 00 02 02 01 C9";
ZToolPacket data = getPacket(packetString);
assertEquals(packetString, data.getPacketString());
ZigBeeApsFrame apsFrame = ZdoActiveEndpoint.create(data);
assertEquals(0x0000, apsFrame.getSourceAddress());
assertEquals(0, apsFrame.getProfile());
assertEquals(0, apsFrame.getDestinationEndpoint());
assertTrue(Arrays.equals(getPacketData("00 00 00 00 02 02 01"), apsFrame.getPayload()));
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testSendCommandZCL() {
ZigBeeNetworkManager networkManager = mockZigBeeNetworkManager();
networkManager.setSerializer(DefaultSerializer.class, DefaultDeserializer.class);
ZigBeeEndpointAddress deviceAddress = new ZigBeeEndpointAddress(1234, 56);
OnCommand cmd = new OnCommand();
cmd.setClusterId(6);
cmd.setDestinationAddress(deviceAddress);
boolean error = false;
networkManager.sendCommand(cmd);
assertFalse(error);
assertEquals(1, mockedApsFrameListener.getAllValues().size());
ZigBeeApsFrame apsFrame = mockedApsFrameListener.getValue();
assertEquals(ZigBeeNwkAddressMode.DEVICE, apsFrame.getAddressMode());
assertEquals(1234, apsFrame.getDestinationAddress());
assertEquals(0, apsFrame.getSourceAddress());
assertEquals(0x104, apsFrame.getProfile());
assertEquals(6, apsFrame.getCluster());
assertEquals(56, apsFrame.getDestinationEndpoint());
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public void sendCommand(final ZigBeeApsFrame apsFrame) {
ConBeeEnqueueSendDataRequest request = new ConBeeEnqueueSendDataRequest();
request.setRequestId(apsFrame.getApsCounter());
request.setClusterId(apsFrame.getCluster());
switch (apsFrame.getAddressMode()) {
case DEVICE:
request.setDestinationAddress(
new ZigBeeEndpointAddress(apsFrame.getDestinationAddress(), apsFrame.getDestinationEndpoint()));
request.setDestinationAddressMode(ConBeeAddressMode.NWK);
if (apsFrame.getDestinationAddress() > 0xfff8) {
//
request.setTxOptions(0);
}
break;
case GROUP:
request.setDestinationAddress(new ZigBeeGroupAddress(apsFrame.getDestinationAddress()));
request.setDestinationAddressMode(ConBeeAddressMode.GROUP);
break;
default:
break;
}
request.setProfileId(apsFrame.getProfile());
request.setRadius(apsFrame.getRadius());
request.setSourceEndpoint(apsFrame.getSourceEndpoint());
// request.setTxOptions(txOptions);
request.setAdsuData(apsFrame.getPayload());
conbeeHandler.queueFrame(request);
}
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setDestinationEndpoint()方法的一些代码示例,展示了ZigBeeApsFram
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getPayload()方法的一些代码示例,展示了ZigBeeApsFrame.getPayload
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setCluster()方法的一些代码示例,展示了ZigBeeApsFrame.setCluster
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getRadius()方法的一些代码示例,展示了ZigBeeApsFrame.getRadius()
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getSecurityEnabled()方法的一些代码示例,展示了ZigBeeApsFrame.ge
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setAddressMode()方法的一些代码示例,展示了ZigBeeApsFrame.setAdd
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getSourceEndpoint()方法的一些代码示例,展示了ZigBeeApsFrame.get
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setApsCounter()方法的一些代码示例,展示了ZigBeeApsFrame.setApsC
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getApsCounter()方法的一些代码示例,展示了ZigBeeApsFrame.getApsC
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setSecurityEnabled()方法的一些代码示例,展示了ZigBeeApsFrame.se
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setRadius()方法的一些代码示例,展示了ZigBeeApsFrame.setRadius()
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.()方法的一些代码示例,展示了ZigBeeApsFrame.()的具体用法。这些代码示例主要来源于G
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setProfile()方法的一些代码示例,展示了ZigBeeApsFrame.setProfile
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setPayload()方法的一些代码示例,展示了ZigBeeApsFrame.setPayload
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setDestinationAddress()方法的一些代码示例,展示了ZigBeeApsFrame
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setSourceEndpoint()方法的一些代码示例,展示了ZigBeeApsFrame.set
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getDestinationAddress()方法的一些代码示例,展示了ZigBeeApsFrame
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getProfile()方法的一些代码示例,展示了ZigBeeApsFrame.getProfile
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.setSourceAddress()方法的一些代码示例,展示了ZigBeeApsFrame.setS
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeApsFrame.getSourceAddress()方法的一些代码示例,展示了ZigBeeApsFrame.getS
我是一名优秀的程序员,十分优秀!