Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* disclosing the source code of your own applications.
*
*/
var debug = require('debug')('lib/elgato_dm');
var HID = require('node-hid');
var deviceHandler = require('./device');
var usb = require('./usb');
var elgatoEmulator = require('./elgato_emulator');
var elgatoPluginDevice = require('./elgato_plugin');
var satelliteDevice = require('./satellite_device');
var preview = require('./preview');
var system;
HID.setDriverType('libusb');
debug("module required");
var instances = {};
function elgatoDM(_system) {
var self = this;
system = _system;
system.on('elgatodm_remove_device', self.removeDevice.bind(self));
system.on('devices_list_get', function (cb) {
var ary = [];
for (var id in instances) {
ary.push({ id: instances[id].id, serialnumber: instances[id].serialnumber, type: instances[id].type, config: instances[id].config });