MID CSP.LMC FSP Processing Mode Capability Device
- class ska_csp_lmc_mid.capability.mid_capability_fsp_device.MidCspCapabilityFsp(cl, name)
Bases:
SKABaseDeviceMid CSP Capability FSP device Aggregates FSP information and presents to higher level devices
- buildState
Read the Build State of the device.
- Returns:
the build state of the device
- versionId
Return the SW version of the current device.
The SW version is equal to the release number of the CSP Helm chart and also of the containerized image.
- Returns:
the version id of the device
- class InitCommand(device: Device, logger: Logger | None = None, validator: ArgumentValidator | None = None)
Bases:
InitCommandClass to handle the CSP.LMC Controller Init command.
- do(*args: Any, **kwargs: Any) Tuple[ResultCode, str]
Invoke the init command on the Controller ComponentManager.
- Returns:
a tuple with the command result code and an informative message.
- init_device()
Initialise the tango device after startup.
- initialize_dynamic_attributes()
This method will be called automatically by the device_factory for each device. Within this method all the dynamic attributes are created. This method is called once, when the device starts
- delete_device() None
Hook to 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.
- set_component_manager(cm_configuration: ComponentManagerConfiguration) MidFspCapabilityComponentManager
Configure the ComponentManager for the CSP Capability FSP device.
- Parameters:
cm_configuration – A class with all the device properties accessible as attributes
- Returns:
The CSP Capability FSP ComponentManager
- create_component_manager() MidFspCapabilityComponentManager
Override the base method.
- Returns:
The CSP ControllerComponentManager
- update_device_attribute(attr_name: str, attr_value: Any) None
General method invoked by the ComponentManager to push an event on a device attribute properly configured to push events from the device.
- Parameters:
attr_name – the TANGO attribute name
attr_value – the attribute value
- ConnectionTimeout
TANGO property
- PingConnectionTime
TANGO property
- CspCbf
TANGO property
- fspsDeployed
Number of FSPs deployed
- fspFqdn
List of FQDNs of all FSP devices
- fspFunctionMode
List of function mode for all FSPs
- fspState
List of operational state for all FSPs.
- fspHealthState
List of HealthState for all FSPs
- fspAdminMode
List of administration mode for all FSPs.
- fspAvailable
List of non-programmed FSP IDs with State.ON
- fspUnavailable
List of FSP IDs with state != State.ON
- fspPss
List of FSP IDs programmed in PSS Functionmode
- fspPst
List of FSP IDs programmed in PST Functionmode
- fspCorrelation
List of FSP IDs programmed in correlation function mode
- fspsSubarrayMembership
FSPs subarray membership
- fspsFqdnAssigned
FQDNs of the assigned FSPs
- fspJson
Json containing the aggregated data for all FSPs
- isCommunicating
Whether the device is communicating with the component under control
- adminMode
The admin mode reported for this device. It may interpret the current device condition and condition of all managed devices to set this. Most possibly an aggregate attribute.
- fspsSwVersion
online fsps software version attribute list
- fspsHwVersion
online fsps software hardware attribute list
- fspsFwVersion
online fsps software firmare attribute list
- Abort() tuple[list[ResultCode], list[str]]
Abort any executing long running command(s) and empty the queue.
- Returns:
A tuple containing a result code and the unique ID of the command
- AbortCommands() tuple[list[ResultCode], list[str]]
Empty out long running commands in queue.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- CheckLongRunningCommandStatus(argin: str) str
Check the status of a long running command by ID.
- Parameters:
argin – the command id
- Returns:
command status
- DebugDevice() int
Enable remote debugging of this device.
To modify behaviour for this command, modify the do() method of the command class:
DebugDeviceCommand.- Returns:
the port the debugger is listening on
- ExecutePendingOperations() None
Execute any Tango operations that have been pushed on the queue.
The poll time is initially 5ms, to circumvent the problem of device initialisation, but is reset to 100ms after the first pass.
- GetVersionInfo() list[str]
Return the version information of the device.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
The result code and the command unique ID
- GroupDefinitions
Device property.
Each string in the list is a JSON serialised dict defining the
group_name,devicesandsubgroupsin the group. A Tango Group object is created for each item in the list, according to the hierarchy defined. This provides easy access to the managed devices in bulk, or individually.The general format of the list is as follows, with optional
devicesandsubgroupskeys:[ {"group_name": "<name>", "devices": ["<dev name>", ...]}, {"group_name": "<name>", "devices": ["<dev name>", "<dev name>", ...], "subgroups" : [{<nested group>}, {<nested group>}, ...]}, ... ]
For example, a hierarchy of racks, servers and switches:
[ {"group_name": "servers", "devices": ["elt/server/1", "elt/server/2", "elt/server/3", "elt/server/4"]}, {"group_name": "switches", "devices": ["elt/switch/A", "elt/switch/B"]}, {"group_name": "pdus", "devices": ["elt/pdu/rackA", "elt/pdu/rackB"]}, {"group_name": "racks", "subgroups": [ {"group_name": "rackA", "devices": ["elt/server/1", "elt/server/2", "elt/switch/A", "elt/pdu/rackA"]}, {"group_name": "rackB", "devices": ["elt/server/3", "elt/server/4", "elt/switch/B", "elt/pdu/rackB"], "subgroups": []} ]} ]
- LoggingLevelDefault
Device property.
Default logging level at device startup. See
LoggingLevel
- LoggingTargetsDefault
Device property.
Default logging targets at device startup. See the project readme for details.
- Off() tuple[list[ResultCode], list[str]]
Turn the device off.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- On() tuple[list[ResultCode], list[str]]
Turn device on.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Reset() tuple[list[ResultCode], list[str]]
Reset the device.
To modify behaviour for this command, modify the do() method of the command class.
For a device that directly monitors and controls hardware, this command should put that hardware into a known state, for example by clearing buffers and loading default values into registers, or if necessary even by power-cycling and re-initialising the hardware.
Logical devices should generally implement this command to perform a sensible reset of that logical device. For example, aborting any current activities and clearing internal state.
Reset generally should not change the power state of the device or its hardware:
If invoking Reset() from STANDBY state, the device would usually be expected to remain in STANDBY.
If invoking Reset() from ON state, the device would usually be expected to remain in ON.
If invoking Reset() from FAULT state, the device would usually be expected to transition to ON or remain in FAULT, depending on whether the reset was successful in clearing then fault.
Reset generally should not propagate to subservient devices. For example, a subsystem controller device should implement Reset to reset the subsystem as a whole, but that probably should not result in all of the subsystem’s hardware being power-cycled.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SkaLevel
Device property.
Indication of importance of the device in the SKA hierarchy to support drill-down navigation: 1..6, with 1 highest.
- Standby() tuple[list[ResultCode], list[str]]
Put the device into standby mode.
To modify behaviour for this command, modify the do() method of the command class.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- TangoClassClass
alias of
MidCspCapabilityFspClass
- TangoClassName = 'MidCspCapabilityFsp'
- commandedState
Read the last commanded operating state of the device.
Initial string is “None”. Only other strings it can change to is “OFF”, “STANDBY” or “ON”, following the start of the Off(), Standby(), On() or Reset() long running commands.
- Returns:
commanded operating state string.
- controlMode
Read the Control Mode of the device.
The control mode of the device are REMOTE, LOCAL Tango Device accepts only from a ‘local’ client and ignores commands and queries received from TM or any other ‘remote’ clients. The Local clients has to release LOCAL control before REMOTE clients can take control again.
- Returns:
Control Mode of the device
- healthState
Read the Health State of the device.
It interprets the current device condition and condition of all managed devices to set this. Most possibly an aggregate attribute.
- Returns:
Health State of the device
- loggingLevel
Read the logging level of the device.
Initialises to LoggingLevelDefault on startup. See
LoggingLevel- Returns:
Logging level of the device.
- loggingTargets
Read the additional logging targets of the device.
Note that this excludes the handlers provided by the ska_ser_logging library defaults - initialises to LoggingTargetsDefault on startup.
- Returns:
Logging level of the device.
- longRunningCommandResult
Read the result of the completed long running command.
Reports unique_id, json-encoded result. Clients can subscribe to on_change event and wait for the ID they are interested in.
- Returns:
ID, result.
- lrcFinished
Read info of the finished long running commands.
- Returns:
a list of info JSON blobs of the finished long running commands.
- lrcProtocolVersions
Return supported protocol versions.
- Returns:
A tuple containing the lower and upper bounds of supported long running command protocol versions.
- simulationMode
Read the Simulation Mode of the device.
Some devices may implement both modes, while others will have simulators that set simulationMode to True while the real devices always set simulationMode to False.
- Returns:
Simulation Mode of the device.
- testMode
Read the Test Mode of the device.
Either no test mode or an indication of the test mode.
- Returns:
Test Mode of the device