use of io.openems.api.bridge.BridgeReadTask in project openems by OpenEMS.
the class ModbusDeviceNature method setAsRequired.
@Override
public /**
* Sets a Channel as required. The Range with this Channel will be added to ModbusProtocol.RequiredRanges.
*/
void setAsRequired(Channel channel) {
ModbusRange range = getProtocol().getRangeByChannel(channel);
Iterator<BridgeReadTask> i = otherReadTasks.iterator();
while (i.hasNext()) {
BridgeReadTask task = i.next();
if (((ModbusBridgeReadTask) task).getRange().equals(range)) {
this.readTasks.add(task);
i.remove();
}
}
}
use of io.openems.api.bridge.BridgeReadTask in project openems by OpenEMS.
the class StuderDeviceNature method setAsRequired.
@Override
public /**
* Sets a Channel as required. The Range with this Channel will be added to StuderProtocol.RequiredRanges.
*/
void setAsRequired(Channel channel) {
StuderProperty<?> property = getProtocol().getPropertyByChannel(channel);
Iterator<BridgeReadTask> i = readTasks.iterator();
while (i.hasNext()) {
BridgeReadTask task = i.next();
if (((StuderBridgeReadTask) task).getProperty().equals(property)) {
this.requiredReadTasks.add(task);
i.remove();
}
}
}
Aggregations