Bridge to CPP SDK¶
var MetaWear = require('metawear');
The core libraries are written in C++ and many of the calls made are from the CPP library. You will find the C++ documentation and API reference useful.
The main MetaWear class in Node.JS can be found here.
Node ffi is use along with the bindings file so that Node API calls can call the CPP SDK.
In the bindings file:
/** * Stop sensor fusion * @param board Calling object */ 'mbl_mw_sensor_fusion_stop': [ref.types.void, [ref.refType(MetaWearBoard)]],
In the CPP library:
/** * Stop sensor fusion * @param board Calling object */ METAWEAR_API void mbl_mw_sensor_fusion_stop(const MblMwMetaWearBoard* board);
Can be called in Node.JS:
var MetaWear = require('metawear'); MetaWear.mbl_mw_sensor_fusion_stop(device.board);