Iedk.h File Reference

Go to the source code of this file.

Data Structures

struct  IInputSensorDescriptor_struct
 Input sensor description. More...
 

Macros

#define EDK_API
 

Typedefs

typedef void * EmoStateHandle
 Handle to EmoState structure allocated by IEE_EmoStateCreate. More...
 
typedef void * EmoEngineEventHandle
 Handle to EmoEngine event structure allocated by IEE_EmoEngineEventCreate. More...
 
typedef enum IEE_DataChannels_enum IEE_DataChannel_t
 EEG and system data channel description. More...
 
typedef void * DataHandle
 Handle to data placeholder allocated by IEE_MotionDataCreate. More...
 
typedef enum IEE_Event_enum IEE_Event_t
 EmoEngine event types. More...
 
typedef struct IInputSensorDescriptor_struct IInputSensorDescriptor_t
 Input sensor description. More...
 
typedef enum IEE_Detection_enum IEE_Detection_t
 Detection type enumerator. More...
 
typedef enum IEE_MotionDataChannel_enum IEE_MotionDataChannel_t
 Motion data channel description. More...
 
typedef enum IEE_WindowingTypes_enum IEE_WindowingTypes
 Windowing types enum for Fast Fourier Transform. More...
 

Enumerations

enum  IEE_DataChannels_enum {
  IED_COUNTER = 0, IED_INTERPOLATED, IED_RAW_CQ, IED_AF3,
  IED_F7, IED_F3, IED_FC5, IED_T7,
  IED_P7, IED_Pz, IED_O1 = IED_Pz, IED_O2,
  IED_P8, IED_T8, IED_FC6, IED_F4,
  IED_F8, IED_AF4, IED_GYROX, IED_GYROY,
  IED_TIMESTAMP, IED_ES_TIMESTAMP, IED_FUNC_ID, IED_FUNC_VALUE,
  IED_MARKER, IED_SYNC_SIGNAL
}
 EEG and system data channel description. More...
 
enum  IEE_Event_enum {
  IEE_UnknownEvent = 0x0000, IEE_EmulatorError = 0x0001, IEE_ReservedEvent = 0x0002, IEE_UserAdded = 0x0010,
  IEE_UserRemoved = 0x0020, IEE_EmoStateUpdated = 0x0040, IEE_ProfileEvent = 0x0080, IEE_MentalCommandEvent = 0x0100,
  IEE_FacialExpressionEvent = 0x0200, IEE_InternalStateChanged = 0x0400, IEE_AllEvent
}
 EmoEngine event types. More...
 
enum  IEE_Detection_enum {
  DT_BlinkAndWink = 0x0001, DT_FacialExpression = 0x0002, DT_EyeMovement = 0x0004, DT_Excitement = 0x0008,
  DT_Engagement = 0x0010, DT_Relaxation = 0x0020, DT_Interest = 0x0040, DT_Stress = 0x0080,
  DT_Focus = 0x0100, DT_MentalCommand = 0x0200, DT_AllDetections
}
 Detection type enumerator. More...
 
enum  IEE_MotionDataChannel_enum {
  IMD_COUNTER = 0, IMD_GYROX, IMD_GYROY, IMD_GYROZ,
  IMD_ACCX, IMD_ACCY, IMD_ACCZ, IMD_MAGX,
  IMD_MAGY, IMD_MAGZ, IMD_TIMESTAMP
}
 Motion data channel description. More...
 
enum  IEE_WindowingTypes_enum {
  IEE_HANNING = 0, IEE_HAMMING = 1, IEE_HANN = 2, IEE_BLACKMAN = 3,
  IEE_RECTANGLE = 4
}
 Windowing types enum for Fast Fourier Transform. More...
 

Functions

EDK_API int IEE_EngineConnect (const char *strDevID="Emotiv Systems-5")
 Initialize EmoEngine instance which reads data from the headset. More...
 
EDK_API int IEE_EngineRemoteConnect (const char *szHost, unsigned short port)
 Initialize the connection to a remote instance of EmoEngine. More...
 
EDK_API int IEE_EngineDisconnect ()
 Terminate the connection to EmoEngine. More...
 
