While working with PR #35 I noticed one opportunity to optimize parsing. The idea is in the commit message of this PR:
Call field parsing only if the (first) register in the parameter definition is within the range of raw data queried from the device. The change reduces somewhat processing overhead, by avoiding extra function calls.
All definitions are looped through for each received raw data buffer. Without this change rule specific parsers were called even if data for the register in the definition is not in the raw data buffer being parsed. That condition is discovered in rule specific parsers and parsing attempt rejected only there.
While working with PR #35 I noticed one opportunity to optimize parsing. The idea is in the commit message of this PR:
Call field parsing only if the (first) register in the parameter definition is within the range of raw data queried from the device. The change reduces somewhat processing overhead, by avoiding extra function calls.
All definitions are looped through for each received raw data buffer. Without this change rule specific parsers were called even if data for the register in the definition is not in the raw data buffer being parsed. That condition is discovered in rule specific parsers and parsing attempt rejected only there.