Comparing version 0.0.4 to 0.0.5
@@ -9,11 +9,7 @@ 'use strict'; | ||
node.on('nodes', data => console.log(data)); | ||
//node.on('nodes', data => data.forEach(node => console.log(JSON.stringify(node, null, 2)))); | ||
//node.start(); | ||
node.start(); | ||
let msg = node.nodeSetName('huhu', 'asd'); | ||
console.log(msg.toString()); | ||
// const Protocol = require('./protocol'); | ||
@@ -20,0 +16,0 @@ |
@@ -7,3 +7,7 @@ 'use strict'; | ||
const ip = require('ip'); | ||
const ESTA = require('./data/esta'); | ||
const OEMList = require('./data/oem.json'); | ||
const DeviceStyles = require('./data/device-styles'); | ||
const PORT = 6454; | ||
@@ -25,2 +29,7 @@ | ||
function getInfoFromOEM(code) { | ||
return OEMList.find(item => parseInt(item.OemCode) === code) || null; | ||
} | ||
module.exports = class ArtNetController extends EventEmitter { | ||
@@ -77,3 +86,7 @@ | ||
} else { | ||
this.nodes[id] = Object.assign({id}, res.data); | ||
let node = this.nodes[id] = Object.assign({id}, res.data); | ||
node.ESTAManufactor = ESTA[node.EstaMan]; | ||
node.OemInfo = getInfoFromOEM(node.Oem); | ||
node.StyleInfo = DeviceStyles[node.Style]; | ||
} | ||
@@ -80,0 +93,0 @@ |
@@ -24,3 +24,3 @@ 'use strict'; | ||
schemaValidation: { | ||
size: Joi.alternatives().try(Joi.number(), Joi.string()), | ||
size: Joi.alternatives().try(Joi.number()), | ||
sizeType: Joi.string().default('uint8') | ||
@@ -64,3 +64,33 @@ }, | ||
{ key: 'SubSwitch', type: 'int8', default: 0 }, | ||
{ key: 'rubbish', type: 'skip', size: 6 }, | ||
// { key: 'OemHi', type: 'uint8' }, | ||
{ key: 'Oem', type: 'uint16be' }, | ||
{ key: 'UbeaVersion', type: 'uint8', default: 0 }, | ||
{ key: 'Status1', type: 'uint8', bits: { | ||
UBEA: { bit: 0, values: ['present', 'notpresentOrCorrupt'] }, | ||
RDM: 1, | ||
bootedFrom: { bit: 2, values: ['ROM', 'Flash']}, | ||
portAddressProgrammingAuthority: { | ||
shift: 4, | ||
size: 2, | ||
default: 'unknown', | ||
values: { | ||
'unknown': 0b00, | ||
'frontPanelControls': 0b01, | ||
'networkOrBrowser': 0b10 | ||
} | ||
}, | ||
mode: { | ||
shift: 6, | ||
size: 2, | ||
default: 'unknown', | ||
values: { | ||
'unknown': 0b00, | ||
'identify': 0b01, | ||
'mute': 0b10, | ||
'normal': 0b11 | ||
} | ||
} | ||
} }, | ||
{ key: 'EstaMan', type: 'uint16le', default: 0 }, | ||
{ key: 'ShortName', type: 'string', size: 18 }, | ||
@@ -70,17 +100,71 @@ { key: 'LongName', type: 'string', size: 64 }, | ||
{ key: 'NumPorts', type: 'uint16be', default: 1 }, | ||
{ key: 'PortTypes', type: 'array', size: 4, default: [0, 0, 0, 0] }, | ||
{ key: 'GoodInput', type: 'array', size: 4, default: [0, 0, 0, 0] }, | ||
{ key: 'GoodOutput', type: 'array', size: 4, default: [0, 0, 0, 0] }, | ||
{ key: 'PortTypes', type: 'array', size: 4, items:{ type: 'uint8', bits: { | ||
output: 7, | ||
input: 6, | ||
protocol: { | ||
shift: 0, | ||
size: 6, | ||
values: { | ||
'DMX': 0b000000, | ||
'MIDI': 0b000001, | ||
'Avab': 0b000010, | ||
'Colortran CMX': 0b000011, | ||
'ADB 62.5': 0b000100, | ||
'Art-Net': 0b000101 | ||
} | ||
} | ||
} } }, | ||
{ key: 'GoodInput', type: 'array', size: 4, items:{ type: 'uint8', bits: { | ||
receiveErrors: 2, | ||
inputDisabled: 3, | ||
includesDmxTextPackets: 4, | ||
includesDmxSIPs: 5, | ||
includesDmxTestPackets: 6, | ||
dataReceived: 7 | ||
}} }, | ||
{ key: 'GoodOutput', type: 'array', size: 4, items:{ type: 'uint8', bits: { | ||
mergeModeLTP: 1, | ||
dmxOutputShortDetect: 2, | ||
mergingArtnetData: 3, | ||
includesDmxTextPackets: 4, | ||
includesDmxSIPs: 5, | ||
includesDmxTestPackets: 6, | ||
dataTransmitted: 7 | ||
}} }, | ||
{ key: 'SwIn', type: 'array', size: 4, default: [0, 0, 0, 0] }, | ||
{ key: 'SwOut', type: 'array', size: 4, default: [0, 0, 0, 0] }, | ||
{ key: 'SwVideo', type: 'int8', default: 0 }, | ||
{ key: 'SwMacro', type: 'int8', default: 0 }, | ||
{ key: 'SwRemote', type: 'int8', default: 0 }, | ||
{ key: 'Spare', type: 'array', size: 3, default: [0, 0, 0] }, | ||
{ key: 'Style', type: 'int8', default: 0 }, | ||
{ key: 'SwVideo', type: 'uint8', default: 0 }, | ||
{ key: 'SwMacro', type: 'uint8', default: 0, bits: { | ||
macro1: 0, | ||
macro2: 1, | ||
macro3: 2, | ||
macro4: 3, | ||
macro5: 4, | ||
macro6: 5, | ||
macro7: 6, | ||
macro8: 7 | ||
} }, | ||
{ key: 'SwRemote', type: 'uint8', default: 0, bits: { | ||
remote1: 0, | ||
remote2: 1, | ||
remote3: 2, | ||
remote4: 3, | ||
remote5: 4, | ||
remote6: 5, | ||
remote7: 6, | ||
remote8: 7 | ||
}}, | ||
{ key: 'Spare', type: 'skip', size: 3 }, | ||
{ key: 'Style', type: 'uint8', default: 0 }, | ||
{ key: 'MAC', type: 'array', size: 6 }, | ||
{ key: 'BindIp', type: 'ip', default: '0.0.0.0' }, | ||
{ key: 'BindIndex', type: 'int8', default: 0 }, | ||
{ key: 'Status2', type: 'int8', default: 0 }, | ||
//{ key: 'Filler', type: 'array', size: 26, items: { type: 'int8', default: 0 } } | ||
{ key: 'BindIndex', type: 'uint8', default: 0 }, | ||
{ key: 'Status2', type: 'uint8', default: 0, bits: { | ||
supportsWebConfig: 0, | ||
dhcpEnabled: 1, | ||
dhcpCapable: 2, | ||
artnetSacnSwitchable: 4, | ||
squawking: 5 | ||
} }, | ||
{ key: 'Filler', type: 'skip', size: 26 } | ||
@@ -87,0 +171,0 @@ ] |
@@ -5,5 +5,5 @@ { | ||
"author": "Christian Blaschke <mail@platdesign.de>", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"dependencies": { | ||
"bipro": "0.0.3", | ||
"bipro": "0.0.7", | ||
"ip": "^1.1.5" | ||
@@ -19,2 +19,3 @@ }, | ||
"code": "^4.1.0", | ||
"csv": "^1.1.1", | ||
"mocha": "^3.5.0", | ||
@@ -21,0 +22,0 @@ "npm-release": "^1.0.0" |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
366265
17
1254
4
2
3
+ Addedbipro@0.0.7(transitive)
- Removedbipro@0.0.3(transitive)
Updatedbipro@0.0.7