UNPKG

emotiv-ts

Version:

A Typescript library that wraps the Cortex API functionalities to communicate with Emotiv headsets

36 lines (35 loc) 1.39 kB
import type { w3cwebsocket } from 'websocket'; import { EmotivService } from "./emotiv.service"; import type { Application } from "../models/application"; import { ProfileService } from "./profile.service"; import { DataStreamService } from "./data-stream.service"; import { TrainingCommands } from "../enums/training-command.enum"; export declare class TrainingService { socket: w3cwebsocket; emotivService: EmotivService; profileService: ProfileService; dataStreamService: DataStreamService; constructor(socket: w3cwebsocket, application: Application); /** * - handle send training request * - handle resolve for two difference status : start and accept */ trainRequest(action: string, status: TrainingCommands): Promise<unknown>; /** * - check login and grant access * - create profile if not yet exist * - load profile * - sub stream 'sys' for training * - train for actions, each action in number of time * */ train(profileName: string, trainingActions: string[], numberOfTrain: number): void; /** * * - load profile which trained before * - sub 'com' stream (mental command) * - user think specific thing which used while training, for example 'push' action * - 'push' command should show up on mental command stream */ live(profileName: string): void; }