Search in sources :

Example 1 with ZclClusterDao

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);
        }
    }
}
Also used : ZclClusterDao(com.zsmartsystems.zigbee.dao.ZclClusterDao) ZclCluster(com.zsmartsystems.zigbee.zcl.ZclCluster)

Example 2 with ZclClusterDao

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;
}
Also used : ZclClusterDao(com.zsmartsystems.zigbee.dao.ZclClusterDao)

Example 3 with ZclClusterDao

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;
}
Also used : ZclClusterDao(com.zsmartsystems.zigbee.dao.ZclClusterDao) ZigBeeEndpointDao(com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao) ZclCluster(com.zsmartsystems.zigbee.zcl.ZclCluster)

Aggregations

ZclClusterDao (com.zsmartsystems.zigbee.dao.ZclClusterDao)3 ZclCluster (com.zsmartsystems.zigbee.zcl.ZclCluster)2 ZigBeeEndpointDao (com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao)1