Events

List of events available in the base Cortex class

Authorized

Called when the plugin has been connected and successfully authorized. Can be used to wait for functionality to be available. The license is entirely irrelevant

Authorized(License license);

Connection State Changed

Indicates a change in the connection or authorization status of the communication link with the Emotiv launcher

ConnectionStateChanged(ConnectToCortexStates state)

public enum ConnectToCortexStates
{
    Service_connecting,
    EmotivApp_NotFound,
    // Connected, awaiting login in Emotiv launcher
    Login_waiting,
    Login_notYet,
    // Attempting authorization,
    // user need to open Emotiv launcher to authorize
    Authorizing,
    Authorize_failed,
    // connected and authorized, good to go!
    Authorized,
    LicenseExpried,
    License_HardLimited
}

Headset Query Result

Provides a list of headsets currently available to the Emotiv Launcher. Fired in response to QueryHeadsets

HeadsetQueryResult(List<Headset> availableHeadsets)

public class Headset
{
    public string headsetID;
    public string status;
    public string serialId;
    public string firmwareVersion;
    public string dongleSerial;
    public ArrayList sensors;
    public ArrayList motionSensors;
    public JObject settings;
    public ConnectionType connectedBy;
    public HeadsetTypes headsetType;
    public string mode;
}

Device Connected

Called when a headset has been connected

DeviceConnected(HeadsetConnectEventArgs args)

public class HeadsetConnectEventArgs
{
    public bool IsSuccess
    public string Message
    public string HeadsetId
}

Data Stream Started

Called when the first object has been received by a new data stream. Effectively equivalent to the start of a session

DataStreamStarted(string headsetId)

Data Stream Ended

A data stream has been closed

DataStreamEnded(string headsetId)

Error Received

Throws errors sent by the underlying Cortex API

ErrorReceived(ErrorMsgEventArgs args)

public class ErrorMsgEventArgs
{
    public int Code;
    public string MessageError;
    public string MethodName;
}

Last updated