Example #1
0
        /// <summary>
        /// 初始化消息处理业务
        /// </summary>
        protected JT809SuperiorMsgIdReceiveHandlerBase(
            ILoggerFactory loggerFactory,
            IJT809SubordinateLoginService jT809SubordinateLoginService,
            IJT809VerifyCodeGenerator verifyCodeGenerator)
        {
            this.Logger = loggerFactory.CreateLogger <JT809SuperiorMsgIdReceiveHandlerBase>();
            this.VerifyCodeGenerator     = verifyCodeGenerator;
            this.SubordinateLoginService = jT809SubordinateLoginService;
            HandlerDict = new Dictionary <JT809BusinessType, Func <JT809Request, JT809Response> >
            {
                { JT809BusinessType.主链路登录请求消息, Msg0x1001 },
                { JT809BusinessType.主链路注销请求消息, Msg0x1003 },
                { JT809BusinessType.主链路连接保持请求消息, Msg0x1005 },
                { JT809BusinessType.主链路断开通知消息, Msg0x1007 },
                { JT809BusinessType.主链路动态信息交换消息, Msg0x1200 },
                { JT809BusinessType.级平台主动关闭链路通知消息, Msg0x1008 },

                { JT809BusinessType.从链路连接应答消息, Msg0x9002 },
                { JT809BusinessType.从链路注销应答消息, Msg0x9004 },
                { JT809BusinessType.从链路连接保持应答消息, Msg0x9006 },
            };
            SubHandlerDict = new Dictionary <JT809SubBusinessType, Func <JT809Request, JT809Response> >
            {
                { JT809SubBusinessType.车辆注册信息, Msg0x1200_0x1201 },
                { JT809SubBusinessType.主动上报驾驶员身份信息, Msg0x1200_0x120C },
                { JT809SubBusinessType.实时上传车辆定位信息, Msg0x1200_0x1202 },
                { JT809SubBusinessType.车辆定位信息自动补报, Msg0x1200_0x1203 },
            };
        }
 public JT809SuperiorMsgIdReceiveHandler(
     IOptions <JT809GpsOptions> jt809GpsAccessor,
     JT809_GpsPositio_Producer producer,
     ILoggerFactory loggerFactory,
     IJT809SubordinateLoginService jT809SubordinateLoginService,
     IJT809VerifyCodeGenerator verifyCodeGenerator)
     : base(loggerFactory, jT809SubordinateLoginService, verifyCodeGenerator)
 {
     this.producer   = producer;
     this.gpsOptions = jt809GpsAccessor.Value;
 }
 public JT809SuperiorMsgIdReceiveDefaultHandler(ILoggerFactory loggerFactory, IJT809SubordinateLoginService jT809SubordinateLoginService, IJT809VerifyCodeGenerator verifyCodeGenerator) : base(loggerFactory, jT809SubordinateLoginService, verifyCodeGenerator)
 {
 }