poolpseudocounter

This module is part of the Python Pool library. It defines the PoolPseudoCounter class

Classes

PoolPseudoCounter

Inheritance diagram of PoolPseudoCounter
class PoolPseudoCounter(**kwargs)[source]

Bases: PoolBaseGroup, PoolBaseChannel

A class representing a Pseudo Counter in the Sardana Device Pool

ValueAttributeClass

alias of Value

ValueBufferClass

alias of ValueBuffer

AcquisitionClass = None
serialize(*args, **kwargs)[source]
add_user_element(element, index=None)[source]
on_element_changed(evt_src, evt_type, evt_value)[source]
get_action_cache()[source]

Returns the internal action cache object

set_action_cache(action_cache)[source]
get_siblings()[source]
property siblings

the siblings for this pseudo counter

calc(physical_values=None)[source]
calc_all(physical_values=None)[source]
get_low_level_physical_value_attribute_iterator()[source]
get_physical_value_attribute_iterator()[source]
get_physical_values_attribute_sequence()[source]
get_physical_values_attribute_map()[source]
get_physical_value_buffer_iterator()[source]

Returns an iterator over the value buffer of each user element.

Returns:

an iterator over the value buffer of each user element.

Return type:

iter< SardanaBuffer >

get_physical_values(cache=True, propagate=1)[source]

Get value for underlying elements.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware

  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority

Returns:

the physical value

Return type:

dict <PoolElement, SardanaAttribute >

get_siblings_values(use=None)[source]

Get the last values for all siblings.

Parameters:

use (dict <PoolElement, SardanaValue >) – the already calculated values. If a sibling is in this dictionary, the value stored here is used instead

Returns:

a dictionary with siblings values

Return type:

dict <PoolElement, value(float?) >

get_value(cache=True, propagate=1)[source]

Returns the pseudo counter value.

Parameters:
  • cache (bool) – if True (default) return value in cache, otherwise read value from hardware

  • propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority

Returns:

the pseudo counter value

Return type:

SardanaAttribute

set_value(value, propagate=1)[source]

Starts an acquisition on this channel

Parameters:

value (Number) – the value to count

property value

pseudo counter value

calculate_state_info(status_info=None)[source]

Transforms the given state information. This specific base implementation transforms the given state,status tuple into a state, new_status tuple where new_status is “self.name is state plus the given status. It is assumed that the given status comes directly from the controller status information.

Parameters:

status_info (tuple<State, str>) – given status information [default: None, meaning use current state status.

Returns:

a transformed state information

Return type:

tuple<State, str>

read_state_info(state_info=None)[source]