EssCsc#
- class lsst.ts.ess.csc.EssCsc(index, config_dir=None, initial_state=State.STANDBY, simulation_mode=0, override='', name='ESS', config_schema={'$id': 'https://github.com/lsst-ts/ts_ess/blob/main/python/lsst/ts/ess/csc/config_schema.py', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalProperties': False, 'description': 'Schema for ESS configuration.', 'properties': {'instances': {'description': 'Configuration for each ESS instance.', 'items': {'additionalProperties': False, 'properties': {'csc_name': {'description': 'Descriptive name of the CSC.', 'type': 'string'}, 'data_clients': {'description': 'Configuration for each data client run by this instance.', 'items': {'additionalProperties': False, 'properties': {'client_class': {'description': 'Data client class name, e.g. ControllerDataClient.', 'type': 'string'}, 'config': {'description': 'Configuration for the data client.', 'type': 'object'}}, 'required': ['client_class', 'config'], 'type': 'object'}, 'minItems': 1, 'type': 'array'}, 'sal_index': {'description': 'SAL index of ESS instance.', 'minimum': 1, 'type': 'integer'}}, 'required': ['csc_name', 'sal_index', 'data_clients'], 'type': 'object'}, 'minItem': 1, 'type': 'array'}}, 'required': ['instances'], 'title': 'ESS v8', 'type': 'object'})#
Bases:
ConfigurableCscUpper level Commandable SAL Component for the Environmental Sensors Support.
- Parameters:
index (
int) – The index of the CSCconfig_dir (
str) – The configuration directoryinitial_state (
salobj.State) – The initial state of the CSCsimulation_mode (
int) – Simulation mode (1) or not (0)override (
str, optional) – Configuration override file to apply ifinitial_stateisState.DISABLEDorState.ENABLED.name (
str, default:'ESS')config_schema (
dict, default:{'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://github.com/lsst-ts/ts_ess/blob/main/python/lsst/ts/ess/csc/config_schema.py', 'title': 'ESS v8', 'description': 'Schema for ESS configuration.', 'type': 'object', 'properties': {'instances': {'type': 'array', 'description': 'Configuration for each ESS instance.', 'minItem': 1, 'items': {'type': 'object', 'properties': {'csc_name': {'type': 'string', 'description': 'Descriptive name of the CSC.'}, 'sal_index': {'type': 'integer', 'description': 'SAL index of ESS instance.', 'minimum': 1}, 'data_clients': {'description': 'Configuration for each data client run by this instance.', 'type': 'array', 'minItems': 1, 'items': {'type': 'object', 'properties': {'client_class': {'description': 'Data client class name, e.g. ControllerDataClient.', 'type': 'string'}, 'config': {'description': 'Configuration for the data client.', 'type': 'object'}}, 'required': ['client_class', 'config'], 'additionalProperties': False}}}, 'required': ['csc_name', 'sal_index', 'data_clients'], 'additionalProperties': False}}}, 'required': ['instances'], 'additionalProperties': False})
Attributes Summary
Methods Summary
begin_disable(data)Begin do_disable; called before state changes.
begin_enable(data)Begin do_enable; called before state changes.
Shut down pending tasks.
configure(config)Configure the CSC.
fault(code, report[, traceback])Enter the fault state and output the
errorCodeevent.Get the name of the configuration package, e.g. "ts_config_ocs".
Run the data clients, to read and publish environmental data.
Start the data clients.
Stop the data clients.
Attributes Documentation
- enable_cmdline_state = True#
- valid_simulation_modes: Sequence[int] = (0, 1)#
- version = '0.22.1'#
Methods Documentation
- async begin_disable(data)#
Begin do_disable; called before state changes.
- Parameters:
data (
DataType) – Command data- Return type:
- async begin_enable(data)#
Begin do_enable; called before state changes.
This override sends a CMD_INPROGRESS signal.
- Parameters:
data (
salobj.BaseDdsDataType) – Command data- Return type:
- async configure(config)#
Configure the CSC.
Also store the device configurations for easier access when receiving and processing telemetry.
- Parameters:
config (
types.SimpleNamespace) – The configuration as described by the schema atlsst.ts.ess.csc.CONFIG_SCHEMA, as a struct-like object.- Return type:
- async fault(code, report, traceback='')#
Enter the fault state and output the
errorCodeevent.- Parameters:
code (
int) – Error code for theerrorCodeevent. IfNonethenerrorCodeis not output and you should output it yourself. SpecifyingNoneis deprecated; please always specify an integer error code.report (
str) – Description of the error.traceback (
str, optional) – Description of the traceback, if any.
- Return type:
- static get_config_pkg()#
Get the name of the configuration package, e.g. “ts_config_ocs”.
- Return type:
- async run_data_clients()#
Run the data clients, to read and publish environmental data.
- Return type: