| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.ComponentModel;
- using WCS.Core;
- using WCS.WorkEngineering.Extensions;
- using WCS.WorkEngineering.Protocol.SRM;
- using WCS.WorkEngineering.Worlds;
- using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
- namespace WCS.WorkEngineering.Systems
- {
- /// <summary>
- /// Agv交互系统
- /// </summary>
- [BelongTo(typeof(MainWorld))]
- [Description("Agv交互系统")]
- public class AgvSystems : DeviceSystem<Station>
- {
- protected override bool ParallelDo => true;
- protected override bool SaveLogsToFile => true;
- private List<Station> devs = new List<Station>();
- private List<SRM> srms = new List<SRM>();
- public AgvSystems()
- {
- devs = Device.All.Where(v => v.HasFlag(DeviceFlags.入库, DeviceFlags.巷道口)).Select(v => new Station(v, this.World)).ToList();
- srms = Device.All.Where(v => v.HasProtocol(typeof(ISRM520))).Select(v => new SRM(v, this.World)).ToList();
- }
- public override void Do(Station obj)
- {
- }
- public override bool Select(Device dev)
- {
- return dev.Code is "1011" or "1012";
- }
- }
- }
|