Extract HwController status as JSON and store it
What
This MR adds an abstract method to libYarr/HwController, virtual const json getStatus()
, that HwControllers can implement. By default, this method returns an empty json
object:
class HwController {
public :
...
virtual const json getStatus() { return json{}; };
...
Each of the various HwControllers can implement this as fits their specific needs.
SpecController
Status object for This MR implements the getStatus()
method for libSpec/SpecController. It is a wrapper
around the call to const json SpecCom::getStatus()
,
class SpecController {
public:
...
const json getStatus() override {
return this->SpecCom::getStatus();
}
...
},
and constructs and returns a JSON object with the following fields,
- firmware version number
- firmware identifier
- FPGA card
- FE chip type
- FMC card type
- RX speed
- Channel configuration
which are currently the fields that get printed out to the screen during the initialization of the SpecController object.
scanConsole
Output
Storing the HwController Status in the The JSON object that is returned by the HwController's getStatus()
method is stored in the scanLog.json
file that is produced at the end of a given scan when running scanConsole
. It is currently stored under the node ctrlStatus
, but this can of course change:
...
scanLog["ctrlCfg"] = ctrlCfg;
scanLog["ctrlStatus"] = hwCtrl->getStatus();
...
Related Issues
This MR is related to the issue #87 (closed)