Example

Loading...
Searching...
No Matches
CEmotions.h
Go to the documentation of this file.
1// Copyright. 2019 - 2024 PSBD. All rights reserved.
2
3#pragma once
4
5#include "Capsule/CDefinesPrivate.h"
6
7#ifdef __cplusplus
8 extern "C" {
9#endif
10
17 CLC_CLASS_WN(ClassificationEmotionsPrivate, clCEmotions);
18
22 typedef enum clCEmotionsEmotion {
23 clC_Emotions_EmotionFocus,
24 clC_Emotions_EmotionChill,
25 clC_Emotions_EmotionStress,
26 clC_Emotions_EmotionAnger,
27 clC_Emotions_EmotionSelfControl,
28} clCEmotionsEmotion;
29
33 typedef struct clCEmotionalStates {
34 float focus;
35 float chill;
36 float stress;
37 float anger;
38 float selfControl;
39} clCEmotionalStates;
40
48 CL_DLL clCEmotions clCEmotions_Create(clCSession session, double speed, double maxSpeed) NOEXCEPT;
55 CL_DLL clCEmotions clCEmotions_CreateCalibrated(clCNFBCalibrator calibrator, double speed,
56 double maxSpeed) NOEXCEPT;
62 CL_DLL void clCEmotions_Destroy(clCEmotions emotions) NOEXCEPT;
63
64 CLC_STRUCT(clCEmotionsDelegateFloat);
65 typedef void (*clCEmotionsHandlerFloat)(clCEmotions, float);
66 CL_DLL void clCEmotionsDelegateFloat_Set(clCEmotionsDelegateFloat delegate,
67 clCEmotionsHandlerFloat handler) NOEXCEPT;
68 CL_DLL clCEmotionsDelegateFloat clCEmotions_GetOnEmotionUpdateEvent(
69 clCEmotions emotions, clCEmotionsEmotion emotion) NOEXCEPT;
70
71 CLC_STRUCT(clCEmotionsDelegateEmotionalStatesUpdate);
72 typedef void (*clCEmotionsHandlerEmotionalStatesUpdate)(clCEmotions, const clCEmotionalStates*);
73 CL_DLL void clCEmotionsDelegateEmotionalStatesUpdate_Set(
74 clCEmotionsDelegateEmotionalStatesUpdate delegate,
75 clCEmotionsHandlerEmotionalStatesUpdate handler) NOEXCEPT;
76 CL_DLL clCEmotionsDelegateEmotionalStatesUpdate
77 clCEmotions_GetOnEmotionalStatesUpdateEvent(clCEmotions emotions) NOEXCEPT;
78
79 CLC_STRUCT(clCEmotionsDelegate);
80 typedef void (*clCEmotionsHandler)(clCEmotions);
81 CL_DLL void clCEmotionsDelegate_Set(clCEmotionsDelegate delegate, clCEmotionsHandler handler) NOEXCEPT;
82 CL_DLL clCEmotionsDelegate clCEmotions_GetOnInitializedEvent(clCEmotions emotions) NOEXCEPT;
83 CL_DLL clCEmotionsDelegate clCEmotions_GetOnCalibratedEvent(clCEmotions emotions) NOEXCEPT;
84
85 CLC_STRUCT(clCEmotionsDelegateString);
86 typedef void (*clCEmotionsHandlerString)(clCEmotions, const char*);
87 CL_DLL void clCEmotionsDelegateString_Set(clCEmotionsDelegateString delegate,
88 clCEmotionsHandlerString handler) NOEXCEPT;
89 CL_DLL clCEmotionsDelegateString clCEmotions_GetOnErrorEvent(clCEmotions emotions) NOEXCEPT;
90
97 CL_DLL void clCEmotions_Initialize(clCEmotions emotions, const char* platformAddress) NOEXCEPT;
103 CL_DLL void clCEmotions_StartCalibration(clCEmotions emotions) NOEXCEPT;
104
105#ifdef __cplusplus
106}
107#endif
CDefinesPrivate.h
CLC_STRUCT
#define CLC_STRUCT(Name)
Definition CDefinesPrivate.h:24
NOEXCEPT
#define NOEXCEPT
Definition CDefinesPrivate.h:52
CL_DLL
#define CL_DLL
Definition CDefinesPrivate.h:21
CLC_CLASS_WN
#define CLC_CLASS_WN(Wrapped, Name)
Definition CDefinesPrivate.h:54
clCEmotions_GetOnEmotionUpdateEvent
CL_DLL clCEmotionsDelegateFloat clCEmotions_GetOnEmotionUpdateEvent(clCEmotions emotions, clCEmotionsEmotion emotion) NOEXCEPT
clCEmotionsHandlerFloat
void(* clCEmotionsHandlerFloat)(clCEmotions, float)
Definition CEmotions.h:65
clCEmotions_GetOnEmotionalStatesUpdateEvent
CL_DLL clCEmotionsDelegateEmotionalStatesUpdate clCEmotions_GetOnEmotionalStatesUpdateEvent(clCEmotions emotions) NOEXCEPT
clCEmotions_Create
CL_DLL clCEmotions clCEmotions_Create(clCSession session, double speed, double maxSpeed) NOEXCEPT
clCEmotions_Destroy
CL_DLL void clCEmotions_Destroy(clCEmotions emotions) NOEXCEPT
clCEmotions_Initialize
CL_DLL void clCEmotions_Initialize(clCEmotions emotions, const char *platformAddress) NOEXCEPT
Initialize emotions classifier.
clCEmotions_GetOnInitializedEvent
CL_DLL clCEmotionsDelegate clCEmotions_GetOnInitializedEvent(clCEmotions emotions) NOEXCEPT
clCEmotionsHandler
void(* clCEmotionsHandler)(clCEmotions)
Definition CEmotions.h:80
clCEmotionsDelegateString_Set
CL_DLL void clCEmotionsDelegateString_Set(clCEmotionsDelegateString delegate, clCEmotionsHandlerString handler) NOEXCEPT
clCEmotionsHandlerString
void(* clCEmotionsHandlerString)(clCEmotions, const char *)
Definition CEmotions.h:86
clCEmotionsDelegateEmotionalStatesUpdate_Set
CL_DLL void clCEmotionsDelegateEmotionalStatesUpdate_Set(clCEmotionsDelegateEmotionalStatesUpdate delegate, clCEmotionsHandlerEmotionalStatesUpdate handler) NOEXCEPT
clCEmotions_StartCalibration
CL_DLL void clCEmotions_StartCalibration(clCEmotions emotions) NOEXCEPT
Start emotions calibration.
clCEmotionsEmotion
clCEmotionsEmotion
Metrics you can compute with clCEmotions.
Definition CEmotions.h:22
clC_Emotions_EmotionStress
@ clC_Emotions_EmotionStress
Definition CEmotions.h:25
clC_Emotions_EmotionAnger
@ clC_Emotions_EmotionAnger
Definition CEmotions.h:26
clC_Emotions_EmotionSelfControl
@ clC_Emotions_EmotionSelfControl
Definition CEmotions.h:27
clC_Emotions_EmotionFocus
@ clC_Emotions_EmotionFocus
Definition CEmotions.h:23
clC_Emotions_EmotionChill
@ clC_Emotions_EmotionChill
Definition CEmotions.h:24
clCEmotions_GetOnErrorEvent
CL_DLL clCEmotionsDelegateString clCEmotions_GetOnErrorEvent(clCEmotions emotions) NOEXCEPT
clCEmotionsHandlerEmotionalStatesUpdate
void(* clCEmotionsHandlerEmotionalStatesUpdate)(clCEmotions, const clCEmotionalStates *)
Definition CEmotions.h:72
clCEmotions_GetOnCalibratedEvent
CL_DLL clCEmotionsDelegate clCEmotions_GetOnCalibratedEvent(clCEmotions emotions) NOEXCEPT
clCEmotions_CreateCalibrated
CL_DLL clCEmotions clCEmotions_CreateCalibrated(clCNFBCalibrator calibrator, double speed, double maxSpeed) NOEXCEPT
clCEmotionsDelegateFloat_Set
CL_DLL void clCEmotionsDelegateFloat_Set(clCEmotionsDelegateFloat delegate, clCEmotionsHandlerFloat handler) NOEXCEPT
clCEmotionsDelegate_Set
CL_DLL void clCEmotionsDelegate_Set(clCEmotionsDelegate delegate, clCEmotionsHandler handler) NOEXCEPT
clCEmotionalStates
Emotions values, determined by Emotions classifier.
Definition CEmotions.h:33
clCEmotionalStates::anger
float anger
Definition CEmotions.h:37
clCEmotionalStates::chill
float chill
Definition CEmotions.h:35
clCEmotionalStates::focus
float focus
Definition CEmotions.h:34
clCEmotionalStates::selfControl
float selfControl
Definition CEmotions.h:38
clCEmotionalStates::stress
float stress
Definition CEmotions.h:36