How to use the read_sync function from bindings
Find comprehensive JavaScript bindings.read_sync code examples handpicked from public code repositorys.
GitHub: watson/rtl-sdr
21 22 23 24 25 26 27 28 29 30 31
gains[i] = buf.readInt32LE(i * 4) // TODO: Endian is OS dependent } return result } const read_sync = rtlsdr.read_sync rtlsdr.read_sync = function (dev, buf, len, n_read) { len = len || buf.length n_read = n_read || Buffer.allocUnsafe(4) // TODO: int size is OS dependent const result = read_sync(dev, buf, len, n_read)
13
73
0
+ 3 other calls in file
750 751 752 753 754 755 756 757 758 759
describe('read_sync(dev_hnd, len)', () => { it('reads data via rtlsdr_read_sync', () => { rtlsdr.mock_set_rtlsdr_dev_contents(dev, 'buffer_ready', true); let buf = rtlsdr.read_sync(dev, 20); buf.toString('ascii').should.equal('dddddddddddddddddddd'); rtlsdr.mock_set_rtlsdr_dev_contents(dev, 'mock_sync_read_discount', 5); buf = rtlsdr.read_sync(dev, 10);
0
1
0
+ 287 other calls in file
bindings.createKey is the most popular function in bindings (8616 examples)