get-crc
v0.0.5
Published
得到CRC码
Downloads
1
Readme
快速开始
const crc = require("get-crc");
const buffer = new Buffer.from([
0x02, 0x04, 0x18, 0x21, 0x11, 0x25, 0x08, 0x08, 0x54, 0x01, 0x57, 0x00, 0x36,
0x00, 0x0b, 0xff, 0xb2, 0x00, 0x05, 0xff, 0xe8, 0x00, 0x04, 0xff, 0xe4, 0xff,
0xe4,
]);
const reply = new Buffer.from([0x02, 0x05]);
console.log(crc.crc16Modbus(reply));