asyc-ii: Unobfuscate a comment on packet parse constraints

The specific packet layout puts constraints on the parse logic (case
sensitive comparison, order of comparison). Fix a comment that made no
sense before, and better reflect that there are two constraints.
This commit is contained in:
Gerhard Sittig 2016-12-31 12:48:59 +01:00 committed by Uwe Hermann
parent 26e8c6a2b2
commit c2debda60d
1 changed files with 10 additions and 6 deletions

View File

@ -124,12 +124,16 @@ static int parse_value(const char *buf, struct asycii_info *info,
* variable length. Flags immediately follow the unit. The remainder
* of the text buffer is SPACE padded, and terminated with CR.
*
* Notice the implementation detail of case *sensitive* comparison.
* This would break correct operation. It's essential that e.g. "Vac"
* gets split into the "V" unit and the "ac" flag, not into "VA" and
* the unknown "c" flag! In the absence of separators or fixed
* positions and with ambiguous text (when abbreviated), order of
* comparison matters, too.
* Notice the implementation detail of case @b sensitive comparison.
* Since the measurement unit and flags are directly adjacent and are
* not separated from each other, case insensitive comparison would
* yield wrong results. It's essential that e.g. "Vac" gets split into
* the "V" unit and the "ac" flag, not into "VA" and the unknown "c"
* flag!
*
* Notice, too, that order of comparison matters in the absence of
* separators or fixed positions and with ambiguous text (note that we do
* partial comparison). It's essential to e.g. correctly tell "VA" from "V".
*
* @param[in] buf The text buffer received from the DMM.
* @param[out] info Broken down measurement details.