MentalCommandDetection.h File Reference
#include "IEmoStateDLL.h"

Go to the source code of this file.

Macros

#define EDK_API
 

Typedefs

typedef void * EmoEngineEventHandle
 Handle to EmoEngine event structure allocated by IEE_EmoEngineEventCreate. More...
 
typedef enum IEE_MentalCommandTrainingControl_enum IEE_MentalCommandTrainingControl_t
 MentalCommand Suite training control enumerator. More...
 
typedef enum IEE_MentalCommandEvent_enum IEE_MentalCommandEvent_t
 MentalCommand event types. More...
 

Enumerations

enum  IEE_MentalCommandTrainingControl_enum {
  MC_NONE = 0, MC_START, MC_ACCEPT, MC_REJECT,
  MC_ERASE, MC_RESET
}
 MentalCommand Suite training control enumerator. More...
 
enum  IEE_MentalCommandEvent_enum {
  IEE_MentalCommandNoEvent = 0, IEE_MentalCommandTrainingStarted, IEE_MentalCommandTrainingSucceeded, IEE_MentalCommandTrainingFailed,
  IEE_MentalCommandTrainingCompleted, IEE_MentalCommandTrainingDataErased, IEE_MentalCommandTrainingRejected, IEE_MentalCommandTrainingReset,
  IEE_MentalCommandAutoSamplingNeutralCompleted, IEE_MentalCommandSignatureUpdated
}
 MentalCommand event types. More...
 

Functions

EDK_API IEE_MentalCommandEvent_t IEE_MentalCommandEventGetType (EmoEngineEventHandle hEvent)
 Return the MentalCommand-specific event type. More...
 
EDK_API int IEE_MentalCommandSetActiveActions (unsigned int userId, unsigned long activeActions)
 Set the current MentalCommand active action types. More...
 
EDK_API int IEE_MentalCommandGetActiveActions (unsigned int userId, unsigned long *pActiveActionsOut)
 Get the current MentalCommand active action types. More...
 
EDK_API int IEE_MentalCommandGetTrainingTime (unsigned int userId, unsigned int *pTrainingTimeOut)
 Return the duration of a MentalCommand training session. More...
 
EDK_API int IEE_MentalCommandSetTrainingControl (unsigned int userId, IEE_MentalCommandTrainingControl_t control)
 Set the training control flag for MentalCommand training. More...
 
EDK_API int IEE_MentalCommandSetTrainingAction (unsigned int userId, IEE_MentalCommandAction_t action)
 Set the type of MentalCommand action to be trained. More...
 
EDK_API int IEE_MentalCommandGetTrainingAction (unsigned int userId, IEE_MentalCommandAction_t *pActionOut)
 Get the type of MentalCommand action currently selected for training. More...
 
EDK_API int IEE_MentalCommandGetTrainedSignatureActions (unsigned int userId, unsigned long *pTrainedActionsOut)
 Get a list of the actions that have been trained by the user. More...
 
EDK_API int IEE_MentalCommandGetOverallSkillRating (unsigned int userId, float *pOverallSkillRatingOut)
 Get the current overall skill rating of the user in MentalCommand. More...
 
EDK_API int IEE_MentalCommandGetActionSkillRating (unsigned int userId, IEE_MentalCommandAction_t action, float *pActionSkillRatingOut)
 Get the current skill rating for particular MentalCommand actions of the user. More...
 
EDK_API int IEE_MentalCommandSetActivationLevel (unsigned int userId, int level)
 Set the overall sensitivity for all MentalCommand actions. More...
 
EDK_API int IEE_MentalCommandSetActionSensitivity (unsigned int userId, int action1Sensitivity, int action2Sensitivity, int action3Sensitivity, int action4Sensitivity)
 Set the sensitivity of MentalCommand actions. More...
 
EDK_API int IEE_MentalCommandGetActivationLevel (unsigned int userId, int *pLevelOut)
 Get the overall sensitivity for all MentalCommand actions. More...
 
EDK_API int IEE_MentalCommandGetActionSensitivity (unsigned int userId, int *pAction1SensitivityOut, int *pAction2SensitivityOut, int *pAction3SensitivityOut, int *pAction4SensitivityOut)
 Query the sensitivity of MentalCommand actions. More...
 
EDK_API int IEE_MentalCommandStartSamplingNeutral (unsigned int userId)
 Start the sampling of Neutral state in MentalCommand. More...
 
