artnet: send universe id in packet header
This commit is contained in:
parent
c0b9b9b7b4
commit
2ef2a5ab84
1 changed files with 8 additions and 4 deletions
|
@ -6,15 +6,18 @@ function EnttecODE(device_id, options) {
|
|||
var self = this
|
||||
|
||||
self.header = new Buffer([65, 114, 116, 45, 78, 101, 116, 0, 0, 80, 0, 14])
|
||||
self.sequence = self.physical = new Buffer([0])
|
||||
self.length = new Buffer([0x02,0x00])
|
||||
self.sequence = new Buffer([0])
|
||||
self.physical = new Buffer([0])
|
||||
self.universe_id = new Buffer([0x00, 0x00])
|
||||
self.length = new Buffer([0x02, 0x00])
|
||||
|
||||
this.universe = new Buffer(512)
|
||||
this.universe.fill(0)
|
||||
self.universe = new Buffer(512)
|
||||
self.universe.fill(0)
|
||||
|
||||
self.sleepTime = 24
|
||||
|
||||
options = options || {}
|
||||
self.universe_id.writeInt16BE(options.universe || 0, 0)
|
||||
self.host = device_id || '127.0.0.1'
|
||||
self.port = options.port || 6454
|
||||
self.dev = dgram.createSocket('udp4')
|
||||
|
@ -26,6 +29,7 @@ EnttecODE.prototype.send_universe = function() {
|
|||
this.header,
|
||||
this.sequence,
|
||||
this.physical,
|
||||
this.universe_id,
|
||||
this.length,
|
||||
this.universe
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue