gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-18 11:43:31 26 4
gpt4 key购买 nike

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

ZigBeeGroupAddress.setGroupId介绍

[英]Sets group ID.
[中]设置组ID。

代码示例

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

@Override
public void setAddress(final int address) {
  setGroupId(address);
}

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

@Test
  public void testGroupAddress() {
    ZigBeeGroupAddress group1 = new ZigBeeGroupAddress(1);
    assertTrue(group1.isGroup());

    ZigBeeGroupAddress group2 = new ZigBeeGroupAddress(1);
    assertTrue(group1.equals(group2));
    assertEquals(0, group1.compareTo(group2));
    assertEquals(1, group1.getGroupId());

    // Test that label doesn't matter
    group2 = new ZigBeeGroupAddress(1, "Test Label");
    assertTrue(group1.equals(group2));
    assertEquals("Test Label", group2.getLabel());

    group2 = new ZigBeeGroupAddress();
    group2.setGroupId(1);
    assertEquals(1, group1.getGroupId());
    group2.setLabel("Test Label");
    assertEquals("Test Label", group2.getLabel());

    group2.setGroupId(2);
    assertEquals(1, group1.compareTo(group2));

    System.out.println(group2);
  }
}

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