EDK_API int IEE_EnableDiagnostics (const char *szFilename, int fEnable, int nReserved)
 Enable diagnostics mode. More...
 
EDK_API EmoEngineEventHandle IEE_EmoEngineEventCreate ()
 Return a handle to memory that can hold an EmoEngine event. More...
 
EDK_API void IEE_EmoEngineEventFree (EmoEngineEventHandle hEvent)
 Free memory referenced by an event handle. More...
 
EDK_API EmoStateHandle IEE_EmoStateCreate ()
 Return a handle to memory that can store an EmoState. More...
 
EDK_API void IEE_EmoStateFree (EmoStateHandle hState)
 Free memory referenced by an EmoState handle. More...
 
EDK_API IEE_Event_t IEE_EmoEngineEventGetType (EmoEngineEventHandle hEvent)
 Return the event type for an event already retrieved using IEE_EngineGetNextEvent(). More...
 
EDK_API int IEE_EmoEngineEventGetUserId (EmoEngineEventHandle hEvent, unsigned int *pUserIdOut)
 Retrieve the user ID for IEE_UserAdded and IEE_UserRemoved events. More...
 
EDK_API int IEE_EmoEngineEventGetEmoState (EmoEngineEventHandle hEvent, EmoStateHandle hEmoState)
 Copy an EmoState returned with a IEE_EmoStateUpdate event to memory referenced by an EmoStateHandle. More...
 
EDK_API int IEE_EngineGetNextEvent (EmoEngineEventHandle hEvent)
 Retrieve the next EmoEngine event. More...
 
EDK_API int IEE_EngineClearEventQueue (int eventTypes)
 Clear a specific EmoEngine event type or all events currently inside the event queue. More...
 
EDK_API int IEE_EngineGetNumUser (unsigned int *pNumUserOut)
 Retrieve number of active users (headset) connected to the EmoEngine. More...
 
EDK_API int IEE_SetHardwarePlayerDisplay (unsigned int userId, unsigned int playerNum)
 Set the player number display. More...
 
EDK_API int IEE_GetHeadsetSettings (unsigned int userId, unsigned int *EPOCmode, unsigned int *eegRate, unsigned int *eegRes, unsigned int *memsRate, unsigned int *memsRes)
 Get headset settings from EPOC+ headset. More...
 
EDK_API int IEE_SetHeadsetSettings (unsigned int userId, unsigned int EPOCmode, unsigned int eegRate, unsigned int eegRes, unsigned int memsRate, unsigned int memsRes)
 Set headset setting for EPOC+ headset. More...
 
EDK_API int IEE_HeadsetGetSensorDetails (IEE_InputChannels_t channelId, IInputSensorDescriptor_t *pDescriptorOut)
 Return a struct containing details about a specific channel. More...
 
EDK_API int IEE_HardwareGetVersion (unsigned int userId, unsigned long *pHwVersionOut)
 Return the current hardware version of the headset and dongle (if available). More...
 
EDK_API int IEE_SoftwareGetVersion (char *pszVersionOut, unsigned int nVersionChars, unsigned long *pBuildNumOut)
 Return the current version of the Emotiv SDK. More...
 
EDK_API int IEE_HeadsetGetSerialNumber (unsigned int userId, char **pHwSerialOut)
 Return the current serial number of the headset (if available). More...
 
EDK_API int IEE_HeadsetGetGyroDelta (unsigned int userId, int *pXOut, int *pYOut)
 Return the delta of the movement of the gyro since the previous call for a particular user. More...
 
EDK_API int IEE_HeadsetGyroRezero (unsigned int userId)
 Re-zero the gyro for a particular user. More...
 
EDK_API DataHandle IEE_MotionDataCreate ()
 Return a handle to memory that can hold motion data. More...
 
EDK_API void IEE_MotionDataFree (DataHandle hData)
 Free memory referenced by a data handle. More...
 
EDK_API int IEE_MotionDataUpdateHandle (unsigned int userId, DataHandle hData)
 Update the content of the data handle to point to new data since the last call. More...
 
EDK_API int IEE_MotionDataGet (DataHandle hData, IEE_MotionDataChannel_t channel, double buffer[], unsigned int bufferSizeInSample)
 Extract data of a particular channel from the data handle. More...
 
