diff --git a/docs/migrations/v8_to_v10.md b/docs/migrations/v8_to_v10.md index e81fd2ea2..b42f78ef0 100644 --- a/docs/migrations/v8_to_v10.md +++ b/docs/migrations/v8_to_v10.md @@ -2,4 +2,9 @@ ## Replaced result of visual instructions with dedicated result object -In *Moryx.Factory* **6.3** and **8.1** we introduced the new result object and optional extended APIs. The result object solved issues caused by localization of the different results. With **Moryx 10** we remove all old APIs based on strings. \ No newline at end of file +In *Moryx.Factory* **6.3** and **8.1** we introduced the new result object and optional extended APIs. The result object solved issues caused by localization of the different results. With **Moryx 10** we remove all old APIs based on strings. + +## Merged `IProcessControlReporting` into `IProcessControl` + +The `IProcessControlReporting` interface has been merged into `IProcessControl`. All reporting-related methods and the `ReportAction` enum are now part of `IProcessControl`. Remove usages of `IProcessControlReporting` and update your code to use the unified `IProcessControl` interface. + diff --git a/src/Moryx.ControlSystem/Processes/IProcessControl.cs b/src/Moryx.ControlSystem/Processes/IProcessControl.cs index 71c289a08..758e536e7 100644 --- a/src/Moryx.ControlSystem/Processes/IProcessControl.cs +++ b/src/Moryx.ControlSystem/Processes/IProcessControl.cs @@ -20,6 +20,13 @@ public interface IProcessControl /// IReadOnlyList RunningProcesses { get; } + /// + /// Get the running process with the given + /// + /// Id of the running process + /// + IProcess GetProcess(long processId); + /// /// Retrieve all processes for a product instance /// @@ -35,6 +42,13 @@ public interface IProcessControl /// IReadOnlyList Targets(IActivity activity); + /// + /// Report a specific to have been executed on the + /// + /// The process to report + /// The action to perform + void Report(IProcess process, ReportAction action); + /// /// A process has changed /// diff --git a/src/Moryx.ControlSystem/Processes/ReportAction.cs b/src/Moryx.ControlSystem/Processes/ReportAction.cs new file mode 100644 index 000000000..c41d58a17 --- /dev/null +++ b/src/Moryx.ControlSystem/Processes/ReportAction.cs @@ -0,0 +1,20 @@ +// Copyright (c) 2025, Phoenix Contact GmbH & Co. KG +// Licensed under the Apache License, Version 2.0 + +namespace Moryx.ControlSystem.Processes +{ + /// + /// Actions to report a running process + /// + public enum ReportAction + { + /// + /// The process is broken or damaged + /// + Broken, + /// + /// The process was physically removed + /// + Removed + } +}