psi46/psi46expert — pull request #3 by simonspa (2013-11-13 08:28:43+00:00)
Title: Remove TB*Interface and TB*Parameters, cleanup of purely virtual classes

this pull request removes all dependencies on TBAnalogInterface. This has several reasons:

1) Stable, working code. In the current state all test implement stuff from TBAnalogInterface, but we are loading a TBDigitalInterface. This means that we are really dirtily accessing stuff across child class borders. So making all tests and high-level functions using TBInterface is mandatory.

2) Readability, maintainability. The current state features several layers of abstract, almost completely virtual classes. This is unneeded in my opinion. The only additional hardware abstraction layer I would allow is the CTestboard class since there is a person gap in between pixel_dtb.cc (maintained by Beat) and TBInterface.cc (maintained by us).

3) Clean start. Right now our aim should be (I just assume that here) to provide a solid working solution for all DTBs out there in the production centers. This means we (at this point) don't have to care about ATBs. There is a working solution for those boards (the old psi46expert software) which can even cope with PSI46digV2 chips. If we want to implement this again at a later point, I'm fine with it - but then we should place this at the right position (i.e. between TBInterface and the Hardware) so that all tests can access the same routines in TBInterface regardless of the testboard attached.

The current state of the cleanup is not well-tested yet and some (known) fixes have to be implemented, e.g. Daniel's change which allows loading and changing of testboard parameters again. That was just another pawn sacrifice of a fast fix implementing the DTB in psi46expert - but when running with anything other than the standard parameters for clk, sda etc. it won't work (e.g. different cable length) because they are not really changed anywhere (not even read to be precise).

Anyway, this should be a first step in the right direction, so we just have to chop off some more heads of that Hydra.