yaq/daemons/vici-two-position


bugtracker
source

installation

The vici-two-position daemon can be installed using the following package managers:

PyPI
conda-forge

traits

The vici-two-position daemon is composed of the following traits:

has-position
is-daemon
is-discrete
uses-serial
uses-uart

hardware

The vici-two-position daemon has been tested with the following hardware:

vici/e2ca
vici/edma
vici/eudf

configuration

baud_rate (int)
from uses-uart

device_id (['int', 'null']) default: None
VICI device ID, an integer from 0 to 9. If unspecified, will assume no ID. You must manually program your control modules with IDs, yaq will not attempt to apply IDs.

enable (boolean) default: True
Disable this daemon. The kind entry-point will not attempt to start this daemon.
from is-daemon

identifiers ({'type': 'map', 'values': 'double'}) default: {'A': 0, 'B': 1}
Position identifiers
from is-discrete

interface ({'name': 'interface', 'symbols': ['RS232', 'RS485'], 'type': 'enum'}) default: RS232
VICI uses slightly different commands for RS232 vs RS485. You must tell yaq if you require RS485 style commands.

log_level ({'name': 'level', 'symbols': ['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'], 'type': 'enum'}) default: info
Set daemon log-level.
from is-daemon

log_to_file (boolean) default: False
Optionally force logging to a file.
from is-daemon

make (['null', 'string']) default: None
from is-daemon

model (['null', 'string']) default: None
from is-daemon

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

serial (['null', 'string']) default: None
Serial number for the particular device represented by the daemon
from is-daemon

serial_port (string)
from uses-uart

state

The vici-two-position daemon will provide the following state information:

destination (double)
from has-position

position (double)
from has-position

position_identifier (['null', 'string'])
Current position identifier.
from is-discrete

messages

The vici-two-position daemon will expose the following public messages:

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

direct_serial_write ➜ null
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-serial
parameters:

message (bytes)

get_config ➜ string
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_config_filepath ➜ string
String representing the absolute filepath of the configuration file on the host machine.
from is-daemon

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

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

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

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

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

get_state ➜ string
Get version of the running daemon
from is-daemon

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

id ➜ {'type': 'map', 'values': ['null', 'string']}
JSON object with information to identify the daemon, including name, kind, make, model, serial.
from is-daemon

set_identifier ➜ double
Set using an identifier. Returns new destination.
from is-discrete
parameters:

identifier (string)

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

position (double)

set_relative ➜ double
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 (double)

shutdown ➜ null
Cleanly shutdown (or restart) daemon.
from is-daemon
parameters:

restart (boolean) default: False


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