Skip to content

Commit 9456b2d

Browse files
Merge pull request #109 from PHOENIXCONTACT/feature/process-report-broken-removed
Extend the `IProcessControl` facade to support direct process reporting (Broken, Removed)
2 parents 6ace9e0 + 67aa124 commit 9456b2d

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright (c) 2025, Phoenix Contact GmbH & Co. KG
2+
// Licensed under the Apache License, Version 2.0
3+
4+
using Moryx.AbstractionLayer;
5+
6+
namespace Moryx.ControlSystem.Processes
7+
{
8+
/// <summary>
9+
/// Actions to report a running process
10+
/// </summary>
11+
public enum ReportAction
12+
{
13+
/// <summary>
14+
/// The process is broken or damaged
15+
/// </summary>
16+
Broken,
17+
/// <summary>
18+
/// The process was physically removed
19+
/// </summary>
20+
Removed
21+
}
22+
23+
/// <summary>
24+
/// Facade interface to get more information from the control system.
25+
/// </summary>
26+
public interface IProcessControlReporting : IProcessControl
27+
{
28+
29+
/// <summary>
30+
/// Report a specific <see cref="ReportAction"/> to have been executed on the <paramref name="process"/>
31+
/// </summary>
32+
/// <param name="process">The process to report</param>
33+
/// <param name="action">The action to perform</param>
34+
void Report(IProcess process, ReportAction action);
35+
36+
/// <summary>
37+
/// Get the running process with the given <paramref name="processId"/>
38+
/// </summary>
39+
/// <param name="processId">Id of the running process</param>
40+
/// <returns><see cref="IProcess"/></returns>
41+
IProcess GetProcess(long processId);
42+
}
43+
}

0 commit comments

Comments
 (0)