EDK_API int IEE_MotionDataGetMultiChannels (DataHandle hData, IEE_MotionDataChannel_t channels[], unsigned int nChannels, double *buffer[], unsigned int bufferSizeInSample)
 Extract data of a list of channels from the data handle. More...
 
EDK_API int IEE_MotionDataGetNumberOfSample (DataHandle hData, unsigned int *nSampleOut)
 Return number of sample of motion data stored in the data handle. More...
 
EDK_API int IEE_MotionDataSetBufferSizeInSec (float bufferSizeInSec)
 Set the size of the motion data buffer. More...
 
EDK_API int IEE_MotionDataGetBufferSizeInSec (float *pBufferSizeInSecOut)
 Return the size of the motion data buffer. More...
 
EDK_API int IEE_MotionDataGetSamplingRate (unsigned int userId, unsigned int *samplingRateOut)
 Get sampling rate of the motion data stream. More...
 
EDK_API void IEE_EnableDetections (unsigned long value)
 Enable/disable particular detections. More...
 
EDK_API void IEE_CheckDetectionsEnabled (unsigned long *result)
 Check if particular detections are enabled. More...
 
EDK_API int IEE_GetAverageBandPowers (unsigned int userId, IEE_DataChannel_t channel, double *theta, double *alpha, double *low_beta, double *high_beta, double *gamma)
 Get averge band power values for a channel. More...
 
EDK_API int IEE_FFTSetWindowingType (unsigned int userId, IEE_WindowingTypes type)
 Set the current windowing type for band power calculation. More...
 
EDK_API int IEE_FFTGetWindowingType (unsigned int userId, IEE_WindowingTypes *type)
 Get the current windowing type for band power calculation. More...
 

Macro Definition Documentation

#define EDK_API

Emotiv SDK Copyright (c) 2016 Emotiv Inc.

This file is part of the Emotiv SDK.

The main interface that allows interactions between external programs and the Emotiv detection engine.

None of these API functions are thread-safe.

This header file is designed to be included under C and C++ environment.

Typedef Documentation

typedef void* DataHandle

Handle to data placeholder allocated by IEE_MotionDataCreate.

See also
IEE_MotionDataCreate()
typedef void* EmoEngineEventHandle

Handle to EmoEngine event structure allocated by IEE_EmoEngineEventCreate.

See also
IEE_EmoEngineEventCreate()
typedef void* EmoStateHandle

Handle to EmoState structure allocated by IEE_EmoStateCreate.

See also
IEE_EmoStateCreate()

EEG and system data channel description.

Detection type enumerator.

EmoEngine event types.

Motion data channel description.

Windowing types enum for Fast Fourier Transform.

Input sensor description.

Enumeration Type Documentation

EEG and system data channel description.

Enumerator
IED_COUNTER 

Sample counter.

IED_INTERPOLATED 

Indicate if data is interpolated.

IED_RAW_CQ 

Raw contact quality value.

IED_AF3 

Channel AF3.

IED_F7 

Channel F7.

IED_F3 

Channel F3.

IED_FC5 

Channel FC5.

IED_T7 

Channel T7.

IED_P7 

Channel P7.

IED_Pz 

Channel Pz.

IED_O1 

Channel O1.

IED_O2 

Channel O2.

IED_P8 

Channel P8.

IED_T8 

Channel T8.

IED_FC6 

Channel FC6.

IED_F4 

Channel F4.

IED_F8 

Channel F8.

IED_AF4 

Channel AF4.

IED_GYROX 

Gyroscope X-axis.

IED_GYROY 

Gyroscope Y-axis.

IED_TIMESTAMP 

System timestamp.

IED_ES_TIMESTAMP 

EmoState timestamp.

IED_FUNC_ID 

Reserved function id.

IED_FUNC_VALUE 

Reserved function value.

IED_MARKER 

Marker value from hardware.

IED_SYNC_SIGNAL 

Synchronisation signal.

Detection type enumerator.

Enumerator
DT_BlinkAndWink 

Blink and Wink detection.

DT_FacialExpression 

Other facial expression detection.

DT_EyeMovement 

