How to use the open function from bindings
Find comprehensive JavaScript bindings.open code examples handpicked from public code repositorys.
GitHub: tblobaum/rconsole
105 106 107 108 109 110 111 112 113 114
rc.showTime = defined(options.showTime, rc.showTime, true) rc.showLine = defined(options.showLine, rc.showLine, true) rc.showFile = defined(options.showFile, rc.showFile, true) rc.showTags = defined(options.showTags, rc.showTags, true) connected = bindings.open(rc.title, fac[rc.facility], rc.upto) } process.on('exit', function () { if (connected)
10
54
5
+ 25 other calls in file
GitHub: taoyuan/ni2c
62 63 64 65 66 67 68 69 70
this.opening = true; const device = `/dev/i2c-${busnum}`; debug('opening', `path: ${device}`); await fromCallback(cb => wire.open(device, cb)); this.opening = false; this.opened = true; }
90
0
2
+ 9 other calls in file
69 70 71 72 73 74 75 76 77 78
} stream.Stream.call(this); this.port = path; this.fd = serialport_native.open(this.port, options.baudrate, options.databits, options.stopbits, options.parity, options.flowcontrol); if (this.fd == -1) { throw new Error("Could not open serial port"); } else { this.readStream = fs.createReadStream(this.port,{bufferSize:options.buffersize});
0
5
4
+ 9 other calls in file
30 31 32 33 34 35 36 37 38 39
pause() { return kinect.pause() } seek(time) { return kinect.seek(time) } get time() { return kinect.time() } get duration() { return kinect.duration() } open() { return kinect.open() } /** * Starts the kinect cameras * @param {Object} options The configuration for the cameras
20
0
1
+ 11 other calls in file
GitHub: pass0a/pcan
15 16 17 18 19 20 21 22 23 24
} export class Pcan extends Duplex { private inst: any = null; constructor(info: PcanInfo) { super({ objectMode: true }); this.inst = bindings.open(info, (data: any) => { this.push(data); }); } _read(size: number) {
1
0
0
87 88 89 90 91 92 93 94 95 96
rtlsdr.mock_get_rtlsdr_dev_contents(dev1).should.have.property('index', 1); rtlsdr.mock_get_rtlsdr_dev_contents(dev1).should.have.property('open', true); }); it('throws if index does not exist', () => { (() => rtlsdr.open(2)).should.throw(); }); }); describe('open-device functions', () => {
0
1
0
+ 191 other calls in file
61 62 63 64 65 66 67 68 69 70
if (this.isOpen) { return asyncError(cb, new Error('Already open')); } binding.open(path, options, function afterOpen(err, fd) { if (err) { return cb(err); } this.fd = fd;
0
0
1
+ 11 other calls in file
222 223 224 225 226 227 228 229 230 231
this.readable = true; this.reading = false; this.opening = true; var self = this; SerialPortBinding.open(this.path, this.options, function (err, fd) { if (err) { debug('SerialPortBinding.open had an error', err); return self._error(err, callback); }
0
0
2
+ 11 other calls in file
bindings.createKey is the most popular function in bindings (8616 examples)