Capsule API Example

Loading...
Searching...
No Matches
Connect To Device

To get [DeviceID, IsConnected, SerialNum, PingTime, DeviceStatus, ChannelNames, ChannelNamesSize, Resistances, ResistancesSize, BatteryCharge] a callback is used with a pointer to `clCDevice_StateData`, which is set via clCDevice_SetOnDeviceStateUpdateEvent

To get `clCDevice_ConnectionState` a callback is used, which is set via clCDevice_SetOnConnectionStateChangedEvent

## Fail Reason values:

- 0 - Ok
- 1 - BluetoothDisabled
- 2 - Unknown

## Device Type values:

- 0 - Band
- 1 - Buds
- 2 - Headphones
- 3 - Impulse
- 4 - Any
- 6 - BrainBit
- 100 - SinWave
- 101 - Noise

## Device Mode values:

- 0 - Resistance
- 1 - Signal
- 2 - SignalAndResist
- 3 - StartMEMS
- 4 - StopMEMS
- 6 - StartPPG
- 7 - StopPPG

## Connection State values:

- 0 - Disconnected
- 1 - Connected
- 2 - UnsupportedConnection

## Log Level:

- 0 - Trace
- 1 - Debug
- 2 - Info
- 3 - Warn
- 4 - Err
- 5 - Critical
- 6 - Off

## Methods:

- clCCapsule_GetVersionString
- clCCapsule_SetSingleThreaded
- clCCapsule_SetLogLevel
- clCCapsule_GetLogLevel
- clCDeviceLocator_Create
- clCDeviceLocator_CreateWithLogDirectory
- clCDeviceLocator_Update
- clCDeviceLocator_Destroy
- clCDeviceLocator_RequestDevices
- clCDeviceLocator_CreateDevice
- clCDeviceInfoList_GetCount
- clCDeviceInfoList_GetDeviceInfo
- clCDeviceInfo_GetSerial
- clCDeviceInfo_GetName
- clCDeviceInfo_GetType
- clCDevice_Connect
- clCDevice_Disconnect
- clCDevice_GetBatteryCharge
- clCDevice_Start
- clCDevice_Stop
- clCDevice_GetMode
- clCDevice_IsConnected
- clCDevice_GetInfo
- clCDevice_GetEEGSampleRate
- clCDevice_GetPPGSampleRate
- clCDevice_GetMEMSSampleRate
- clCDevice_GetPPGIrAmplitude
- clCDevice_GetPPGRedAmplitude
- clCDevice_GetChannelNames
- clCDevice_ChannelNames_GetChannelsCount
- clCDevice_ChannelNames_GetChannelIndexByName
- clCDevice_ChannelNames_GetChannelNameByIndex
- clCDevice_Release

## Device events:

- clCDeviceLocator_SetOnDeviceListEvent
- clCDevice_SetOnConnectionStatusChangedEvent
- clCDevice_SetOnResistanceUpdateEvent
- clCDevice_SetOnBatteryChargeUpdateEvent
- clCDevice_SetOnModeSwitchedEvent
- clCDevice_SetOnEEGDataEvent
- clCDevice_SetOnPSDDataEvent
- clCDevice_SetOnEEGArtifactsEvent
- clCDevice_SetOnErrorEvent