dmx-flok/drivers/null.js

25 lines
401 B
JavaScript
Raw Normal View History

"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
Null.prototype.update = function(u) {
for(var c in u) {
this.universe[c] = u[c]
2012-09-02 12:36:08 +00:00
}
console.log(this.universe)
}
2012-09-08 12:43:04 +00:00
Null.prototype.updateAll = function(v){
// TODO
}
Null.prototype.get = function(c) {
return this.universe[c]
2012-09-02 12:36:08 +00:00
}
module.exports = Null