|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
using HybirdFrameworkCore.Autofac.Attribute;
|
|
|
|
|
using HybirdFrameworkDriver.Session;
|
|
|
|
|
using log4net;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Service.Car.Msg.Car.Req;
|
|
|
|
|
using Service.Car.Msg.Host.Resp;
|
|
|
|
|
using Service.Car.Server;
|
|
|
|
@ -24,8 +25,8 @@ public class ElecMsgHandler : SimpleChannelInboundHandler<ElecMsg>, IBaseHandler
|
|
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
|
|
protected override void ChannelRead0(IChannelHandlerContext ctx, ElecMsg msg)
|
|
|
|
|
{
|
|
|
|
|
Log.Info($"receive ElecMsg = {msg}");
|
|
|
|
|
IoSession? ioSession = CarServerMgr.CarServer?.SessionMgr.GetSession(msg.CarNo);
|
|
|
|
|
Log.Info($"receive ElecMsg = {JsonConvert.SerializeObject(msg)}");
|
|
|
|
|
IoSession? ioSession = SessionMgr.GetSession(msg.CarNo);
|
|
|
|
|
|
|
|
|
|
ioSession?.BusinessMap.AddOrUpdate("ElecMsg", msg, ((s, o) => msg));
|
|
|
|
|
ioSession?.BusinessMap.AddOrUpdate("Connected", true, ((s, o) => true));
|
|
|
|
|