@36node/protocol-32960
TypeScript icon, indicating that this package has built-in type declarations

0.15.2 • Public • Published

@36node/protocol-32960

version downloads

电动汽车 32960 协议解析库

Install

yarn add @36node/protocol-32960

Usage

import Protocol from "@36node/protocol-32960";

// buffer: origin data
const protocol = new Protocol({
  encrypt: { key: "xx", iv: "xxx", method: "AES128" },
});
const data = protocol.parse(buffer);
const buf = protocol.build(data);

cli

使用方法,可以全局安装或者用 npx 免安装执行

npx @36node/protocol-32960 parse -h

# Usage: parse [options]
# Parse binary message data

# Options:
#  -d, --data <data>        Binary hex data of message
#  -i, --input <input>      File contains binary hex data of message
#  -d, --data <data>        Binary hex data of message
#  -o, --output <output>    Save parsed result to file

# example:

npx @36node/protocol-32960 parse -d  232303fe4c53464430333230324a4330303136323701006b13020200210c81010002ff0300000423f5010002ff0300000423f3010002ff0300000423f3010002ff0300000423f3010002ff0300000423f3010002ff0300000423f6010002ff0300000423f5010002ff0300000423f5010002ff0300000423f3010002ff0300000423f30e

# 如果需要将结果拷贝到内存,可以通过管道
npx @36node/protocol-32960 parse -d xxxxxxxxxxxxxxx | pbcopy

# 通过文件输入输出
npx @36node/protocol-32960 parse -i ./some_in.file -o ./some_out.file

Protocol

协议和实现

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

module © 36node, Released under the MIT License.

Authored and maintained by 36node with help from contributors (list).

github.com/zzswang · GitHub @36node

Dependents (0)

Package Sidebar

Install

npm i @36node/protocol-32960

Weekly Downloads

13

Version

0.15.2

License

MIT

Unpacked Size

275 kB

Total Files

9

Last publish

Collaborators

  • xuna08
  • zzswang
  • hauy
  • 36node-robot