Eye movement detection.

DT_Excitement 

Excitement detection (deprecated)

DT_Engagement 

Engagement detection (deprecated)

DT_Relaxation 

Relaxation detection (deprecated)

DT_Interest 

Interest detection (deprecated)

DT_Stress 

Stress detection (deprecated)

DT_Focus 

Focus detection (deprecated)

DT_MentalCommand 

Mental command detection.

DT_AllDetections 

EmoEngine event types.

Enumerator
IEE_UnknownEvent 

An unknown event.

IEE_EmulatorError 

Error event from emulator. Connection to EmoComposer could be lost.

IEE_ReservedEvent 

Reserved event.

IEE_UserAdded 

A headset is connected.

IEE_UserRemoved 

A headset has been disconnected.

IEE_EmoStateUpdated 

Detection results have been updated from EmoEngine.

IEE_ProfileEvent 

A profile has been returned from EmoEngine.

IEE_MentalCommandEvent 

A IEE_MentalCommandEvent_t has been returned from EmoEngine.

IEE_FacialExpressionEvent 

A IEE_FacialExpressionEvent_t has been returned from EmoEngine.

IEE_InternalStateChanged 

Reserved for internal use.

IEE_AllEvent 

Bit-mask for all events except error types.

Motion data channel description.

Enumerator
IMD_COUNTER 

Sample counter.

IMD_GYROX 

Gyroscope X-axis.

IMD_GYROY 

Gyroscope Y-axis.

IMD_GYROZ 

Gyroscope Z-axis.

IMD_ACCX 

Accelerometer X-axis.

IMD_ACCY 

Accelerometer Y-axis.

IMD_ACCZ 

Accelerometer Z-axis.

IMD_MAGX 

Magnetometer X-axis.

IMD_MAGY 

Magnetometer Y-axis.

IMD_MAGZ 

Magnetometer Z-axis.

IMD_TIMESTAMP 

Timestamp of the motion data stream.

Windowing types enum for Fast Fourier Transform.

Enumerator
IEE_HANNING 

Hanning Window.

IEE_HAMMING 

Hamming Window.

IEE_HANN 

Hann Window.

IEE_BLACKMAN 

Blackman-Harris Window.

IEE_RECTANGLE 

Uniform/rectangular Window.

Function Documentation

EDK_API void IEE_CheckDetectionsEnabled ( unsigned long *  result)

Check if particular detections are enabled.

Parameters
result- store enabled detection bits in result
See also
IEE_EnableDetections(), IEE_Detection_t
EDK_API EmoEngineEventHandle IEE_EmoEngineEventCreate ( )

Return a handle to memory that can hold an EmoEngine event.

This handle can be reused by the caller to retrieve subsequent events.

Returns
EmoEngineEventHandle
EDK_API void IEE_EmoEngineEventFree ( EmoEngineEventHandle  hEvent)

Free memory referenced by an event handle.

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate() or IEE_ProfileEventCreate()
EDK_API int IEE_EmoEngineEventGetEmoState ( EmoEngineEventHandle  hEvent,
EmoStateHandle  hEmoState 
)

Copy an EmoState returned with a IEE_EmoStateUpdate event to memory referenced by an EmoStateHandle.

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate() and populated with IEE_EmoEngineGetNextEvent()
hEmoState- a handle returned by IEE_EmoStateCreate()
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API IEE_Event_t IEE_EmoEngineEventGetType ( EmoEngineEventHandle  hEvent)

Return the event type for an event already retrieved using IEE_EngineGetNextEvent().

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate()
Returns
IEE_Event_t
EDK_API int IEE_EmoEngineEventGetUserId ( EmoEngineEventHandle  hEvent,
unsigned int *  pUserIdOut 
)

Retrieve the user ID for IEE_UserAdded and IEE_UserRemoved events.

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate()
pUserIdOut- receives the user ID associated with the current event
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API EmoStateHandle IEE_EmoStateCreate ( )

Return a handle to memory that can store an EmoState.

This handle can be reused by the caller to retrieve subsequent EmoStates.

Returns
EmoStateHandle
EDK_API void IEE_EmoStateFree ( EmoStateHandle  hState)

