gpt4 book ai didi

com.zsmartsystems.zigbee.zcl.clusters.ZclRelativeHumidityMeasurementCluster类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:44:30 27 4
gpt4 key购买 nike

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

ZclRelativeHumidityMeasurementCluster介绍

[英]Relative humidity measurement cluster implementation (Cluster ID 0x0405).

The server cluster provides an interface to relative humidity measurement functionality, including configuration and provision of notifications of relative humidity measurements.

Code is auto-generated. Modifications may be overwritten!
[中]相对湿度测量集群实施(集群ID 0x0405)。
服务器集群提供了相对湿度测量功能的接口,包括配置和提供相对湿度测量通知。
代码是自动生成的。修改可能会被覆盖!

代码示例

代码示例来源:origin: openhab/org.openhab.binding.zigbee

@Override
public void handleRefresh() {
  cluster.getMeasuredValue(0);
}

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

/**
 * Get the <i>MinMeasuredValue</i> attribute [attribute ID <b>1</b>].
 * <p>
 * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue
 * that can be measured. A value of 0xffff means this attribute is not defined
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getMinMeasuredValueAsync() {
  return read(attributes.get(ATTR_MINMEASUREDVALUE));
}

代码示例来源:origin: openhab/org.openhab.binding.zigbee

@Override
public void disposeConverter() {
  cluster.removeAttributeListener(this);
}

代码示例来源:origin: openhab/org.openhab.binding.zigbee

@Override
public boolean initializeConverter() {
  cluster = (ZclRelativeHumidityMeasurementCluster) endpoint
      .getInputCluster(ZclRelativeHumidityMeasurementCluster.CLUSTER_ID);
  if (cluster == null) {
    logger.error("{}: Error opening device relative humidity measurement cluster", endpoint.getIeeeAddress());
    return false;
  }
  bind(cluster);
  // Add a listener, then request the status
  cluster.addAttributeListener(this);
  // Configure reporting - no faster than once per second - no slower than 10 minutes.
  cluster.setMeasuredValueReporting(1, REPORTING_PERIOD_DEFAULT_MAX, 0.1);
  return true;
}

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

/**
 * Synchronously get the <i>MinMeasuredValue</i> attribute [attribute ID <b>1</b>].
 * <p>
 * The MinMeasuredValue attribute indicates the minimum value of MeasuredValue
 * that can be measured. A value of 0xffff means this attribute is not defined
 * <p>
 * This method can return cached data if the attribute has already been received.
 * The parameter <i>refreshPeriod</i> is used to control this. If the attribute has been received
 * within <i>refreshPeriod</i> milliseconds, then the method will immediately return the last value
 * received. If <i>refreshPeriod</i> is set to 0, then the attribute will always be updated.
 * <p>
 * This method will block until the response is received or a timeout occurs unless the current value is returned.
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed
 * @return the {@link Integer} attribute value, or null on error
 */
public Integer getMinMeasuredValue(final long refreshPeriod) {
  if (attributes.get(ATTR_MINMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_MINMEASUREDVALUE).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_MINMEASUREDVALUE));
}

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

/**
   * Set reporting for the <i>Tolerance</i> attribute [attribute ID <b>3</b>].
   * <p>
   * The Tolerance attribute indicates the magnitude of the possible error that is
   * associated with MeasuredValue . The true value is located in the range
   * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance).
   * <p>
   * The attribute is of type {@link Integer}.
   * <p>
   * The implementation of this attribute by a device is OPTIONAL
   *
   * @param minInterval {@link int} minimum reporting period
   * @param maxInterval {@link int} maximum reporting period
   * @param reportableChange {@link Object} delta required to trigger report
   * @return the {@link Future<CommandResult>} command result future
   */
  public Future<CommandResult> setToleranceReporting(final int minInterval, final int maxInterval, final Object reportableChange) {
    return setReporting(attributes.get(ATTR_TOLERANCE), minInterval, maxInterval, reportableChange);
  }
}

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

/**
 * Synchronously get the <i>Tolerance</i> attribute [attribute ID <b>3</b>].
 * <p>
 * The Tolerance attribute indicates the magnitude of the possible error that is
 * associated with MeasuredValue . The true value is located in the range
 * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance).
 * <p>
 * This method can return cached data if the attribute has already been received.
 * The parameter <i>refreshPeriod</i> is used to control this. If the attribute has been received
 * within <i>refreshPeriod</i> milliseconds, then the method will immediately return the last value
 * received. If <i>refreshPeriod</i> is set to 0, then the attribute will always be updated.
 * <p>
 * This method will block until the response is received or a timeout occurs unless the current value is returned.
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is OPTIONAL
 *
 * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed
 * @return the {@link Integer} attribute value, or null on error
 */
