本文整理了Java中com.zsmartsystems.zigbee.ZigBeeNode.isDiscovered()
方法的一些代码示例,展示了ZigBeeNode.isDiscovered()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeNode.isDiscovered()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeNode
类名称:ZigBeeNode
方法名:isDiscovered
[英]Checks if basic device discovery is complete. This ensures that we have received the NodeDescriptor and the SimpleDescriptor so that we know the endpoints.
[中]检查基本设备查找是否完成。这确保我们已经收到NodeDescriptor和SimpleDescriptor,以便了解端点。
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
if (!updated && node.isDiscovered() || node.getIeeeAddress().equals(localIeeeAddress)) {
nodeDiscoveryComplete.add(node.getIeeeAddress());
代码示例来源:origin: openhab/org.openhab.binding.zigbee
if (!node.isDiscovered()) {
logger.debug("{}: Node discovery not complete", node.getIeeeAddress());
return;
代码示例来源:origin: openhab/org.openhab.binding.zigbee
if (!node.isDiscovered()) {
logger.debug("{}: Node has not finished discovery", nodeIeeeAddress);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE,
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void isDiscovered() {
ZigBeeNode node = new ZigBeeNode(Mockito.mock(ZigBeeNetworkManager.class), new IeeeAddress("1234567890"));
ZigBeeNetworkEndpointListener listener = Mockito.mock(ZigBeeNetworkEndpointListener.class);
node.addNetworkEndpointListener(listener);
assertFalse(node.isDiscovered());
assertNotNull(node.getEndpoints());
NodeDescriptor descriptor = new NodeDescriptor(0, 3333, 74, true, 6666, 0, 6, 4444, true, 8);
node.setNodeDescriptor(descriptor);
assertFalse(node.isDiscovered());
ZigBeeEndpoint endpoint = new ZigBeeEndpoint(node, 1);
node.addEndpoint(endpoint);
assertTrue(node.isDiscovered());
Mockito.verify(listener, Mockito.timeout(TIMEOUT)).deviceAdded(endpoint);
assertEquals(endpoint, node.getEndpoint(1));
assertEquals(1, node.getEndpoints().size());
node.removeEndpoint(1);
assertEquals(0, node.getEndpoints().size());
Mockito.verify(listener, Mockito.timeout(TIMEOUT)).deviceRemoved(endpoint);
node.removeNetworkEndpointListener(listener);
}
内容来源于网络,如有侵权,请联系作者删除!