Menu

#7 Item validation needs to be split.

open
hidrd (14)
3
2010-02-26
2010-02-12
No

Currently item validation is done too strictly for a descriptor conversion.
It must be separated.

When converting a report descriptor, items should be validated only for possibility of being represented in memory.
A separate layer of validation should check if the item contents matches specification.

For example: a report_id item may contain 32 bits of data, while per specification report ID is 8 bits at most.
When converting a report descriptor we shouldn't complain about invalid report ID's.
But when using the library to generate or read report_id item programmatically, it should be validated.

How it is to be accomplished is not yet known.

We cannot afford a duplicate set of item accessors.
A global validation switch is unacceptable.

Discussion

  • Nikolai Kondrashov

    • assigned_to: nobody --> spb_nick
     
  • Nikolai Kondrashov

    Nevertheless, the additional set of accessors seems to be the only way. Maybe macros could help us with that. Again.

     
  • Nikolai Kondrashov

    Also, the XML schema will need to be separated into two: relaxed and strict versions.

    This seems like too much work for little gain for now.

     
  • Nikolai Kondrashov

    • labels: --> 1344008
     
  • Nikolai Kondrashov

    • labels: 1344008 --> hidrd
     

Log in to post a comment.