- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeGroupAddress.getLabel()
方法的一些代码示例,展示了ZigBeeGroupAddress.getLabel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeGroupAddress.getLabel()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeGroupAddress
类名称:ZigBeeGroupAddress
方法名:getLabel
[英]Gets group label.
[中]获取组标签。
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* {@inheritDoc}
*/
@Override
public boolean process(final ZigBeeApi zigbeeApi, final String[] args, PrintStream out) {
final List<ZigBeeGroupAddress> groups = zigbeeApi.getGroups();
for (final ZigBeeGroupAddress group : groups) {
print(StringUtils.leftPad(Integer.toString(group.getGroupId()), 10) + " " + group.getLabel(), out);
}
return true;
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Gets destination by device identifier or group ID.
*
* @param zigbeeApi the ZigBee API
* @param destinationIdentifier the device identifier or group ID
* @return the device
*/
private ZigBeeAddress getDestination(final ZigBeeApi zigbeeApi, final String destinationIdentifier,
final PrintStream out) {
final ZigBeeEndpoint device = getDevice(zigbeeApi, destinationIdentifier);
if (device != null) {
return device.getEndpointAddress();
}
try {
for (final ZigBeeGroupAddress group : zigbeeApi.getGroups()) {
if (destinationIdentifier.equals(group.getLabel())) {
return group;
}
}
final int groupId = Integer.parseInt(destinationIdentifier);
return zigbeeApi.getGroup(groupId);
} catch (final NumberFormatException e) {
return null;
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testAddRemoveGroup() {
ZigBeeNetworkManager networkManager = mockZigBeeNetworkManager();
networkManager.addGroup(new ZigBeeGroupAddress(1));
assertEquals(1, networkManager.getGroups().size());
networkManager.addGroup(new ZigBeeGroupAddress(1));
assertEquals(1, networkManager.getGroups().size());
networkManager.addGroup(new ZigBeeGroupAddress(2));
assertEquals(2, networkManager.getGroups().size());
networkManager.removeGroup(2);
assertEquals(1, networkManager.getGroups().size());
assertNull(networkManager.getGroup(1).getLabel());
ZigBeeGroupAddress group = networkManager.getGroup(1);
assertEquals(1, group.getGroupId());
group.setLabel("Group Label");
networkManager.updateGroup(group);
assertEquals(1, networkManager.getGroups().size());
assertEquals("Group Label", networkManager.getGroup(1).getLabel());
}
代码示例来源: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);
}
}
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeGroupAddress.getLabel()方法的一些代码示例,展示了ZigBeeGroupAddress.getL
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeGroupAddress.setGroupId()方法的一些代码示例,展示了ZigBeeGroupAddress.se
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeGroupAddress.getGroupId()方法的一些代码示例,展示了ZigBeeGroupAddress.ge
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeGroupAddress.()方法的一些代码示例,展示了ZigBeeGroupAddress.()的具体用法。这些代码
我是一名优秀的程序员,十分优秀!