本文整理了Java中com.zsmartsystems.zigbee.console.ZigBeeConsoleAttributeSupportedCommand
类的一些代码示例,展示了ZigBeeConsoleAttributeSupportedCommand
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeConsoleAttributeSupportedCommand
类的具体详情如下:
包路径:com.zsmartsystems.zigbee.console.ZigBeeConsoleAttributeSupportedCommand
类名称:ZigBeeConsoleAttributeSupportedCommand
暂无
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStream out)
throws IllegalArgumentException, InterruptedException, ExecutionException {
if (args.length != 3) {
throw new IllegalArgumentException("Invalid number of arguments");
}
final ZigBeeEndpoint endpoint = getEndpoint(networkManager, args[1]);
ZclCluster cluster = getCluster(endpoint, args[2]);
final Future<Boolean> future = cluster.discoverAttributes(false);
Boolean result = future.get();
if (result) {
out.println("Supported attributes for " + printCluster(cluster));
out.println("AttrId Data Type Name");
for (Integer attributeId : cluster.getSupportedAttributes()) {
out.print(" ");
ZclAttribute attribute = cluster.getAttribute(attributeId);
out.print(printAttributeId(attributeId));
if (attribute != null) {
out.print(" " + printZclDataType(attribute.getDataType()) + " " + attribute.getName());
}
out.println();
}
} else {
out.println("Failed to retrieve supported attributes");
}
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
newCommands.put("write", new ZigBeeConsoleAttributeWriteCommand());
newCommands.put("attsupported", new ZigBeeConsoleAttributeSupportedCommand());
newCommands.put("cmdsupported", new ZigBeeConsoleCommandsSupportedCommand());
内容来源于网络,如有侵权,请联系作者删除!