WMS component state interface:
Specialization for WMS functionality.
- class WMSComponentManager(wms_device_names, *args, logger=<Logger ska_mid_dish_manager.component_managers.wms_cm (WARNING)>, component_state_callback=None, communication_state_callback=None, state_update_lock=None, wms_polling_period=1.0, wind_speed_moving_average_period=600.0, wind_gust_period=3.0, **kwargs)[source]
Specialization for Weather Monitoring System (WMS) functionality.
This component manager handles communication and data processing for a single or a group of WMS Tango device(s), providing periodic polling of wind speed data, calculation of mean wind speed and wind gust values, and management of device states.
- Parameters:
wms_device_names (List[str]) – List of TRLs of the WMS devices to be monitored.
args (Any) – Additional positional arguments passed to the base component manager.
logger (Optional[logging.Logger]) – Optional logger instance for logging messages.
component_state_callback (Optional[Callable]) – Optional callback for component state updates.
state_update_lock (Optional[threading.Lock]) – Optional threading lock for component state updates.
wms_polling_period (Optional[float]) – Polling period (in seconds) for fetching wind speed data.
wind_speed_moving_average_period (Optional[float]) – Time window (in seconds) over which the mean wind speed is calculated.
wind_gust_period (Optional[float]) – Time window (in seconds) over which the wind gust is calculated.
kwargs (Any) – Additional keyword arguments passed to the base component manager.
- __init__(wms_device_names, *args, logger=<Logger ska_mid_dish_manager.component_managers.wms_cm (WARNING)>, component_state_callback=None, communication_state_callback=None, state_update_lock=None, wms_polling_period=1.0, wind_speed_moving_average_period=600.0, wind_gust_period=3.0, **kwargs)[source]
- read_wms_group_attribute_value(attribute_name)[source]
Reads the specified attribute from all devices in the WMS device group.
Attempts to read the given attribute from each device in the group, collecting the value and timestamping it for each successful read. Communication state is updated based on the success or failure of the operation.
- Return type:
Any- Parameters:
attribute_name (
str) – The name of the attribute to read from each device in the group.
:type attribute_name : str :return list of list: A list of lists, where each inner list contains the
timestamp (float) and the attribute value read from a device.
- start_communicating()[source]
Add WMS device(s) to group and initiate WMS attr polling.
- Return type:
None
- stop_communicating()[source]
Stop WMS attr polling and clean up windspeed data buffers.
- Return type:
None
- write_wms_group_attribute_value(attribute_name, attribute_value)[source]
Writes the specified attribute value to all devices in the WMS Tango device group.
Attempts to write the given attribute value to the specified attribute across all devices in the WMS device group. Updates the communication state based on the success or failure of the write operation. :rtype:
None- Parameters:
attribute_name (
str) – The name of the attribute to write to each device in the group.
:type attribute_name : str :type attribute_value:
Any:param attribute_value: The value to write to the attribute. :type attribute_value : str :raises tango.DevFailed : If writing the attribute fails for any device in the group.