gpt4 book ai didi

com.zsmartsystems.zigbee.zcl.ZclCluster.getReporting()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 16:09:31 25 4
gpt4 key购买 nike

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

ZclCluster.getReporting介绍

[英]Gets the reporting configuration for an attribute
[中]获取属性的报告配置

代码示例

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

final CommandResult result = cluster.getReporting(attribute).get();
if (result.isSuccess()) {
  final ReadAttributesResponse response = result.getResponse();

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

@Test
public void getReporting() {
  createEndpoint();
  ZclCluster cluster = new ZclOnOffCluster(endpoint);
  ZclAttribute attribute = cluster.getAttribute(0);
  cluster.getReporting(attribute);
  assertEquals(1, commandCapture.getAllValues().size());
  ZigBeeCommand command = commandCapture.getValue();
  assertNotNull(command);
  System.out.println(command);
  assertTrue(command instanceof ReadReportingConfigurationCommand);
  ReadReportingConfigurationCommand cfgCommand = (ReadReportingConfigurationCommand) command;
  assertEquals(1, cfgCommand.getRecords().size());
  AttributeRecord record = cfgCommand.getRecords().get(0);
  assertEquals(0, record.getAttributeIdentifier());
  assertEquals(0, record.getDirection());
}

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