streamdevice

Generate EPICS StreamDevice .proto and .db definitions for byte-stream devices.

1|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/BCDA-APS/opencode-skills --skill streamdevice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streamdevice
Source: https://github.com/BCDA-APS/opencode-skills/tree/main/streamdevice
Command: npx skills add https://github.com/BCDA-APS/opencode-skills --skill streamdevice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing EPICS StreamDevice support often requires careful, error-prone formatting of byte-stream commands and record link strings, especially when devices use serial/TCP/GPIB protocols and non-trivial reply parsing.

Core Features & Use Cases

  • Protocol authoring (.proto): Define linear request/reply sequences for byte-stream devices using StreamDevice syntax, including timeouts, terminators, and error handlers.
  • Database record authoring (.db): Create EPICS records that use DTYP = "stream" and reference protocol blocks via INP/OUT link formats.
  • Robust parsing with format converters: Use StreamDevice converters for numeric, string, raw binary, regex-based extraction, checksums, and timestamp handling, with record field redirection and array parsing patterns.

Quick Start

Use the streamdevice skill to draft a StreamDevice .proto protocol and matching EPICS .db records for a device command/response pair over your configured bus (serial, TCP/IP, or GPIB).

Frequently Asked Questions about streamdevice

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate EPICS StreamDevice protocol files for serial devices?

To generate StreamDevice protocol files, define linear request/reply sequences for byte-stream devices using .proto syntax, including timeouts, terminators, and error handlers for serial, TCP/IP, or GPIB buses.

How do I write EPICS database records that use StreamDevice for device communication?

EPICS database records use DTYP = "stream" and reference protocol blocks via INP/OUT link formats. The generated .db files bind record fields to byte-stream command sequences and format converter parsing rules.

Can I parse raw binary and regex replies in StreamDevice format converters?

StreamDevice format converters support numeric, string, raw binary, regex-based extraction, checksums, and timestamp handling. They manage record field redirection, array parsing, and %r precision versus width specifications.

What is the correct syntax for StreamDevice protocol arguments and exception handling?

StreamDevice protocol arguments use $1-$9 syntax for variable substitution within command sequences. Exception handlers are defined within protocol blocks to manage error conditions, ensuring robust byte-stream communication parsing.

Does StreamDevice support GPIB and TCP/IP buses or only serial connections?

StreamDevice supports byte-stream devices across serial, TCP/IP, and GPIB buses. Protocol definitions and record links are generated to handle command/response pairs over any configured bus interface.

How do I handle array elements and checksums in StreamDevice protocol parsing?

StreamDevice handles array elements and checksums using pseudo-converters within format converter rules. These parse multi-value replies and validate data integrity across byte-stream device responses.