| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- using SHJX.Service.Common.Extend;
- using SHJX.Service.Common.ReadXML;
- using SHJX.Service.Model.Control;
- using SHJX.Service.ServerClient.Interface;
- using SHJX.Service.ServerClient.TempController;
- using SHJX.Service.Common.Logging;
- using Microsoft.Extensions.Logging;
- namespace SHJX.Service.ServerClient.RS485Control
- {
-
- /// <summary>
- /// 消解位搅拌
- /// </summary>
- public class TitrationStirPort : SerialPortImp, PortControlImp
- {
- private static readonly ILogger logger = LogFactory.BuildLogger(typeof(TitrationStirPort));
- /// <summary>
- /// 消解位搅拌
- /// </summary>
- /// <param name="log">日志</param>
- /// <param name="config">配置</param>
- public TitrationStirPort( ReadConfigUtil config)
- : base( config) { }
- public object Read(PortArgs args)
- {
- throw new NotImplementedException();
- }
- public bool Write(PortArgs args)
- {
- var way = args.WriteWay switch
- {
- WriteWay.Start => "L",
- WriteWay.Stop => "H",
- _ => throw new ArgumentNullException(args.WriteWay.GetEnumDesc<WriteWay>())
- };
- return MotorStorage(args.NodeId, 2, way);
- }
- }
- }
|