stanza.utils
Module Contents
Functions
API
Substitute parameters in a template string.
Parameters:
The template string to substitute parameters in.
A dictionary of substitutions to make.
Returns:
The substituted string.
Get config file content
Parameters:
The path to the config file.
The encoding of the config file.
Returns:
The config file content.
Load a device configuration YAML file.
Parameters:
Whether the config is a stanza config.
Returns:
The device configuration.
Raises:
ValueError: If the file cannot be loaded.
Generate ChannelConfigs for the device.
Parameters:
The device configuration.
Returns:
A dictionary mapping of gate/contact name to ChannelConfigs.
Create a device from a DeviceConfig object.
Parameters:
The device configuration object.
Returns:
A configured Device instance with instantiated instruments.
Raises:
ValueError: If required driver field is missing or instruments cannot be instantiated.
Load a device from a YAML configuration file.
Parameters:
Path to the device configuration YAML file.
Whether the config is a stanza config.
Returns:
A configured Device instance with instantiated instruments.
Raises:
ValueError: If required driver field is missing or instruments cannot be instantiated.