Capsule API Example

Loading...
Searching...
No Matches
CNFB.h
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 "CError.h"
7#include "CNFBCalibrator.h"
8
9#ifdef __cplusplus
10 extern "C" {
11#endif
12
16 typedef enum clCNFB_CallResult {
17 clCNFB_CallResult_Success,
18 clCNFB_CallResult_FailedToSendData
19} clCNFB_CallResult;
20
24 typedef struct clCNFB_UserState {
25 int64_t timestampMilli = -1;
26 float delta = -1.F;
27 float theta = -1.F;
28 float alpha = -1.F;
29 float smr = -1.F;
30 float beta = -1.F;
31} clCNFB_UserState;
32
33 CLC_CLASS_WN(ClassificationNFBPrivate, clCNFB);
41 CL_DLL clCNFB clCNFB_Create(clCDevice device, clCError* error) NOEXCEPT;
50 CL_DLL clCNFB clCNFB_CreateCalibrated(clCDevice device, clCNFBCalibrator calibrator, clCError* error) NOEXCEPT;
51
52 typedef void (*clCNFB_UserStateChangedHandler)(clCNFB, const clCNFB_UserState*) NOEXCEPT;
53 CL_DLL void clCNFB_SetOnUserStateChangedEvent(clCNFB nfb, clCNFB_UserStateChangedHandler handler) NOEXCEPT;
54
55 typedef void (*clCNFB_ErrorHandler)(clCNFB, const char*) NOEXCEPT;
56 CL_DLL void clCNFB_SetOnErrorEvent(clCNFB nfb, clCNFB_ErrorHandler handler) NOEXCEPT;
57
58#ifdef __cplusplus
59}
60#endif
CDefinesPrivate.h
NOEXCEPT
#define NOEXCEPT
Definition CDefinesPrivate.h:82
CL_DLL
#define CL_DLL
Definition CDefinesPrivate.h:51
CLC_CLASS_WN
#define CLC_CLASS_WN(Wrapped, Name)
Definition CDefinesPrivate.h:84
CError.h
clCNFB_Create
CL_DLL clCNFB clCNFB_Create(clCDevice device, clCError *error) NOEXCEPT
clCNFB_SetOnUserStateChangedEvent
CL_DLL void clCNFB_SetOnUserStateChangedEvent(clCNFB nfb, clCNFB_UserStateChangedHandler handler) NOEXCEPT
clCNFB_CallResult
clCNFB_CallResult
NFB call result.
Definition CNFB.h:16
clCNFB_CallResult_FailedToSendData
@ clCNFB_CallResult_FailedToSendData
Definition CNFB.h:18
clCNFB_CallResult_Success
@ clCNFB_CallResult_Success
Definition CNFB.h:17
clCNFB_UserState
struct clCNFB_UserState clCNFB_UserState
User state, determined by NFB classifier.
clCNFB_UserStateChangedHandler
void(* clCNFB_UserStateChangedHandler)(clCNFB, const clCNFB_UserState *) NOEXCEPT
Definition CNFB.h:52
clCNFB_SetOnErrorEvent
CL_DLL void clCNFB_SetOnErrorEvent(clCNFB nfb, clCNFB_ErrorHandler handler) NOEXCEPT
clCNFB_ErrorHandler
void(* clCNFB_ErrorHandler)(clCNFB, const char *) NOEXCEPT
Definition CNFB.h:55
clCNFB_CreateCalibrated
CL_DLL clCNFB clCNFB_CreateCalibrated(clCDevice device, clCNFBCalibrator calibrator, clCError *error) NOEXCEPT
CNFBCalibrator.h
clCError
Definition CError.h:28
clCNFB_UserState
User state, determined by NFB classifier.
Definition CNFB.h:24
clCNFB_UserState::theta
float theta
Definition CNFB.h:27
clCNFB_UserState::beta
float beta
Definition CNFB.h:30
clCNFB_UserState::delta
float delta
Definition CNFB.h:26
clCNFB_UserState::smr
float smr
Definition CNFB.h:29
clCNFB_UserState::alpha
float alpha
Definition CNFB.h:28
clCNFB_UserState::timestampMilli
int64_t timestampMilli
Definition CNFB.h:25