Taurus Extensions

Classes

BaseElement

Inheritance diagram of BaseElement
class BaseElement[source]

Bases: object

The base class for elements in the Pool (Pool itself, Motor, ControllerClass, ExpChannel all should inherit from this class directly or indirectly)

serialize()[source]
str(n=0)[source]

Returns a sequence of strings representing the object in ‘consistent’ way. Default is to return <name>, <controller name>, <axis>

Parameters:n – the number of elements in the tuple.
getName()[source]
getPoolObj()[source]

Get reference to this object’s Pool.

getPoolData()[source]

Get reference to this object’s Pool data.

Controller

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

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating Controller functionality.

getModuleName()[source]
getClassName()[source]
getTypes()[source]
getMainType()[source]
addElement(elem)[source]
removeElement(elem)[source]
getElementByAxis(axis)[source]
getElementByName(name)[source]
getUsedAxes()[source]

Return axes in use by this controller

Returns:list of axes
Return type:list<int>
getUsedAxis()[source]
getLastUsedAxis()[source]

Return the last used axis (the highest axis) in this controller

Returns:last used axis
Return type:int or None

ControllerClass

Inheritance diagram of ControllerClass
class ControllerClass(**kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.BaseElement

getSimpleFileName()[source]
getFileName()[source]
getClassName()[source]
getType()[source]
getTypes()[source]
getLib()[source]
getGender()[source]
getModel()[source]
getOrganization()[source]

CTExpChannel

Inheritance diagram of CTExpChannel
class CTExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating CTExpChannel functionality.

ExpChannel

Inheritance diagram of ExpChannel
class ExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating ExpChannel functionality.

getValueObj_()[source]

Retrurns Value attribute event generator object.

Returns:Value attribute event generator
Return type:TangoAttributeEG

..todo:: When support to Taurus 3 will be dropped provide getValueObj. Taurus 3 TaurusDevice class already uses this name.

getValue(force=False)[source]
getValueBufferObj()[source]
getValueBuffer()[source]
valueBufferChanged(value_buffer)[source]

Instrument

Inheritance diagram of Instrument
class Instrument(**kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.BaseElement

getFullName()[source]
getParentInstrument()[source]
getParentInstrumentName()[source]
getChildrenInstruments()[source]
getElements()[source]
getType()[source]

IORegister

Inheritance diagram of IORegister
class IORegister(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating IORegister functionality.

getValueObj()[source]
Deprecated by TEP14.
..warning::
this bck-compat implementation is not perfect because the rvalue of the returned TangoAttributeValue is now a member of TaurusDevState instead of TaurusSWDevState

Deprecated since version 4.0: Use state [agnostic] or stateObj.read [Tango] instead

readValue(force=False)[source]
startWriteValue(new_value, timeout=None)[source]
waitWriteValue(timeout=None)[source]
writeValue(new_value, timeout=None)[source]
writeIORegister(new_value, timeout=None)
writeIOR(new_value, timeout=None)
readIORegister(force=False)
readIOR(force=False)
getValue(force=False)

MeasurementGroup

Inheritance diagram of MeasurementGroup
class MeasurementGroup(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating MeasurementGroup functionality.

cleanUp()[source]

The cleanUp. Default implementation does nothing Overwrite when necessary

getConfigurationAttrEG()[source]
setConfiguration(configuration)[source]
getConfiguration(force=False)[source]
on_configuration_changed(evt_src, evt_type, evt_value)[source]
getTimerName()[source]
getTimer()[source]
getTimerValue()[source]
getMonitorName()[source]
getMonitor()[source]
setTimer(timer_name)[source]
getChannels()[source]
getCounters()[source]
getChannelNames()[source]
getCounterNames()[source]
getChannelLabels()[source]
getCounterLabels()[source]
getChannel(name)[source]
getChannelInfo(name)[source]
getChannelsInfo()[source]
getChannelsEnabledInfo()[source]

Returns information about only enabled channels present in the measurement group in a form of ordered, based on the channel index, list.

Returns:list with channels info
Return type:list<TangoChannelInfo>
getCountersInfo()[source]
getValues(parallel=True)[source]
getValueBuffers()[source]
getIntegrationTime()[source]
getIntegrationTimeObj()[source]
setIntegrationTime(ctime)[source]
putIntegrationTime(ctime)[source]
getAcquisitionModeObj()[source]
getAcquisitionMode()[source]
setAcquisitionMode(acqMode)[source]
getSynchronizationObj()[source]
getSynchronization()[source]
setSynchronization(synchronization)[source]
getNbStartsObj()[source]
setNbStarts(starts)[source]
getNbStarts()[source]
getMoveableObj()[source]
getMoveable()[source]
getLatencyTimeObj()[source]
getLatencyTime()[source]
setMoveable(moveable=None)[source]
valueBufferChanged(channel, value_buffer)[source]

Receive value buffer updates, pre-process them, and call the subscribed callback.

Parameters:
  • channel (ExpChannel) – channel that reports value buffer update
  • value_buffer (str) – json encoded value buffer update, it contains at least values and indexes
subscribeValueBuffer(cb=None)[source]

Subscribe to channels’ value buffer update events. If no callback is passed, the default channel’s callback is subscribed which will store the data in the channel’s value_buffer attribute.

Parameters:cb (callable) – callback to be subscribed, None means subscribe the default channel’s callback
unsubscribeValueBuffer(cb=None)[source]

Unsubscribe from channels’ value buffer events. If no callback is passed, unsubscribe the channel’s default callback.

Parameters:cb (callable) – callback to be unsubscribed, None means unsubscribe the default channel’s callback
enableChannels(channels)[source]

Enable acquisition of the indicated channels.

Parameters:channels – (seq<str>) a sequence of strings indicating channel names
disableChannels(channels)[source]

Disable acquisition of the indicated channels.

Parameters:channels – (seq<str>) a sequence of strings indicating channel names
prepare()[source]
count_raw(start_time=None)[source]
go(*args, **kwargs)[source]
count_continuous(synchronization, value_buffer_cb=None)[source]

Execute measurement process according to the given synchronization description.

Parameters:
  • synchronization (list of groups with equidistant synchronizations) – synchronization description
  • value_buffer_cb (callable) – callback on value buffer updates
Returns:

state and eventually value buffers if no callback was passed

Return type:

tuple<list<DevState>,<list>>

Todo

Think of unifying measure with count.

Note

The measure method has been included in MeasurementGroup class on a provisional basis. Backwards incompatible changes (up to and including removal of the method) may occur if deemed necessary by the core developers.

startCount(**kwargs)
waitCount(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
count(*args, **kwargs)
stopCount(wait_ready=True, timeout=None)
stop(wait_ready=True, timeout=None)

Motor

Inheritance diagram of Motor
class Motor(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement, sardana.taurus.core.tango.sardana.motion.Moveable

Class encapsulating Motor functionality.

getPosition(force=False)[source]
getDialPosition(force=False)[source]
getVelocity(force=False)[source]
getAcceleration(force=False)[source]
getDeceleration(force=False)[source]
getBaseRate(force=False)[source]
getBacklash(force=False)[source]
getLimitSwitches(force=False)[source]
getOffset(force=False)[source]
getStepPerUnit(force=False)[source]
getSign(force=False)[source]
getSimulationMode(force=False)[source]
getPositionObj()[source]
getDialPositionObj()[source]
getVelocityObj()[source]
getAccelerationObj()[source]
getDecelerationObj()[source]
getBaseRateObj()[source]
getBacklashObj()[source]
getLimitSwitchesObj()[source]
getOffsetObj()[source]
getStepPerUnitObj()[source]
getSimulationModeObj()[source]
setVelocity(value)[source]
setAcceleration(value)[source]
setDeceleration(value)[source]
setBaseRate(value)[source]
setBacklash(value)[source]
setOffset(value)[source]
setStepPerUnit(value)[source]
setSign(value)[source]
go(*args, **kwargs)[source]
startMove(**kwargs)
waitMove(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
move(*args, **kwargs)
getLastMotionTime()

Returns the time it took for last go operation

getTotalLastMotionTime()

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

iterMove(**kwargs)[source]
readPosition(force=False)[source]
getMoveableSource()[source]
getSize()[source]
getIndex(name)[source]

MotorGroup

Inheritance diagram of MotorGroup
class MotorGroup(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement, sardana.taurus.core.tango.sardana.motion.Moveable

Class encapsulating MotorGroup functionality.

getMotorNames()[source]
hasMotor(name)[source]
getPosition(force=False)[source]
getPositionObj()[source]
go(*args, **kwargs)[source]
startMove(**kwargs)
waitMove(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
move(*args, **kwargs)
getLastMotionTime()

Returns the time it took for last go operation

getTotalLastMotionTime()

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

readPosition(force=False)[source]
getMoveableSource()[source]
getSize()[source]
getIndex(name)[source]

OneDExpChannel

Inheritance diagram of OneDExpChannel
class OneDExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating OneDExpChannel functionality.

Pool

Inheritance diagram of Pool
class Pool(name, **kw)[source]

Bases: taurus.core.tango.tangodevice.TangoDevice, sardana.taurus.core.tango.sardana.motion.MoveableSource

Class encapsulating device Pool functionality.

getObject(element_info)[source]
on_elements_changed(evt_src, evt_type, evt_value)[source]
getElementsInfo()[source]
getElements()[source]
getElementInfo(name)[source]
getElementNamesOfType(elem_type)[source]
getElementsOfType(elem_type)[source]
getElementsWithInterface(interface)[source]
getElementWithInterface(elem_name, interface)[source]
getObj(name, elem_type=None)[source]
getMoveable(seq<string> names) → Moveable[source]

Returns a moveable object that handles all the moveable items given in names.

createMotorGroup(mg_name, elements)[source]
createMeasurementGroup(mg_name, elements)[source]
deleteMeasurementGroup(name)[source]
createElement(name, ctrl, axis=None)[source]
renameElement(old_name, new_name)[source]
deleteElement(name)[source]
createController(class_name, name, *props)[source]
deleteController(name)[source]

PoolElement

Inheritance diagram of PoolElement
class PoolElement(name, **kwargs)[source]

Bases: sardana.taurus.core.tango.sardana.pool.BaseElement, taurus.core.tango.tangodevice.TangoDevice

Base class for a Pool element device.

getPoolObj()[source]

Get reference to this object’s Pool.

getPoolData()[source]

Get reference to this object’s Pool data.

cleanUp()[source]

The cleanUp. Default implementation does nothing Overwrite when necessary

reserve(obj)[source]
unreserve()[source]
isReserved(obj=None)[source]
getReservedWR()[source]
getReserved()[source]
dump_attributes()[source]
getStateEG()[source]
getControllerName()[source]
getControllerObj()[source]
getAxis()[source]
getType()[source]
waitReady(timeout=None)[source]
getAttrEG(name)[source]

Returns the TangoAttributeEG object

getAttrObj(name)[source]

Returns the taurus.core.tangoattribute.TangoAttribute object

getInstrumentObj()[source]
getInstrumentName(force=False)[source]
getInstrument()[source]
start(**kwargs)[source]
waitFinish(timeout=None, id=None)[source]

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
go(**kwargs)[source]
getLastGoTime()[source]

Returns the time it took for last go operation

getTotalLastGoTime()[source]

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

abort(wait_ready=True, timeout=None)[source]
stop(wait_ready=True, timeout=None)[source]
information(tab=' ')[source]

PseudoCounter

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

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating PseudoCounter functionality.

PseudoMotor

Inheritance diagram of PseudoMotor
class PseudoMotor(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement, sardana.taurus.core.tango.sardana.motion.Moveable

Class encapsulating PseudoMotor functionality.

getPosition(force=False)[source]
getDialPosition(force=False)[source]
getPositionObj()[source]
getDialPositionObj()[source]
go(*args, **kwargs)[source]
startMove(**kwargs)
waitMove(timeout=None, id=None)

Wait for the operation to finish

Parameters:
  • timeout (float) – optional timeout (seconds)
  • id (tuple(float)) – id of the opertation returned by start
move(*args, **kwargs)
getLastMotionTime()

Returns the time it took for last go operation

getTotalLastMotionTime()

Returns the time it took for last go operation, including dead time to prepare, wait for events, etc

readPosition(force=False)[source]
getMoveableSource()[source]
getSize()[source]
getIndex(name)[source]

TriggerGate

Inheritance diagram of TriggerGate
class TriggerGate(name, **kwargs)[source]

Bases: sardana.taurus.core.tango.sardana.pool.PoolElement

Class encapsulating TriggerGate functionality.

TwoDExpChannel

Inheritance diagram of TwoDExpChannel
class TwoDExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating TwoDExpChannel functionality.

ZeroDExpChannel

Inheritance diagram of ZeroDExpChannel
class ZeroDExpChannel(name, **kw)[source]

Bases: sardana.taurus.core.tango.sardana.pool.ExpChannel

Class encapsulating ZeroDExpChannel functionality.