npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

epics-ioc-connection

v0.0.10

Published

Forked from [this repo](https://github.com/RobbieClarken/node-epics) but does not have the same signature with the original package.

Downloads

40

Readme

EPICS IOC Connection

Forked from this repo but does not have the same signature with the original package.

This package aims to provide a convenient interface for JS/TS codes to communicate with the EPICS IOCs.

Shipped with types

Author

onichandame

Guide

Pre-requisite

You are assumed to be familiar with the EPICS framework. If not, check the official site and the API docs.

This package is not a traditional JS package which only depends on the JS runtime due to the complexity of the ChannelAccess protocol. It requires the following conditions being met:

  1. an installation of epics base. The development of this package is based on EPICS 3.14.12.8
  2. one of the below env variables set(Check the meaning of them in the official installation guide of EPICS). If none is installed, it will fallback to the binaries shipped in clibs directory, which will not be guaranteed to work in your environment.
    • LIBCA_PATH
    • EPICS_BASE and EPICS_HOST_ARCH

Installation

yarn add epics-ioc-connection
# or
npm i epics-ioc-connection

Usage

import { CA } from 'epics-ioc-connection'

(async () => {
  // self-managed channel
  const channel = await CA.connect('rootHost:ai1')
    // get once
  channel.get()
    .then(value => console.log(value))
    // put once
    .then(channel.put(4))
    .then(() => console.log('pushed value to channel'))
    // get new value when value changes
    .then(channel.monitor)
    .then(() => {
      channel.on('value', value => console.log(value))
    })
    // disconnect
  setTimeout(channel.disconnect, 5000)

  // managed methods
    // get once
  console.log(await CA.get('rootHost:ai1'))
    // put once
  try {
    await CA.put('rootHost:ai1', 3)
  } catch(e) {
    console.error(`put failed due to ${e}`)
  }
})()

LICENSE

MIT

Roadmap

  • add counter to channel
  • separate types of dependencies to DefinitelyTyped
  • test caget/caput/camonitor
  • implement ca using napi
  • implement ca using pure ts
  • write unit test(after previous)