use of com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeNode method setDao.
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(networkManager, this, endpointDao.getEndpointId());
endpoint.setDao(endpointDao);
endpoints.put(endpoint.getEndpointId(), endpoint);
}
}
use of com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeNode method getDao.
/**
* Gets a {@link ZigBeeNodeDao} representing the node
*
* @return the {@link ZigBeeNodeDao}
*/
public ZigBeeNodeDao getDao() {
ZigBeeNodeDao dao = new ZigBeeNodeDao();
dao.setIeeeAddress(ieeeAddress.toString());
dao.setNetworkAddress(networkAddress);
dao.setNodeDescriptor(nodeDescriptor);
dao.setPowerDescriptor(powerDescriptor);
dao.setBindingTable(bindingTable);
List<ZigBeeEndpointDao> endpointDaoList = new ArrayList<ZigBeeEndpointDao>();
for (ZigBeeEndpoint endpoint : endpoints.values()) {
endpointDaoList.add(endpoint.getDao());
}
dao.setEndpoints(endpointDaoList);
return dao;
}
use of com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao 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;
}
use of com.zsmartsystems.zigbee.dao.ZigBeeEndpointDao in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeEndpointTest method setDao.
@Test
public void setDao() {
ZigBeeEndpoint endpoint = getEndpoint();
ZigBeeEndpointDao dao = new ZigBeeEndpointDao();
endpoint.setDao(dao);
}
Aggregations