asyn-port-driver

Implement asynPortDriver-based EPICS device drivers with parameter interfaces and callbacks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement EPICS device drivers by defining how to create and wire an asynPortDriver subclass so records can reliably read/write device parameters, support I/O Intr scanning, and publish updates.

Core Features & Use Cases

  • Parameter library setup: Create typed parameters that map cleanly to record INP/OUT links via createParam() and setXxxParam() helpers.
  • Correct callback behavior: Ensure updates propagate by calling callParamCallbacks() after scalar/string parameter changes and using explicit doCallbacksXxxArray() for array data.
  • Production-ready driver structure: Cover interface/interrupt masks, virtual method overrides (read/write for multiple DBR types), background polling patterns with proper locking, and iocsh/DBD registration.
  • Alarms, tracing, and lifecycle: Show how to set parameter status/alarm severity, add asynPrint tracing, and implement shutdown/destructor patterns for clean stopping.

Quick Start

Ask the AI to generate a minimal C++ asynPortDriver skeleton for a new IOC driver that defines parameters, overrides the necessary read/write virtual methods, signals a polling thread, calls the correct callbacks, and registers an iocsh configure function plus the required DBD registrar entry.

Frequently Asked Questions about asyn-port-driver

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

FAQPage Schema
How do I implement an EPICS device driver using asynPortDriver?

To implement an EPICS asynPortDriver device driver, define typed parameters with createParam(), override virtual read/write methods, and manage update propagation through callParamCallbacks() for I/O Intr scanning and synchronous I/O.

How do I set up I/O Intr scanning and callbacks for array parameters in asyn?

For array parameters in asyn, call explicit doCallbacksXxxArray() functions to publish updates, while using callParamCallbacks() for scalar and string parameters to ensure correct I/O Intr scanning propagation.

What's the best way to structure a polling thread in an asynPortDriver subclass?

Structure a polling thread in an asynPortDriver subclass by using thread-safe background polling with proper lock() and unlock() calls to protect parameter access and ensure update propagation across scalar, string, and array parameters.

How do I select interfaceMask and interruptMask for EPICS asyn parameters?

Select interfaceMask and interruptMask in EPICS asyn parameters to define which asyn interfaces records use for read/write operations and which support I/O Intr callbacks, ensuring correct mapping to record INP/OUT links.

Do I need iocsh and DBD registration to deploy an asynPortDriver in an EPICS IOC?

Yes, you need iocsh and DBD registration to deploy an asynPortDriver in an EPICS IOC, requiring an iocsh configure function and a DBD registrar entry to properly load and initialize the driver.

How do I handle alarms and tracing in an EPICS asyn device driver?

Handle alarms and tracing in an EPICS asyn device driver by setting parameter status and alarm severity via setParamStatus(), using asynPrint for tracing, and implementing shutdown and destructor patterns for clean stopping.