gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-19 06:23:31 27 4
gpt4 key购买 nike

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

ZclLevelControlCluster介绍

[英]Level Control cluster implementation (Cluster ID 0x0008).

This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for example the brightness of a light, the degree of closure of a door, or the power output of a heater.

Code is auto-generated. Modifications may be overwritten!
[中]级别控制群集实现(群集ID 0x0008)。
该集群提供了一个接口,用于控制设备的特性,该特性可以设置为某个级别,例如灯光亮度、门的关闭程度或加热器的功率输出。
代码是自动生成的。修改可能会被覆盖!

代码示例

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

@Override
public void handleRefresh() {
  if (clusterOnOff != null) {
    clusterOnOff.getOnOff(0);
  }
  clusterLevelControl.getCurrentLevel(0);
}

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

levelControlCluster.getZigBeeAddress(), configurationParameter.getKey(),
    configurationParameter.getValue(), configurationParameter.getValue().getClass().getSimpleName());
Integer response = null;
  case CONFIG_ONOFFTRANSITIONTIME:
    levelControlCluster
        .setOnOffTransitionTime(((BigDecimal) (configurationParameter.getValue())).intValue());
    response = levelControlCluster.getOnOffTransitionTime(0);
    break;
  case CONFIG_ONTRANSITIONTIME:
    levelControlCluster
        .setOnTransitionTime(((BigDecimal) (configurationParameter.getValue())).intValue());
    response = levelControlCluster.getOnTransitionTime(0);
    break;
  case CONFIG_OFFTRANSITIONTIME:
    levelControlCluster
        .setOffTransitionTime((((BigDecimal) (configurationParameter.getValue())).intValue()));
    response = levelControlCluster.getOffTransitionTime(0);
    break;
  case CONFIG_ONLEVEL:
    levelControlCluster.setOnLevel(((BigDecimal) (configurationParameter.getValue())).intValue());
    response = levelControlCluster.getOnLevel(0);
    break;
  case CONFIG_DEFAULTMOVERATE:
    levelControlCluster
        .setDefaultMoveRate(((BigDecimal) (configurationParameter.getValue())).intValue());
    response = levelControlCluster.getDefaultMoveRate(0);
    break;
  case CONFIG_DEFAULTTRANSITIONTIME:

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

levelControlCluster = (ZclLevelControlCluster) cluster;
try {
  Boolean result = levelControlCluster.discoverAttributes(false).get();
  if (!result) {
    logger.debug("{}: Unable to get supported attributes for {}.", levelControlCluster.getZigBeeAddress(),
        levelControlCluster.getClusterName());
  logger.error("{}: Error getting supported attributes for {}. ", levelControlCluster.getZigBeeAddress(),
      levelControlCluster.getClusterName(), e);
if (levelControlCluster.isAttributeSupported(ZclLevelControlCluster.ATTR_ONOFFTRANSITIONTIME)) {
  options = new ArrayList<ParameterOption>();
  parameters.add(ConfigDescriptionParameterBuilder.create(CONFIG_ONOFFTRANSITIONTIME, Type.INTEGER)
if (levelControlCluster.isAttributeSupported(ZclLevelControlCluster.ATTR_ONTRANSITIONTIME)) {
  options = new ArrayList<ParameterOption>();
  options.add(new ParameterOption("65535", "Use On/Off transition time"));
if (levelControlCluster.isAttributeSupported(ZclLevelControlCluster.ATTR_OFFTRANSITIONTIME)) {
  options = new ArrayList<ParameterOption>();
  options.add(new ParameterOption("65535", "Use On/Off transition time"));
if (levelControlCluster.isAttributeSupported(ZclLevelControlCluster.ATTR_ONLEVEL)) {
  options = new ArrayList<ParameterOption>();
  options.add(new ParameterOption("255", "Not Set"));
if (levelControlCluster.isAttributeSupported(ZclLevelControlCluster.ATTR_DEFAULTMOVERATE)) {
  options = new ArrayList<ParameterOption>();
  options.add(new ParameterOption("255", "Not Set"));

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

.setCurrentLevelReporting(1, REPORTING_PERIOD_DEFAULT_MAX, 1).get();
    if (reportingResponse.isError()) {
      pollingPeriod = POLLING_PERIOD_HIGH;
clusterLevelControl.addAttributeListener(this);

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

@Test
public void getClusterName() {
  createEndpoint();
  ZclCluster cluster = new ZclLevelControlCluster(endpoint);
  assertEquals("Level Control", cluster.getClusterName());
}

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

clusterLevelControl.addAttributeListener(this);
try {
  CommandResult bindResponse = bind(clusterLevelControl).get();
      .setCurrentLevelReporting(1, REPORTING_PERIOD_DEFAULT_MAX, 1).get();
  if (!reportResponse.isSuccess()) {
    pollingPeriod = POLLING_PERIOD_HIGH;

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

@Override
public void handleRefresh() {
  if (clusterOnOff != null) {
    clusterOnOff.getOnOff(0);
  }
  if (supportsHue) {
    clusterColorControl.getCurrentHue(0);
    clusterColorControl.getCurrentSaturation(0);
  } else {
    clusterColorControl.getCurrentX(0);
    clusterColorControl.getCurrentY(0);
  }
  if (clusterLevelControl != null) {
    clusterLevelControl.getCurrentLevel(0);
  }
}

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