How will a driver behave when a smart-serial definition has:
- A response def with Header and trailer => to capture specific matching data
- A response def with a next param = to capture any data
will the "any data" response get triggered all the time or only when the specific one doesn't?
We would like to use this to detect when an unsupported / unexpected message is received.
Hi Mieke,
I'm afraid this approach will not work due to the way the data forwarding works between SLPort and SLProtocol. Refer to Data forwarding for more details.
To summarize, for a smart-serial connection you'll either have a response with a next param (and then all the response processing is done via QAction) or you define multiple responses with headers/trailers to cover the different responses. As soon as you define a response for a smart serial connection that makes use of headers/trailers, SLPort assumes that all other responses also make use of this approach and therefore SLPort will only forward data to SLProtocol if a trailer has been received.