Coder Social home page Coder Social logo

反转义功能异常 about jt-framework HOT 3 CLOSED

hylexus avatar hylexus commented on August 17, 2024
反转义功能异常

from jt-framework.

Comments (3)

hylexus avatar hylexus commented on August 17, 2024

这东西真烦人…… 不知道是不是我哪里理解错了?你这个报文转义后是13个字节?正常的808心跳报文应该是没有消息体的,也没有消息包封装项的。

原报文: 7e00020000978290002147029E7D017e
分隔符: 00020000978290002147029E7D01
转义后: 00020000978290002147029E7D  (7D01 --> 7D) 长度为 13bytes ??????

0002 消息Id
0000 消息体属性
	---> 消息体长度  --> 0
	---> 无分包
	---> 消息头共12字节
978290002147 terminalId
029E 流水号
7D  ??????

from jt-framework.

hylexus avatar hylexus commented on August 17, 2024

@hjki456789 不过默认的消息转义处理在极端情况下好像真是有bug的……改了下,但是我真的不确定……。因为我见过有比较另类的实现厂商。
你可以自己实现 io.github.hylexus.jt808.codec.BytesEncoder 来覆盖默认的逻辑。

from jt-framework.

hjki456789 avatar hjki456789 commented on August 17, 2024

7d就是异或校验符

from jt-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.