2023-08-17 01:10:47 +08:00
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Linq;
|
2023-08-17 09:43:24 +08:00
|
|
|
using Aitex.Core.RT.IOCore.Interlock.Actions;
|
2023-08-17 01:10:47 +08:00
|
|
|
using MECF.Framework.Common.Equipment;
|
2023-08-10 16:44:46 +08:00
|
|
|
|
2023-08-17 09:43:24 +08:00
|
|
|
namespace Aitex.Core.RT.IOCore.Interlock;
|
2023-08-10 16:44:46 +08:00
|
|
|
|
2023-08-16 15:21:02 +08:00
|
|
|
public class InterlockDaemonManager : InterlockManagerBase<InterlockDaemonAction>
|
2023-08-10 16:44:46 +08:00
|
|
|
{
|
2023-08-17 01:10:47 +08:00
|
|
|
public InterlockDaemonManager()
|
|
|
|
{
|
|
|
|
RootNodeName = "Daemon";
|
|
|
|
}
|
2023-08-16 15:21:02 +08:00
|
|
|
|
2023-08-17 01:10:47 +08:00
|
|
|
/// <summary>
|
|
|
|
/// <inheritdoc cref="InterlockManagerBase{TAction}.Monitor()"/>
|
|
|
|
/// </summary>
|
|
|
|
public override void Monitor()
|
|
|
|
{
|
|
|
|
// 按Module扫描Interlock Limit
|
|
|
|
foreach (var moduleName in _dicActionsPerModule.Keys.ToList())
|
|
|
|
{
|
|
|
|
Debug.Assert(moduleName != ModuleName.UnDefined,
|
|
|
|
$"Interlock Manager CanSetDo() undesired module name {ModuleName.UnDefined}");
|
|
|
|
|
|
|
|
foreach (var action in _dicActionsPerModule[moduleName].ToList())
|
|
|
|
action.Monitor();
|
|
|
|
}
|
|
|
|
}
|
2023-08-10 16:44:46 +08:00
|
|
|
}
|