03 test flag
This commit is contained in:
parent
8a28a2cfb1
commit
a698eefa97
@ -7,12 +7,12 @@ switch (flag) {
|
|||||||
break;
|
break;
|
||||||
case '-d':
|
case '-d':
|
||||||
let fcs = JSON.parse(process.argv[4].replace(/'/g, '"'));
|
let fcs = JSON.parse(process.argv[4].replace(/'/g, '"'));
|
||||||
|
|
||||||
console.log(crc.decode(message, fcs));
|
console.log(crc.decode(message, fcs));
|
||||||
break;
|
break;
|
||||||
case '-t':
|
case '-t':
|
||||||
|
let res = crc.encode(message);
|
||||||
|
console.log(res.encoded);
|
||||||
|
console.log(crc.decode(message, res.FCS))
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw "incorect flag"
|
throw "incorect flag"
|
||||||
|
Loading…
Reference in New Issue
Block a user