cue-sdk-node
Intro
This wrapper can be used in node and electron apps. It uses prebuildify and is prebuilt for some runtime environments:
Node: 10.16.0, 11.8.0, 12.x, 13.x, 14.x
Electron: 6.0.0, 7.0.0, 8.0.0
Prerequisites
- Microsoft Visual C++ Redistributable for Visual Studio 2017.
- Node have to have N-API v4 (see N-API Version Matrix)
Installation
Note: you might need to install some tools to build from source before running
npm install
: https://github.com/nodejs/node-gyp#installation
npm install cue-sdk --save
Usage
1. Create sdk instance
const sdk = ;
2. Perform handshake
const details = sdk;const errCode = sdk;if errCode === 0 // 'CE_Success'
3. Control your devices
const n = sdk; for let i = 0; i < n; ++i const info = sdk; // example: read device properties if infocapsMask & sdkCorsairDeviceCapsCDC_PropertyLookup console; Object; if infocapsMask & sdkCorsairDeviceCapsCDC_Lighting const positions = sdk; const maxX = positions; // create red gradient const colors = positions; sdk; sdk;