| | |
| | | *----------------------------------------------------------------*/ |
| | | #endregion << 版 本 注 释 >> |
| | | |
| | | using HslCommunication; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | [Description("通用输送线")] |
| | | public class CommonConveyorLine : IConveyorLine |
| | | { |
| | | #region Private Member |
| | |
| | | return false; |
| | | } |
| | | |
| | | public T ReadCustomer<T>(string deviceChildCode) where T : IDataTransfer, new() |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | |
| | | if (devicePro == null) |
| | | { |
| | | throw new Exception(); |
| | | } |
| | | else |
| | | { |
| | | return Communicator.ReadCustomer<T>(devicePro.DeviceProAddress); |
| | | } |
| | | } |
| | | |
| | | public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode) |
| | | where TEnum : Enum |
| | | where TValue : notnull |