Skip to content

Commit

Permalink
feat: module class add get meas device (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sviatose committed Jan 13, 2024
1 parent e00626f commit 528b3ca
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,32 @@ public Object getUnit(String name) {
return null; // no unit found with the given name
}



/**
* Returns the unit with the given name from the list of added unit operations and list of added
* modules.
*
* @param name the name of the unit to retrieve
* @return the unit with the given name, or {@code null} if no such unit is found
*/
public Object getMeasurumentDevice(String name) {
for (ProcessSystem processSystem : addedUnitOperations) {
Object unit = processSystem.getMeasurementDevice(name);
if (unit != null) {
return unit;
}
}

for (ProcessModule processModule : addedModules) {
Object unit = processModule.getMeasurumentDevice(name);
if (unit != null) {
return unit;
}
}
return null; // no unit found with the given name
}

/**
* <p>
* Create deep copy.
Expand Down

0 comments on commit 528b3ca

Please sign in to comment.