Example
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
CSession.h File Reference
#include "Capsule/CClient.h"
#include "Capsule/CDefinesPrivate.h"
#include "Capsule/CDevice.h"
#include "Capsule/CEEGTimedData.h"
Include dependency graph for CSession.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum clCSessionState clCSessionState
 Session state.
 
typedef enum clCSessionError clCSessionError
 Session error.
 
typedef void(* clCSessionHandlerSessionError) (clCSession, clCSessionError)
 
typedef enum clCUserActivity clCUserActivity
 
typedef void(* clCSessionHandler) (clCSession)
 
typedef void(* clCSessionHandlerSessionEEGData) (clCSession, clCEEGTimedData)
 

Enumerations

enum  clCSessionState {
  clC_SS_Unknown , clC_SS_Starting , clC_SS_Active , clC_SS_Inactive ,
  clC_SS_Pausing , clC_SS_Paused , clC_SS_Stopping
}
 Session state. More...
 
enum  clCSessionError { clC_SE_Unknown , clC_SE_FailedToStart , clC_SE_FailedToStop , clC_SE_LostConnection }
 Session error. More...
 
enum  clCUserActivity {
  clCUserActivity1 , clCUserActivity2 , clCUserActivity3 , clCUserActivity4 ,
  clCUserActivity5 , clCUserActivityNone
}
 

Functions

 CLC_CLASS_WN (SessionPrivate, clCSession)
 Client session.
 
 CLC_STRUCT (clCSessionDelegateSessionError)
 Session error callback. Not supported in the current version.
 
CL_DLL void clCSessionDelegateSessionError_Set (clCSessionDelegateSessionError delegate, clCSessionHandlerSessionError callback) NOEXCEPT
 
CL_DLL clCSession clCClient_CreateSessionWithError (clCClient client, clCDevice device, clCError *error) NOEXCEPT
 Create a Capsule session. Requires a device.
 
CL_DLL clCSession clCClient_CreateSessionWithMonopolarChannelsWithError (clCClient client, clCDevice device, clCError *error) NOEXCEPT
 
CL_DLL void clCSession_Destroy (clCSession session) NOEXCEPT
 Destroy Capsule session. Release the handle.
 
CL_DLL int64_t clCSession_GetSessionID (clCSession session) NOEXCEPT
 Get numeric ID of the session.
 
CL_DLL clCString clCSession_GetSessionUUID (clCSession session) NOEXCEPT
 Get UUID of the session.
 
CL_DLL clCSessionState clCSession_GetSessionState (clCSession session) NOEXCEPT
 Get session state.
 
CL_DLL void clCSession_Start (clCSession session) NOEXCEPT
 Start the session.
 
CL_DLL void clCSession_Stop (clCSession session) NOEXCEPT
 Stop the session.
 
CL_DLL bool clCSession_IsActive (clCSession session) NOEXCEPT
 Is the session active.
 
CL_DLL void clCSession_SetExtra (clCSession session, const char *json) NOEXCEPT
 Set extra data to send to platform.
 
CL_DLL void clCSession_MarkActivity (clCSession session, clCUserActivity marker) NOEXCEPT
 Mark user activity start/stop.
 
CL_DLL bool clCSession_IsFilterEEG (clCSession session) NOEXCEPT
 Check if EEG in the session is filtered.
 
CL_DLL bool clCSession_IsBipolarMode (clCSession session) NOEXCEPT
 Check if bipolar mode is enabled for the session.
 
 CLC_STRUCT (clCSessionDelegate)
 
CL_DLL void clCSessionDelegate_Set (clCSessionDelegate delegate, clCSessionHandler callback) NOEXCEPT
 
CL_DLL clCSessionDelegate clCSession_GetOnSessionStartedEvent (clCSession session) NOEXCEPT
 Get session delegate for started event.
 
CL_DLL clCSessionDelegate clCSession_GetOnSessionStoppedEvent (clCSession session) NOEXCEPT
 Get session delegate for stopped event.
 
CL_DLL clCSessionDelegateSessionError clCSession_GetOnErrorEvent (clCSession session) NOEXCEPT
 Get session delegate for error event.
 
 CLC_STRUCT (clCSessionDelegateSessionEEGData)
 Session delegate for EEG data event. Session EEG data may be filtered and in bipolar mode depending on session configuration.
 
CL_DLL void clCSessionDelegateSessionEEGData_Set (clCSessionDelegateSessionEEGData delegate, clCSessionHandlerSessionEEGData callback) NOEXCEPT
 
CL_DLL clCSessionDelegateSessionEEGData clCSession_GetOnSessionEEGDataEvent (clCSession device) NOEXCEPT
 Get delegate for session EEG data event. Session EEG data may be filtered and in bipolar mode depending on session configuration.
 
CL_DLL void clCSession_SetConfig (clCSession session, bool bipolarMode, bool filterEEG) NOEXCEPT
 Configure whether channels in the session should work in bipolar mode.
 

Typedef Documentation

◆ clCSessionError

Session error.

◆ clCSessionHandler

typedef void(* clCSessionHandler) (clCSession)

◆ clCSessionHandlerSessionEEGData

typedef void(* clCSessionHandlerSessionEEGData) (clCSession, clCEEGTimedData)

◆ clCSessionHandlerSessionError

typedef void(* clCSessionHandlerSessionError) (clCSession, clCSessionError)

◆ clCSessionState

Session state.

◆ clCUserActivity

Enumeration Type Documentation

◆ clCSessionError

Session error.

Enumerator
clC_SE_Unknown 
clC_SE_FailedToStart 
clC_SE_FailedToStop 
clC_SE_LostConnection 

◆ clCSessionState

Session state.

