Draft: Refactor the FT decoding for better maintenance
Now opened !1001 (merged) to put the changes relative to fixing the decoding and making Allen & Rec agree. This should go after !1001 (merged), and will basically be a refactoring. I put this back in Draft so the distinction is clearer (also, once !1001 (merged) is merged, there will be merge conflicts).
** Changes **
- name all ClusterTypes and put them in the event model
- revert when possible the logic of the code to
if (all good) then do something
rather than weeding out errors; - create a ClusterReference namespace in the event model;
- put in one place the methods to read a raw bank and get the row in DB map
- create error counters;
- rename variables to make them hopefully clearer;
- group decoding 6, 7 and 8 when possible to reduce code repetition;
- template large cluster checking on the decoding version
To-Do
-
study the appropriate size of max_mat_per_bank; -
remove all printfs -
do proper error counting -
make contracts
Edited by Roel Aaij