ska_tmc_centralnode.manager package
Subpackages
Submodules
ska_tmc_centralnode.manager.aggregators module
Aggregation method for telescope state Aggregating for Mid
- class ska_tmc_centralnode.manager.aggregators.DishkValueValidationResultAggregator(cm, logger)
Bases:
objectThis Class Aggregate k-value validation results received from Dish Leaf Nodes.
- aggregate(dish_leaf_node_fqdn, kvalue_validation_result)
Aggregate the k-value validation result received from Dish leaf nodes and provide the aggregated k-value report result to Central Node.
- Parameters:
dish_leaf_node_fqdn (str) – dish leaf node fqdn
kvalue_validation_result (str) – kvalue validation result code
- Return type:
None
- is_events_received_percentage_valid()
Verify the percent of kvalue validation result event received as specified by DishKvalueAggregationAllowedPercent property.
- Returns:
True, if Events recieved percentage is valid. False, otherwise.
- Return type:
bool
- update_central_node_with_result()
This method updates the DishVccValidationStatus of Central Node.
- Return type:
None
- class ska_tmc_centralnode.manager.aggregators.LoadDishCfgCommandResultAggregator(cm, logger)
Bases:
objectThis Class Aggregate LoadDishCfg command results from Csp Master Leaf Nodes and Dish Leaf Nodes
- aggregate()
Aggregate the results and return Final Result code
- Returns:
result code and message
- Return type:
tuple (ResultCode, str)
- class ska_tmc_centralnode.manager.aggregators.TMCOpStateAggregator(cm, logger)
Bases:
AggregatorClass for TelescopeOpStateAggregation for low Telescope
- aggregate()
Aggregate method for TMC Op State
- Returns:
Aggregates TMC Op state
- Return type:
DevState
- class ska_tmc_centralnode.manager.aggregators.TelescopeAvailabilityAggregatorLow(cm, logger)
Bases:
AggregatorClass for TelescopeAvailablity for low Telescope
- aggregate()
Aggregate method for Low Telescope Availability
- Return type:
None
- class ska_tmc_centralnode.manager.aggregators.TelescopeAvailabilityAggregatorMid(cm, logger)
Bases:
AggregatorClass for TelescopeAvailablity for Mid Telescope
- aggregate()
Aggregate method for Mid Telescope Availability
- Return type:
None
ska_tmc_centralnode.manager.aggregate_process module
This module contain process for aggregation
- class ska_tmc_centralnode.manager.aggregate_process.HealthAggregatorFactory
Bases:
objectFactory class to return the appropriate HealthStateAggregator instance.
- static get_aggregator(telescope)
Static method to return aggregator class instance
- Returns:
StateAggregator instance
- Return type:
StateAggregator
- Raises:
ValueError – If Unknown telescope type is provided
- class ska_tmc_centralnode.manager.aggregate_process.HealthStateAggregationProcessor(event_data_queue, aggregated_health_state, aggregate_update_event, telescope='mid', callback=None)
Bases:
AggregationProcessHealth State Aggregation Processor
Inherits from AggregationProcess and implements health-specific state aggregation logic.
- set_state_aggregator()
Return an instance of HealthStateAggregator for the given telescope.
- Returns:
HealthAggregatorFactory Instance
- Return type:
ska_tmc_centralnode.manager.component_manager module
This module provided an implementation of the Central Node ComponentManager.
- class ska_tmc_centralnode.manager.component_manager.CNComponentManager(op_state_model, _input_parameter, logger, _update_device_callback, _update_telescope_state_callback, _update_telescope_health_state_callback, _update_tmc_op_state_callback, _update_imaging_callback, _telescope_availability_callback, _component=None, _liveliness_probe=ska_tmc_common.LivelinessProbeType.MULTI_DEVICE, _event_manager=True, proxy_timeout=500, event_subscription_check_period=1, liveliness_check_period=1, skuid_service='ska-ser-skuid-test-svc.ska-tmc-centralnode.svc.techops.internal.skao.int:9870', command_timeout=30, retry_attempts=5, retry_delay=3.0, subarray_trl_prefix='', *args, **kwargs)
Bases:
TmcComponentManagerA component manager for The Central Node component.
It supports:
1. Monitoring its component, e.g. detect that it has been turned off or on
2. Receiving the change events from lower level devices and trigger the TMC and telescope state aggregation
- add_device(device_name)
Add device to the liveliness probe function
- Parameters:
dev_name (str) – device name
- Return type:
None
- add_multiple_devices(device_list)
Add multiple devices to the liveliness probe function
- Parameters:
device_list (list[str]) – list of device names
- aggregate_process_monitor()
This method keep tracking aggregate health state changed from aggregation process
- assign_resources(argin, task_callback=None)
Submit the AssignResources command in queue.
- Parameters:
argin (str) – input json string for assign resource command
task_callback (Callable, optional) – Update task state, defaults to None
- Returns:
task_status
- Return type:
tuple
- build_device_attribute_map()
Builds a dictionary mapping device names to lists of attributes to be subscribed.
- Returns:
A mapping from device names to list of attributes.
- Return type:
Dict[str, List[str]]
- check_device_responsiveness_command(command_name)
Override this method to add responsive checks for the devices
- Parameters:
command_name (str) – Command name for the check
- Return type:
None
- check_event_error(event, callback)
Method for checking event error.
- check_if_csp_mln_is_available()
Returns boolean value based on availability of CspMasterLeafNode, which ultimately indicated availability of CspMasterNode
- Return type:
bool
- check_if_sdp_mln_is_available()
Returns boolean value based on availability of SdpMasterLeafNode, which ultimately indicated availability of SdpMasterNode
- Return type:
bool
- check_if_subarrays_are_responsive()
Checks if subarray are responsive
- Returns:
True if at least one subarray device is responsive, False otherwise.
- Return type:
bool
- check_subarray_id_in_json(json_argument)
Checks subarray id is present in json or not.
- Parameters:
json_argument (str) – input json string
- Return type:
Tuple(bool, str)
- property checked_devices
Return the list of the checked monitored devices
- Returns:
list of the checked monitored devices
- command_not_allowed_callable(subarray_id=0, desired_obsstate=None, command_name='')
This method provides callable for command not allowed
- Parameters:
subarray_id (int) – subarray_id
desired_obsstate (List) – desired observation state
command_name (str) – command name
- property component
Return the managed component
- Returns:
the managed component
- Return type:
Component
- property devices
Return the list of the monitored devices
- Returns:
list of the monitored devices
- property event_queue
event queue property
- get_adapter_by_device_name(device_name)
The get_adapter_by_device_name method takes a device_name as input and searches for an adapter object in the adapter_factory object’s adapters attribute that matches the input device_name. If a matching adapter object is found, it is returned. If no matching adapter object is found, first adapter is returned.
- Parameters:
device_name (str) – The name of the device to search for.
- Returns:
An adapter object if a matching device is found, otherwise first adapter object is returned.
- get_csp_controller_admin_mode()
Retrieve the adminMode of csp controller :rtype:
AdminMode:returns: This method returns the adminMode of theTMC csp controller leaf Node.
- get_csp_master_dev_name()
Return Csp Master device name
- Return type:
str
- get_csp_master_leaf_node_dev_name()
Return Csp master leaf node device name
- Return type:
str
- get_csp_subarray_dev_names()
Return Csp Subarray device names
- Return type:
list
- get_device(device_name)
Return the device info with device name dev_name
- Parameters:
dev_name (str) – name of the device
- Returns:
a device info
- Return type:
DeviceInfo
- get_dish_device_names()
Return Dish Master device names
- Return type:
tuple
- get_dish_leaf_node_device_names()
Return Dish leaf node device names
- Return type:
tuple
- get_mccs_controller_admin_mode()
Retrieve the adminMode of mccs controller :rtype:
AdminMode:returns: This method returns the adminMode of theTMC mccs controller leaf Node.
- get_mccs_master_dev_name()
Return Sdp Master device name
- Return type:
str
- get_mccs_master_leaf_node_dev_name()
Return MCCS master leaf node device name
- Return type:
str
- get_sdp_controller_admin_mode()
Retrieve the adminMode of sdp controller :rtype:
AdminMode:returns: This method returns the adminMode of theTMC sdp controller leaf Node.
- get_sdp_master_dev_name()
Return Sdp Master device name
- Return type:
str
- get_sdp_master_leaf_node_dev_name()
Return Sdp master leaf node device name
- Return type:
str
- get_sdp_subarray_dev_names()
Return Sdp Subarray device names
- Return type:
list
- get_subarray_obsstate()
Get Current device obsState
- Returns:
current obsstate
- Return type:
ObsState
- get_telescope_availability()
Getter method for Telescope Availability
- Return type:
bool
- get_telescope_health_state()
Getter method for telescope health state
- Return type:
HealthState
- get_telescope_state()
Getter method for telescope state
- get_tmc_op_state()
Getter method for TMC Op State Model
- property input_parameter
Return the input parameter
- Returns:
input parameter
- Return type:
- is_already_assigned(dish_id)
Check if a Dish is already assigned to a subarray
- Parameters:
dish_id (str) – id of the dish
- Return type:
bool
:return True is already assigned, False otherwise
- is_command_allowed()
This method needs to be overridden by the child classes in order to check whether command is allowed or not
- is_input_json_valid(argin)
Checks inputs json.
param argin: input json string :type argin: str
- Return type:
Tuple[bool,str]
- log_state(msg='Device States')
Log state method for
- Return type:
None
- off(task_callback=None)
This method needs to be overridden by the child classes in order to check have functionality under off command
- Return type:
tuple[TaskStatus, str]
- on(task_callback=None)
This method needs to be overridden by the child classes in order to check have functionality under off command
- Return type:
tuple[TaskStatus, str]
- process_event(attribute_name)
- Process the given attribute’s event using the data from the
event_queue and invoke corresponding process method.
- Parameters:
attribute_name (str) – Name of the attribute for which event is to be processed
- Return type:
None- Returns:
None
- release_resources(argin, task_callback=None)
Submit the ReleaseResource command in queue.
- Parameters:
argin (str) – input json string for release resource command
task_callback (Callable, optional) – Update task state, defaults to None
- Returns:
task_status
- Return type:
tuple
- reset(task_callback=None)
Placeholder method for reset command.
- Parameters:
task_callback (
Optional[Callable]) – Update task status, defaults to None- Returns:
task_status, message
- Return type:
tuple(TaskStatus, str)
- set_aggregators(_telescope_state_aggregator, _health_state_aggregator, _op_state_aggregator)
Sets Aggregators callback
- Return type:
None
- set_telescope_availability(telescope_availability)
Setter method for telescope availability
- Return type:
None
- setup_event_subscription()
Sets up the event subscription after input parameters are updated.
- Return type:
None
- standby(task_callback=None)
This method needs to be overridden by the child classes in order to check have functionality under off command
- Return type:
tuple[TaskStatus, str]
- start_communicating()
This method needs to be overridden by the child classes to have this functionality
- stop()
stops liveliness probe
- Return type:
None
- stop_aggregation_process()
Override this method in mid and low
- stop_all_process()
This stop aggregation process
- stop_communicating()
This method needs to be overridden by the child classes to have this functionality
- telescope_off(task_callback=None)
Turn the Telescope Off.
- Returns:
a result code and message
- telescope_on(task_callback=None)
Turn the Telescope On.
- Returns:
a result code and message
- telescope_standby(task_callback=None)
Standby the Telescope.
- Returns:
a result code and message
- update_device_admin_mode(device_name, admin_mode, timestamp)
Update a monitored device admin mode
- Parameters:
device_name (str) – name of the device
admin_mode (AdminMode) – admin mode of the device
- update_device_assigned_resource(dev_name, assign_resources)
Update assign_resources for a monitored device
- Parameters:
dev_name (str) – name of the device
assign_resources (str) – assigned resources in JSON format
- Return type:
None
- update_device_health_state(device_name, health_state, timestamp)
Update a monitored device health state aggregate the health states available
- Parameters:
dev_name (str) – name of the device
health_state (HealthState) – health state of the device
timstamp – timestamp
- Return type:
None
- update_device_obs_state(dev_name, obs_state)
Update a monitored device obs state, and call the relative callbacks if available
- Parameters:
dev_name (str) – name of the device
obs_state (ObsState) – obs state of the device
- Return type:
None
- update_event_failure(device_name)
updates event failures in Dev info
- Parameters:
device_name (str) – Device name
- Return type:
None
- update_exception_for_unresponsiveness(device_info, exception)
Set a device to failed and call the relative callback if available.
- Parameters:
device_info (DeviceInfo) – Information about the device
exception (Exception) – Exception raised during the ping failure
- Return type:
None
- update_input_parameter()
updates the input parameter for component manager instance
- Return type:
None
- update_responsiveness_info(device_name)
Update a device with correct responsiveness information.
- Parameters:
dev_name (str) – name of the device
- Return type:
None
ska_tmc_centralnode.manager.component_manager_mid module
This module is inherited from CNComponentManager.
It is component Manager for Mid Telecope.
It is provided for explanatory purposes, and to support testing of this package.
- class ska_tmc_centralnode.manager.component_manager_mid.CNComponentManagerMid(op_state_model, _input_parameter, logger, _dish_vcc_command_status_callback, _update_device_callback, _update_telescope_state_callback, _update_telescope_health_state_callback, _update_tmc_op_state_callback, _update_imaging_callback, _telescope_availability_callback, _update_dishvccconfig_callback, _dishvccvalidation_callback, _component=None, _liveliness_probe=ska_tmc_common.enum.LivelinessProbeType.MULTI_DEVICE, _event_manager=True, proxy_timeout=500, event_subscription_check_period=1, liveliness_check_period=1, skuid_service='', command_timeout=30, dish_vcc_uri=None, dish_vcc_file_path=None, dish_vcc_init_timeout=120, dishKvalueAggregationAllowedPercent=100.0, invoke_load_dish_cfg_command_callback=None, enable_dish_vcc_init=True, k_value_valid_range_upper_limit=1177, k_value_valid_range_lower_limit=1, subarray_trl_prefix='mid-tmc/subarray/', *args, **kwargs)
Bases:
CNComponentManagerComponent manager class for central node mid
- add_dishes(dln_prefix, num_dishes)
Add dishes to the liveliness probe function
- Parameters:
dln_prefix (str) – prefix of the dish
num_dishes (int) – number of dishes
- Return type:
list- Returns:
List of dishes
- aggregate_load_dish_cfg_results()
This method aggregate load dish cfg command result based on generated data
- Return type:
None
- check_device_responsiveness_command(command_name)
This method overrides the method from super class to add responsive checks for the devices
- Parameters:
command_name (str) – Command name for the check
- Return type:
None
- check_if_csp_all_dish_ready()
Check and validate all dish and csp master is ready
- Return type:
bool- Returns:
True, if all dish and csp master is ready, False, otherwise.
- check_if_dishes_are_responsive()
Checks whether dishes are responsive
- Return type:
bool- Returns:
True, if dishes are responsive, False otherwise
- property dish_vcc_command_status
Return dish vcc command status
- property dish_vcc_validation_status: dict
Getter method for dish vcc validation status
- Returns:
dish vcc validation status
- Return type:
dish
- get_command_id(unique_id)
This Method is used to get command it from the command mapping dictionary
- Parameters:
unique_id (int) – unique id of the command
- Returns:
returns the command id with reference to unique id.
- Return type:
str
- get_default_dish_vcc_config_params()
Return default dish vcc config json
- Return type:
dict- Returns:
Default dish vcc config json
- get_dish_leaf_node_device_names()
Return Dish leaf node device names
- Return type:
tuple- Returns:
A tuple of dish leaf node devices names
- get_load_disg_cfg_resultcode()
Return Aggregated command result for Load Dish Cfg command
- Return type:
ResultCode- Returns:
Aggregated command result for Load Dish Cfg command
- handle_dish_vcc_validation_result(dev_name, result)
Handle Dish Vcc Validation Result Based on following table Result codes handled and attributes updated
Result Code | Meaning
UNKNOWN | Dish Vcc Config not set on CSP
OK | Dish Vcc Config on CSP LN and CSP match
FAILED | Mismatch in dish vcc version on CSP LN and CSP Master
NOT_ALLOWED | CSP master is not available
Result Code | Action
UNKNOWN | Load Dish Config using LoadDishCfg command
OK | Dish Vcc already set so set is_dish_vcc_config_set to True
FAILED | Dish Vcc is mismatch so set set is_dish_vcc_config_set to False
NOT_ALLOWED | Set is_dish_vcc_config_set to False
- Parameters:
dev_name (str) – Device name
result (ResultCode) – ResultCode
- Return type:
None
- is_command_allowed(command_name=None)
Checks whether this command is allowed It checks that the device is in a state to perform this command and that all the component needed for the operation are not unresponsive
- Parameters:
command_name (str) – name of the command
- Return type:
bool- Returns:
True if this command is allowed
- is_csp_dish_ready()
his method wait for csp master leaf node and dish leaf nodes to become ready to accept request
- Return type:
bool- Returns:
True, if csp master leaf node and dish leaf nodes are ready, False otherwise
- property is_dish_vcc_config_set
Getter method for is_dish_vcc_config_set
- is_valid_admin_mode()
Validates that all relevant subarray devices are in a valid admin mode.
- Returns:
True if all subarrays are in a valid mode, False otherwise.
- Return type:
bool
- load_dish_cfg(argin, task_callback=None)
Load Dish Cfg command for Dish-VCC map.
- Parameters:
argin (str) – Dish Id Vcc map initial params
- Return type:
Tuple[ResultCode,str]- Returns:
a result code and message
- reset_load_dish_cfg_data()
Reset all data which is set for aggregating LoadDisgCfg command
- Return type:
None
- stop_aggregation_process()
Stop aggregation process
- Return type:
None
- update_device_dish_mode(dev_name, dish_mode)
Update the dish mode of the given dish leaf node and call the relative callbacks if available.
- Parameters:
dev_name (str) – Device name
dishMode – Dish mode of the device
- Return type:
None
- update_device_state(device_name, state)
Update a monitored device state, aggregate the states available and call the relative callbacks if available
- Parameters:
dev_name (str) – name of the device
state (
DevState) – state of the device
- Return type:
None
- update_dish_vcc_flag(value)
Update dish vcc flag and call telescope state aggregator
- Parameters:
value (bool) – Value of the dish vcc config flag
- Return type:
None
- update_k_value_validation(dev_name, kvalue)
Updates the k value validation value and starts the aggregation.
- Parameters:
dev_name (str) – device name
kvalue (ResultCode) – k value validation result
- Return type:
None
- update_load_dish_cfg_results(dev_name, value, is_async_result=False)
This method is used to update the result returned from Csp Master Leaf Node and returned from Dish Leaf Nodes for SetKValue command. Update result_codes_mapping with dev name as a key and command result as a value If all events are received from all device then aggregate the result Value contains (unique_id, ResultCode) or (unique_id,exception_msg) or (unique_id,TaskStatus)
- Parameters:
dev_name (str) – name of the device who’s event has been captured in this method
value (tuple) – longRunningCommandResult attribute event.
is_async_result (bool) – Whether this callback is called from Async command result call or longRunningCommandResult attribute callback
- Return type:
None
- Examples of value:
Async callback value: [array([0], dtype=int32), ['']] LongRunningCommandResultCallBack value: ('1698838234.9087641-LoadDishCfg', 'Exception occurred, command failed.')
- update_load_dish_cfg_results_async(dev_name, value)
This method is used to update the result returned from Csp Master Leaf Node and returned from Dish Leaf Nodes for SetKValue command.
- Parameters:
dev_name (str) – name of the device who’s event has been captured in this method
value (
tuple) – longRunningCommandResult attribute event.
- Return type:
None
- update_long_running_command_result(dev_name, value)
Updates the LRCR callback with received event.
Value contains (unique_id, ResultCode) or (unique_id,exception_msg) or (unique_id,TaskStatus) Whenever there is exception occured , (unique_id,exception_msg) event is first raised and catched in ValueError.The exception_msg and command_id is then passed to long_running_result_callback. Command_mapping contains {centralnode_command_id:unique_id} , all events are verified with respect to this mapping. If there is no command_mapping present the event might be of old command.
- Parameters:
dev_name (str) – name of the device who’s event has been captured in this method
value (
tuple) – longRunningCommandResult attribute event.
- Return type:
None
- update_telescope_availability(device_name, event_value)
Updates telescope availablity status
- Parameters:
device_name (str) – Device name
event_value – Event value
- Return type:
None
ska_tmc_centralnode.manager.component_manager_low module
This module is inherited from CNComponentManager.
It is component Manager for Low Telecope.
It is provided for explanatory purposes, and to support testing of this package.
- class ska_tmc_centralnode.manager.component_manager_low.CNComponentManagerLow(op_state_model, _input_parameter, logger, _update_device_callback, _update_telescope_state_callback, _update_telescope_health_state_callback, _update_tmc_op_state_callback, _update_imaging_callback, _telescope_availability_callback, _component=None, _liveliness_probe=ska_tmc_common.enum.LivelinessProbeType.MULTI_DEVICE, _event_manager=True, proxy_timeout=500, event_subscription_check_period=1, liveliness_check_period=1, skuid_service='', command_timeout=30, subarray_trl_prefix='low-tmc/subarray/', *args, **kwargs)
Bases:
CNComponentManagerComponent Manager class for low central node
- property assign_resources_schema_version: str
Gets the schema version assigned to resources.
- Returns:
The current value of the assign_resources_schema_version.
- Return type:
str
- check_device_responsiveness_command(command_name)
This method overrides the method from super class to add responsive checks for the devices
- Parameters:
command_name (str) – Command name for the check
- Return type:
None
- check_if_mccs_mln_is_available()
Returns boolean value based on availability of MccsMasterLeafNode, which indicated availability of Mccs Master.
- Returns:
boolean value based on availability of MccsMasterLeafNode
- Return type:
bool
- check_if_mccs_mln_is_responsive()
Checks whether mccs mln is responsive
- get_unique_ids()
Provides unique id for processing long running command result events.
- Returns:
Provides list of unique ids under progress
- Return type:
list
- is_command_allowed(command_name=None)
Checks whether this command is allowed It checks that the device is in a state to perform this command and that all the component needed for the operation are not unresponsive
- Parameters:
command_name (str) – name of the command
- Returns:
True if this command is allowed
- Return type:
boolean
- is_valid_admin_mode()
Extends the base admin mode validation with MCCS check for LOW telescope.
- Returns:
True if all controllers including MCCS are in valid admin mode.
- Return type:
bool
- property release_resources_schema_version: str
Gets the schema version release the assigned resources.
- Returns:
The current value of the release_resources_schema_version.
- Return type:
str
- reset_event_count(command_id)
Reset count function to reset sdp and csp events count and error dictionary
- stop_aggregation_process()
Stop aggregation process
- update_device_state(device_name, state)
Update a monitored device state, aggregate the states available and call the relative callbacks if available
- Parameters:
device_name (str) – name of the device
state (DevState) – state of the device
- update_long_running_command_result(dev_name, value)
Updates the LRCR callback with received event.
Value contains (unique_id, ResultCode) or (unique_id,exception_msg) or (unique_id,TaskStatus)Whenever there is exception occured on any device,(unique_id,exception_msg) event is first raised and catched in ValueError.The events on longRunningCommandResult from both the devices are aggregated and then exception_msg and command_id along with the device name is then passed to long_running_result_callback. Command_mapping contains {centralnode_command_id:unique_id} , all events are verified with respect to this mapping.If there is no command_mapping present the event might be of old command.
- Parameters:
dev_name (str) – name of the device who’s event has been captured
value (tuple) – longRunningCommandResult attribute event.
- update_long_running_command_result_callback()
This method checks for errors after receiving events from all the desired devices. If there are errors it will aggregate them and update the lrcr callback. If there are no errors it will just reset the event dicitonary.
- Return type:
None
- update_telescope_availability(device_name, event_value)
Updates telescope availability
ska_tmc_centralnode.manager.event_data_manager module
Use event manager to manage all event related data
- class ska_tmc_centralnode.manager.event_data_manager.AdminModeData(admin_mode, event_timestamp)
Bases:
objectDataClass for AdminMode and its Timestamp
-
admin_mode:
AdminMode
-
event_timestamp:
datetime
-
admin_mode:
- class ska_tmc_centralnode.manager.event_data_manager.EventDataManager(component_manager)
Bases:
object- A class to update the values of events received for different
attributes in EventDataStorage class
- compare_timevals(current_timestamp, received_timestamp)
- A method to compare the timestamps of events received with the
existing timestamp.
- get_enum_name_from_value(enum_class, value)
Get the name from value of enum
- update_aggragation_queue()
- A method to put a copy of the EventDataStorage object whenever
it receives an event.
- update_event_data(device, data, data_type, received_timestamp=None)
A method to receive and update device name, data, and timestamp in the EventDataStorage Class
- class ska_tmc_centralnode.manager.event_data_manager.EventDataStorage(health_state_data=<factory>, admin_mode_data=<factory>)
Bases:
objectA class to store the Events received for different attributes.
-
admin_mode_data:
dict
-
health_state_data:
dict
-
admin_mode_data:
- class ska_tmc_centralnode.manager.event_data_manager.HealthStateData(health_state, event_timestamp)
Bases:
objectDataClass for HealthState and its Timestamp.
-
event_timestamp:
datetime
-
health_state:
HealthState
-
event_timestamp:
- ska_tmc_centralnode.manager.event_data_manager.pre_process(func)
Decorator for preprocessing event data
- Return type:
Callable
ska_tmc_centralnode.manager.event_manager module
Event manager class for CentralNode
- class ska_tmc_centralnode.manager.event_manager.CentralNodeEventManager(component_manager, subscription_configuration=None, logger=<Logger ska_tmc_centralnode.manager.event_manager (WARNING)>, stateless=True, event_subscription_check_period=1, event_error_max_count=10, status_update_callback=None, maximum_status_queue_size=50)
Bases:
EventManagerCentralNodeEventManager class inherits from EventManager and adds event callbacks.
- adminmode_event_callback(event)
It handles the admin mode events of subsystem’s controller and subaray devices.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- assignedresources_event_callback(event)
Handles assigned Resources event.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- cspcontrolleradminmode_event_callback(event)
It handles the adminMode events of csp controller device.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- dishmode_event_callback(event)
Method to handle and update the latest value of dishMode attribute.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- dishvccmapvalidationresult_event_callback(event)
Handle DishVccMapValidationResult change event.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- healthstate_event_callback(event)
It handles the health state events of subsystem’s controller and subarray devices.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- issubarrayavailable_event_callback(event)
Method to handle and update the latest value of isSubarrayAvailable attribute.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- issubsystemavailable_event_callback(event)
Method to handle and update the latest value of isSubsystemAvailable attribute.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- kvaluevalidationresult_event_callback(event)
Method to handle kValueValidationResult from dish leaf node.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- longrunningcommandresult_event_callback(event)
Callback for longRunningCommandResult attribute.
Delegates to specific handlers based on device type.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- mccscontrolleradminmode_event_callback(event)
It handles the adminMode events of mccs controller device.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- obsstate_event_callback(event)
Handles observation state event.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- sdpcontrolleradminmode_event_callback(event)
It handles the adminMode events of sdp controller device.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None
- state_event_callback(event)
It handles the state events of subsystem’s controller and subaray devices.
- Parameters:
event_data (tango.EventType.CHANGE_EVENT) – to flag the change in event.
- Return type:
None