2013-11-17 00:41:27 +00:00
|
|
|
"use strict"
|
|
|
|
|
|
|
|
function Null(device_id, cb) {
|
|
|
|
var self = this
|
|
|
|
cb = cb || function() {}
|
|
|
|
this.universe = new Buffer(512)
|
|
|
|
this.universe.fill(0)
|
|
|
|
}
|
2012-09-02 12:36:08 +00:00
|
|
|
|
2013-11-17 00:41:27 +00:00
|
|
|
Null.prototype.update = function(u) {
|
|
|
|
for(var c in u) {
|
|
|
|
this.universe[c] = u[c]
|
2012-09-02 12:36:08 +00:00
|
|
|
}
|
2013-11-17 00:41:27 +00:00
|
|
|
console.log(this.universe)
|
|
|
|
}
|
2012-09-08 12:43:04 +00:00
|
|
|
|
2014-04-24 17:53:07 +00:00
|
|
|
Null.prototype.updateAll = function(v){
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2013-11-17 00:41:27 +00:00
|
|
|
Null.prototype.get = function(c) {
|
|
|
|
return this.universe[c]
|
2012-09-02 12:36:08 +00:00
|
|
|
}
|
2013-11-17 00:41:27 +00:00
|
|
|
|
|
|
|
module.exports = Null
|