com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(72)

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

ZigBeeEndpointDao介绍

[英]This class provides a clean class to hold a data object for serialisation of a ZigBeeEndpoint
[中]这个类提供了一个干净的类来保存一个数据对象,以便对端点进行序列化

代码示例

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

/**
 * Gets a {@link ZigBeeEndpointDao} used for serialisation of the {@link ZigBeeEndpoint}
 *
 * @return the {@link ZigBeeEndpointDao}
 */
public ZigBeeEndpointDao getDao() {
  ZigBeeEndpointDao dao = new ZigBeeEndpointDao();
  dao.setEndpointId(endpointId);
  dao.setProfileId(profileId);
  List<ZclClusterDao> clusters;
  clusters = new ArrayList<ZclClusterDao>();
  for (ZclCluster cluster : inputClusters.values()) {
    clusters.add(cluster.getDao());
  }
  dao.setInputClusters(clusters);
  clusters = new ArrayList<ZclClusterDao>();
  for (ZclCluster cluster : outputClusters.values()) {
    clusters.add(cluster.getDao());
  }
  dao.setOutputClusters(clusters);
  return dao;
}

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

public void setDao(ZigBeeEndpointDao dao) {
  endpointId = dao.getEndpointId();
  if (dao.getProfileId() != null) {
    profileId = dao.getProfileId();
  }
  if (dao.getInputClusterIds() != null) {
    for (ZclClusterDao clusterDao : dao.getInputClusters()) {
      ZclCluster cluster = getClusterClass(clusterDao.getClusterId());
      cluster.setDao(clusterDao);
      inputClusters.put(clusterDao.getClusterId(), cluster);
    }
  }
  if (dao.getOutputClusterIds() != null) {
    for (ZclClusterDao clusterDao : dao.getOutputClusters()) {
      ZclCluster cluster = getClusterClass(clusterDao.getClusterId());
      cluster.setDao(clusterDao);
      outputClusters.put(clusterDao.getClusterId(), cluster);
    }
  }
}

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

@Test
public void setDao() {
  ZigBeeEndpoint endpoint = getEndpoint();
  ZigBeeEndpointDao dao = new ZigBeeEndpointDao();
  endpoint.setDao(dao);
}

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

public void setDao(ZigBeeNodeDao dao) {
  ieeeAddress = new IeeeAddress(dao.getIeeeAddress());
  networkAddress = dao.getNetworkAddress();
  nodeDescriptor = dao.getNodeDescriptor();
  powerDescriptor = dao.getPowerDescriptor();
  if (dao.getBindingTable() != null) {
    bindingTable.addAll(dao.getBindingTable());
  }
  for (ZigBeeEndpointDao endpointDao : dao.getEndpoints()) {
    ZigBeeEndpoint endpoint = new ZigBeeEndpoint(this, endpointDao.getEndpointId());
    endpoint.setDao(endpointDao);
    endpoints.put(endpoint.getEndpointId(), endpoint);
  }
}

相关文章