gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 12:47:59 26 4
gpt4 key购买 nike

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

ZclBasicCluster介绍

[英]Basic cluster implementation (Cluster ID 0x0000).

Code is auto-generated. Modifications may be overwritten!
[中]基本群集实现(群集ID 0x0000)。
代码是自动生成的。修改可能会被覆盖!

代码示例

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

/**
 * Get the <i>ZCLVersion</i> attribute [attribute ID <b>0</b>].
 * <p>
 * The ZCLVersion attribute is 8 bits in length and specifies the version number of
 * the ZigBee Cluster Library that all clusters on this endpoint conform to.
 * <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> getZclVersionAsync() {
  return read(attributes.get(ATTR_ZCLVERSION));
}

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

switch (command) {
  case "MANUFACTURER":
    response = basicCluster.getManufacturerName(refresh);
    break;
  case "MODEL":
    response = basicCluster.getModelIdentifier(refresh);
    break;
  case "APPVERSION":
    response = basicCluster.getApplicationVersion(refresh);
    break;
  case "STKVERSION":
    response = basicCluster.getStackVersion(refresh);
    break;
  case "ZCLVERSION":
    response = basicCluster.getZclVersion(refresh);
    break;
  case "HWVERSION":
    response = basicCluster.getHwVersion(refresh);
    break;
  case "DATE":
    response = basicCluster.getDateCode(refresh);
    break;
  default:

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

basicCluster.getZigBeeAddress());
  String manufacturer = basicCluster.getManufacturerName(Long.MAX_VALUE);
  if (manufacturer != null) {
    properties.put(Thing.PROPERTY_VENDOR, manufacturer.trim());
  String model = basicCluster.getModelIdentifier(Long.MAX_VALUE);
  if (model != null) {
    properties.put(Thing.PROPERTY_MODEL_ID, model.trim());
Integer hwVersion = basicCluster.getHwVersion(Long.MAX_VALUE);
if (hwVersion != null) {
  properties.put(Thing.PROPERTY_HARDWARE_VERSION, hwVersion.toString());
Integer stkVersion = basicCluster.getStackVersion(Long.MAX_VALUE);
if (stkVersion != null) {
  properties.put(ZigBeeBindingConstants.THING_PROPERTY_STKVERSION, stkVersion.toString());
Integer zclVersion = basicCluster.getZclVersion(Long.MAX_VALUE);
if (zclVersion != null) {
  properties.put(ZigBeeBindingConstants.THING_PROPERTY_ZCLVERSION, zclVersion.toString());
String dateCode = basicCluster.getDateCode(Long.MAX_VALUE);
if (dateCode != null) {
  properties.put(ZigBeeBindingConstants.THING_PROPERTY_DATECODE, dateCode);

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

/**
 * Synchronously get the <i>ModelIdentifier</i> attribute [attribute ID <b>5</b>].
 * <p>
 * The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the
 * model number (or other identifier) assigned by the manufacturer as a ZigBee character string.
 * <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 String}.
 * <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 String} attribute value, or null on error
 */
public String getModelIdentifier(final long refreshPeriod) {
  if (attributes.get(ATTR_MODELIDENTIFIER).isLastValueCurrent(refreshPeriod)) {
    return (String) attributes.get(ATTR_MODELIDENTIFIER).getLastValue();
  }
  return (String) readSync(attributes.get(ATTR_MODELIDENTIFIER));
}

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

/**
 * Synchronously get the <i>ZCLVersion</i> attribute [attribute ID <b>0</b>].
 * <p>
 * The ZCLVersion attribute is 8 bits in length and specifies the version number of
 * the ZigBee Cluster Library that all clusters on this endpoint conform to.
 * <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 getZclVersion(final long refreshPeriod) {
  if (attributes.get(ATTR_ZCLVERSION).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_ZCLVERSION).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_ZCLVERSION));
}

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

/**
 * Get the <i>SWBuildID</i> attribute [attribute ID <b>16384</b>].
 * <p>
 * The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software.
 * <p>
 * The attribute is of type {@link String}.
 * <p>
 * The implementation of this attribute by a device is OPTIONAL
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getSwBuildIdAsync() {
  return read(attributes.get(ATTR_SWBUILDID));
}

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

/**
 * Synchronously get the <i>HWVersion</i> attribute [attribute ID <b>3</b>].
 * <p>
 * The HWVersion attribute is 8 bits in length and specifies the version number of
 * the hardware of the device. The usage of this attribute is manufacturer dependent.
 * <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 getHwVersion(final long refreshPeriod) {
  if (attributes.get(ATTR_HWVERSION).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_HWVERSION).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_HWVERSION));
}

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

/**
 * Get the <i>LocationDescription</i> attribute [attribute ID <b>16</b>].
 * <p>
 * The LocationDescription attribute is a maximum of 16 bytes in length and describes
 * the physical location of the device as a ZigBee character string.
 * <p>
 * The attribute is of type {@link String}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getLocationDescriptionAsync() {
  return read(attributes.get(ATTR_LOCATIONDESCRIPTION));
}

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

/**
 * Synchronously get the <i>ManufacturerName</i> attribute [attribute ID <b>4</b>].
 * <p>
 * The ManufacturerName attribute is a maximum of 32 bytes in length and specifies
 * the name of the manufacturer as a ZigBee character string.
 * <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 String}.
 * <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 String} attribute value, or null on error
 */
public String getManufacturerName(final long refreshPeriod) {
  if (attributes.get(ATTR_MANUFACTURERNAME).isLastValueCurrent(refreshPeriod)) {
    return (String) attributes.get(ATTR_MANUFACTURERNAME).getLastValue();
  }
  return (String) readSync(attributes.get(ATTR_MANUFACTURERNAME));
}

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

