-
Notifications
You must be signed in to change notification settings - Fork 3
/
sap.h
84 lines (71 loc) · 2.47 KB
/
sap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef _SAP_H_
#define _SAP_H_
#include "stdio.h"
#include <stdbool.h>
#ifdef __cplusplus
#include "SapClassBasic.h"
extern "C" {
#endif
#include "corapi.h"
// This parameter is not yet defined in the linux api (BJSU, 2023-05-08)
#ifndef CORACQ_PRM_META_DATA_CLEAR
#define CORACQ_PRM_META_DATA_CLEAR CORACQ_PRM(0x0000001C, 4)
#endif
#ifdef __cplusplus
typedef SapBuffer* SapBufferWrapper;
typedef SapAcquisition* SapAcquisitionWrapper;
typedef SapLocation* SapLocationWrapper;
typedef SapTransfer* SapAcqToBufWrapper;
typedef SapXferCallbackInfo* SapXferCallbackInfoWrapper;
typedef SapXferFrameRateInfo* SapXferFrameRateInfoWrapper;
typedef SapAcqCallbackInfo* SapAcqCallbackInfoWrapper;
extern "C" {
extern void xferCallback(SapXferCallbackInfoWrapper pInfo);
extern void acqCallback(SapAcqCallbackInfoWrapper pInfo);
}
typedef SapManVersionInfo* SapVersionInfoWrapper;
#else
typedef void* SapBufferWrapper;
typedef void* SapAcquisitionWrapper;
typedef void* SapLocationWrapper;
typedef void* SapAcqToBufWrapper;
typedef void* SapXferCallbackInfoWrapper;
typedef void* SapXferFrameRateInfoWrapper;
typedef void* SapAcqCallbackInfoWrapper;
extern void xferCallback(SapXferCallbackInfoWrapper pInfo);
extern void acqCallback(SapAcqCallbackInfoWrapper pInfo);
typedef void* SapVersionInfoWrapper;
#endif
typedef struct
{
int id;
SapBufferWrapper buffer;
int height;
int width;
int pixeldepth;
long counter;
} SapXferContext;
typedef SapXferContext* SapXferContextWrapper;
typedef struct
{
int id;
} SapAcqContext;
typedef SapAcqContext* SapAcqContextWrapper;
extern void goxferhandler(SapXferCallbackInfoWrapper pInfo);
extern void goacqhandler(SapAcqCallbackInfoWrapper pInfo);
extern void _CorW32_EnableKernelEventNotification(void); // New entrypoint that will be part of next SaperaLT SDK release.
void SapManager_Init();
int SapManager_GetServerCount();
const char* SapManager_GetLastStatus();
SapLocationWrapper SapLocation_New(const char* acqServerName, int acqDeviceNumber);
void SapLocation_Delete(SapLocationWrapper loc);
SapVersionInfoWrapper SapManager_GetVersionInfo();
void SapVersionInfo_Delete(SapVersionInfoWrapper v);
int SapVersionInfo_GetMajor(SapVersionInfoWrapper v);
int SapVersionInfo_GetMinor(SapVersionInfoWrapper v);
int SapVersionInfo_GetRevision(SapVersionInfoWrapper v);
int SapVersionInfo_GetBuild(SapVersionInfoWrapper v);
#ifdef __cplusplus
}
#endif
#endif //_SAP_H_