yaq/daemons/mcp9600


MCP9600 thermocouple measurement IC.

external links

repository
bugtracker
manufacturer

traits

The mcp9600 daemon is composed of the following traits:

is-sensor
uses-i2c
uses-serial (from uses-i2c)
is-daemon

configuration

i2c_addr (integer)
I2C bus address.
from uses-i2c

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

methods

Daemons with the mcp9600 trait expose the following public methods:

measure ➜ number
Initiate a measurement. Returns integer, measurement ID.
from is-sensor
Arguments:

loop, {'type': 'boolean'}

get_measured ➜ dictionary name: value
Get most recent measured value. Additional key of measurement ID.
from is-sensor

stop_looping
Stop looping measurement.
from is-sensor

get_channel_names ➜ list of string
Get current channel names.
from is-sensor

get_channel_shapes ➜ dictionary name: list of int
Get current channel shapes. If list is empty, channel is scalar.
from is-sensor

get_channel_units ➜ dictionary name: units
Get current channel units.
from is-sensor

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-i2cuses-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'}