Capsule API Example

Loading...
Searching...
No Matches
Public Member Functions | List of all members
capsule::client::Device Class Referencefinal

Device. More...

`#include <Device.hpp>`

## Public Member Functions
| Device (const Device &)=delete
Device & | operator= (const Device &)=delete
| Device (Device &&rhd) noexcept
Device & | operator= (Device &&rhd) noexcept
| ~Device ()=default
bool | IsConnected () const
const device::DeviceInfo & | GetInfo () &
float | GetEEGSampleRate () const
float | GetPPGSampleRate () const
float | GetMEMSSampleRate () const
int | GetPPGIrAmplitude () const
int | GetPPGRedAmplitude () const
void | SetOnConnectionStateChangedEvent (std::function< void(Device &, device::DeviceConnectionStatus)> &&callback)
void | SetOnResistanceUpdateEvent (std::function< void(Device &, device::Resistances &&)> &&callback)
void | SetOnBatteryChargeUpdateEvent (std::function< void(Device &, device::DeviceBatteryCharge)> &&callback)
void | SetOnEEGDataEvent (std::function< void(Device &, device::EEGTimedData &&)> &&callback)
void | SetOnErrorEvent (std::function< void(Device &, std::string &&)> &&callback)
void | SetOnModeSwitchedEvent (std::function< void(Device &, device::DeviceMode)> &&callback)
void | SetOnPSDDataEvent (std::function< void(Device &, device::PSDData &&)> &&callback)
void | SetOnEEGArtifactsEvent (std::function< void(Device &, device::EEGArtifacts &&)> &&callback)
void | Connect (bool bipolarChannels)
void | Disconnect ()
void | Start ()
bool | Stop ()
device::DeviceBatteryCharge | GetBatteryCharge () const
device::DeviceChannelNames | GetChannelNames () const
device::DeviceMode | GetMode () const
bool | IsValid () const noexcept

## Detailed Description

Device.

Controls connection to the device

## Constructor & Destructor Documentation

## ◆ Device() [1/2]

capsule::client::Device::Device | ( | const Device & |  | ) |
| delete

## ◆ Device() [2/2]

capsule::client::Device::Device | ( | Device && | rhd | ) |
| noexcept

## ◆ ~Device()

capsule::client::Device::~Device | ( |  | ) |
| default

## Member Function Documentation

## ◆ Connect()

void capsule::client::Device::Connect | ( | bool | bipolarChannels | ) |

Connect to device. Non-blocking - OnConnectionStateChanged event is fired when connected.

## ◆ Disconnect()

void capsule::client::Device::Disconnect | ( |  | ) |

Disconnect from device. Non-blocking - OnConnectionStateChanged event is fired when disconnected.

## ◆ GetBatteryCharge()

device::DeviceBatteryCharge capsule::client::Device::GetBatteryCharge | ( |  | ) | const

## ◆ GetChannelNames()

device::DeviceChannelNames capsule::client::Device::GetChannelNames | ( |  | ) | const

## ◆ GetEEGSampleRate()

float capsule::client::Device::GetEEGSampleRate | ( |  | ) | const

## ◆ GetInfo()

const device::DeviceInfo & capsule::client::Device::GetInfo | ( |  | ) | &

Get device information.

Returns
  device info

## ◆ GetMEMSSampleRate()

float capsule::client::Device::GetMEMSSampleRate | ( |  | ) | const

## ◆ GetMode()

device::DeviceMode capsule::client::Device::GetMode | ( |  | ) | const

## ◆ GetPPGIrAmplitude()

int capsule::client::Device::GetPPGIrAmplitude | ( |  | ) | const

## ◆ GetPPGRedAmplitude()

int capsule::client::Device::GetPPGRedAmplitude | ( |  | ) | const

## ◆ GetPPGSampleRate()

float capsule::client::Device::GetPPGSampleRate | ( |  | ) | const

## ◆ IsConnected()

bool capsule::client::Device::IsConnected | ( |  | ) | const

Is device connected to Capsule.

## ◆ IsValid()

bool capsule::client::Device::IsValid | ( |  | ) | const
| noexcept

## ◆ operator=() [1/2]

Device & capsule::client::Device::operator= | ( | const Device & |  | ) |
| delete

## ◆ operator=() [2/2]

Device & capsule::client::Device::operator= | ( | Device && | rhd | ) |
| noexcept

## ◆ SetOnBatteryChargeUpdateEvent()

void capsule::client::Device::SetOnBatteryChargeUpdateEvent | ( | std::function< void(Device &, device::DeviceBatteryCharge)> && | callback | ) |

## ◆ SetOnConnectionStateChangedEvent()

void capsule::client::Device::SetOnConnectionStateChangedEvent | ( | std::function< void(Device &, device::DeviceConnectionStatus)> && | callback | ) |

## ◆ SetOnEEGArtifactsEvent()

void capsule::client::Device::SetOnEEGArtifactsEvent | ( | std::function< void(Device &, device::EEGArtifacts &&)> && | callback | ) |

## ◆ SetOnEEGDataEvent()

void capsule::client::Device::SetOnEEGDataEvent | ( | std::function< void(Device &, device::EEGTimedData &&)> && | callback | ) |

## ◆ SetOnErrorEvent()

void capsule::client::Device::SetOnErrorEvent | ( | std::function< void(Device &, std::string &&)> && | callback | ) |

## ◆ SetOnModeSwitchedEvent()

void capsule::client::Device::SetOnModeSwitchedEvent | ( | std::function< void(Device &, device::DeviceMode)> && | callback | ) |

## ◆ SetOnPSDDataEvent()

void capsule::client::Device::SetOnPSDDataEvent | ( | std::function< void(Device &, device::PSDData &&)> && | callback | ) |

## ◆ SetOnResistanceUpdateEvent()

void capsule::client::Device::SetOnResistanceUpdateEvent | ( | std::function< void(Device &, device::Resistances &&)> && | callback | ) |

## ◆ Start()

void capsule::client::Device::Start | ( |  | ) |

## ◆ Stop()

bool capsule::client::Device::Stop | ( |  | ) |

The documentation for this class was generated from the following file:

- C:/builds/bci/capsule/CapsuleClient/Include/Device.hpp