dragonfly.implementations.step_attenuator module

Some template vars

Members: StepAttenuator Functions: Classes:

Summary

class dragonfly.implementations.step_attenuator.StepAttenuator(file_name='/tmp/step_atten.txt', min_value=0, max_value=63, spi_clock=1000000, **kwargs)

Bases: dragonfly.implementations.step_attenuator.StepAttenuator

Keyword Arguments:
 
  • log_on_set (bool) – flag to enable logging the new value whenever a new one is set
  • max_interval (float) – If > 0, any log event exceding this number of seconds since the last broadcast will trigger a broadcast.
  • max_fractional_change (float) – If > 0, any log event which produces a value which differs from the previous value by more than this amount (expressed as a fraction, ie 10% change is 0.1) will trigger a broadcast
  • alert_routing_key (str) – routing key for the alert message send when broadcasting a logging event result. The default value of ‘sensor_value’ is valid for DataLoggers which represent physical quantities being stored to the slow controls database tables
  • name (str) – unique identifier across all dripline services (used to determine routing key)
  • calibration (str||dict) – string use to process raw get result (with .format(raw)) or a dict to use for the same purpose where raw must be a key
  • get_on_set (bool) – flag to toggle running ‘on_get’ after each ‘on_set’
  • schedule_interval (float) – time in seconds between scheduled events
handle_request(channel, method, properties, request)
is_locked
lock(lockout_key=None, *args, **kwargs)
lockout_key
log_interval
log_on_set
logging_status
max_fractional_change
max_interval
on_cmd(*args, **kwargs)

WARNING! if you override this method, you must ensure you deal with lockout properly

on_config(attribute, value=None)

configure a property again

WARNING! if you override this method, you must ensure you deal with lockout properly

on_get(*args, **kwargs)
on_set(value)
ping(*args, **kwargs)

ignore all details and respond with an empty message

schedule_interval
schedule_status
scheduled_action()

Override Scheduler method with Spime-specific get and log

set_condition(*args, **kwargs)

To actually do something inside a class, the set_condition should be implemented in the class itself.

single_schedule(delay)
store_value(severity)

This method automatically overridden in Spimescape add_endpoint

unlock(*args, **kwargs)

End of modules condition

Data:

End of data condition