PseudoCounter

Classes

PseudoCounter

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

Bases: PoolExpChannelDevice

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

get_pseudo_counter()[source]
set_pseudo_counter(pseudo_counter)[source]
property pseudo_counter
delete_device(*args, **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(*args, **kwargs)[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

on_pseudo_counter_changed(event_source, event_type, event_value)[source]
always_executed_hook(self)[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

Raises:

DevFailed – This method does not throw exception but a redefined method can.

get_dynamic_attributes()[source]

Override of PoolDevice.get_dynamic_attributes. 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>

initialize_dynamic_attributes()[source]

Initializes this device dynamic attributes

read_Value(attr)[source]
is_Value_allowed(req_type)

Generic is_allowed

CalcPseudo(physical_values)[source]

Returns the pseudo counter value for the given physical counters

CalcAllPseudo(physical_values)[source]

Returns the pseudo counter values for the given physical counters

PseudoCounterClass

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

Bases: PoolExpChannelDeviceClass

class_property_list = {}

Sardana device class properties definition

cmd_list = {'Abort': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'CalcAllPseudo': [[tango._tango.CmdArgType.DevVarDoubleArray, 'physical positions'], [tango._tango.CmdArgType.DevVarDoubleArray, 'pseudo counter values']], 'CalcPseudo': [[tango._tango.CmdArgType.DevVarDoubleArray, 'physical values'], [tango._tango.CmdArgType.DevDouble, 'pseudo counter']], 'Release': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'Restore': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']], 'Stop': [[tango._tango.CmdArgType.DevVoid, ''], [tango._tango.CmdArgType.DevVoid, '']]}

Sardana device command definition

standard_attr_list = {'Shape': [[tango._tango.CmdArgType.DevLong64, tango._tango.AttrDataFormat.SPECTRUM, tango._tango.AttrWriteType.READ, 2], {'label': 'Shape (X,Y)', 'description': 'Shape of the value. It is an array with \nat most 2 elements: X and Y dimensions. \n0-element array - scalar\n1-element array (X) - spectrum\n2-element array (X, Y) - image'}], 'Value': [[tango._tango.CmdArgType.DevDouble, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ], {'abs_change': '1.0'}], 'ValueBuffer': [[tango._tango.CmdArgType.DevEncoded, tango._tango.AttrDataFormat.SCALAR, tango._tango.AttrWriteType.READ]]}