gpt4 book ai didi

com.zsmartsystems.zigbee.ZigBeeNode.setAssociatedDevices()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 21:47:31 27 4
gpt4 key购买 nike

本文整理了Java中com.zsmartsystems.zigbee.ZigBeeNode.setAssociatedDevices()方法的一些代码示例,展示了ZigBeeNode.setAssociatedDevices()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeNode.setAssociatedDevices()方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeNode
类名称:ZigBeeNode
方法名:setAssociatedDevices

ZigBeeNode.setAssociatedDevices介绍

[英]Set the list of associated devices.

This method checks to see if there have been "significant" changes to the neighbors list so that we can avoid bothering higher layers if nothing noteworthy has changed.
[中]设置关联设备的列表。
这种方法会检查邻居列表是否有“重大”变化,这样,如果没有什么值得注意的变化,我们就可以避免打扰更高层。

代码示例

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

node.setAssociatedDevices(associatedDevices);

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

associatedDevices.add(2);
associatedDevices.add(3);
boolean changed = node.setAssociatedDevices(associatedDevices);
assertTrue(changed);
assertEquals(3, node.getAssociatedDevices().size());
associatedDevices.add(1);
associatedDevices.add(3);
changed = node.setAssociatedDevices(associatedDevices);
assertTrue(changed);
assertEquals(2, node.getAssociatedDevices().size());
changed = node.setAssociatedDevices(associatedDevices);
assertFalse(changed);
associatedDevices.add(3);
associatedDevices.add(4);
changed = node.setAssociatedDevices(associatedDevices);
assertTrue(changed);
assertEquals(3, node.getAssociatedDevices().size());
associatedDevices.add(3);
associatedDevices.add(4);
changed = node.setAssociatedDevices(associatedDevices);
assertTrue(changed);
assertEquals(3, node.getAssociatedDevices().size());

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

associated.add(2);
associated.add(3);
node.setAssociatedDevices(associated);
associated = new HashSet<Integer>();
associated.add(1);
associated.add(2);
associated.add(3);
newNode.setAssociatedDevices(associated);
assertFalse(node.updateNode(newNode));
associated.add(2);
associated.add(1);
newNode.setAssociatedDevices(associated);
assertFalse(node.updateNode(newNode));
associated.add(1);
associated.add(3);
newNode.setAssociatedDevices(associated);
assertTrue(node.updateNode(newNode));

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com