EDK_API int IEE_MentalCommandStopSamplingNeutral (unsigned int userId)
 Stop the sampling of Neutral state in MentalCommand. More...
 
EDK_API int IEE_MentalCommandSetSignatureCaching (unsigned int userId, unsigned int enabled)
 Enable or disable signature caching in MentalCommand. More...
 
EDK_API int IEE_MentalCommandGetSignatureCaching (unsigned int userId, unsigned int *pEnabledOut)
 Query the status of signature caching in MentalCommand. More...
 
EDK_API int IEE_MentalCommandSetSignatureCacheSize (unsigned int userId, unsigned int size)
 Set the cache size for the signature caching in MentalCommand. More...
 
EDK_API int IEE_MentalCommandGetSignatureCacheSize (unsigned int userId, unsigned int *pSizeOut)
 Get the current cache size for the signature caching in MentalCommand. More...
 

Detailed Description

Emotiv SDK Copyright (c) 2016 Emotiv Inc.

This file is part of the Emotiv SDK.

Header file for Mental Command related API.

Macro Definition Documentation

#define EDK_API

Typedef Documentation

typedef void* EmoEngineEventHandle

Handle to EmoEngine event structure allocated by IEE_EmoEngineEventCreate.

See also
IEE_EmoEngineEventCreate()

MentalCommand event types.

MentalCommand Suite training control enumerator.

Enumeration Type Documentation

MentalCommand event types.

Enumerator
IEE_MentalCommandNoEvent 

No new event.

IEE_MentalCommandTrainingStarted 

The training has begun after MC_START is sent.

IEE_MentalCommandTrainingSucceeded 

The training is succeeded, waiting for MC_ACCEPT or MC_REJECT.

IEE_MentalCommandTrainingFailed 

The training is failed due to signal issues. Please restart training.

IEE_MentalCommandTrainingCompleted 

The training is completed after MC_ACCEPT is sent.

IEE_MentalCommandTrainingDataErased 

The training data for a particular action has been erased by MC_ERASE.

IEE_MentalCommandTrainingRejected 

The training is rejected after MC_REJECT is sent.

IEE_MentalCommandTrainingReset 

The training has been reset after MC_RESET is sent.

IEE_MentalCommandAutoSamplingNeutralCompleted 

The neutral training is completed.

IEE_MentalCommandSignatureUpdated 

The mental command signature has been updated for new actions.

MentalCommand Suite training control enumerator.

Enumerator
MC_NONE 

No action.

MC_START 

Start a new training.

MC_ACCEPT 

Accept current training.

MC_REJECT 

Reject current training.

MC_ERASE 

Erase training data for an action.

MC_RESET 

Reset current training.

Function Documentation

EDK_API IEE_MentalCommandEvent_t IEE_MentalCommandEventGetType ( EmoEngineEventHandle  hEvent)

Return the MentalCommand-specific event type.

Returns the MentalCommand-specific event type for an IEE_MentalCommandEvent event already retrieved using IEE_EngineGetNextEvent().

Parameters
hEvent- a handle returned by IEE_EmoEngineEventCreate()
Returns
IEE_MentalCommandEvent_t
EDK_API int IEE_MentalCommandGetActionSensitivity ( unsigned int  userId,
int *  pAction1SensitivityOut,
int *  pAction2SensitivityOut,
int *  pAction3SensitivityOut,
int *  pAction4SensitivityOut 
)

Query the sensitivity of MentalCommand actions.

Parameters
userId- user ID
pAction1SensitivityOut- sensitivity of action 1
pAction2SensitivityOut- sensitivity of action 2
pAction3SensitivityOut- sensitivity of action 3
pAction4SensitivityOut- sensitivity of action 4
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandGetActionSkillRating ( unsigned int  userId,
IEE_MentalCommandAction_t  action,
float *  pActionSkillRatingOut 
)

Get the current skill rating for particular MentalCommand actions of the user.

Blocking call

Parameters
userId- user ID
action- a particular action of IEE_MentalCommandAction_t contant
pActionSkillRatingOut- receives the action skill rating [from 0.0 to 1.0]
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandAction_t
EDK_API int IEE_MentalCommandGetActivationLevel ( unsigned int  userId,
int *  pLevelOut 
)

Get the overall sensitivity for all MentalCommand actions.

Parameters
userId- user ID
pLevelOut- sensitivity level of all actions (min: 1, max: 10)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandGetActiveActions ( unsigned int  userId,
unsigned long *  pActiveActionsOut 
)

Get the current MentalCommand active action types.

