Example

Loading...
Searching...
No Matches
CCardio.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#include "Capsule/CNFBCalibrator.h"
7#include "Capsule/CSession.h"
8
9#ifdef __cplusplus
10 extern "C" {
11#endif
12
13 CLC_CLASS_WN(ClassificationCardioPrivate, clCCardio);
14
21 CL_DLL clCCardio clCCardio_Create(clCSession session) NOEXCEPT;
28 CL_DLL clCCardio clCCardio_CreateCalibrated(clCNFBCalibrator calibrator) NOEXCEPT;
29
35 CL_DLL void clCCardio_Initialize(clCCardio cardio) NOEXCEPT;
36
37 CLC_STRUCT(clCCardioIndexesDelegate);
38 typedef struct clCCardioData {
39 float heartRate;
40 float stressIndex;
41 float kaplanIndex;
42 bool artifacted;
43} clCCardioData;
44 typedef void (*clCCardioIndexesUpdateHandler)(clCCardio, clCCardioData);
48 CL_DLL clCCardioIndexesDelegate clCCardio_GetOnIndexesUpdateEvent(clCCardio cardio) NOEXCEPT;
52 CL_DLL void clCCardioDelegateIndexesUpdate_Set(clCCardioIndexesDelegate delegate,
53 clCCardioIndexesUpdateHandler callback) NOEXCEPT;
54
55 CLC_STRUCT(clCCardioCalibratedDelegate);
56 typedef void (*clCCardioCalibratedHandler)(clCCardio);
61 CL_DLL clCCardioCalibratedDelegate clCCardio_GetOnCalibratedEvent(clCCardio cardio) NOEXCEPT;
66 CL_DLL void clCCardioDelegateCalibrated_Set(clCCardioCalibratedDelegate delegate,
67 clCCardioCalibratedHandler handler) NOEXCEPT;
68
74 CL_DLL void clCCardio_Destroy(clCCardio cardio) NOEXCEPT;
75
76#ifdef __cplusplus
77}
78#endif
clCCardioIndexesUpdateHandler
void(* clCCardioIndexesUpdateHandler)(clCCardio, clCCardioData)
Definition CCardio.h:44
clCCardio_GetOnCalibratedEvent
CL_DLL clCCardioCalibratedDelegate clCCardio_GetOnCalibratedEvent(clCCardio cardio) NOEXCEPT
Get delegate for cardio calibrated event Calibration starts automatically when PPG signal starts emit...
clCCardio_Destroy
CL_DLL void clCCardio_Destroy(clCCardio cardio) NOEXCEPT
Destroy Cardio classifier.
clCCardioCalibratedHandler
void(* clCCardioCalibratedHandler)(clCCardio)
Definition CCardio.h:56
clCCardioDelegateCalibrated_Set
CL_DLL void clCCardioDelegateCalibrated_Set(clCCardioCalibratedDelegate delegate, clCCardioCalibratedHandler handler) NOEXCEPT
Set handler for cardio calibrated delegate Calibration starts automatically when PPG signal starts em...
clCCardio_GetOnIndexesUpdateEvent
CL_DLL clCCardioIndexesDelegate clCCardio_GetOnIndexesUpdateEvent(clCCardio cardio) NOEXCEPT
Get delegate for cardio indexes event.
clCCardioDelegateIndexesUpdate_Set
CL_DLL void clCCardioDelegateIndexesUpdate_Set(clCCardioIndexesDelegate delegate, clCCardioIndexesUpdateHandler callback) NOEXCEPT
Set handler for cardio indexes updates delegate.
clCCardio_CreateCalibrated
CL_DLL clCCardio clCCardio_CreateCalibrated(clCNFBCalibrator calibrator) NOEXCEPT
Create a Cardio classifier after individual NFB has calibrated.
clCCardio_Create
CL_DLL clCCardio clCCardio_Create(clCSession session) NOEXCEPT
Create a Cardio classifier.
clCCardio_Initialize
CL_DLL void clCCardio_Initialize(clCCardio cardio) NOEXCEPT
Initialize cardio classifier.
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
CNFBCalibrator.h
CSession.h
clCCardioData
Definition CCardio.h:38
clCCardioData::stressIndex
float stressIndex
Definition CCardio.h:40
clCCardioData::artifacted
bool artifacted
Definition CCardio.h:42
clCCardioData::heartRate
float heartRate
Definition CCardio.h:39
clCCardioData::kaplanIndex
float kaplanIndex
Definition CCardio.h:41