smart-bus-mrgadget
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -42,2 +42,11 @@ var url = require('url'); | ||
Bus.prototype.createDevice = function(address, id) { | ||
var subnet = address; | ||
if (typeof address === 'number') address = address + '.' + id; | ||
else subnet = subnet.split('.'), id = subnet[1], subnet = subnet[0]; | ||
return new Device(this, subnet, id); | ||
} | ||
/** | ||
@@ -94,3 +103,3 @@ * Return device object by its address | ||
var command = new Command(code, { | ||
sender: this, | ||
sender: sender, | ||
target: target, | ||
@@ -97,0 +106,0 @@ |
@@ -1436,2 +1436,10 @@ var word = { | ||
0x1604: { | ||
parse: function(buffer) { | ||
return null; | ||
}, | ||
encode: function(data) { | ||
return new Buffer([]); | ||
}, | ||
response: 0x1605 | ||
@@ -1438,0 +1446,0 @@ }, |
{ | ||
"name": "smart-bus-mrgadget", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Node.js implementation of HDL SmartBus protocol [Fork of smart-bus]", |
102830
3071