Warning Objects

In addition to method responses and data samples, Cortex can send a third type of message, called warnings.

These warnings inform your application about important events, like when the user logs in or out, or when a training profile is loaded or unloaded for a headset.

Description

A warning object contain these fields:

The warning object has 2 fields:

Warning Codes

The possible codes are:

Examples

0 - Data stream unsubscribed

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 0,
        "message": {
            "behavior": "Cortex has stopped all the subscriptions of session 866b8437-2380-4392-9a35-3d5957eaf95d.",
            "sessionId": "866b8437-2380-4392-9a35-3d5957eaf95d"
        }
    }
}

1 - Session closed

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 1,
        "message": {
            "behavior": "Cortex has closed the session 866b8437-2380-4392-9a35-3d5957eaf95d.",
            "sessionId": "866b8437-2380-4392-9a35-3d5957eaf95d"
        }
    }
}

2 - User login

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 2,
        "message": "User jon.snow has already logged in to Cortex."
    }
}

3 - User logout

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 3,
        "message": "User jon.snow has already logged out from Cortex."
    }
}

9 - App access granted

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 9,
        "message": "The access right to the cortex-examples has been granted"
    }
}

10 - App access declined

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 10,
        "message": "The access right to the cortex-examples has been rejected"
    }
}

13 - Profile loaded

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 13,
        "message": {
            "behavior": "Profile is loaded",
            "headset": "INSIGHT-12341234",
            "profile": "foo"
        }
    }
}

14 - 15 - Profile unloaded

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 14,
        "message": {
            "behavior": "Profile is unloaded",
            "headset": "INSIGHT-12341234",
            "profile": "foo"
        }
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 15,
        "message": {
            "behavior": "Cortex has unloaded the profile",
            "headset": "INSIGHT-12341234",
            "profile": "foo"
        }
    }
}

17 - EULA accepted

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 17,
        "message": "User jon.snow has accepted the EULA via EMOTIV App"
    }
}

19 - 20 - Disk space

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 19,
        "message": {
            "behavior": "The available disk space is low.",
            "rootPath": "/",
            "volumeName": "MAC"
        }
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 20,
        "message": {
            "behavior": "The available disk space is critically low. Cortex will disconnect all the headsets.",
            "rootPath": "C",
            "volumeName": "Windows"
        }
    }
}

21 - 22 - Opt-out configuration changed

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 21,
        "message": {
            "currOptOut": true,
            "forceOptOut": false,
            "message": "User has changed the Opt-out configuration.",
            "optOutAvail": true
        }
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 22,
        "message": {
            "currOptOut": true,
            "forceOptOut": false,
            "message": "The Opt-out configuration has been automatically changed due to change in license.",
            "optOutAvail": true
        }
    }
}

100 - 101 - 102 - 113 - Failed to connect to a headset

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 100,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Headset cannot be connected. Please try again."
        }
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 101,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Headset cannot be connected. Please try again."
        }
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 102,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Headset cannot be connected due to connection timeout."
        }
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 113,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Please disable motion data and set EEG rate to 128Hz in headset configuration when using Bluetooth connection, or use USB dongle."
        }
    }
}

103 - Headset disconnected

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 103,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Headset has been disconnected due to connection timeout."
        }
    }
}

104 - Headset connected

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 104,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "The headset is connected"
        }
    }
}

110 - Headset update successful

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 110,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Headset configuration is updated."
        }
    }
}

111 - Headset update failed

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 111,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "Headset configuration update failed."
        }
    }
}

112 - Headset configuration cannot work with Bluetooth

{
    "jsonrpc": "2.0",
    "warning": {
        "code": 112,
        "message": {
            "headsetId": "EPOCPLUS-3B9AXXXX",
            "behavior": "This headset configuration cannot work with BTLE on this platform."
        }
    }
}

Last updated