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

vita

v0.9.3

Published

A wrapper for the libvita library used to control Ansync devices.

Downloads

183

Readme

Vita

JaveScript bindings for libvita. Version 0.9.0

Requirements

Libvita shared library. You can this at Ansync.com.

Installation

npm install vita

Execution

sudo node appName.js

Device Organization

All Libvita devices will have the following organization:

Board  
   |-Property 1  
   |-Property ...  
   |-Property N  
   |  
   |-Group 1  
   |   |-Property 1  
   |   |-Property ...  
   |   |-Property N  
   |   |  
   |   |-Channel 1  
   |   |   |-Property 1  
   |   |   |-Property ...  
   |   |   |-Property N  
   |   |-Channel ...  
   |   |-Channel N  
   |-Group ...  
   |-Group N  
  • Boards represent individual daughter cards that may be attached to a mainboard such as Mersin, Megaboard, or Pizza Slices.
  • Groups represent collections of channels, and map directly to hardware ports on the daughter card.
  • Channels represent the I/O channels on a daughter card. These are semantic channels, and may represent a pin or collection of pins which compose an I/O port. For example, channels on the AN2006 map to pin pairs on the daughter card’s 32-pin header. On AN2053, a channel represents an instance of the motor controller, which maps to two pins and encapsulates several properties and an FPGA.
  • Properties represent the configuration and attributes of their parent. They may be provided by the end user or may be read from hardware. They may be cached in the library or read back live.

API

   var vita = require('vita');
   var board = vita.open('boardName')
   // or
   vita.open('boardname', callback); // callback(err, board)
   
   board.setOutputs(group, channel, data, callback); // callback(err)
   board.getInputs(group, channel, callback); // callback(err, data)
   
   board.setProperty(group, channel, property, data, callback); // callback(err)
   board.requestProperty(group, channel, property, callback); // callback(err, data)
   
   board.startAgent(group, channel, interval, callback); // callback(err, data, agentId)
   board.stopAgent(agentId);
   
   board.close();

Behavior:

Because the Top Level functions are thin wrappers around Library Level functions, the Top Level has no defined behavior of its own. All work is handled at the Library Level

setOutputs: This function will set the outputs on a given group or channel in a device-specific manner. This function is asynchronous.

requestInputs: This function will make an asynchronous request to read back the value for a given group or channel. If given a callback, the callback function must be called when the requested inputs become ready.

setProperty: This function will set a property for the given board/group/channel.

requestProperty: This function will make an asynchronous request to read properties from hardware. The behavior of requestProperty should be effectively identical to that of requestInputs.