use of com.zsmartsystems.zigbee.dao.ZclClusterDao in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeEndpoint method setDao.
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);
}
}
}
use of com.zsmartsystems.zigbee.dao.ZclClusterDao in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZclCluster method getDao.
public ZclClusterDao getDao() {
ZclClusterDao dao = new ZclClusterDao();
dao.setClusterId(clusterId);
dao.setClient(isClient);
dao.setSupportedAttributes(supportedAttributes);
dao.setSupportedCommandsGenerated(supportedCommandsGenerated);
dao.setSupportedCommandsReceived(supportedCommandsReceived);
dao.setAttributes(attributes);
return dao;
}
use of com.zsmartsystems.zigbee.dao.ZclClusterDao in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeEndpoint method getDao.
/**
* 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;
}
Aggregations