Skip to content

Refactor fcgen, configuration types, add parameters #96

Open
@alex-brinkman

Description

I'd like to perform some refactoring to achieve the following aims:

  • Developers who add new device driver don't need to write any manager class code or YAML parsing code (only define the fastcat_types.yaml)
  • Formalize device configuration with a std::variant typedef'ed to DeviceConfig to permit querying the device in programmatic manner through the manager
  • Auto-code the parsing of configuration to potentially enable other configuration vendors (e.g. JSON rather than just YAML via libyaml-cpp)
  • Add runtime-parameters (see the FTS device) If provided in the YAML, set to the override but then permit setting and retriving by runtime commands and responses

To achieve these aims, I'm proposing a roll-out in a staged refactor consisting of the following merges. Once all these are merged to a staging branch and tested on hardware, then they can be merged to master and the staging branch deleted.

  1. Refactor the fastcat_types.yaml and minimally modify the autocoder to deliver the current set of functionality
  2. Implement the automated YAML-to-DeviceConfig parsing and modify the DeviceBase::ConfigFromYaml() method to DeviceBase::Config(DeviceConfig) and DeviceBase::Initialize()
  3. Add more autocoding to the Manager such that developers don't need to author custom code here any longer. This includes the generic DeviceConfig getter
  4. Add support for Device Runtime parameters, like FTS guard limits, configured from within the fastcat_types.yaml

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions