Ejemplo n.º 1
0
 internal bool TryAdd(IJT808Session session)
 {
     return(Sessions.TryAdd(session.SessionID, session));
 }
 /// <summary>
 /// 自定义消息
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public byte[] Msg0x9999(JT808HeaderPackage request, IJT808Session session)
 {
     logger.LogDebug("自定义消息");
     return(default);
 /// <summary>
 /// 终端通用应答
 /// 平台无需回复
 /// 实现自己的业务
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public virtual byte[] Msg0x0001(JT808HeaderPackage request, IJT808Session session)
 {
     return(default);
 /// <summary>
 /// 重写自带的消息
 /// </summary>
 /// <param name="request"></param>
 /// <param name="session"></param>
 public override byte[] Msg0x0200(JT808HeaderPackage request, IJT808Session session)
 {
     logger.LogDebug("重写自带Msg0x0200的消息");
     return(base.Msg0x0200(request, session));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 重写自带的消息
 /// </summary>
 /// <param name="request"></param>
 /// <param name="session"></param>
 public override byte[] Msg0x0200(JT808HeaderPackage request, IJT808Session session)
 {
     //logger.LogDebug("重写自带Msg0x0200的消息");
     logger.LogDebug($"重写自带Msg0x0200的消息{request.Header.TerminalPhoneNo}-{request.OriginalData.ToArray().ToHexString()}");
     return(base.Msg0x0200(request, session));
 }