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));
get-crc
0.0.5 • Public • PublishedPackage Sidebar
Install
npm i get-crc
Weekly Downloads
1
Version
0.0.5
License
MIT
Unpacked Size
2.19 kB
Total Files
3