1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using Aitex.Core.RT.Device;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using Efem;
- using System.Threading;
- namespace EFEM.RT.Tasks
- {
- public class SigStatTask : CheckImp, ITask
- {
- public SigStatTask()
- {
- }
- public bool Execute(out string result, params string[] args)
- {
- string device = Args2Unit(args.Length > 0 ? args[0] : string.Empty);
- if (device == null)
- {
- result = PARAM_NG;
- return false;
- }
- if (!CheckIsPort(device) && device != DeviceName.System)
- {
- result = PARAM_NG;
- return false;
- }
- if (!Check<NoReadyPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<MaintenancePolicy>(device, out result))
- {
- return false;
- }
- if (!Check<RemovePolicy>(device, out result))
- {
- return false;
- }
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- string device = Args2Unit(args.Length > 0 ? args[0] : string.Empty);
- if (args.Length > 0)
- {
- var data1 = Singleton<EfemEntity>.Instance.GetSigStatData1(device);
- result = data1.ToString("X8");
-
- var data2 = Singleton<EfemEntity>.Instance.GetSigStatData2(device);
- result += "/" + data2.ToString("X8");
-
- }
- return true;
- }
- }
- }
|