Parameters
userId- user ID
pActiveActionsOut- receive a bit vector composed of IEE_MentalCommandAction_t contants
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandAction_t
EDK_API int IEE_MentalCommandGetOverallSkillRating ( unsigned int  userId,
float *  pOverallSkillRatingOut 
)

Get the current overall skill rating of the user in MentalCommand.

Blocking call

Parameters
userId- user ID
pOverallSkillRatingOut- receives the overall skill rating [from 0.0 to 1.0]
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandGetSignatureCacheSize ( unsigned int  userId,
unsigned int *  pSizeOut 
)

Get the current cache size for the signature caching in MentalCommand.

Parameters
userId- user ID
pSizeOut- number of signatures to be kept in the cache (0: unlimited)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandGetSignatureCaching ( unsigned int  userId,
unsigned int *  pEnabledOut 
)

Query the status of signature caching in MentalCommand.

Parameters
userId- user ID
pEnabledOut- flag to get status of caching (1: enable, 0: disable)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandGetTrainedSignatureActions ( unsigned int  userId,
unsigned long *  pTrainedActionsOut 
)

Get a list of the actions that have been trained by the user.

Blocking call

Parameters
userId- user ID
pTrainedActionsOut- receives a bit vector composed of IEE_MentalCommandAction_t contants
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandAction_t
EDK_API int IEE_MentalCommandGetTrainingAction ( unsigned int  userId,
IEE_MentalCommandAction_t pActionOut 
)

Get the type of MentalCommand action currently selected for training.

Parameters
userId- user ID
pActionOut- action that is currently selected for training
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandAction_t
EDK_API int IEE_MentalCommandGetTrainingTime ( unsigned int  userId,
unsigned int *  pTrainingTimeOut 
)

Return the duration of a MentalCommand training session.

Parameters
userId- user ID
pTrainingTimeOut- receive the training time in ms
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandSetActionSensitivity ( unsigned int  userId,
int  action1Sensitivity,
int  action2Sensitivity,
int  action3Sensitivity,
int  action4Sensitivity 
)

Set the sensitivity of MentalCommand actions.

Parameters
userId- user ID
action1Sensitivity- sensitivity of action 1 (min: 1, max: 10)
action2Sensitivity- sensitivity of action 2 (min: 1, max: 10)
action3Sensitivity- sensitivity of action 3 (min: 1, max: 10)
action4Sensitivity- sensitivity of action 4 (min: 1, max: 10)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandSetActivationLevel ( unsigned int  userId,
int  level 
)

Set the overall sensitivity for all MentalCommand actions.

Parameters
userId- user ID
level- sensitivity level of all actions (lowest: 1, highest: 7)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandSetActiveActions ( unsigned int  userId,
unsigned long  activeActions 
)

Set the current MentalCommand active action types.

Parameters
userId- user ID
activeActions- a bit vector composed of IEE_MentalCommandAction_t contants
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandAction_t
EDK_API int IEE_MentalCommandSetSignatureCacheSize ( unsigned int  userId,
unsigned int  size 
)

Set the cache size for the signature caching in MentalCommand.

Parameters
userId- user ID
size- number of signatures to be kept in the cache (0: unlimited)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandSetSignatureCaching ( unsigned int  userId,
unsigned int  enabled 
)

Enable or disable signature caching in MentalCommand.

Enable signature caching will shorten the time to build the signature after each training, with the penalty of more memory usage.

Parameters
userId- user ID
enabled- flag to set status of caching (1: enable, 0: disable)
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandSetTrainingAction ( unsigned int  userId,
IEE_MentalCommandAction_t  action 
)

Set the type of MentalCommand action to be trained.

Parameters
userId- user ID
action- which action would like to be trained
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandAction_t
EDK_API int IEE_MentalCommandSetTrainingControl ( unsigned int  userId,
IEE_MentalCommandTrainingControl_t  control 
)

Set the training control flag for MentalCommand training.

Parameters
userId- user ID
control- pre-defined MentalCommand training control
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h, IEE_MentalCommandTrainingControl_t
EDK_API int IEE_MentalCommandStartSamplingNeutral ( unsigned int  userId)

Start the sampling of Neutral state in MentalCommand.

Parameters
userId- user ID
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h
EDK_API int IEE_MentalCommandStopSamplingNeutral ( unsigned int  userId)

Stop the sampling of Neutral state in MentalCommand.

Parameters
userId- user ID
Returns
EDK_ERROR_CODE
  • EDK_OK if successful
See also
IedkErrorCode.h