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:
Name | Type | Description |
jsonrpc |
| Always has the value "2.0". |
warning |
| An object with the fields "code" and "message". |
The warning object has 2 fields:
Name | Type | Description |
code |
| The code of this warning. The possible codes are documented below. |
message |
| The type and value of this field depends on the code. For most of the warnings it is just a string, but it can also be an object. See the examples below. |
Warning Codes
The possible codes are:
Code | Description |
0 | All the data streams you subscribed to have been automatically canceled by Cortex. This can happen if the headset was disconnected. |
1 | Your session was automatically closed by Cortex. This can happen if the headset was disconnected. |
2 | The user has logged in with EMOTIV App. |
3 | The user has logged out with EMOTIV App. |
9 | The user approved your application in EMOTIV App. |
10 | The user declined your application in EMOTIV App. |
13 | A training profile was loaded for a headset using setupProfile |
14 | A training profile was unloaded for a headset using setupProfile. |
15 | A training profile was automatically unloaded by Cortex. This can happen if the headset was disconnected, or if the application that loaded this profile was disconnected from Cortex. |
17 | The user accepted the EULA in EMOTIV App. |
18 | The record data has been successfully saved. Cortex sends this warning when a record is done with some long-run post processing after record is stopped. |
19 | The available disk space is low. Cortex send this warning when there is less then 1 GB available of the hard drive. This warning was added in Cortex 2.2.1 |
20 | The available disk space is critically low. Cortex send this warning when there is less then 300 MB available of the hard drive. When this happens Cortex automatically disconnect all the headsets. You cannot connect a headset until the user free up some space. This warning was added in Cortex 2.2.1 |
21 | The user has changed the opt-out configuration. This warning was added in Cortex 2.2.1 |
22 | Cortex has changed the opt-out configuration. This can happen when the license of the user is updated. This warning was added in Cortex 2.2.1 |
26 | The license of the user will expire in a few days. This warning was added in Cortex 2.3.0 |
30 | Data post-processing finishes. After record stops, Cortex still needs to run a lengthy process to improve timestamps or combine broken sessions. If you want to export the record just after it stops, you should wait until this warning is emitted from Cortex. |
100 and 101 | Cortex failed to connect to a headset. If the headset uses a Bluetooth connection, then you should try to disconnect the headset from the Bluetooth manager of the OS. |
102 | Cortex reached a timeout while trying to connect to a headset. This can happen if the wireless connection is of poor quality. |
103 | Cortex disconnected a headset because it didn't receive any data from this headset for more than 30 seconds. This can happen if the headset goes out of range of the computer, or if the wireless connection is of poor quality. |
104 | Cortex successfully connected to a headset. |
110 | Cortex successfully updated the configuration of a headset. See updateHeadset. This warning was added in Cortex 2.4 |
111 | Cortex failed to update the configuration of a headset. See updateHeadset. This warning was added in Cortex 2.4 |
112 | Cortex successfully updated a headset but the new configuration can only work with a USB dongle connection. The configuration is not compatible with a Bluetooth connection. See updateHeadset. This warning was added in Cortex 2.5 |
113 | Cortex failed to connect to an EPOC+ or EPOC X headset with Bluetooth. The configuration of the headset is not compatible with a Bluetooth connection. See controlDevice. This warning was added in Cortex 2.5 |
142 | Cortex finishes headset scanning which is started by controlDevice with "refresh" command. |
Examples
0 - Data stream unsubscribed
1 - Session closed
2 - User login
3 - User logout
9 - App access granted
10 - App access declined
13 - Profile loaded
14 - 15 - Profile unloaded
17 - EULA accepted
19 - 20 - Disk space
21 - 22 - Opt-out configuration changed
100 - 101 - 102 - 113 - Failed to connect to a headset
103 - Headset disconnected
104 - Headset connected
110 - Headset update successful
111 - Headset update failed
112 - Headset configuration cannot work with Bluetooth
Last updated