public Integer getTolerance(final long refreshPeriod) {
  if (attributes.get(ATTR_TOLERANCE).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_TOLERANCE).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_TOLERANCE));
}

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

/**
 * Set reporting for the <i>MeasuredValue</i> attribute [attribute ID <b>0</b>].
 * <p>
 * MeasuredValue represents the relative humidity in % as follows:-
 * <p>
 * MeasuredValue = 100 x Relative humidity
 * <p>
 * Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in
 * the range 0 to 0x2710.
 * <p>
 * The maximum resolution this format allows is 0.01%.
 * <p>
 * A MeasuredValue of 0xffff indicates that the measurement is invalid.
 * <p>
 * MeasuredValue is updated continuously as new measurements are made.
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @param minInterval {@link int} minimum reporting period
 * @param maxInterval {@link int} maximum reporting period
 * @param reportableChange {@link Object} delta required to trigger report
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> setMeasuredValueReporting(final int minInterval, final int maxInterval, final Object reportableChange) {
  return setReporting(attributes.get(ATTR_MEASUREDVALUE), minInterval, maxInterval, reportableChange);
}

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

/**
 * Get the <i>Tolerance</i> attribute [attribute ID <b>3</b>].
 * <p>
 * The Tolerance attribute indicates the magnitude of the possible error that is
 * associated with MeasuredValue . The true value is located in the range
 * (MeasuredValue – Tolerance) to (MeasuredValue + Tolerance).
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is OPTIONAL
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getToleranceAsync() {
  return read(attributes.get(ATTR_TOLERANCE));
}

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

/**
 * Synchronously get the <i>MaxMeasuredValue</i> attribute [attribute ID <b>2</b>].
 * <p>
 * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue
 * that can be measured. A value of 0xffff means this attribute is not defined.
 * <p>
 * MaxMeasuredValue shall be greater than MinMeasuredValue.
 * <p>
 * MinMeasuredValue and MaxMeasuredValue define the range of the sensor.
 * <p>
 * This method can return cached data if the attribute has already been received.
 * The parameter <i>refreshPeriod</i> is used to control this. If the attribute has been received
 * within <i>refreshPeriod</i> milliseconds, then the method will immediately return the last value
 * received. If <i>refreshPeriod</i> is set to 0, then the attribute will always be updated.
 * <p>
 * This method will block until the response is received or a timeout occurs unless the current value is returned.
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @param refreshPeriod the maximum age of the data (in milliseconds) before an update is needed
 * @return the {@link Integer} attribute value, or null on error
 */
public Integer getMaxMeasuredValue(final long refreshPeriod) {
  if (attributes.get(ATTR_MAXMEASUREDVALUE).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_MAXMEASUREDVALUE).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_MAXMEASUREDVALUE));
}

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

/**
 * Get the <i>MaxMeasuredValue</i> attribute [attribute ID <b>2</b>].
 * <p>
 * The MaxMeasuredValue attribute indicates the maximum value of MeasuredValue
 * that can be measured. A value of 0xffff means this attribute is not defined.
 * <p>
 * MaxMeasuredValue shall be greater than MinMeasuredValue.
 * <p>
 * MinMeasuredValue and MaxMeasuredValue define the range of the sensor.
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getMaxMeasuredValueAsync() {
  return read(attributes.get(ATTR_MAXMEASUREDVALUE));
}

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

return (Integer) readSync(attributes.get(ATTR_MEASUREDVALUE));

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

/**
 * Get the <i>MeasuredValue</i> attribute [attribute ID <b>0</b>].
 * <p>
 * MeasuredValue represents the relative humidity in % as follows:-
 * <p>
 * MeasuredValue = 100 x Relative humidity
 * <p>
 * Where 0% <= Relative humidity <= 100%, corresponding to a MeasuredValue in
 * the range 0 to 0x2710.
 * <p>
 * The maximum resolution this format allows is 0.01%.
 * <p>
 * A MeasuredValue of 0xffff indicates that the measurement is invalid.
 * <p>
 * MeasuredValue is updated continuously as new measurements are made.
 * <p>
 * The attribute is of type {@link Integer}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getMeasuredValueAsync() {
  return read(attributes.get(ATTR_MEASUREDVALUE));
}

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