diff --git a/Service/TBox/Codec/Decoder.cs b/Service/TBox/Codec/Decoder.cs index dbd2149..abe7722 100644 --- a/Service/TBox/Codec/Decoder.cs +++ b/Service/TBox/Codec/Decoder.cs @@ -37,6 +37,22 @@ public class Decoder : ByteToMessageDecoder { 0x1882D0F3 => ModelConvert.Decode(bytes), 0x18FF48A8 => ModelConvert.Decode(bytes), + + 0x18E1D0F3=> ModelConvert.Decode(bytes), + 0x18E2D0F3=> ModelConvert.Decode(bytes), + 0x18E3D0F3=> ModelConvert.Decode(bytes), + 0x18E4D0F3=> ModelConvert.Decode(bytes), + + 0x18E1F3D0=> ModelConvert.Decode(bytes), + 0x1801D8A7=> ModelConvert.Decode(bytes), + //0x1880D0F3=> ModelConvert.Decode(bytes), + 0x18E5D0F3=> ModelConvert.Decode(bytes), + 0x18F1D0F3=> ModelConvert.Decode(bytes), + 0x18F2D0F3=> ModelConvert.Decode(bytes), + 0x18FEDA17=> ModelConvert.Decode(bytes), + //0x18E1F3D1=> ModelConvert.Decode(bytes), + //0x18FFF8A8=> ModelConvert.Decode(bytes), + 0x18FFF8A7=> ModelConvert.Decode(bytes), _ => ModelConvert.Decode(bytes), }; diff --git a/Service/TBox/Handler/BatteryFourSnHandler.cs b/Service/TBox/Handler/BatteryFourSnHandler.cs new file mode 100644 index 0000000..5dd3a5b --- /dev/null +++ b/Service/TBox/Handler/BatteryFourSnHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryFourSnHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/BatteryInfo1Handler.cs b/Service/TBox/Handler/BatteryInfo1Handler.cs new file mode 100644 index 0000000..239b902 --- /dev/null +++ b/Service/TBox/Handler/BatteryInfo1Handler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryInfo1Handler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/BatteryOneSnHandler.cs b/Service/TBox/Handler/BatteryOneSnHandler.cs new file mode 100644 index 0000000..257c60a --- /dev/null +++ b/Service/TBox/Handler/BatteryOneSnHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryOneSnHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/BatteryThreeSnHandler.cs b/Service/TBox/Handler/BatteryThreeSnHandler.cs new file mode 100644 index 0000000..9486252 --- /dev/null +++ b/Service/TBox/Handler/BatteryThreeSnHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryThreeSnHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/BatteryTwoSnHandler.cs b/Service/TBox/Handler/BatteryTwoSnHandler.cs new file mode 100644 index 0000000..3946e7b --- /dev/null +++ b/Service/TBox/Handler/BatteryTwoSnHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(BatteryTwoSnHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/LockMsgHandler.cs b/Service/TBox/Handler/LockMsgHandler.cs new file mode 100644 index 0000000..3d89bb3 --- /dev/null +++ b/Service/TBox/Handler/LockMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(LockMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/LockStatusMsgHandler.cs b/Service/TBox/Handler/LockStatusMsgHandler.cs new file mode 100644 index 0000000..bccca84 --- /dev/null +++ b/Service/TBox/Handler/LockStatusMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(LockStatusMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/RestartMsgHandler.cs b/Service/TBox/Handler/RestartMsgHandler.cs new file mode 100644 index 0000000..3ceb8a7 --- /dev/null +++ b/Service/TBox/Handler/RestartMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(RestartMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/SohMsgHandler.cs b/Service/TBox/Handler/SohMsgHandler.cs new file mode 100644 index 0000000..d7aa8b4 --- /dev/null +++ b/Service/TBox/Handler/SohMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(SohMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/StatusMsgHandler.cs b/Service/TBox/Handler/StatusMsgHandler.cs new file mode 100644 index 0000000..3b88fea --- /dev/null +++ b/Service/TBox/Handler/StatusMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(StatusMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/SubMileMsgHandler.cs b/Service/TBox/Handler/SubMileMsgHandler.cs new file mode 100644 index 0000000..679cd2b --- /dev/null +++ b/Service/TBox/Handler/SubMileMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(SubMileMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/TotalMileMsgHandler.cs b/Service/TBox/Handler/TotalMileMsgHandler.cs new file mode 100644 index 0000000..6a56bcd --- /dev/null +++ b/Service/TBox/Handler/TotalMileMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(TotalMileMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file diff --git a/Service/TBox/Handler/VersionMsgHandler.cs b/Service/TBox/Handler/VersionMsgHandler.cs new file mode 100644 index 0000000..370f172 --- /dev/null +++ b/Service/TBox/Handler/VersionMsgHandler.cs @@ -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, IBaseHandler +{ + private static readonly ILog Log = LogManager.GetLogger(typeof(VersionMsgHandler)); + + protected override void ChannelRead0(IChannelHandlerContext ctx, OtherMsg msg) + { + Log.Info($"receive OtherMsg={msg}"); + } +} \ No newline at end of file