Skip to content

Extract HwController status as JSON and store it

Daniel Joseph Antrim requested to merge dantrim_log_fw_status into devel

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.

Status object for SpecController

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.

Storing the HwController Status in the scanConsole Output

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)

Edited by Daniel Joseph Antrim

Merge request reports