Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: module class add get meas device #903

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the typo getMeasurumentDevice -> getMeasurementDevice

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
Loading