Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jcoreio/iron-pi-ipc-codec

Package Overview
Dependencies
Maintainers
11
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jcoreio/iron-pi-ipc-codec

Encodes and decodes SPI bus messages exchanged with the Iron Pi

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
11
Created
Source

Iron Pi IPC Codec

Encodes and decodes messages exchanged over UNIX sockets with the Iron Pi SPI handler

Getting Started

npm install --save @jcoreio/iron-pi-ipc-codec

Example


import IronPiIPCCodec from './index'
import type {SetOutputs} from './index'

const codec: IronPiIPCCodec = new IronPiIPCCodec()

const setOutputs: SetOutputs = {
  outputs: [
    {
      address: 1,
      levels: [true, false, true, false],
    },
    {
      address: 2,
      levels: [true, true, true, true, false, false, false, false],
    }
  ]
}
const buf: Buffer = codec.encodeSetOutputs(setOutputs)
const msgOut = codec.decodeMessageToDriver(buf)
// msgOut = {setOutputs: {outputs: [ ... ]}}

License

Apache-2.0

Keywords

FAQs

Package last updated on 29 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc