本文整理了Java中com.zsmartsystems.zigbee.ZigBeeChannel.create()
方法的一些代码示例,展示了ZigBeeChannel.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeChannel.create()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeChannel
类名称:ZigBeeChannel
方法名:create
[英]Lookup function based on the ZigBeeChannel channel number. Returns null if the channel does not exist.
[中]基于Zigbee通道号的查找功能。如果通道不存在,则返回null。
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Gets the channels in this channel mask
*
* return the {@link List} of {@link ZigBeeChannel}s in this mask
*/
public List<ZigBeeChannel> getChannels() {
List<ZigBeeChannel> channels = new ArrayList<ZigBeeChannel>();
for (int channelCnt = 0; channelCnt < 32; channelCnt++) {
if ((channelMask & 1 << channelCnt) == 0) {
continue;
}
ZigBeeChannel channel = ZigBeeChannel.create(channelCnt);
if (channel != ZigBeeChannel.UNKNOWN) {
channels.add(channel);
}
}
return channels;
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public ZigBeeChannel getZigBeeChannel() {
return ZigBeeChannel.create(networkManager.getCurrentChannel());
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testChannel() {
assertEquals(1 << 1, ZigBeeChannel.create(1).getMask());
assertEquals(ZigBeeChannel.CHANNEL_11, ZigBeeChannel.create(11));
assertEquals(1 << 11, ZigBeeChannel.create(11).getMask());
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
networkManager.setZigBeeChannel(ZigBeeChannel.create(channel));
networkManager.setZigBeePanId(pan);
networkManager.setZigBeeExtendedPanId(extendedPan);
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public ZigBeeChannel getZigBeeChannel() {
ConBeeReadParameterRequest readParameter = new ConBeeReadParameterRequest();
readParameter.setParameter(ConBeeNetworkParameter.CURRENT_CHANNEL);
ConBeeReadParameterResponse response = (ConBeeReadParameterResponse) conbeeHandler
.sendTransaction(new ConBeeSingleResponseTransaction(readParameter, ConBeeReadParameterResponse.class))
.getResponse();
return ZigBeeChannel.create((int) response.getValue());
}
代码示例来源:origin: openhab/org.openhab.binding.zigbee
networkManager.setZigBeeLinkKey(linkKey);
networkManager.setZigBeeNetworkKey(networkKey);
networkManager.setZigBeeChannel(ZigBeeChannel.create(channelId));
networkManager.setZigBeePanId(panId);
networkManager.setZigBeeExtendedPanId(extendedPanId);
内容来源于网络,如有侵权,请联系作者删除!