Capsule API Example

Loading...
Searching...
No Matches
NFBCalibrator.hpp
Go to the documentation of this file.
1// Copyright. 2019 - 2024 PSBD. All rights reserved.
2
3#pragma once
4
5#include "CDefinesPrivate.h"
6
7#include <Core/NFB.hpp>
8
9 namespace capsule::client {
10 class Device;
11 class NFBCalibratorPrivate;
12 class ClassificationNFB;
13 class ClassificationProductivity;
14 class ClassificationEmotions;
15 class ClassificationNFBPrivate;
16 class ClassificationProductivityPrivate;
17 class ClassificationEmotionsPrivate;
18
22 class CL_DLL NFBCalibrator final {
23 friend NFBCalibratorPrivate;
24 friend ClassificationNFB;
25 friend ClassificationProductivity;
26 friend ClassificationEmotions;
27 friend ClassificationNFBPrivate;
28 friend ClassificationProductivityPrivate;
29 friend ClassificationEmotionsPrivate;
30
31 public:
32 enum class Stage : uint8_t {
33 Stage1,
34 Stage2,
35 Stage3,
36 Stage4
37 };
38
39 explicit NFBCalibrator(Device& owner);
40
41 void CalibrateIndividualNFB(const nfb::IndividualNFBStageInfo& info);
42 void CalibrateIndividualNFB(Stage stage);
43 void CalibrateIndividualNFBQuick();
44 void ImportIndividualNFBData(const nfb::IndividualNFBData& data);
45
46 void SetOnIndividualNFBStageFinishedEvent(std::function<void(NFBCalibrator&)>&& callback);
47 void SetOnIndividualNFBCalibratedEvent(std::function<void(NFBCalibrator&, const nfb::IndividualNFBData&)>&& callback);
48
49 bool IsCalibrated() const;
50 nfb::IndividualNFBData GetIndividualNFB() const;
51
52 private:
53 void CheckValid() const;
54
55 NFBCalibratorPrivate* m_impl;
56};
57
58} // namespace capsule::client
CDefinesPrivate.h
CL_DLL
#define CL_DLL
Definition CDefinesPrivate.h:51
capsule::client::ClassificationEmotions
Wrapper of ClassificationNFB class.
Definition ClassificationEmotions.hpp:20
capsule::client::ClassificationNFB
Interface to NFB classification process.
Definition ClassificationNFB.hpp:30
capsule::client::ClassificationProductivity
Interface to Productivity process.
Definition ClassificationProductivity.hpp:29
capsule::client::Device
Device.
Definition Device.hpp:71
capsule::client::NFBCalibrator
Calibration for Individual NFB and NFB baseline.
Definition NFBCalibrator.hpp:22
capsule::client::NFBCalibrator::Stage
Stage
Definition NFBCalibrator.hpp:32
capsule::client::NFBCalibrator::GetIndividualNFB
nfb::IndividualNFBData GetIndividualNFB() const
capsule::client::NFBCalibrator::NFBCalibrator
NFBCalibrator(Device &owner)
capsule::client::NFBCalibrator::CalibrateIndividualNFBQuick
void CalibrateIndividualNFBQuick()
capsule::client::NFBCalibrator::SetOnIndividualNFBStageFinishedEvent
void SetOnIndividualNFBStageFinishedEvent(std::function< void(NFBCalibrator &)> &&callback)
capsule::client::NFBCalibrator::IsCalibrated
bool IsCalibrated() const
capsule::client::NFBCalibrator::SetOnIndividualNFBCalibratedEvent
void SetOnIndividualNFBCalibratedEvent(std::function< void(NFBCalibrator &, const nfb::IndividualNFBData &)> &&callback)
capsule::client::NFBCalibrator::ImportIndividualNFBData
void ImportIndividualNFBData(const nfb::IndividualNFBData &data)
capsule::client::NFBCalibrator::CalibrateIndividualNFB
void CalibrateIndividualNFB(const nfb::IndividualNFBStageInfo &info)
capsule::client::NFBCalibrator::CalibrateIndividualNFB
void CalibrateIndividualNFB(Stage stage)
capsule::client
Definition Classification.hpp:7