PST Base Device API
Module for the base TANGO device used in PST.LMC.
- class ska_pst_lmc.component.pst_device.PstBaseDevice(*args: Any, **kwargs: Any)[source]
Base class for all the TANGO devices in PST.LMC.
This extends from
CspSubElementObsDevice
but is also generic in the type of the component manager.The CspSubElementObsDevice class is used as a base rather than a SKASubarray due to the fact this PST is a software subelement within CSP.
- init_device() None [source]
Initialise the attributes and properties of the PstReceive.
This overrides the
SKABaseDevice
.
- delete_device() None [source]
Delete resources allocated in init_device.
This method allows for any memory or other resources allocated in the init_device method to be released. This method is called by the device destructor and by the device Init command.
- create_component_manager() T [source]
Create and return a component manager for this device.
- Raises
NotImplementedError – for no implementation
- handle_component_state_change(*args: Any, **kwargs: Any) None [source]
Handle change in this device’s state.
This overrides the
PstDeviceInterface
and calls _component_state_changed on this class.
- handle_communication_state_change(communication_state: ska_tango_base.control_model.CommunicationStatus) None [source]
Handle a change in device’s communication state.
This just calls the SKABaseDevice._communication_state_changed method
- handle_attribute_value_update(attribute_name: str, value: Any) None [source]
Handle update of a device attribute value.
- Parameters
attribute_name (str) – the name of the attribute to update.
value (Any) – the new value of the attribute to update to.
- property component_manager: T
Get component manager.
Overrides the super class property of component_manager to be typesafe.
- Returns
the component manager casted to type T.
- property device_name: str
Get the name of the device.
This is the relative device name (e.g. low_psi/beam/01) and not the FQDN which can include the Tango DB in a URL.
- property facility: TelescopeFacilityEnum
Get the facility that this device is being used for.
- update_health_state(health_state: ska_tango_base.control_model.HealthState) None [source]
Update the health state of the device.
This delegates to the base class _update_health_state
- set_logging_level(value: ska_tango_base.control_model.LoggingLevel) None [source]
Set the logging level for the device.
Both the Python logger and the TANGO logger are updated.
This calls
SKABaseDevice.set_logging_level()
then delegates to the component manager to perform necessary updates. This is used by having the BEAM.MGMT to update the subordinate Tango devices, which in turn update the core apps.- Parameters
value – Logging level for logger
- Raises
LoggingLevelError – for invalid value
- class ConfigureScanCommand(*args: Any, **kwargs: Any)[source]
A class for the PstBaseDevice’s ConfigureScan command.
This class overrides the CspSubElementObsDevice.ConfigureScanCommand’s validate_input method to no assert the id field.
- class ska_pst_lmc.component.pst_device.PstBaseProcessDevice(*args: Any, **kwargs: Any)[source]
Base class for all the TANGO devices that manager an external process.
This extends from
PstBaseDevice
but exposes the ConfigureBeam method. This allows for setting up the beam related configuration that may not change as often as the scan configuration.- class InitCommand(*args: Any, **kwargs: Any)[source]
A class for the CspSubElementObsDevice’s init_device() “command”.
- is_ValidateConfigureScan_allowed() bool [source]
Return whether the ValidateConfigureScan command may be called in the current state.
- Returns
whether the command may be called in the current device state
- Return type
- is_ConfigureBeam_allowed() bool [source]
Return whether the ConfigureBeam command may be called in the current state.
- Returns
whether the command may be called in the current device state
- Return type