Capsule API Example

Loading...
Searching...
No Matches
ClassificationProductivity.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#include "Classification.hpp"
7
8#include <Core/Common.hpp>
9#include <Core/Delegate.hpp>
10
11 namespace capsule::client {
12 class ClassificationProductivityPrivate;
13 class Device;
14
29 class CL_DLL ClassificationProductivity final : public Classification {
30 friend ClassificationProductivityPrivate;
31
32 public:
33 explicit ClassificationProductivity(Device& owner);
34
35 void SetOnMetricsUpdateEvent(std::function<void(ClassificationProductivity&, const productivity::Metrics&)>&& callback);
36 void SetOnIndexesUpdateEvent(std::function<void(ClassificationProductivity&, const productivity::Indexes&)>&& callback);
37 void SetOnBaselineUpdateEvent(std::function<void(ClassificationProductivity&, const productivity::Baselines&)>&& callback);
38 void SetOnCalibrationProgressUpdateEvent(std::function<void(ClassificationProductivity&, float)>&& callback);
39 void SetOnIndividualNFBUpdateEvent(std::function<void(ClassificationProductivity&)>&& callback);
40
48 void RequestIndexesState();
49
53 void StartBaselineCalibration();
54
58 void ResetAccumulatedFatigue();
59
63 void ImportBaselines(const productivity::Baselines& baseline);
64
65 private:
66 ClassificationProductivityPrivate* getImpl();
67 const ClassificationProductivityPrivate* getImpl() const;
68};
69
70} // namespace capsule::client
CDefinesPrivate.h
CL_DLL
#define CL_DLL
Definition CDefinesPrivate.h:51
Classification.hpp
capsule::client::Classification
is the base class for to NFB or productivity classification process.
Definition Classification.hpp:16
capsule::client::ClassificationProductivity
Interface to Productivity process.
Definition ClassificationProductivity.hpp:29
capsule::client::ClassificationProductivity::SetOnMetricsUpdateEvent
void SetOnMetricsUpdateEvent(std::function< void(ClassificationProductivity &, const productivity::Metrics &)> &&callback)
capsule::client::ClassificationProductivity::ResetAccumulatedFatigue
void ResetAccumulatedFatigue()
Reset accumulated fatigue.
capsule::client::ClassificationProductivity::SetOnIndexesUpdateEvent
void SetOnIndexesUpdateEvent(std::function< void(ClassificationProductivity &, const productivity::Indexes &)> &&callback)
capsule::client::ClassificationProductivity::SetOnIndividualNFBUpdateEvent
void SetOnIndividualNFBUpdateEvent(std::function< void(ClassificationProductivity &)> &&callback)
capsule::client::ClassificationProductivity::SetOnCalibrationProgressUpdateEvent
void SetOnCalibrationProgressUpdateEvent(std::function< void(ClassificationProductivity &, float)> &&callback)
capsule::client::ClassificationProductivity::RequestIndexesState
void RequestIndexesState()
request to measure and send status indexes - GetOnIndexesStateEvent will receive a response within 5 ...
capsule::client::ClassificationProductivity::StartBaselineCalibration
void StartBaselineCalibration()
it is necessary to calibrate the getting values
capsule::client::ClassificationProductivity::ImportBaselines
void ImportBaselines(const productivity::Baselines &baseline)
Imports baseline values.
capsule::client::ClassificationProductivity::SetOnBaselineUpdateEvent
void SetOnBaselineUpdateEvent(std::function< void(ClassificationProductivity &, const productivity::Baselines &)> &&callback)
capsule::client::ClassificationProductivity::ClassificationProductivity
ClassificationProductivity(Device &owner)
capsule::client::Device
Device.
Definition Device.hpp:71
capsule::client
Definition Classification.hpp:7