yaq/daemons/wright-wl-motor


Single axis stepper motor drive built for the purpose of controlling white light delay in an OPA.

external links

source
bugtracker

installation

The wright-wl-motor daemon can be installed using the following package managers:

PyPI

traits

The wright-wl-motor daemon is composed of the following traits:

is-homeable
has-position (from is-homeable)
uses-uart
uses-serial (from uses-uart)
is-daemon

configuration

baudrate () default: 57600

serial_port (string)
from uses-uart

baud_rate (number)
from uses-uart

port (integer)
TCP port for daemon to occupy.
from is-daemon

serial (string) default: NULL
Serial number for the particular device represented by the daemon
from is-daemon

make (String) default: NULL
from is-daemon

model (String) default: NULL
from is-daemon

state

The wright-wl-motor daemon will provide the following state information:

position
type: number
from is-homeablehas-position

destination
type: number
from is-homeablehas-position

methods

Daemons with the wright-wl-motor trait expose the following public methods:

home
Initiates the homing procedure. The daemon will report as busy during the homing procedure. After the homing procedure is complete, the daemon will return to the current destination.
from is-homeable

get_destination ➜ number
Get current daemon destination.
from is-homeablehas-position

get_units ➜ string
Get units of daemon. These units apply to the position and destination fields.
from is-homeablehas-position

get_position ➜ number
Get current daemon position.
from is-homeablehas-position

set_position
Give the daemon a new destination, and begin motion towards that destination.
from is-homeablehas-position
Arguments:

position, {'type': 'number'}

set_relative ➜ number
Give the daemon a new destination relative to its current position. Daemon will immediately begin motion towards new destination. Returns new destination.
from is-homeablehas-position
Arguments:

distance, {'type': 'number'}

direct_serial_write
Expose direct access to the serial port to clients. This should not be encouraged for normal use, but may be very important for debugging. If a device is expected to return data, it should be logged at the INFO level, not returned to the client. This is done to allow long tasks to be run asynchronously, and to explicitly discourage use of this method except when debugging. Setting `busy` to true is encouraged, but individual daemon writers should consider their own use case.
from uses-uartuses-serial
Arguments:

message, {'type': 'string'}

busy ➜ boolean
Returns true if daemon is currently busy.
from is-daemon

id ➜ dictionary
JSON object with information to identify the daemon, including name, kind, make, model, serial.
from is-daemon

get_config_filepath ➜ string
String representing the absolute filepath of the configuration file on the host machine.
from is-daemon

get_config ➜ dictionary
Full configuration for the individual daemon as defined in the TOML file. This includes defaults and shared settings not directly specified in the daemon-specific TOML table.
from is-daemon

get_traits ➜ [string]
Get a full list of the daemon traits.
from is-daemon

get_state ➜ dictionary
Get daemon state, as saved in the state.toml file.
from is-daemon

set_state
Set daemon state. Accepts any subset of the state dictionary, dynamically.
from is-daemon

list_methods ➜ [string]
Get an array of all known public method names.
from is-daemon

shutdown
Cleanly shutdown daemon.
from is-daemon

help ➜ string
If method not given, return a human-readable string with information about the daemon as a whole. If method is given, return a human-readable string with the signature of the method on the first line and a description of the method on subsequent lines. The signature is not specified to be in any particular language. It is intended for usage by humans ONLY.
from is-daemon
Arguments:

method, {'type': 'string'}