Skip to main content

Uc2 Esp

@vcjdeboer/uc2-espv2026.09.12.4· 1d agoMODELS
01README

Drive a UC2-ESP device from swamp over USB serial and record every exchange as versioned data. One model type, uc2-device, speaks the UC2-ESP task protocol ({task, qid, ...} with ACK, async events and a final DONE correlated by request id) from Diederich et al., J. Microscopy 2026 (doi:10.1111/jmi.70147).

02Models1
@vcjdeboer/uc2-devicev2026.09.12.1uc2_device.ts

Global Arguments

ArgumentTypeDescription
device?stringSerial device path: /dev/cu.usbmodemXXXX on macOS, /dev/ttyACM0 on Linux.
baudnumber
timeoutMsnumberHard cap on waiting for a request's final reply.
idleMsnumberSilence that ends a read burst once bytes have arrived.
settleMsnumberDiscard this many ms of stale bytes after opening the port.
holderbooleanKeep the port open between calls in a detached worker (start with `hold`).
holderIdleTimeoutMsnumber
denoPath?string
fn detect()
List serial device nodes on this host without opening any, and record
fn act(task: string, args: record, timeoutMs?: number)
Run a UC2 ACT endpoint: send {task, qid, ...args}, correlate the board's
ArgumentTypeDescription
taskstringThe ACT endpoint, e.g. /motor_act
argsrecordParameters merged into the request object
timeoutMs?number
fn get(task: string, timeoutMs?: number)
Read a UC2 GET endpoint: send {task, qid} and record the state the board
ArgumentTypeDescription
taskstringThe GET endpoint, e.g. /motor_get
timeoutMs?number
fn listen(timeoutMs?: number)
Listen for unsolicited event lines (JSON with an "event" field and
ArgumentTypeDescription
timeoutMs?numberHow long to listen; defaults to the global timeoutMs
fn hold()
Start a detached worker that keeps the port open between calls
fn release()
Stop the holder: close the port and let the detached worker exit.
03Previous Versions3
2026.09.12.3
2026.09.12.2
2026.09.12.1
04Stats
B
85 / 100
Downloads
0
Archive size
33.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository0/2missing
05Platforms