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

typedef enum clCSessionError clCSessionError

Session error.

## ◆ clCSessionHandler

typedef void(* clCSessionHandler) (clCSession)

## ◆ clCSessionHandlerSessionEEGData

typedef void(* clCSessionHandlerSessionEEGData) (clCSession, clCEEGTimedData)

## ◆ clCSessionHandlerSessionError

typedef void(* clCSessionHandlerSessionError) (clCSession, clCSessionError)

## ◆ clCSessionState

typedef enum clCSessionState clCSessionState

Session state.

## ◆ clCUserActivity

typedef enum clCUserActivity clCUserActivity

## Enumeration Type Documentation

## ◆ clCSessionError

enum clCSessionError

Session error.

Enumerator
clC_SE_Unknown |
clC_SE_FailedToStart |
clC_SE_FailedToStop |
clC_SE_LostConnection |

## ◆ clCSessionState

enum 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

enum 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

  client | client handle
  device | device 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

  session | session handle

## ◆ clCSession_GetOnErrorEvent()

CL_DLL clCSessionDelegateSessionError clCSession_GetOnErrorEvent | ( | clCSession | session | ) |

Get session delegate for error event.

Parameters

  session | session 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

  session | session handle

## ◆ clCSession_GetOnSessionStartedEvent()

CL_DLL clCSessionDelegate clCSession_GetOnSessionStartedEvent | ( | clCSession | session | ) |

Get session delegate for started event.

Parameters

  session | session handle

## ◆ clCSession_GetOnSessionStoppedEvent()

CL_DLL clCSessionDelegate clCSession_GetOnSessionStoppedEvent | ( | clCSession | session | ) |

Get session delegate for stopped event.

Parameters

  session | session handle

## ◆ clCSession_GetSessionID()

CL_DLL int64_t clCSession_GetSessionID | ( | clCSession | session | ) |

Get numeric ID of the session.

Parameters

  session | session handle

Returns
  int64 ID of the session

## ◆ clCSession_GetSessionState()

CL_DLL clCSessionState clCSession_GetSessionState | ( | clCSession | session | ) |

Get session state.

Parameters

  session | session handle

## ◆ clCSession_GetSessionUUID()

CL_DLL clCString clCSession_GetSessionUUID | ( | clCSession | session | ) |

Get UUID of the session.

Parameters

  session | session handle

Returns
  string UUID of the session

## ◆ clCSession_IsActive()

CL_DLL bool clCSession_IsActive | ( | clCSession | session | ) |

Is the session active.

Parameters

  session | session 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 |
  marker | user 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 |
  bipolarMode | `true` if bipolar mode is enabled
  filterEEG | `true` 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

  session | session handle
  json | extra data in json format

## ◆ clCSession_Start()

CL_DLL void clCSession_Start | ( | clCSession | session | ) |

Start the session.

Parameters

  session | session handle

## ◆ clCSession_Stop()

CL_DLL void clCSession_Stop | ( | clCSession | session | ) |

Stop the session.

Parameters

  session | session 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
| ) |  |