yaq-yeps/302


is-sensor

YEP:302
Title:is-sensor
Authors:Blaise Thompson
Status:draft
Tags:trait
Post-History:2020-04-22, 2020-07-14

Abstract

This YEP defines the is-sensor trait. Daemons implementing this trait make measurements.

Table of Contents

Motivation

Sensors are a core component of the instrumentation ecosystem. The is-sensor trait enforces a consistent interface across all measurement devices.

Proposal

Because this trait has no setters, daemons implementing only this trait should always be busy. Daemons that also implement other traits, e.g. has-measure-trigger, do implement setters and therefore may release busy.

message: get_measured

response: {type: map, values: [float, ndarray]}

Get most recent measured value.

message: get_channel_names

response: {'type': 'array', 'items': 'string'}

Get map of channel names.

message: get_channel_shapes

response: {'type': 'map', 'values': {'type': 'array', 'items': 'int'}}

Get map of current channel shapes. Scalar represented by empty list.

message: get_channel_units

response: {'type': 'map', 'values': ['null', 'string']}

Get current channel units.

Discussion

Discussion can be found on the gitlab issue for this YEP.

Copyright

This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive.


built 2020-10-29 23:33:13                                      CC0: no copyright