Controller
¶
Classes
Controller¶

-
class
Controller
(dclass, name)[source]¶ Bases:
sardana.tango.pool.PoolDevice.PoolDevice
-
init
(name)[source]¶ initialize the device once in the object lifetime. Override when necessary but always call the method from your super class
:param
str
name: device name
-
ctrl
¶
-
delete_device
(**kwargs)[source]¶ Clean the device. Called during shutdown and every time the tango
Init
command is executed. Override when necessary but always call the method from your super class
-
init_device
(**kwargs)[source]¶ Initialize the device. Called during startup after
init()
and every time the tangoInit
command is executed. Override when necessary but always call the method from your super class
-
always_executed_hook
(self) → None[source]¶ - Hook method. Default method to implement an action necessary on a device before any command is executed. This method can be redefined in sub-classes in case of the default behaviour does not fullfill the needs
Parameters : None Return : None
Throws : DevFailed This method does not throw exception but a redefined method can.
-
read_attr_hardware
(self, attr_list) → None[source]¶ - Read the hardware to return attribute value(s). Default method to implement an action necessary on a device to read the hardware involved in a a read attribute CORBA call. This method must be redefined in sub-classes in order to support attribute reading
- Parameters :
- attr_list : (sequence<int>) list of indices in the device object attribute vector
- of an attribute to be read.
Return : None
Throws : DevFailed This method does not throw exception but a redefined method can.
-
dev_state
()[source]¶ Calculates and returns the device state. Called by Tango on a read state request.
Returns: the device state Return type: DevState
-
dev_status
()[source]¶ Calculates and returns the device status. Called by Tango on a read status request.
Returns: the device status Return type: str
-
get_dynamic_attributes
()[source]¶ Returns the standard dynamic and fully dynamic attributes for this device. The return is a tuple of two dictionaries:
- standard attributes: caseless dictionary with key being the attribute name and value is a tuple of attribute name(str), tango information, attribute information
- dynamic attributes: caseless dictionary with key being the attribute name and value is a tuple of attribute name(str), tango information, attribute information
- tango information
- seq<
CmdArgType
,AttrDataFormat
,AttrWriteType
> - attribute information
- attribute information as returned by the sardana controller
Returns: the standard dynamic and fully dynamic attributes Return type: seq< CaselessDict
,CaselessDict
>
-
read_DynamicAttribute
(attr)[source]¶ Generic read dynamic attribute. Default implementation raises
NotImplementedError
Parameters: attr ( Attribute
) – attribute to be readRaises: NotImplementedError
-
ControllerClass¶

-
class
ControllerClass
(name)[source]¶ Bases:
sardana.tango.pool.PoolDevice.PoolDeviceClass
-
class_property_list
= {}¶
-
device_property_list
= {'Force_HW_Read': [tango._tango.CmdArgType.DevBoolean, 'Force a hardware read of value even when in operation (motion/acquisition', False], 'Id': [tango._tango.CmdArgType.DevLong64, 'Internal ID', 0], 'Klass': [tango._tango.CmdArgType.DevString, '', None], 'Library': [tango._tango.CmdArgType.DevString, '', None], 'Role_ids': [tango._tango.CmdArgType.DevVarLongArray, '', []], 'Type': [tango._tango.CmdArgType.DevString, '', None]}¶
-
cmd_list
= {'Abort': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'CreateElement': [[tango._tango.CmdArgType.DevVarStringArray, ''], [tango._tango.CmdArgType.DevVoid, '']], 'DeleteElement': [[tango._tango.CmdArgType.DevString, ''], [tango._tango.CmdArgType.DevVoid, '']], 'Restore': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'Stop': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']]}¶
-
attr_list
= {'ElementList': [[tango._tango.CmdArgType.DevString, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 4096]], 'LogLevel': [[tango._tango.CmdArgType.DevLong, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ_WRITE], {'label': 'Log level', 'Display level': tango._tango.DispLevel.EXPERT, 'Memorized': 'true'}]}¶
-