|
Example
|


Go to the source code of this file.
Typedefs | |
| typedef enum clCDisconnectReason | clCDisconnectReason |
| Reason for client's disconnect. | |
| typedef enum clCConnectionState | clCConnectionState |
| Connection state to Capsule. | |
| typedef void(* | clCClientHandler) (clCClient) |
| typedef void(* | clCClientHandlerDisconnectReason) (clCClient, clCDisconnectReason) |
| typedef void(* | clCClientHandlerError) (clCClient, clCError) |
Enumerations | |
| enum | clCDisconnectReason { clC_DR_UserRequested , clC_DR_Destruction , clC_DR_FatalError } |
| Reason for client's disconnect. More... | |
| enum | clCConnectionState { clC_CS_Disconnected , clC_CS_Connecting , clC_CS_Connected , clC_CS_Disconnecting } |
| Connection state to Capsule. More... | |
Functions | |
| CLC_CLASS_WN (ClientPrivate, clCClient) | |
| Used to connect with Capsule. | |
| CLC_STRUCT (clCClientDelegate) | |
| Client callback without parameters. (Note: ALL callbacks receive their owner as first argument). | |
| CL_DLL void | clCClientDelegate_Set (clCClientDelegate delegate, clCClientHandler callback) NOEXCEPT |
| CLC_STRUCT (clCClientDelegateDisconnectReason) | |
| Client disconnect callback. Not supported in the current version. | |
| CL_DLL void | clCClientDelegateDisconnectReason_Set (clCClientDelegateDisconnectReason delegate, clCClientHandlerDisconnectReason callback) NOEXCEPT |
| CLC_STRUCT (clCClientDelegateError) | |
| Client error callback. Not supported in the current version. | |
| CL_DLL void | clCClientDelegateError_Set (clCClientDelegateError delegate, clCClientHandlerError callback) NOEXCEPT |
| CL_DLL clCString | clCClient_GetVersionString () NOEXCEPT |
| CL_DLL void | clCClient_SetAppVersion (clCClient client, const char *version) |
| Client application version setter. Must be set before client connection. | |
| CL_DLL clCClient | clCClient_Create () NOEXCEPT |
| CL_DLL clCClient | clCClient_CreateWithName (const char *clientName) NOEXCEPT |
| CL_DLL clCClient | clCClient_CreateWithDataDirectory (const char *dataDir) NOEXCEPT |
| CL_DLL clCClient | clCClient_CreateWithDataDirectoryAndName (const char *dataDir, const char *clientName) NOEXCEPT |
| CL_DLL void | clCClient_Destroy (clCClient client) NOEXCEPT |
| CL_DLL void | clCClient_Connect (clCClient client, const char *address) NOEXCEPT |
| CL_DLL void | clCClient_ConnectWithAccessToken (clCClient client, const char *address, const char *accessToken) NOEXCEPT |
| CL_DLL void | clCClient_ConnectWithAccessTokenAndPlatformAddress (clCClient client, const char *address, const char *accessToken, const char *platformAddress) NOEXCEPT |
| CL_DLL clCClientDelegate | clCClient_GetOnRefreshAccessTokenRequestedEvent (clCClient client) NOEXCEPT |
| CL_DLL void | clCClient_RefreshToken (clCClient client, const char *accessToken) NOEXCEPT |
| CL_DLL uint64_t | clCClient_GetTime () NOEXCEPT |
| CL_DLL uint64_t | clCClient_GetTimeMicro () NOEXCEPT |
| CL_DLL void | clCClient_Disconnect (clCClient client) NOEXCEPT |
| CL_DLL bool | clCClient_IsConnected (clCClient client) NOEXCEPT |
| CL_DLL bool | clCClient_IsConnecting (clCClient client) NOEXCEPT |
| CL_DLL clCString | clCClient_GetCapsuleVersion (clCClient client) NOEXCEPT |
| CL_DLL clCString | clCClient_GetClientName (clCClient client) NOEXCEPT |
| CL_DLL clCString | clCClient_GetDataDirectory (clCClient client) NOEXCEPT |
| CL_DLL void | clCClient_Update (clCClient client) NOEXCEPT |
| CL_DLL clCClientDelegate | clCClient_GetOnConnectedEvent (clCClient client) NOEXCEPT |
| CL_DLL clCClientDelegateDisconnectReason | clCClient_GetOnDisconnectedEvent (clCClient client) NOEXCEPT |
| CL_DLL clCClientDelegateError | clCClient_GetOnErrorEvent (clCClient client) NOEXCEPT |
| typedef void(* clCClientHandler) (clCClient) |
| typedef void(* clCClientHandlerDisconnectReason) (clCClient, clCDisconnectReason) |
| typedef void(* clCClientHandlerError) (clCClient, clCError) |
| typedef enum clCConnectionState clCConnectionState |
Connection state to Capsule.
| typedef enum clCDisconnectReason clCDisconnectReason |
Reason for client's disconnect.
| enum clCConnectionState |
| enum clCDisconnectReason |
| CLC_CLASS_WN | ( | ClientPrivate | , |
| clCClient | |||
| ) |
Used to connect with Capsule.
Handle to client used to connect with Capsule, responsible for control.
| CLC_STRUCT | ( | clCClientDelegate | ) |
Client callback without parameters. (Note: ALL callbacks receive their owner as first argument).
| CLC_STRUCT | ( | clCClientDelegateDisconnectReason | ) |
Client disconnect callback. Not supported in the current version.
| CLC_STRUCT | ( | clCClientDelegateError | ) |
Client error callback. Not supported in the current version.
| CL_DLL void clCClient_Connect | ( | clCClient | client, |
| const char * | address | ||
| ) |
Connect to Capsule.
| client | client handle |
| address | Capsule address to connect to. If NULL, the default address "tcp:://127.0.0.1:5666" is in effect.
|
| CL_DLL void clCClient_ConnectWithAccessToken | ( | clCClient | client, |
| const char * | address, | ||
| const char * | accessToken | ||
| ) |
Connect to Capsule with access token.
| client | client handle |
| address | Capsule address to connect to. If NULL, the default address "tcp:://127.0.0.1:5666" is in effect.
|
| accessToken | access token for communication with platform |
| CL_DLL void clCClient_ConnectWithAccessTokenAndPlatformAddress | ( | clCClient | client, |
| const char * | address, | ||
| const char * | accessToken, | ||
| const char * | platformAddress | ||
| ) |
Connect to Capsule with access token and platform address.
| client | client handle |
| address | Capsule address to connect to. If NULL, the default address "tcp:://127.0.0.1:5666" is in effect.
|
| accessToken | access token for communication with platform |
| platformAddress | URL of a platform processing http requests |
| CL_DLL clCClient clCClient_Create | ( | ) |
Create a Capsule client.
| CL_DLL clCClient clCClient_CreateWithDataDirectory | ( | const char * | dataDir | ) |
Create a Capsule client with data directory.
| dataDir | path to data directory |
| CL_DLL clCClient clCClient_CreateWithDataDirectoryAndName | ( | const char * | dataDir, |
| const char * | clientName | ||
| ) |
Create a Capsule client with data directory and application name.
| dataDir | path to data directory |
| clientName | application name |
| CL_DLL clCClient clCClient_CreateWithName | ( | const char * | clientName | ) |
Create a Capsule client with application name.
| clientName | application name |
| CL_DLL void clCClient_Destroy | ( | clCClient | client | ) |
Destroy Capsule client. Release the handle.
| client | client handle |
| CL_DLL void clCClient_Disconnect | ( | clCClient | client | ) |
Disconnects from Capsule, stopping any background threads.
| client | client handle |
| CL_DLL clCString clCClient_GetCapsuleVersion | ( | clCClient | client | ) |
Get Capsule version string.
| client | client handle |
| CL_DLL clCString clCClient_GetClientName | ( | clCClient | client | ) |
Get Client application name.
| client | client handle |
| CL_DLL clCString clCClient_GetDataDirectory | ( | clCClient | client | ) |
Get Capsule data directory.
| client | client handle |
| CL_DLL clCClientDelegate clCClient_GetOnConnectedEvent | ( | clCClient | client | ) |
Get delegate for client connected event.
| client | client handle |
| CL_DLL clCClientDelegateDisconnectReason clCClient_GetOnDisconnectedEvent | ( | clCClient | client | ) |
Get delegate for client disconnected event.
| client | client handle |
| CL_DLL clCClientDelegateError clCClient_GetOnErrorEvent | ( | clCClient | client | ) |
Get delegate for client error event.
| client | client handle |
| CL_DLL clCClientDelegate clCClient_GetOnRefreshAccessTokenRequestedEvent | ( | clCClient | client | ) |
Get delegate for client RefreshAccessTokenRequested event.
| client | client handle |
| CL_DLL uint64_t clCClient_GetTime | ( | ) |
Get Capsule time for synchronization with EEG timestamps
| CL_DLL uint64_t clCClient_GetTimeMicro | ( | ) |
Get Capsule time in microseconds
| CL_DLL clCString clCClient_GetVersionString | ( | ) |
Get Capsule client version
| CL_DLL bool clCClient_IsConnected | ( | clCClient | client | ) |
Is client connected.
| client | client handle |
| CL_DLL bool clCClient_IsConnecting | ( | clCClient | client | ) |
Is client connecting.
| client | client handle |
| CL_DLL void clCClient_RefreshToken | ( | clCClient | client, |
| const char * | accessToken | ||
| ) |
Refresh access token for data upload
| client | client handle |
| accessToken | access token |
| CL_DLL void clCClient_SetAppVersion | ( | clCClient | client, |
| const char * | version | ||
| ) |
Client application version setter. Must be set before client connection.
| [in,out] | client | client handle |
| [in] | version | string, representing client's version |
| CL_DLL void clCClient_Update | ( | clCClient | client | ) |
Client is single-threaded. Note: Update does all the work and must be called regularly to process events.
| client | client handle |
| CL_DLL void clCClientDelegate_Set | ( | clCClientDelegate | delegate, |
| clCClientHandler | callback | ||
| ) |
| CL_DLL void clCClientDelegateDisconnectReason_Set | ( | clCClientDelegateDisconnectReason | delegate, |
| clCClientHandlerDisconnectReason | callback | ||
| ) |
| CL_DLL void clCClientDelegateError_Set | ( | clCClientDelegateError | delegate, |
| clCClientHandlerError | callback | ||
| ) |