You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's gonna be too redundant if we have to add the entire thing per tablet config that can be handled by the configurable parser, so what I thought of is to have another file.
report_structure_definitions.json
which contains named structures, much like named parsers.
Description
We have way too many classes that essentially does the same parsing but in different indices.
If we encounter such tablet that only needs "regular" parsing, we should be able to define its report structure in the configuration itself.
Proposed Schema (intentionally incomplete)
We add
ReportStructure
as a field of the tablet configuration.ReportStructure
It is a field that contains an array of
Report
.Report
Identifier
Type Enum
Report (Type = Data)
ReportValue
Identifier
ReportValue
TODO: cba to write this one for now, should be self-explanatory with the example down below.
Example (XP-Pen G640S)
ExtensionIndex
is when an encoded value is to be extended via another byte in the report.It handles cases like this:
Other stuff
Dealing with redundancy
It's gonna be too redundant if we have to add the entire thing per tablet config that can be handled by the configurable parser, so what I thought of is to have another file.
report_structure_definitions.json
which contains named structures, much like named parsers.
and then when a
ReportStructure
in a tablet configuration is a string, it should be considered a name of a report structure.Possibility of checking for inconsistencies/conflicts within the structure/parser itself
We could write a test that does exactly that, and also checking for too similar structures/parsers.
Better documentation of the reports from tablets
Acknowledgements
The text was updated successfully, but these errors were encountered: