if a negative response contains an NRC-CONST parameter, where the parameter's value is not in the list of expected values, the response is not applicable and decoding should be stopped at this point. (Thus, NRC-CONST parameters are a multiplexer mechanism which filters responses based on the value of some other parameter.)
This patch implements this by introducing a new DecodeMismatch exception which is raised whenever a NRC-CONST parameter which exhibits an unexpected value is encountered. The higher-level routines for decoding responses then ignore these exceptions when appropriate. IMO, this solution is a bit sub-optimal because it uses exceptions for flow control in normal operation, but alternative implementations would be far more complex.
if a negative response contains an NRC-CONST parameter, where the parameter's value is not in the list of expected values, the response is not applicable and decoding should be stopped at this point. (Thus, NRC-CONST parameters are a multiplexer mechanism which filters responses based on the value of some other parameter.)
This patch implements this by introducing a new
DecodeMismatch
exception which is raised whenever a NRC-CONST parameter which exhibits an unexpected value is encountered. The higher-level routines for decoding responses then ignore these exceptions when appropriate. IMO, this solution is a bit sub-optimal because it uses exceptions for flow control in normal operation, but alternative implementations would be far more complex.Andreas Lauser <andreas.lauser@mercedes-benz.com>, on behalf of MBition GmbH. Provider Information