Free memory referenced by an EmoState handle.

Parameters
hState- a handle returned by IEE_EmoStateCreate()
EDK_API void IEE_EnableDetections ( unsigned long  value)

Enable/disable particular detections.

By default, all detections are enabled. This method should be called before calling IEE_EngineConnect(). If it is already connected, IEE_EngineDisconnect() should be called first before calling IEE_EngineConnect() again.

Parameters
value- bitwise value of detections to be enabled
See also
IEE_CheckDetectionsEnabled(), IEE_Detection_t
EDK_API int IEE_EnableDiagnostics ( const char *  szFilename,
int  fEnable,
int  nReserved 
)

Enable diagnostics mode.

Controls the output of logging information from EmoEngine (disabled by default). This should only be enabled if instructed to do so by Emotiv support for the purposes of collecting diagnostic information.

Parameters
szFilename- The path of the logfile
fEnable- Write diagnostic information to logfile if enabled
nReserved- Reserved for future use.
Returns
EDK_ERROR_CODE
  • EDK_OK if the command succeeded
EDK_API int IEE_EngineClearEventQueue ( int  eventTypes)

Clear a specific EmoEngine event type or all events currently inside the event queue.

Event flags can be combined together as one argument except for IEE_UnknownEvent and IEE_EmulatorError.

Parameters
eventTypes- EmoEngine event type (IEE_Event_t), multiple events can be combined such as (IEE_UserAdded | IEE_UserRemoved)
Returns
EDK_ERROR_CODE
  • EDK_OK if the events have been cleared from the queue
  • EDK_INVALID_PARAMETER if input event types are invalid
See also
IEE_Event_t, IedkErrorCode.h
EDK_API int IEE_EngineConnect ( const char *  strDevID = "Emotiv Systems-5")

Initialize EmoEngine instance which reads data from the headset.

This function should be called at the beginning of programs that make use of EmoEngine, most probably in initialization routine or constructor.

Returns
EDK_ERROR_CODE
  • EDK_OK if a connection is established
See also
IedkErrorCode.h
EDK_API int IEE_EngineDisconnect ( )

Terminate the connection to EmoEngine.

This function should be called at the end of programs which make use of EmoEngine, most probably in clean up routine or destructor.

Returns
EDK_ERROR_CODE
  • EDK_OK if disconnection is achieved
See also
IedkErrorCode.h
EDK_API int IEE_EngineGetNextEvent ( EmoEngineEventHandle  hEvent)

Retrieve the next EmoEngine event.

Non-blocking call

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate()
Returns
EDK_ERROR_CODE
  • EDK_OK if an new event has been retrieved
  • EDK_NO_EVENT if no new events have been generated by EmoEngine
See also
IedkErrorCode.h
EDK_API int IEE_EngineGetNumUser ( unsigned int *  pNumUserOut)

Retrieve number of active users (headset) connected to the EmoEngine.

Parameters
pNumUserOut- receives number of users
Returns
EDK_ERROR_CODE
  • EDK_OK if successful.
See also
IedkErrorCode.h
EDK_API int IEE_EngineRemoteConnect ( const char *  szHost,
unsigned short  port 
)

Initialize the connection to a remote instance of EmoEngine.

Blocking call

Parameters
szHost- A null-terminated string identifying the hostname or IP address of the remote EmoEngine server
port- The port number of the remote EmoEngine server
  • If connecting to the Emotiv Control Panel, use port 3008
  • If connecting to the EmoComposer, use port 1726
Returns
EDK_ERROR_CODE
  • EDK_OK if a connection is established
See also
IedkErrorCode.h
EDK_API int IEE_FFTGetWindowingType ( unsigned int  userId,
IEE_WindowingTypes type 
)

Get the current windowing type for band power calculation.

Parameters
userId- user ID
type- windowing type enum from IEE_WindowingTypes (default: IEE_HANNING)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FFTSetWindowingType, IEE_GetAverageBandPowers
EDK_API int IEE_FFTSetWindowingType ( unsigned int  userId,
IEE_WindowingTypes  type 
)

Set the current windowing type for band power calculation.

