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: ConfigurableCsc

Upper level Commandable SAL Component for the Environmental Sensors Support.

Parameters:
  • index (int) – The index of the CSC

  • config_dir (str) – The configuration directory

  • initial_state (salobj.State) – The initial state of the CSC

  • simulation_mode (int) – Simulation mode (1) or not (0)

  • override (str, optional) – Configuration override file to apply if initial_state is State.DISABLED or State.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.

close_tasks()

Shut down pending tasks.

configure(config)

Configure the CSC.

fault(code, report[, traceback])

Enter the fault state and output the errorCode event.

get_config_pkg()

Get the name of the configuration package, e.g. "ts_config_ocs".

run_data_clients()

Run the data clients, to read and publish environmental data.

start_data_clients()

Start the data clients.

stop_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:

None

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:

None

async close_tasks()#

Shut down pending tasks. Called by close.

Return type:

None

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 at lsst.ts.ess.csc.CONFIG_SCHEMA, as a struct-like object.

Return type:

None

async fault(code, report, traceback='')#

Enter the fault state and output the errorCode event.

Parameters:
  • code (int) – Error code for the errorCode event. If None then errorCode is not output and you should output it yourself. Specifying None is 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:

None

static get_config_pkg()#

Get the name of the configuration package, e.g. “ts_config_ocs”.

Return type:

str

async run_data_clients()#

Run the data clients, to read and publish environmental data.

Return type:

None

async start_data_clients()#

Start the data clients.

Return type:

None

async stop_data_clients()#

Stop the data clients.

Return type:

None