instrumentserver.config#
If any instrument in the config does not have values for SERVERFIELDS or GUIFIELD, the values inside of it are added to the config as defaults. If you are adding any extra fields to the config make sure to add the default values on those variables since we parse the config using those.
Functions
|
Loads the config for the instrumentserver. |
- instrumentserver.config.loadConfig(configPath: str | Path) tuple[str, dict, dict, dict, IO[bytes], dict, dict][source]#
Loads the config for the instrumentserver. From 1 config file it splits the respective fields into 3 different objects: a serverConfig (the configurations for the server), a stationConfig(the qcodes station config file clean of any extra config fields), and a GUI config file (any config that the GUI of the server needs).
The qcodes station only accepts the path of an actual file for its config. So after loading the YAML file, the added fields are removed from the loaded dictionary. After that it is converted to a byte stream and written into a temporary file. what is returned here is the path to that temporary file, after the station loads the file, it gets deleted automatically
The config also supports a ‘gui_defaults’ section for class-based GUI configuration that applies to all instances of a given instrument class. These defaults are merged with instance-specific configs.