-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathacquisition.cpp
76 lines (59 loc) · 2.21 KB
/
acquisition.cpp
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
#include "sap.h"
#include "acquisition.h"
SapAcquisitionWrapper SapAcquisition_New() {
return new SapAcquisition();
}
SapAcquisitionWrapper SapAcquisition_NewForLocation(SapLocationWrapper loc, const char* camFilename) {
return new SapAcquisition(*loc, camFilename, EventNone, goacqhandler);
}
void SapAcquisition_Delete(SapAcquisitionWrapper acq) {
delete acq;
}
bool SapAcquisition_Create(SapAcquisitionWrapper acq) {
return acq->Create();
}
bool SapAcquisition_Destroy(SapAcquisitionWrapper acq) {
return acq->Destroy();
}
bool SapAcquisition_SetParameter(SapAcquisitionWrapper acq, int param, int val) {
return acq->SetParameter(param, val);
}
bool SapAcquisition_GetParameterInt32(SapAcquisitionWrapper acq, int param, int *val) {
return acq->GetParameter(param, val);
}
bool SapAcquisition_GetParameterInt64(SapAcquisitionWrapper acq, int param, long *val) {
return acq->GetParameter(param, val);
}
const char* SapAcquisition_GetLastStatus(SapAcquisitionWrapper acq) {
return acq->GetLastStatus();
}
bool SapAcquisition_ResetTimeStamp(SapAcquisitionWrapper acq) {
return acq->ResetTimeStamp();
}
bool SapAcquisition_RegisterCallback(SapAcquisitionWrapper acq, UINT64 eventType, SapAcqContextWrapper context) {
return acq->RegisterCallback(eventType, goacqhandler, NULL);
}
bool SapAcquisition_UnregisterCallbacks(SapAcquisitionWrapper acq) {
// UINT32 eventCount, eventIndex;
// acq->GetEventCount(&eventCount);
// for (eventIndex = 0; eventIndex < eventCount; eventIndex++) {
// BOOL isRegistered;
// acq.IsCallbackRegistered(eventIndex, &isRegistered);
// if (isRegistered) {
// acq->UnregisterCallback(eventIndex);
// }
// }
return true;
}
bool SapAcquisition_SetCallbackInfo(SapAcquisitionWrapper acq) {
return acq->SetCallbackInfo(goacqhandler);
}
bool SapAcquisition_SetEventType(SapAcquisitionWrapper acq, UINT64 eventType) {
return acq->SetEventType(eventType);
}
bool SapAcqCallbackInfoWrapper_GetEventType(SapAcqCallbackInfoWrapper acq, UINT64 *eventType) {
return acq->GetEventType(eventType);
}
bool SapAcquisition_SetFlipMode(SapAcquisitionWrapper acq, int flipMode){
return acq->SetFlipMode(flipMode);
}