New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can

Package Overview
Dependencies
Maintainers
2
Versions
301
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can - npm Package Compare versions

Comparing version 1.2.5-pre to 1.2.5-pre.0

19

package.json

@@ -8,3 +8,3 @@ {

"description": "A SocketCAN abstraction layer for NodeJS.",
"version": "1.2.5-pre",
"version": "1.2.5-pre.0",
"repository": {

@@ -28,11 +28,2 @@ "type": "git",

"homepage": "https://github.com/sebi2k1/node-can",
"_id": "can@1.2.4",
"_shasum": "ac5c3acb5c2abc4ad8656ba579feb97a872cfbcf",
"_from": "can@1.2.4",
"_npmVersion": "2.1.14",
"_nodeVersion": "0.10.35",
"_npmUser": {
"name": "sebi2k1",
"email": "sebastian@sebastianhaas.info"
},
"maintainers": [

@@ -48,9 +39,3 @@ {

],
"dist": {
"shasum": "ac5c3acb5c2abc4ad8656ba579feb97a872cfbcf",
"tarball": "http://registry.npmjs.org/can/-/can-1.2.4.tgz"
},
"directories": {},
"_resolved": "https://registry.npmjs.org/can/-/can-1.2.4.tgz",
"readme": "ERROR: No README data found!"
"directories": {}
}

@@ -1,62 +0,9 @@

node-can
CanJS
========
This is a NodeJS SocketCAN extension. SocketCAN is a socket-based implementation of the CANbus protocol for Linux system.
This npm package will be for the [CanJS client-side MV* framework](http://canjs.com). It was formerly
the [node-can project](https://github.com/sebi2k1/node-can) which has been moved
to [socketcan](https://www.npmjs.com/package/socketcan). A HUGE thanks to Sebastian Haas for
letting us use the `can` name!
This extensions makes it possible to send and receive CAN messages (extended, remote transission) using simple Javascript functions.
Usage
-----
Basic CAN example:
```javascript
var can = require('can');
var channel = can.createRawChannel("vcan0", true);
// Log any message
channel.addListener("onMessage", function(msg) { console.log(msg); } );
// Reply any message
channel.addListener("onMessage", channel.send, channel);
channel.start();
```
Working with message and signals:
```javascript
var can = require('can');
var fs = require('fs');
// Parse database
var network = can.parseNetworkDescription("samples/can_definition_sample.kcd");
var channel = can.createRawChannel("vcan0");
var db = new can.DatabaseService(channel, network.buses["Motor"].messages);
channel.start();
// Register a listener to get any value changes
db.messages["CruiseControlStatus"].signals["SpeedKm"].onChange(function(s) {
console.log("SpeedKm " + s.value);
}
// Update tank temperature
db.messages["TankController"].signals["TankTemperature"].update(80);
// Trigger sending this message
db.send("TankController");
```
Install
-------
There are two options for installing node-can:
1. Clone / download node-can from [GitHub](https://github.com/sebi2k1/node-can),
then:
node-gyp configure && node-gyp build
2. Install via npm:
npm install socketcan
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