using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkDriver.Common; using HybirdFrameworkDriver.TcpServer; using Service.Car.Codec; using Service.Car.Handler; using Service.Car.Msg.Car.Resp; using Service.Car.Msg.Host.Req; namespace Service.Car.Server; [Scope("SingleInstance")] public class CarServer : TcpServer { public MsgPair LockMsgPair { get; set; } = new (); public MsgPair UnLockMsgPair { get; set; } = new (); public MsgPair SetParamMsgPair { get; set; } = new (); public MsgPair SettleConfirmMsgPair { get; set; } = new (); /// /// 1 待机 2 换电 /// public byte StationStatus { get; set; } = 1; public CarServer() : base() { this.ChannelInActiveAction = Clean; this.LogLevel = DotNetty.Handlers.Logging.LogLevel.INFO; } /// /// 清理数据 /// public void Clean() { LockMsgPair.ClearResp(); UnLockMsgPair.ClearResp(); SetParamMsgPair.ClearResp(); SettleConfirmMsgPair.ClearResp(); } }