New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

bci2k

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bci2k

A javascript connector for BCI2000

latest
Source
npmnpm
Version
3.1.3
Version published
Maintainers
3
Created
Source

bci2k.js

A javascript connector for BCI2000

badge badge MIT license

bci2k.js relies on a binary server called BCI2000Web, which allows browsers to communicate with Operator using the Operator Scripting language and stream data in to the browser using websockets.

Install

npm install --save bci2k

Usage

Connect to BCI2000

import { BCI2K_OperatorConnection } from "./dist/index.js";

const bciOperator = new BCI2K_OperatorConnection();

(async () => {
    try{
        await bciOperator.connect("ws://127.0.0.1")
        console.log("Connected"))
    } catch(err){
        console.log(err)
    }
})()

Execute system commands

bciOperator.showWindow();
bciOperator.hideWindow();
bciOperator.resetSystem();
bciOperator.start();
bciOperator.getVersion();
bciOperator.execute("args"); //args are any BCI2000 Operator commands

Tap data from part of the signal processing chain

import { BCI2K_DataConnection } from "./dist/index.js";

async () => {
    let bciSourceConnection = new BCI2K_DataConnection();
    try{
        await bciSourceConnection.connect("ws://localhost:20100")
        bciSourceConnection.onStateFormat = data => console.log(data);
        bciSourceConnection.onSignalProperties = data => console.log(data);
        bciSourceConnection.onGenericSignal = data => console.log(data);}
    }
    catch(err){
        console.log(err);
    }

Development

npm run build
npm run dev

License

MIT

FAQs

Package last updated on 13 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts