yaq/traits/is-discrete


requires

has-position

configuration

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

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

state

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

position_identifier (['null', 'string'])

position (float)
from has-position

destination (float)
from has-position

messages

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

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

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

identifier (string)

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

get_destination ➜ float
Get current daemon destination.
from has-position

get_units ➜ ['null', 'string']
Get units of daemon. These units apply to the position and destination fields.
from has-position

get_position ➜ float
Get current daemon position.
from has-position

set_position
Give the daemon a new destination, and begin motion towards that destination.
from has-position
parameters:

position (float)

set_relative ➜ float
Give the daemon a new destination relative to its current position. Daemon will immediately begin motion towards new destination. Returns new destination.
from has-position
parameters:

distance (float)

daemons

The following daemons implement the is-discrete trait:

fake-discrete-hardware
gpio-digital-output
lightcon-topas4-shutter


built 2020-08-18 17:11:11                                      CC0: no copyright