handler添加

master
CZ 5 months ago
parent ad2d7cd840
commit 5aa28cc0ed

@ -37,6 +37,22 @@ public class Decoder : ByteToMessageDecoder
{ {
0x1882D0F3 => ModelConvert.Decode<SocMsg>(bytes), 0x1882D0F3 => ModelConvert.Decode<SocMsg>(bytes),
0x18FF48A8 => ModelConvert.Decode<StatusMsg>(bytes), 0x18FF48A8 => ModelConvert.Decode<StatusMsg>(bytes),
0x18E1D0F3=> ModelConvert.Decode<BatteryOneSn>(bytes),
0x18E2D0F3=> ModelConvert.Decode<BatteryTwoSn>(bytes),
0x18E3D0F3=> ModelConvert.Decode<BatteryThreeSn>(bytes),
0x18E4D0F3=> ModelConvert.Decode<BatteryFourSn>(bytes),
0x18E1F3D0=> ModelConvert.Decode<VinMsg>(bytes),
0x1801D8A7=> ModelConvert.Decode<VersionMsg>(bytes),
//0x1880D0F3=> ModelConvert.Decode<StatusMsg>(bytes),
0x18E5D0F3=> ModelConvert.Decode<BatteryInfo1>(bytes),
0x18F1D0F3=> ModelConvert.Decode<SohMsg>(bytes),
0x18F2D0F3=> ModelConvert.Decode<SubMileMsg>(bytes),
0x18FEDA17=> ModelConvert.Decode<TotalMileMsg>(bytes),
//0x18E1F3D1=> ModelConvert.Decode<StatusMsg>(bytes),
//0x18FFF8A8=> ModelConvert.Decode<StatusMsg>(bytes),
0x18FFF8A7=> ModelConvert.Decode<LockStatusMsg>(bytes),
_ => ModelConvert.Decode<OtherMsg>(bytes), _ => ModelConvert.Decode<OtherMsg>(bytes),
}; };

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class BatteryFourSnHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryFourSnHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class BatteryInfo1Handler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryInfo1Handler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class BatteryOneSnHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryOneSnHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class BatteryThreeSnHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryThreeSnHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class BatteryTwoSnHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryTwoSnHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class LockMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(LockMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class LockStatusMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(LockStatusMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class RestartMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(RestartMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class SohMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(SohMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class StatusMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(StatusMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class SubMileMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(SubMileMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class TotalMileMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(TotalMileMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}

@ -0,0 +1,18 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.TBox.Msg.TBox;
namespace Service.TBox.Handler;
[Order(8)]
[Scope("InstancePerDependency")]
public class VersionMsgHandler : SimpleChannelInboundHandler<OtherMsg>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(VersionMsgHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg)
{
Log.Info($"receive OtherMsg={msg}");
}
}
Loading…
Cancel
Save