How to use the init function from bindings

Find comprehensive JavaScript bindings.init code examples handpicked from public code repositorys.

248
249
250
251
252
253
254
255
256
257
}
if (!argv.every((argument) => typeof argument === 'string')) {
  throw new TypeError('argv elements must be strings (and not null).');
}

rclnodejs.init(context.handle, argv);

if (_rosVersionChecked) {
  // no further processing required
  return;
fork icon65
star icon254
watch icon27

+ 15 other calls in file

37
38
39
40
41
42
43
44
45
46
 *        v
 * rcl.shutdown(context)
 *        or
 * context.shutdown() ---> shutdown
 * ```
 * Must call rclnodejs.init(context) to initialize the context
 * to the usable 'initialized' (valid) state be using.
 */
class Context {
  /**
fork icon65
star icon247
watch icon27

+ 3 other calls in file

202
203
204
205
206
207
208
209
210
if(_config.slaveJSON === undefined){
        throw 'Slave filepath is undefined!';
}

try{
        ecat.init(_config.slaveJSON, _config.doSortSlave);

        _cycle.timer = hrtime.bigint();
        self._timer = _cycle.timer;
fork icon0
star icon1
watch icon2

0
1
2
3
4
5
6
7
8
9
const kinect = require('bindings')('kinectAzure');

class KinectAzure {

  constructor() {
    kinect.init();
  }
  /**
   * open a playback mkv stream
   * @param {string} path The path to the mkv recording
fork icon20
star icon0
watch icon1

+ 11 other calls in file

2
3
4
5
6
7
8
9
10

class KinectAzure {

  constructor() {
    const emitter = new EventEmitter();
    kinect.init(emitter.emit.bind(emitter));
  }

  open() { return kinect.open() }
fork icon20
star icon0
watch icon0

+ 5 other calls in file

4
5
6
7
8
9
10
11
12
13
14
15


function init(script) {
  assert.equal(false, initialized, 'Hive.init must be called only once.');
  script = script || "";
  initialized = true;
  return addon.init(script);
}


function eval(expr, callback) {
  assert.equal(true, initialized, 'Hive.init must be called before Hive.eval.');
fork icon1
star icon5
watch icon1

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)