Enumerator
clC_SS_Unknown 
clC_SS_Starting 
clC_SS_Active 
clC_SS_Inactive 
clC_SS_Pausing 
clC_SS_Paused 
clC_SS_Stopping 

◆ clCUserActivity

Enumerator
clCUserActivity1 
clCUserActivity2 
clCUserActivity3 
clCUserActivity4 
clCUserActivity5 
clCUserActivityNone 

Function Documentation

◆ CLC_CLASS_WN()

CLC_CLASS_WN ( SessionPrivate  ,
clCSession   
)

Client session.

Required for classifiers and calibrators

◆ CLC_STRUCT() [1/3]

CLC_STRUCT ( clCSessionDelegate  )

Session delegate without parameters. Not supported in the current version

◆ CLC_STRUCT() [2/3]

CLC_STRUCT ( clCSessionDelegateSessionEEGData  )

Session delegate for EEG data event. Session EEG data may be filtered and in bipolar mode depending on session configuration.

◆ CLC_STRUCT() [3/3]

CLC_STRUCT ( clCSessionDelegateSessionError  )

Session error callback. Not supported in the current version.

◆ clCClient_CreateSessionWithError()

CL_DLL clCSession clCClient_CreateSessionWithError ( clCClient  client,
clCDevice  device,
clCError error 
)

Create a Capsule session. Requires a device.

Parameters
clientclient handle
devicedevice handle
Returns
session handle

◆ clCClient_CreateSessionWithMonopolarChannelsWithError()

CL_DLL clCSession clCClient_CreateSessionWithMonopolarChannelsWithError ( clCClient  client,
clCDevice  device,
clCError error 
)

◆ clCSession_Destroy()

CL_DLL void clCSession_Destroy ( clCSession  session)

Destroy Capsule session. Release the handle.

Parameters
sessionsession handle

◆ clCSession_GetOnErrorEvent()

CL_DLL clCSessionDelegateSessionError clCSession_GetOnErrorEvent ( clCSession  session)

Get session delegate for error event.

Parameters
sessionsession handle

◆ clCSession_GetOnSessionEEGDataEvent()

CL_DLL clCSessionDelegateSessionEEGData clCSession_GetOnSessionEEGDataEvent ( clCSession  device)

Get delegate for session EEG data event. Session EEG data may be filtered and in bipolar mode depending on session configuration.

Parameters
sessionsession handle

◆ clCSession_GetOnSessionStartedEvent()

CL_DLL clCSessionDelegate clCSession_GetOnSessionStartedEvent ( clCSession  session)

Get session delegate for started event.

Parameters
sessionsession handle

◆ clCSession_GetOnSessionStoppedEvent()

CL_DLL clCSessionDelegate clCSession_GetOnSessionStoppedEvent ( clCSession  session)

Get session delegate for stopped event.

Parameters
sessionsession handle

◆ clCSession_GetSessionID()

CL_DLL int64_t clCSession_GetSessionID ( clCSession  session)

Get numeric ID of the session.

Parameters
sessionsession handle
Returns
int64 ID of the session

◆ clCSession_GetSessionState()

CL_DLL clCSessionState clCSession_GetSessionState ( clCSession  session)

Get session state.

Parameters
sessionsession handle

◆ clCSession_GetSessionUUID()

CL_DLL clCString clCSession_GetSessionUUID ( clCSession  session)

Get UUID of the session.

Parameters
sessionsession handle
Returns
string UUID of the session

◆ clCSession_IsActive()

CL_DLL bool clCSession_IsActive ( clCSession  session)

Is the session active.

Parameters
sessionsession handle

◆ clCSession_IsBipolarMode()

CL_DLL bool clCSession_IsBipolarMode ( clCSession  session)

Check if bipolar mode is enabled for the session.

Parameters
session
Returns
true if bipolar mode is enabled

◆ clCSession_IsFilterEEG()

CL_DLL bool clCSession_IsFilterEEG ( clCSession  session)

Check if EEG in the session is filtered.

Parameters
session
Returns
true if EEG is filtered

◆ clCSession_MarkActivity()

CL_DLL void clCSession_MarkActivity ( clCSession  session,
clCUserActivity  marker 
)

Mark user activity start/stop.

Parameters
session
markeruser activity marker or None for the end of user activity

◆ clCSession_SetConfig()

CL_DLL void clCSession_SetConfig ( clCSession  session,
bool  bipolarMode,
bool  filterEEG 
)

Configure whether channels in the session should work in bipolar mode.

Deprecated:
Use clCClient_CreateSessionWithMonopolarChannels to create session in monopolar mode
Parameters
session
bipolarModetrue if bipolar mode is enabled
filterEEGtrue if raw EEG should be filtered

◆ clCSession_SetExtra()

CL_DLL void clCSession_SetExtra ( clCSession  session,
const char *  json 
)

Set extra data to send to platform.

Parameters
sessionsession handle
jsonextra data in json format

◆ clCSession_Start()

CL_DLL void clCSession_Start ( clCSession  session)

Start the session.

Parameters
sessionsession handle

◆ clCSession_Stop()

CL_DLL void clCSession_Stop ( clCSession  session)

Stop the session.

Parameters
sessionsession handle

◆ clCSessionDelegate_Set()

CL_DLL void clCSessionDelegate_Set ( clCSessionDelegate  delegate,
clCSessionHandler  callback 
)

◆ clCSessionDelegateSessionEEGData_Set()

CL_DLL void clCSessionDelegateSessionEEGData_Set ( clCSessionDelegateSessionEEGData  delegate,
clCSessionHandlerSessionEEGData  callback 
)

◆ clCSessionDelegateSessionError_Set()

CL_DLL void clCSessionDelegateSessionError_Set ( clCSessionDelegateSessionError  delegate,
clCSessionHandlerSessionError  callback 
)