poolbasechannel
¶
This module is part of the Python Pool library. It defines the base classes for experiment channels
Classes
PoolBaseChannel¶
-
class
PoolBaseChannel
(**kwargs)[source]¶ Bases:
sardana.pool.poolelement.PoolElement
-
ValueAttributeClass
¶ alias of
Value
-
ValueBufferClass
¶ alias of
ValueBuffer
-
AcquisitionClass
¶ alias of
sardana.pool.poolacquisition.
-
has_pseudo_elements
()[source]¶ Informs whether this channel forms part of any pseudo element e.g. pseudo counter.
Returns: has pseudo elements Return type: bool
-
get_pseudo_elements
()[source]¶ Returns list of pseudo elements e.g. pseudo counters that this channel belongs to.
Returns: pseudo elements Return type: seq< PoolPseudoCounter
>
-
add_pseudo_element
(element)[source]¶ Adds pseudo element e.g. pseudo counter that this channel belongs to.
Parameters: element ( PoolPseudoCounter
) – pseudo element
-
remove_pseudo_element
(element)[source]¶ Removes pseudo element e.g. pseudo counters that this channel belongs to.
Parameters: element ( PoolPseudoCounter
) – pseudo element
-
get_value_attribute
()[source]¶ Returns the value attribute object for this experiment channel
Returns: the value attribute Return type: SardanaAttribute
-
get_value_buffer
()[source]¶ Returns the value attribute object for this experiment channel
Returns: the value attribute Return type: SardanaAttribute
-
acquisition
¶ acquisition object
-
read_value
()[source]¶ Reads the channel value from hardware.
Returns: a SardanaValue
containing the channel valueReturn type: SardanaValue
-
put_value
(value, propagate=1)[source]¶ Sets a value.
Parameters: - value (
SardanaValue
) – the new value - propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- value (
-
get_value
(cache=True, propagate=1)[source]¶ Returns the channel value.
Parameters: Returns: the channel value
Return type:
-
set_value
(value)[source]¶ Starts an acquisition on this channel
Parameters: value ( Number
) – the value to count
-
value
¶ channel value
-
extend_value_buffer
(values, idx=None, propagate=1)[source]¶ Extend value buffer with new values assigning them consecutive indexes starting with idx. If idx is omitted, then the new values will be added right after the last value in the buffer. Also update the read value of the attribute with the last element of values.
Parameters: - values (
SardanaValue
) – values to be added to the buffer - propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- values (
-
append_value_buffer
(value, idx=None, propagate=1)[source]¶ Extend value buffer with new values assigning them consecutive indexes starting with idx. If idx is omitted, then the new value will be added with right after the last value in the buffer. Also update the read value.
Parameters: - value (
SardanaValue
) – value to be added to the buffer - propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- value (
-