123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Aitex.Core.RT.Log;
- using MECF.Framework.Common.DataCenter;
- using OpenSEMI.ClientBase.Handlers;
- namespace VirgoUI.Client.Models.Sys
- {
- public class StatesImp
- {
- public StatesImp(IQueryDataService dataService)
- {
- DataService = dataService;
- //all states list for the system
- this.Keys = new List<string>()
- {
- "Aligner.Status",
- "LP1.Status",
- "LP2.Status",
- "EFEM.Status",
- "LLA.Status",
- "LLB.Status",
- "TM.Status",
-
-
- "PM1.Status",
- "PM2.Status",
- "PM3.Status",
- "PM4.Status",
- "PM5.Status",
- "PM6.Status",
- "Rt.Status",
- "Fa.Status",
- "EfemRobot.BladeTarget",
- "EfemRobot.Arm1Extended",
- "EfemRobot.Arm2Extended",
- "TmRobot.BladeTarget",
- };
- }
- public List<State> GetStates(List<string> keys)
- {
- try
- {
- List<State> states = new List<State>();
- if (this.DataService.PollData(keys) != null)
- {
- this.DataService.PollData(keys).ToList().ForEach(kv =>
- {
- if (kv.Value != null)
- states.Add(new State() { Key = kv.Key, DisplayValue = kv.Value.ToString() });
- });
- }
- return states;
- }
- catch (Exception e)
- {
- LOG.Write(e);
- return null;
- }
- }
- public List<string> Keys { get; private set; }
- private IQueryDataService DataService;
- }
-
- }
|