Closed AEgbert closed 2 years ago
I've corrected an error in the validation logic for the FrequencyRange class (commit). While not specifically stated in the SDI spec, it appears that lowFrequency should be strictly less than highFrequency, with each range being interpreted as [lowFrequency, highFrequency) (that is, lowFrequency up to but not including highFrequency). In discussions with @w4je, this may differ from the original intent of the spec, but other interpretations (i.e., up to but not including highFrequency+1) lead to ambiguous limits in interpreting the SDI spec's example response.
I believe I'm out of final tweaks to the code in this PR. If you'd like a shortcut to comparing the new code in this PR to the current branch, check here.
Rebased branch to include corrections from #8
Brief summary of changes:
I've tested the validator against a number of weird edge cases, but I can't guarantee I haven't missed something. Let me know if you have any feedback or specific validation edge cases you have concerns about.