uavcan

0.4.0 • Public • Published

uavcan

NPM version build status Test coverage David deps npm download

Description

This library contains many utilities allowing to use the UAVCAN protocol directly in javascript.

An example of implementation is available in the project: https://github.com/octanis-instruments/slcan

Here are the various utilities that are available:

  • Data:
    • Data: a class that allows to deal with UAVCAN data object. It will convert a javascript object to a byte array and the opposite based on the dataTypeID and isService / isRequest flags
    • DataTypesManager: helper to convert dataTypeID to fullDataTypeID and retrieve information about a specific dataTypeFullID
    • dataTypes: a json containing the description of all the data types
  • Transport:
    • getFrames: Convert a byte array in frames that can be send with the adapter
    • parseFrame: Parse the received frame
    • Node: a class that corresponds to a Node on the can bus that will receive and send frames. It belongs to a specific Adapter that connects the CAN bus to the computer
    • DefaultAdapter: A basic implementation of an adapter that should be extended in order to implement a connection between the computer and the CAN bus. This adapter implements EventEmitter and will generate events for frame (RX and TX) as well as data when the frames are assemble and a new valid data is received.
  • Utilities
    • bytesToHex: converts an array of bytes to an hexadecimal string
    • hexToBytes: converts an hexadecimal string to an array of bytes

Installation

$ npm install uavcan

API Documentation

Example

 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i uavcan

Weekly Downloads

18

Version

0.4.0

License

MIT

Unpacked Size

271 kB

Total Files

69

Last publish

Collaborators

  • bitmorse
  • lpatiny