Parameters
userId- user ID
type- windowing type enum from IEE_WindowingTypes
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FFTGetWindowingType, IEE_GetAverageBandPowers
EDK_API int IEE_GetAverageBandPowers ( unsigned int  userId,
IEE_DataChannel_t  channel,
double *  theta,
double *  alpha,
double *  low_beta,
double *  high_beta,
double *  gamma 
)

Get averge band power values for a channel.

Return the average band power for a specific channel from the latest epoch with 0.5 seconds step size and 2 seconds window size.

Parameters
userId- user ID
channel- channel that is interested in
theta- theta band value (4-8 Hz)
alpha- alpha band value (8-12 Hz)
low_beta- low-beta value (12-16 Hz)
high_beta- high-beta value (16-25 Hz)
gamma- gamma value (25-45 Hz)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_FFTSetWindowingType
EDK_API int IEE_GetHeadsetSettings ( unsigned int  userId,
unsigned int *  EPOCmode,
unsigned int *  eegRate,
unsigned int *  eegRes,
unsigned int *  memsRate,
unsigned int *  memsRes 
)

Get headset settings from EPOC+ headset.

Remarks
Available for EPOC+ headset only. Headset settings can only be retrieved via USB connection.
Parameters
userId- user ID
EPOCmode- If 0, EPOC mode is EPOC.
  • If 1, EPOC mode is EPOC+.
eegRate- If 0, EEG sample rate is 128Hz.
  • If 1, EEG sample rate is 256Hz.
  • If 2, no signal.
eegRes- If 0, EEG resolution is 14bit.
  • If 1, EEG resolution is 16bit.
  • If 2, no signal.
memsRate- If 0, motion sample rate is OFF.
  • If 1, motion sample rate is 32Hz.
  • If 2, motion sample rate is 64Hz.
  • If 3, motion sample rate is 128Hz.
memsRes- If 0, motion resolution is 12bit.
  • If 1, motion resolution is 14bit.
  • If 2, motion resolution is 16bit.
  • If 3, no signal.
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_HardwareGetVersion ( unsigned int  userId,
unsigned long *  pHwVersionOut 
)

Return the current hardware version of the headset and dongle (if available).

  • 0x50XX / 0x90XX - Insight Consumer
  • 0x08XX / 0x09XX - Insight Premium
  • 0x30XX / 0x70XX - EPOC+ Consumer
  • 0x06XX / 0x07XX - EPOC+ Premium
  • 0x1000 / 0x1E00 - EPOC Consumer
  • 0x0565 - EPOC Premium
Parameters
userId- user ID for query
pHwVersionOut- hardware version for the headset/dongle pair.
  • Upper 2 bytes: headset version
  • Lower 2 bytes: dongle version.
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IEmoStateDll.h, IedkErrorCode.h
EDK_API int IEE_HeadsetGetGyroDelta ( unsigned int  userId,
int *  pXOut,
int *  pYOut 
)

Return the delta of the movement of the gyro since the previous call for a particular user.

Parameters
userId- user ID for query
pXOut- horizontal displacement
pYOut- vertical displacment
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IEmoStateDll.h, IedkErrorCode.h
EDK_API int IEE_HeadsetGetSensorDetails ( IEE_InputChannels_t  channelId,
IInputSensorDescriptor_t pDescriptorOut 
)

Return a struct containing details about a specific channel.

Parameters
channelId- channel identifier (see IEmoStateDll.h)
pDescriptorOut- provides detailed sensor location and other info
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IEmoStateDll.h, IedkErrorCode.h
EDK_API int IEE_HeadsetGetSerialNumber ( unsigned int  userId,
char **  pHwSerialOut 
)

Return the current serial number of the headset (if available).

Parameters
userId- user ID for query
pHwSerialOut- serial number for the headset pair.
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_HeadsetGyroRezero ( unsigned int  userId)

Re-zero the gyro for a particular user.

Parameters
userId- user ID for query
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IEmoStateDll.h, IedkErrorCode.h
EDK_API DataHandle IEE_MotionDataCreate ( )

Return a handle to memory that can hold motion data.

Returns
DataHandle
EDK_API void IEE_MotionDataFree ( DataHandle  hData)

Free memory referenced by a data handle.