/**
 * Get the <i>PhysicalEnvironment</i> attribute [attribute ID <b>17</b>].
 * <p>
 * The PhysicalEnvironment attribute is 8 bits in length and specifies the type of
 * physical environment in which the device will operate.
 * <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> getPhysicalEnvironmentAsync() {
  return read(attributes.get(ATTR_PHYSICALENVIRONMENT));
}

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

/**
 * Synchronously get the <i>PhysicalEnvironment</i> attribute [attribute ID <b>17</b>].
 * <p>
 * The PhysicalEnvironment attribute is 8 bits in length and specifies the type of
 * physical environment in which the device will operate.
 * <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 getPhysicalEnvironment(final long refreshPeriod) {
  if (attributes.get(ATTR_PHYSICALENVIRONMENT).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_PHYSICALENVIRONMENT).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_PHYSICALENVIRONMENT));
}

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

/**
 * Get the <i>HWVersion</i> attribute [attribute ID <b>3</b>].
 * <p>
 * The HWVersion attribute is 8 bits in length and specifies the version number of
 * the hardware of the device. The usage of this attribute is manufacturer dependent.
 * <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> getHwVersionAsync() {
  return read(attributes.get(ATTR_HWVERSION));
}

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

/**
 * Synchronously get the <i>SWBuildID</i> attribute [attribute ID <b>16384</b>].
 * <p>
 * The SWBuildIDattribute represents a detailed, manufacturer-specific reference to the version of the software.
 * <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 String}.
 * <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 String} attribute value, or null on error
 */
public String getSwBuildId(final long refreshPeriod) {
  if (attributes.get(ATTR_SWBUILDID).isLastValueCurrent(refreshPeriod)) {
    return (String) attributes.get(ATTR_SWBUILDID).getLastValue();
  }
  return (String) readSync(attributes.get(ATTR_SWBUILDID));
}

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

/**
 * Get the <i>ManufacturerName</i> attribute [attribute ID <b>4</b>].
 * <p>
 * The ManufacturerName attribute is a maximum of 32 bytes in length and specifies
 * the name of the manufacturer as a ZigBee character string.
 * <p>
 * The attribute is of type {@link String}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getManufacturerNameAsync() {
  return read(attributes.get(ATTR_MANUFACTURERNAME));
}

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

/**
 * Synchronously get the <i>LocationDescription</i> attribute [attribute ID <b>16</b>].
 * <p>
 * The LocationDescription attribute is a maximum of 16 bytes in length and describes
 * the physical location of the device as a ZigBee character string.
 * <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 String}.
 * <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 String} attribute value, or null on error
 */
public String getLocationDescription(final long refreshPeriod) {
  if (attributes.get(ATTR_LOCATIONDESCRIPTION).isLastValueCurrent(refreshPeriod)) {
    return (String) attributes.get(ATTR_LOCATIONDESCRIPTION).getLastValue();
  }
  return (String) readSync(attributes.get(ATTR_LOCATIONDESCRIPTION));
}

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

/**
 * Get the <i>DeviceEnabled</i> attribute [attribute ID <b>18</b>].
 * <p>
 * The DeviceEnabled attribute is a boolean and specifies whether the device is enabled
 * or disabled.
 * <p>
 * The attribute is of type {@link Boolean}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getDeviceEnabledAsync() {
  return read(attributes.get(ATTR_DEVICEENABLED));
}

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

/**
 * Synchronously get the <i>DeviceEnabled</i> attribute [attribute ID <b>18</b>].
 * <p>
 * The DeviceEnabled attribute is a boolean and specifies whether the device is enabled
 * or disabled.
 * <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 Boolean}.
 * <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 Boolean} attribute value, or null on error
 */
public Boolean getDeviceEnabled(final long refreshPeriod) {
  if (attributes.get(ATTR_DEVICEENABLED).isLastValueCurrent(refreshPeriod)) {
    return (Boolean) attributes.get(ATTR_DEVICEENABLED).getLastValue();
  }
  return (Boolean) readSync(attributes.get(ATTR_DEVICEENABLED));
}

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

/**
 * Get the <i>ModelIdentifier</i> attribute [attribute ID <b>5</b>].
 * <p>
 * The ModelIdentifier attribute is a maximum of 32 bytes in length and specifies the
 * model number (or other identifier) assigned by the manufacturer as a ZigBee character string.
 * <p>
 * The attribute is of type {@link String}.
 * <p>
 * The implementation of this attribute by a device is MANDATORY
 *
 * @return the {@link Future<CommandResult>} command result future
 */
public Future<CommandResult> getModelIdentifierAsync() {
  return read(attributes.get(ATTR_MODELIDENTIFIER));
}

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

/**
 * Synchronously get the <i>AlarmMask</i> attribute [attribute ID <b>19</b>].
 * <p>
 * The AlarmMask attribute is 8 bits in length and specifies which of a number of general
 * alarms may be generated.
 * <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 getAlarmMask(final long refreshPeriod) {
  if (attributes.get(ATTR_ALARMMASK).isLastValueCurrent(refreshPeriod)) {
    return (Integer) attributes.get(ATTR_ALARMMASK).getLastValue();
  }
  return (Integer) readSync(attributes.get(ATTR_ALARMMASK));
}

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

/**
 * Get the <i>AlarmMask</i> attribute [attribute ID <b>19</b>].
 * <p>
 * The AlarmMask attribute is 8 bits in length and specifies which of a number of general
 * alarms may be generated.
 * <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> getAlarmMaskAsync() {
  return read(attributes.get(ATTR_ALARMMASK));
}

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