Controller

Classes

Controller

Inheritance diagram of Controller
class Controller(dclass, name)[source]

Bases: PoolDevice

init(name)[source]

initialize the device once in the object lifetime. Override when necessary but always call the method from your super class

Parameters:

name – device name

get_ctrl()[source]
set_ctrl(ctrl)[source]
property ctrl
delete_device()[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()[source]

Initialize the device. Called during startup after init() and every time the tango Init command is executed. Override when necessary but always call the method from your super class

initialize_attribute_values()[source]

Initialize attribute values.

get_role_ids()[source]
always_executed_hook(self: tango._tango.Device_6Impl) → None[source]
dev_state()[source]

Calculates and returns the device state. Called by Tango on a read state request.

Returns:

the device state

dev_status()[source]

Calculates and returns the device status. Called by Tango on a read status request.

Returns:

the device status

read_ElementList(attr)[source]
CreateElement(argin)[source]
DeleteElement(argin)[source]
get_element_names()[source]
on_controller_changed(event_src, event_type, event_value)[source]
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

read_DynamicAttribute(attr)[source]

Generic read dynamic attribute. Default implementation raises NotImplementedError

Parameters:

attr – attribute to be read

Raises:

NotImplementedError

write_DynamicAttribute(attr)[source]

Generic write dynamic attribute. Default implementation raises NotImplementedError

Parameters:

attr – attribute to be written

Raises:

NotImplementedError

read_LogLevel(attr)[source]
write_LogLevel(attr)[source]

ControllerClass

Inheritance diagram of ControllerClass
class ControllerClass(name)[source]

Bases: PoolDeviceClass

class_property_list = {}

Sardana device class properties definition

device_property_list = {'Force_HW_Read': [CmdArgType.DevBoolean, 'Force a hardware read of value even when in operation (motion/acquisition', False], 'Id': [CmdArgType.DevLong64, 'Internal ID', 0], 'Klass': [CmdArgType.DevString, '', None], 'Library': [CmdArgType.DevString, '', None], 'Role_ids': [CmdArgType.DevVarLongArray, '', []], 'Type': [CmdArgType.DevString, '', None]}

Sardana device properties definition

cmd_list = {'Abort': [[CmdArgType.DevVoid, ''], [CmdArgType.DevVoid, '']], 'CreateElement': [[CmdArgType.DevVarStringArray, ''], [CmdArgType.DevVoid, '']], 'DeleteElement': [[CmdArgType.DevString, ''], [CmdArgType.DevVoid, '']], 'Release': [[CmdArgType.DevVoid, ''], [CmdArgType.DevVoid, '']], 'Restore': [[CmdArgType.DevVoid, ''], [CmdArgType.DevVoid, '']], 'Stop': [[CmdArgType.DevVoid, ''], [CmdArgType.DevVoid, '']]}

Sardana device command definition

attr_list = {'ElementList': [[CmdArgType.DevString, AttrDataFormat.SPECTRUM, AttrWriteType.READ, 4096]], 'LogLevel': [[CmdArgType.DevLong, AttrDataFormat.SCALAR, AttrWriteType.READ_WRITE], {'Display level': DispLevel.EXPERT, 'Memorized': 'true_without_hard_applied', 'label': 'Log level'}]}

Sardana device attribute definition