yaq/traits/is-discrete


The is-discrete trait is used for hardware that has a countable number of discrete positions, each with a unique identifier. This trait requires the has-position trait, and discrete hardware must support all of the 'normal' methods such as set_position and get_destination. Hardware with this trait simply offer an additional identifier mapping on top of the existing position and destination behavior. A convinience method 'set_identifier' allows clients to provide identifiers instead of raw positions, if desired.

requires

has-position

configuration

Daemons with the is-discrete trait expect the following configuration:

identifiers ({'type': 'map', 'values': 'double'}) default: {}
Position identifiers

state

Daemons with the is-discrete trait will provide the following state information:

position_identifier (['null', 'string'])
Current position identifier.

messages

Daemons with the is-discrete trait expose the following public messages:

get_position_identifiers ➜ {'type': 'map', 'values': 'double'}
Get position identifiers. Identifiers may not change at runtime.

get_position_identifier_options ➜ {'type': 'array', 'items': 'string'}
Get position identifier names. Identifiers may not change at runtime.

set_identifier ➜ double
Set using an identifier. Returns new destination.
parameters:

identifier (string)

get_identifier ➜ ['null', 'string']
Get current identifier string. Current identifier may be None.

daemons

The following daemons implement the is-discrete trait:

fake-discrete-hardware
gpio-digital-output
kd-scientific-legato100
labjack-digital-output
lightcon-topas4-motor
lightcon-topas4-shutter
new-era-continuous-nextgen
scpi-set-discrete
vici-two-position
wright-filter-wheel
wright-stepper-box


built 2024-02-09 01:44:16                                      CC0: no copyright