Skip to content

Commit

Permalink
add kd-scientific (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
untzag authored Dec 19, 2023
1 parent db36880 commit 699e14f
Show file tree
Hide file tree
Showing 3 changed files with 346 additions and 0 deletions.
333 changes: 333 additions & 0 deletions daemons/kd-scientific-legato100.avpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,333 @@
{
"config": {
"baud_rate": {
"default": 115200,
"origin": "uses-uart",
"type": "int"
},
"enable": {
"default": true,
"doc": "Disable this daemon. The kind entry-point will not attempt to start this daemon.",
"origin": "is-daemon",
"type": "boolean"
},
"identifiers": {
"default": {
"infusing": 1,
"paused": 0
},
"doc": "Position identifiers",
"origin": "is-discrete",
"type": {
"type": "map",
"values": "double"
}
},
"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"
},
"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"
]
},
"serial_port": {
"origin": "uses-uart",
"type": "string"
}
},
"doc": "",
"hardware": [
"kd-scientific:legato100"
],
"installation": {
"PyPI": "https://pypi.org/project/yaqd-kd-scientific",
"conda-forge": "https://anaconda.org/conda-forge/yaqd-kd-scientific"
},
"links": {
"bugtracker": "https://github.com/yaq-project/yaqd-kd-scientific/-/issues",
"source": "https://github.com/yaq-project/yaqd-kd-scientific"
},
"messages": {
"busy": {
"doc": "Returns true if daemon is currently busy.",
"origin": "is-daemon",
"request": [],
"response": "boolean"
},
"direct_serial_write": {
"doc": "Expose direct access to the serial port to clients.\n\nThis should not be encouraged for normal use, but may be very important for debugging.\nIf a device is expected to return data, it should be logged at the INFO level, not returned to the client.\nThis is done to allow long tasks to be run asynchronously, and to explicitly discourage use of this method except when debugging.\nSetting `busy` to true is encouraged, but individual daemon writers should consider their own use case.\n",
"origin": "uses-serial",
"request": [
{
"name": "message",
"type": "bytes"
}
],
"response": "null"
},
"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_destination": {
"doc": "Get current daemon destination.",
"origin": "has-position",
"request": [],
"response": "double"
},
"get_identifier": {
"doc": "Get current identifier string. Current identifier may be None.",
"origin": "is-discrete",
"request": [],
"response": [
"null",
"string"
]
},
"get_position": {
"doc": "Get current daemon position.",
"origin": "has-position",
"request": [],
"response": "double"
},
"get_position_identifier_options": {
"doc": "Get position identifier names. Identifiers may not change at runtime.",
"origin": "is-discrete",
"request": [],
"response": {
"items": "string",
"type": "array"
}
},
"get_position_identifiers": {
"doc": "Get position identifiers. Identifiers may not change at runtime.",
"origin": "is-discrete",
"request": [],
"response": {
"type": "map",
"values": "double"
}
},
"get_state": {
"doc": "Get version of the running daemon",
"origin": "is-daemon",
"request": [],
"response": "string"
},
"get_units": {
"doc": "Get units of daemon. These units apply to the position and destination properties.",
"origin": "has-position",
"request": [],
"response": [
"null",
"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"
]
}
},
"set_identifier": {
"doc": "Set using an identifier. Returns new destination.",
"origin": "is-discrete",
"request": [
{
"name": "identifier",
"type": "string"
}
],
"response": "double"
},
"set_position": {
"doc": "Give the daemon a new destination, and begin motion towards that destination.",
"origin": "has-position",
"request": [
{
"name": "position",
"type": "double"
}
],
"response": "null"
},
"set_relative": {
"doc": "Give the daemon a new destination relative to its current position. Daemon will immediately begin motion towards new destination. Returns new destination.",
"origin": "has-position",
"request": [
{
"name": "distance",
"type": "double"
}
],
"response": "double"
},
"shutdown": {
"doc": "Cleanly shutdown (or restart) daemon.",
"origin": "is-daemon",
"request": [
{
"default": false,
"name": "restart",
"type": "boolean"
}
],
"response": "null"
}
},
"properties": {
"destination": {
"control_kind": "hinted",
"dynamic": true,
"getter": "get_destination",
"limits_getter": null,
"options_getter": null,
"record_kind": "data",
"setter": "set_position",
"type": "double",
"units_getter": "get_units"
},
"position": {
"control_kind": "hinted",
"dynamic": true,
"getter": "get_position",
"limits_getter": null,
"options_getter": null,
"record_kind": "data",
"setter": null,
"type": "double",
"units_getter": "get_units"
},
"position_identifier": {
"control_kind": "hinted",
"dynamic": true,
"getter": "get_identifier",
"limits_getter": null,
"options_getter": "get_position_identifier_options",
"record_kind": "data",
"setter": "set_identifier",
"type": "string",
"units_getter": null
}
},
"protocol": "kd-scientific-legato100",
"requires": [],
"state": {
"destination": {
"default": NaN,
"origin": "has-position",
"type": "double"
},
"position": {
"default": NaN,
"origin": "has-position",
"type": "double"
},
"position_identifier": {
"default": null,
"doc": "Current position identifier.",
"origin": "is-discrete",
"type": [
"null",
"string"
]
}
},
"traits": [
"has-position",
"is-daemon",
"is-discrete",
"uses-serial",
"uses-uart"
],
"types": [
{
"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"
}
]
}
6 changes: 6 additions & 0 deletions known-hardware.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ links.manufacturer = "https://www.horiba.com/int/scientific/products/detail/acti
doc = "Visible Single-Photon Detector. Used for Time Correlated Single Photon Counting via Becker-Hickl SPC-130."
links.manufacturer = "https://www.idquantique.com/quantum-sensing/products/id100/"

[kd-scientific]

[kd-scientific.legato100]
doc = "Infuse only single syringe pump."
links.manufacturer = "https://www.kdscientific.com/legato-100-syringe-pump.html"

[labjack]

[labjack.t4]
Expand Down
7 changes: 7 additions & 0 deletions known-packages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ badges = [
"<a href='https://anaconda.org/conda-forge/yaqd-horiba'><img src='https://img.shields.io/conda/vn/conda-forge/yaqd-horiba'></a>",
]

[daemons.yaqd-kd-scientific]
badges = [
"<a href='https://github.com/yaq-project/yaqd-kd-scientific'><img src='https://img.shields.io/github/checks-status/yaq-project/yaqd-kd-scientific/main'></a>",
"<a href='https://pypi.org/project/yaqd-kd-scientific'><img src='https://img.shields.io/pypi/v/yaqd-kd-scientific'></a>",
"<a href='https://anaconda.org/conda-forge/yaqd-kd-scientific'><img src='https://img.shields.io/conda/vn/conda-forge/yaqd-kd-scientific'></a>",
]

[daemons.yaqd-labjack]
badges = [
"<a href='https://github.com/yaq-project/yaqd-labjack/actions'><img src='https://img.shields.io/github/checks-status/yaq-project/yaqd-labjack/main'></a>",
Expand Down

0 comments on commit 699e14f

Please sign in to comment.