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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jscifx

v1.0.4

Published

Hilscher CifX Driver Wrapper for NodeJS

Readme

🚀 jscifx

A TypeScript/JavaScript API for controlling Hilscher CIFX cards.

npm version NPM Downloads GitHub issues GitHub stars GitHub contributors

📝 Overview

This package provides a simple interface for communicating with Hilscher CIFX cards in Node.js. It enables sending and receiving process data as well as managing the cards via a modern API.

✨ Features

  • ⚡ Easy initialization and management of CIFX cards
  • 🔄 Send and receive IO data
  • 🧩 Support for multiple cards and channels
  • 🛡️ Includes TypeScript type definitions

📦 Installation

Note: This package requires cifx drivers to be installed.
More information can be found in the Hilscher documentation.

npm install jscifx

📚 Documentation

CifX

Static class for initializing, deinitializing, and managing the CifX driver. Ensures the driver is set up before use and provides access to the Driver class.

Main Methods:

  • CifX.init(): Initializes the driver. Throws if already initialized.
  • CifX.deinit(): Deinitializes the driver. Throws if not initialized.
  • CifX.openDriver(): Opens the driver and returns a Driver instance.
  • CifX.initialized: Returns true if the driver is initialized.

Example:

import {CifX} from "jscifx";

CifX.init();
const driver = CifX.openDriver();
// ... use driver
driver.close();
CifX.deinit();

Driver

Represents an open handle to the CifX driver. Allows querying driver information and enumerating connected boards.

Main Methods & Properties:

  • driver.version: Returns the driver version string.
  • driver.boardCount: Number of available boards.
  • driver.getBoard(index): Returns a Board instance for the given index.
  • driver.enumerateBoards(): Generator to iterate over all boards.
  • driver.close(): Closes the driver handle.

Example:

for (const board of driver.enumerateBoards()) {
	console.log(board.name);
}

Board

Represents a hardware board managed by the driver. Provides access to board information and its communication channels.

Main Methods & Properties:

  • board.name: Name of the board.
  • board.channelCount: Number of channels on the board.
  • board.getChannel(index): Returns a Channel instance.
  • board.enumerateChannels(): Generator to iterate over all channels.

Example:

const board = driver.getBoard(0);
for (const channel of board.enumerateChannels()) {
	console.log(channel.firmware);
}

Channel

Represents a communication channel on a board. Supports opening/closing, managing bus/host state, and I/O operations.

Main Methods & Properties:

  • channel.open() / channel.close(): Open/close the channel.
  • channel.openBus() / channel.closeBus(): Open/close the bus for communication.
  • channel.startHost() / channel.stopHost(): Set host state.
  • channel.ioWrite(area, offset, data, timeout?): Write data to I/O area.
  • channel.ioRead(area, offset, length, timeout?): Read data from I/O area.
  • channel.firmware: Firmware name of the channel.

Example:

const channel = board.getChannel(0);
channel.open();
channel.startHost();
channel.openBus();
channel.ioWrite(0, 0, Buffer.from([1, 2, 3]));
const data = channel.ioRead(0, 0, 3);
channel.closeBus();
channel.stopHost();
channel.close();

General Notes:

  • Always call CifX.init() before using any driver functionality and CifX.deinit() when done.
  • Use try/catch to handle CifXError exceptions.
  • The API is synchronous and throws on errors.
  • All resources (driver, channels) should be closed after use to avoid leaks.

🛠️ Support

If you have questions or issues, please open an issue.

📄 License

MIT