SRSDK  0.10.39
Loading...
Searching...
No Matches
abiVerification.h
Go to the documentation of this file.
1// The goal of these asserts to make sure data ABI requirements are met.
2// This file is included in public headers.
3// If you are reading this because one of the asserts fail,
4// and you are the user of CNSDK, then I have bad news for you:
5// your compiler lays out data structures in an unexpected manner.
6// You will have to find out why, feel free to contact Leia support for help.
7//
8// But if you are a CNSDK developer, then you most likely have changed one of the structures.
9// In this case, remember these simple rules:
10// 1. Existing fields can only be renamed (in case you want to deprecate it) -> rename the corresponding offsetof assert.
11// The asserts can be updated manually or by relying on the DumpAbiVerfication function.
12
13#ifndef LEIA_ABI_SIZEOF_ASSERT
14# define LEIA_ABI_SIZEOF_ASSERT(...)
15#endif
16#ifndef LEIA_ABI_OFFSETOF_ASSERT
17# define LEIA_ABI_OFFSETOF_ASSERT(...)
18#endif
19#ifndef LEIA_ABI_TRIVIALLY_COPYABLE_ASSERT
20# define LEIA_ABI_TRIVIALLY_COPYABLE_ASSERT(...)
21#endif
22
29
39
43
48
50
54
58// LEIA_ABI_SIZEOF_ASSERT(struct leia_event_error, 16); - Allowed to grow
59
65// LEIA_ABI_SIZEOF_ASSERT(struct leia_headtracking_frame_profiling, 0); - Allowed to grow
66
70
74
78
86
88LEIA_ABI_OFFSETOF_ASSERT(struct leia_camera, translation_mm, 96);
89LEIA_ABI_OFFSETOF_ASSERT(struct leia_camera, rotation_deg, 108);
90LEIA_ABI_OFFSETOF_ASSERT(struct leia_camera, sensorOrientation, 120);
91LEIA_ABI_OFFSETOF_ASSERT(struct leia_camera, frontFacing, 124);
95
96#undef LEIA_ABI_SIZEOF_ASSERT
97#undef LEIA_ABI_OFFSETOF_ASSERT
98#undef LEIA_ABI_TRIVIALLY_COPYABLE_ASSERT
#define LEIA_ABI_SIZEOF_ASSERT(...)
Definition abiVerification.h:14
#define LEIA_ABI_TRIVIALLY_COPYABLE_ASSERT(...)
Definition abiVerification.h:20
#define LEIA_ABI_OFFSETOF_ASSERT(...)
Definition abiVerification.h:17
leia_orientation
Definition types.h:108
leia_timestamp_space
Definition types.h:16
leia_core_event_code
Definition event.h:8
leia_face_tracking_runtime_type
Definition types.h:82
leia_fit_mode
Definition types.h:103
leia_device_config_property
Definition deviceConfig.h:30
int32_t leia_log_level
Definition log.h:22
Definition types.h:48
Definition types.h:119
Definition slice.h:17
Definition eventCenter.types.h:33
Definition eventCenter.types.h:20
Definition slice.h:12
Definition types.h:38
Definition types.h:101
Definition slice.h:22
Definition types.h:33
Definition types.h:78