forked from gpmagvs/VMSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemModes.cs
More file actions
47 lines (45 loc) · 1.45 KB
/
SystemModes.cs
File metadata and controls
47 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using AGVSystemCommonNet6.AGVDispatch.Messages;
using AGVSystemCommonNet6.AGVDispatch.RunMode;
namespace VMSystem
{
public static class SystemModes
{
internal static Action OnRunModeON;
internal static Action OnRunModeOFF;
private static RUN_MODE _RunMode = RUN_MODE.MAINTAIN;
internal static RUN_MODE RunMode
{
get => _RunMode;
set
{
if (_RunMode != value)
{
_RunMode = value;
if (_RunMode == RUN_MODE.RUN)
{
if (OnRunModeON != null)
OnRunModeON();
}
else
{
if (OnRunModeOFF != null)
OnRunModeOFF();
}
}
}
}
internal static HOST_CONN_MODE HostConnMode { get; set; }
internal static HOST_OPER_MODE HostOperMode { get; set; }
internal static bool IsProcessEmulationMode { get; set; } = false;
public static bool RunModeSwitch(RUN_MODE mode, out string Message)
{
Message = string.Empty;
RunMode = mode;
return true;
}
internal static void ProcessSimulationMode(bool enable)
{
IsProcessEmulationMode = enable;
}
}
}