Parameters
hData- a handle returned by IEE_MotionDataCreate()
EDK_API int IEE_MotionDataGet ( DataHandle  hData,
IEE_MotionDataChannel_t  channel,
double  buffer[],
unsigned int  bufferSizeInSample 
)

Extract data of a particular channel from the data handle.

Parameters
hData- a handle returned by IEE_MotionDataCreate()
channel- channel that you are interested in
buffer- pre-allocated buffer
bufferSizeInSample- size of the pre-allocated buffer
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_MotionDataGetBufferSizeInSec ( float *  pBufferSizeInSecOut)

Return the size of the motion data buffer.

Parameters
pBufferSizeInSecOut- receives the size of the data buffer
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_MotionDataGetMultiChannels ( DataHandle  hData,
IEE_MotionDataChannel_t  channels[],
unsigned int  nChannels,
double *  buffer[],
unsigned int  bufferSizeInSample 
)

Extract data of a list of channels from the data handle.

Parameters
hData- a handle returned by IEE_MotionDataCreate()
channels- a list of channel that you are interested in
nChannels- number of channels in the channel list
buffer- pre-allocated 2 dimensional buffer, has to be nChannels x bufferSizeInSample
bufferSizeInSample- size of the pre-allocated buffer for each channel
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_MotionDataGetNumberOfSample ( DataHandle  hData,
unsigned int *  nSampleOut 
)

Return number of sample of motion data stored in the data handle.

Parameters
hData- a handle returned by IEE_MotionDataCreate()
nSampleOut- receives the number of sample of data stored in the data handle
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_MotionDataGetSamplingRate ( unsigned int  userId,
unsigned int *  samplingRateOut 
)

Get sampling rate of the motion data stream.

Parameters
userId- user ID
samplingRateOut- receives the sampling rate
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_MotionDataSetBufferSizeInSec ( float  bufferSizeInSec)

Set the size of the motion data buffer.

The size of the buffer affects how frequent IEE_MotionDataUpdateHandle() needs to be called to prevent data loss.

Parameters
bufferSizeInSec- buffer size in second
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_MotionDataUpdateHandle ( unsigned int  userId,
DataHandle  hData 
)

Update the content of the data handle to point to new data since the last call.

Parameters
userId- user ID
hData- a handle returned by IEE_MotionDataCreate()
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_SetHardwarePlayerDisplay ( unsigned int  userId,
unsigned int  playerNum 
)

Set the player number display.

Sets the player number displayed on the physical input device (currently the USB Dongle) that corresponds to the specified user.

Parameters
userId- EmoEngine user ID
playerNum- application assigned player number displayed on input device hardware (must be in the range 1-4)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_SetHeadsetSettings ( unsigned int  userId,
unsigned int  EPOCmode,
unsigned int  eegRate,
unsigned int  eegRes,
unsigned int  memsRate,
unsigned int  memsRes 
)

Set headset setting for EPOC+ headset.

Remarks
Available for EPOC+ headset only. Headset settings can only be set via USB connection.
Parameters
userId- user ID
EPOCmode- If 0, then EPOC mode is EPOC.
  • If 1, then EPOC mode is EPOC+.
eegRate- If 0, then EEG sample rate is 128Hz.
  • If 1, then EEG sample rate is 256Hz.
eegRes- If 0, then EEG resolution is 14bit.
  • If 1, then EEG resolution is 16bit.
memsRate- If 0, then motion sample rate is OFF.
  • If 1, then motion sample rate is 32Hz.
  • If 2, then motion sample rate is 64Hz.
  • If 3, then motion sample rate is 128Hz.
memsRes- If 0, then motion resolution is 12bit.
  • If 1, then motion resolution is 14bit.
  • If 2, then motion resolution is 16bit.
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
EDK_API int IEE_SoftwareGetVersion ( char *  pszVersionOut,
unsigned int  nVersionChars,
unsigned long *  pBuildNumOut 
)

Return the current version of the Emotiv SDK.

Parameters
pszVersionOut- SDK software version in X.X.X format.
nVersionChars- Length of char buffer pointed to by pszVersion argument.
pBuildNumOut- Build number. Unique for each release.
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h