Hi, currently you can split input on timeout, silence, certain character, or fixed number of characters. Is it possible to have it return on a variable number of characters by passing the number in with the input message?
I briefly looked at 25-serial.js and it appears that you would just need to change the size of the response buffer on input. Not fully cognizant everything that's going on in there though.
A use case of this would be for serial protocols such as Modbus RTU, where the response size is variable and you want to return ASAP when you get the right number of characters back. Interbyte timeout doesn't always work because some Modbus devices out there are really slow/cruddy and may pause before responding fully.
Related to this -- is it also possible to flush the input buffer before sending a new request? This may already be the behavior -- not sure -- in Python I have to discard what was sitting in the input buffer though if I've received a message of the wrong size before sending out another request.
P.S. I know there are a few nodes out there for Modbus RTU already, but I'd rather write my own minimalist code for Modbus. Modbus is so simple that the request/response code for both serial and TCP (with error-checking) in Python is only about a page -- there's no reason to have (some) overly complex nodes with many dependencies.