Closed mreis1 closed 1 year ago
this package is only designed to compile full-filled frame, I don't think I'm able to add some half-filled frame with checkpoints like that
but you can use a Splitter like this and concat data :
new Splitter({ "startWith": STX, "endWith": [ Buffer.from([ DLE, ETB ]), Buffer.from([ DLE, ETX ]) ], "specifics": { "ack": ACK, }, "controlBits": "end+1" })
According to the protocol, certain commands might be returned in multiple blocks. Those are then delimited by ETB being ETX used to delimit the latest block.
ETB 0x17
The ETB management is necessary for messages of more than 248 bytes. The maximum message size (blocks concatenation) is 1024 bytes.