Skip to content

Commit

Permalink
new daemon mcc-ulw-sensor (#82)
Browse files Browse the repository at this point in the history
* new daemon mcc-ulw-sensor

* avpr
  • Loading branch information
untzag authored Sep 1, 2023
1 parent 95075e4 commit b3b7a45
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 0 deletions.
265 changes: 265 additions & 0 deletions daemons/mcc-ulw-sensor.avpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
{
"config": {
"channels": {
"type": "map",
"values": "channel"
},
"enable": {
"default": true,
"doc": "Disable this daemon. The kind entry-point will not attempt to start this daemon.",
"origin": "is-daemon",
"type": "boolean"
},
"log_level": {
"default": "info",
"doc": "Set daemon log-level.",
"origin": "is-daemon",
"type": {
"name": "level",
"symbols": [
"debug",
"info",
"notice",
"warning",
"error",
"critical",
"alert",
"emergency"
],
"type": "enum"
}
},
"log_to_file": {
"default": false,
"doc": "Optionally force logging to a file.",
"origin": "is-daemon",
"type": "boolean"
},
"loop_at_startup": {
"default": false,
"doc": "If set to true, the daemon will begin to loop measure as soon as it starts.",
"origin": "has-measure-trigger",
"type": "boolean"
},
"make": {
"default": null,
"origin": "is-daemon",
"type": [
"null",
"string"
]
},
"model": {
"default": null,
"origin": "is-daemon",
"type": [
"null",
"string"
]
},
"port": {
"doc": "TCP port for daemon to occupy.",
"origin": "is-daemon",
"type": "int"
},
"serial": {
"default": null,
"doc": "Serial number for the particular device represented by the daemon",
"origin": "is-daemon",
"type": [
"null",
"string"
]
}
},
"doc": "",
"hardware": [
"mccdaq:mcc-usb-205"
],
"installation": {
"PyPI": "https://pypi.org/project/yaqd-mcc"
},
"links": {
"bugtracker": "https://github.com/yaq-project/yaqd-mcc/-/issues",
"source": "https://github.com/yaq-project/yaqd-mcc"
},
"messages": {
"busy": {
"doc": "Returns true if daemon is currently busy.",
"origin": "is-daemon",
"request": [],
"response": "boolean"
},
"get_channel_names": {
"doc": "Get current channel names.",
"origin": "is-sensor",
"request": [],
"response": {
"items": "string",
"type": "array"
}
},
"get_channel_shapes": {
"doc": "Get current channel shapes. If list is empty, channel is scalar.",
"origin": "is-sensor",
"request": [],
"response": {
"type": "map",
"values": {
"items": "int",
"type": "array"
}
}
},
"get_channel_units": {
"doc": "Get current channel units.",
"origin": "is-sensor",
"request": [],
"response": {
"type": "map",
"values": [
"null",
"string"
]
}
},
"get_config": {
"doc": "Full configuration for the individual daemon as defined in the TOML file.\nThis includes defaults and shared settings not directly specified in the daemon-specific TOML table.\n",
"origin": "is-daemon",
"request": [],
"response": "string"
},
"get_config_filepath": {
"doc": "String representing the absolute filepath of the configuration file on the host machine.\n",
"origin": "is-daemon",
"request": [],
"response": "string"
},
"get_measured": {
"doc": "Returns map of channel_name to measured_value. Always returns additional key measurement_id.",
"origin": "is-sensor",
"request": [],
"response": {
"type": "map",
"values": [
"int",
"double",
"ndarray"
]
}
},
"get_measurement_id": {
"doc": "Get current measurement_id. Clients are encouraged to watch for this to be updated before calling get_measured to get entire measurement.",
"origin": "is-sensor",
"request": [],
"response": {
"type": "int"
}
},
"get_state": {
"doc": "Get version of the running daemon",
"origin": "is-daemon",
"request": [],
"response": "string"
},
"id": {
"doc": "JSON object with information to identify the daemon, including name, kind, make, model, serial.\n",
"origin": "is-daemon",
"request": [],
"response": {
"type": "map",
"values": [
"null",
"string"
]
}
},
"measure": {
"doc": "Initiate a measurement. Returns integer, measurement ID.",
"origin": "has-measure-trigger",
"request": [
{
"default": false,
"name": "loop",
"type": "boolean"
}
],
"response": "int"
},
"shutdown": {
"doc": "Cleanly shutdown (or restart) daemon.",
"origin": "is-daemon",
"request": [
{
"default": false,
"name": "restart",
"type": "boolean"
}
],
"response": "null"
},
"stop_looping": {
"doc": "Stop looping measurement.",
"origin": "has-measure-trigger",
"request": [],
"response": "null"
}
},
"protocol": "mcc-ulw-sensor",
"requires": [],
"state": {},
"traits": [
"has-measure-trigger",
"is-daemon",
"is-sensor"
],
"types": [
{
"fields": [
{
"default": true,
"name": "enabled",
"type": "boolean"
},
{
"default": false,
"name": "invert",
"type": "boolean"
},
{
"doc": "Physical index of channel.",
"name": "index",
"type": "int"
}
],
"name": "channel",
"type": "record"
},
{
"fields": [
{
"name": "shape",
"type": {
"items": "int",
"type": "array"
}
},
{
"name": "typestr",
"type": "string"
},
{
"name": "data",
"type": "bytes"
},
{
"name": "version",
"type": "int"
}
],
"logicalType": "ndarray",
"name": "ndarray",
"type": "record"
}
]
}
4 changes: 4 additions & 0 deletions known-hardware.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ links.manufacturer = "https://lightcon.com/product/orpheus-twins-opa/"

[mccdaq]

[mccdaq.mcc-usb-205]
doc = "Multifunction USB DAQ Device"
links.manufacturer = "https://digilent.com/shop/mcc-usb-200-series-single-gain-multifunction-usb-daq-devices/"

[mccdaq.mcc118]
doc = "Voltage Measurement DAQ HAT for Raspberry Pi"
links.manufacturer = "https://www.mccdaq.com/DAQ-HAT/MCC-118.aspx"
Expand Down

0 comments on commit b3b7a45

Please sign in to comment.