This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.js
57 lines (47 loc) · 1.48 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
var index;
if (typeof module.exports !== 'undefined') {
index = module.exports;
} else {
index = root.index = {};
}
index.version = require('./package.json').version;
require('./util/index');
index.Device = require('./lib/device');
index.Connection = require('./lib/connection');
index.FrameHandler = require('./lib/framehandler');
index.DeviceLoader = require('./lib/deviceloader');
index.DeviceGuider = require('./lib/deviceguider');
index.Command = require('./lib/command');
index.Task = require('./lib/task');
var tv4 = require('tv4');
index.addAdditionalValidationSchema = function(ref, schema) {
tv4.addSchema(ref, schema);
};
index.addAdditionalFormatForValidationSchemas = function(ref, fn) {
tv4.addFormat(ref, fn);
};
try {
index.FtdiDevice = require('./lib/ftdi/device');
index.FtdiDeviceLoader = require('./lib/ftdi/deviceloader');
index.EventedFtdiDeviceLoader = require('./lib/ftdi/eventeddeviceloader');
} catch(e) {
console.log(e.message);
}
try {
index.SerialDevice = require('./lib/serial/device');
index.SerialDeviceLoader = require('./lib/serial/deviceloader');
index.EventedSerialDeviceLoader = require('./lib/serial/eventeddeviceloader');
index.SerialDeviceGuider = require('./lib/serial/deviceguider');
} catch(e) {
console.log(e.message);
}
try {
index.FtdiSerialDevice = require('./lib/ftdiserial/device');
} catch(e) {
console.log(e.message);
}
try {
index.UsbDeviceLoader = require('./lib/usb/deviceloader');
} catch(e) {
console.log(e.message);
}