Capsule API Example

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

Interface to NFB classification process. More...

`#include <ClassificationNFB.hpp>`

Inherits capsule::client::Classification.

## Public Types
enum class | CallResult : uint8_t { Success , ModelIsNotTrained_Deprecated , ModelIsTrained_Deprecated , FailedToSendData }
| NFB call result. More...
Public Types inherited from capsule::client::Classification
enum class | ClassifierType : uint8_t { Cardio = 0 , Emotions = 1 , NFB = 1 << 1 , MEMS = 1 << 2 , Physiological = 1 << 4 , Productivity = 1 << 5 }

## Public Member Functions
| ClassificationNFB (Device &owner)
void | SetOnUserStateChangedEvent (std::function< void(ClassificationNFB &, const nfb::NFBValue &)> &&callback)
void | SetOnErrorEvent (std::function< void(ClassificationNFB &, const std::string &)> &&callback)
Public Member Functions inherited from capsule::client::Classification
bool | IsValid () const noexcept
| Classification (const Classification &)=delete
Classification & | operator= (const Classification &)=delete
| Classification (Classification &&rhs) noexcept
Classification & | operator= (Classification &&rhs) noexcept

## Additional Inherited Members
Protected Member Functions inherited from capsule::client::Classification
| Classification (std::unique_ptr< ClassificationPrivate > &&pimpl)
virtual | ~Classification ()
void | CheckValid () const
template<typename T >
T * | castImpl ()
template<typename T >
const T * | castImpl () const
Protected Attributes inherited from capsule::client::Classification
ClassificationPrivate * | m_pimpl

## Detailed Description

Interface to NFB classification process.

Before calling any of the functions make sure that:

- A valid Session created with Client::CreateSession is passed to the constructor.
- Session is active.

Model might need to be trained before it is able to calculate user state. ClassificationNFB::IsModelTrained will return `false` if it needs to be trained.

In order to train model you should mark each state at least once, with duration no less than a time window

## Member Enumeration Documentation

## ◆ CallResult

enum class capsule::client::ClassificationNFB::CallResult : uint8_t
| strong

NFB call result.

Enumerator
Success | Call has finished successfully.
ModelIsNotTrained_Deprecated | Model was not trained, must be trained first.
ModelIsTrained_Deprecated | Model is already trained, does not need any training.
FailedToSendData | Failed to send data, session might not be active.

## Constructor & Destructor Documentation

## ◆ ClassificationNFB()

capsule::client::ClassificationNFB::ClassificationNFB | ( | Device & | owner | ) |
| explicit

## Member Function Documentation

## ◆ SetOnErrorEvent()

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

## ◆ SetOnUserStateChangedEvent()

void capsule::client::ClassificationNFB::SetOnUserStateChangedEvent | ( | std::function< void(ClassificationNFB &, const nfb::NFBValue &)> && | callback | ) |

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

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