solid_attenuator.util

Functions

alarm_if(data, condition, status[, severity])

Set an alarm if the condition is met - otherwise NO_ALARM.

block_on_reentry([token])

[Decorator] If an asynchronous handler is called multiple times, block.

config_logging(logger[, file, datefmt, …])

Add a new handler to the logger.

get_default_thread_context()

Get a shared caproto threading client context.

hack_max_length_of_channeldata(channeldata, …)

Force in a maximum length value.

int_array_to_bit_string(int_array)

Integer array such as [1, 0, 0, 0] to integer (8).

monitor_pvs(*pv_names, async_lib[, context, …])

Monitor pv_names asynchronously, yielding events as they happen. Parameters ———- *pv_names : str PV names to monitor. async_lib : caproto.server.AsyncLibraryLayer The async library layer shim to get compatible classes from. context : caproto.threading.client.Context The threading context to use. data_type : {‘time’, ‘control’, ‘native’} The subscription type. Yields ——- event : {‘subscription’, ‘connection’} The event type. context : str or Subscription For a ‘connection’ event, this is the PV name. For a ‘subscription’ event, this is the Subscription instance. data : str or EventAddResponse For a ‘subscription’ event, the EventAddResponse holds the data and timestamp. For a ‘connection’ event, this is one of {'connected',     'disconnected'}.

process_writes_value(pvprop, *[, value])

When .PROC is changed, write the value value to the pvproperty.

Classes

State(value)

State which matches that of the motion IOC.

Exceptions

MisconfigurationError

Misconfiguration blocks the calculation from continuing.