ItalaApiC  1.3.3
ItalaCDefs.h
1 
2 /***********************************************************************************
3  *
4  * ItalaApi - Copyright (C) 2023 Opto Engineering
5  *
6  * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
7  * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
8  * FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
9  * HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY SUFFERED BY LICENSE AS
10  * A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
11  *
12  ***********************************************************************************/
13 
14 #ifndef ITALA_API_C_ITALACDEFS_H
15 #define ITALA_API_C_ITALACDEFS_H
16 
17 #include <stdint.h>
18 
19 #define MAX_SUPPORTED_DEVICES 255
20 #define MAX_SUPPORTED_INTERFACES 255
21 #define MAX_STRING_LENGTH 1024
22 
23 #define DEVINFO_ID_LENGTH MAX_STRING_LENGTH
24 #define DEVINFO_VENDOR_LENGTH MAX_STRING_LENGTH
25 #define DEVINFO_MODEL_LENGTH MAX_STRING_LENGTH
26 #define DEVINFO_DISPLAYNAME_LENGTH MAX_STRING_LENGTH
27 #define DEVINFO_USERDEFINEDNAME_LENGTH MAX_STRING_LENGTH
28 #define DEVINFO_SERIALNUMBER_LENGTH MAX_STRING_LENGTH
29 #define DEVINFO_VERSION_LENGTH MAX_STRING_LENGTH
30 
31 #define ITFINFO_ID_LENGTH MAX_STRING_LENGTH
32 #define ITFINFO_DISPLAYNAME_LENGTH MAX_STRING_LENGTH
33 
34 #define DD_STRIG_LENGTH 150
35 
36 /* To ensure compile-time type safety. Error if passing the wrong handler as parameter.*/
37 #define DEFINE_HANDLE(name) \
38  struct name##__ { \
39  uint8_t unused; \
40  }; \
41  typedef struct name##__ *name
42 
43 #ifdef __cplusplus
44 extern "C" {
45 namespace ItalaC {
46 #endif
47 
52 DEFINE_HANDLE(H_DEVICE);
53 DEFINE_HANDLE(H_IMAGE);
54 DEFINE_HANDLE(H_DEFECTDETECTION);
55 
56 DEFINE_HANDLE(H_NODEMAP);
57 DEFINE_HANDLE(H_NODE);
58 DEFINE_HANDLE(H_NODECALLBACK);
59 
74 };
80 typedef int32_t ItalaError;
89  Busy = 4,
92 };
97 typedef int32_t DeviceAccessStatus;
102  Leaky = 0,
103  Hot = 1,
104  Cold = 2
105 };
110 typedef int32_t DefectType;
115  D8Bit = 0,
116  D10Bit = 1,
117  D12Bit = 2
118 };
123 typedef int32_t PixelDepth;
124 
129 typedef struct {
130  char ID[ITFINFO_ID_LENGTH];
131  char DisplayName[ITFINFO_DISPLAYNAME_LENGTH];
132  uint32_t IpAddress;
134  uint64_t MacAddress;
135  uint32_t SubnetMask;
136 } InterfaceInfo;
137 
142 typedef struct {
143  char ID[DEVINFO_ID_LENGTH];
144  char Vendor[DEVINFO_VENDOR_LENGTH];
145  char Model[DEVINFO_MODEL_LENGTH];
146  char DisplayName[DEVINFO_DISPLAYNAME_LENGTH];
147  char UserDefinedName[DEVINFO_USERDEFINEDNAME_LENGTH];
148  char SerialNumber[DEVINFO_SERIALNUMBER_LENGTH];
150  char Version[DEVINFO_VERSION_LENGTH];
151  DeviceAccessStatus AccessStatus;
152  uint32_t IpAddress;
153  uint32_t SubnetMask;
154  uint32_t DefaultGateway;
156  uint64_t MacAddress;
159 } DeviceInfo;
161 
167 typedef struct {
168  uint64_t X;
169  uint64_t Y;
170  DefectType DefectType;
171  char TypeString[DD_STRIG_LENGTH];
174 
180  P0 = 0,
181  P45 = 1,
182  P90 = 2,
183  P135 = 3
184 };
189 typedef int32_t PolarComponent;
190 
202  NonePolar = 0,
204  Bilinear = 2,
206 };
212 
217 typedef struct {
218  H_IMAGE P0;
219  H_IMAGE P45;
220  H_IMAGE P90;
221  H_IMAGE P135;
223 
228 typedef struct {
233 
238 typedef struct {
239  H_IMAGE S0;
240  H_IMAGE S1;
241  H_IMAGE S2;
242 } StokesVectors;
243 
245 #ifdef __cplusplus
246 }
247 }
248 #endif
249 
250 #endif
Already open read and write.
Definition: ItalaCDefs.h:90
NonePolar.
Definition: ItalaCDefs.h:202
int32_t PixelDepth
Definition: ItalaCDefs.h:123
This is a struct to contain all the data of devices. This struct contains all the data of the devices...
Definition: ItalaCDefs.h:142
Generic error.
Definition: ItalaCDefs.h:65
int32_t PolarDemosaicingAlgorithm
Definition: ItalaCDefs.h:211
Invalid argument passed to function.
Definition: ItalaCDefs.h:67
PolarComponents RedComponents
Red component containing all the 4 polarized image.
Definition: ItalaCDefs.h:229
Property error.
Definition: ItalaCDefs.h:69
Available read only.
Definition: ItalaCDefs.h:87
DEFINE_HANDLE(H_DEVICE)
Handle to instance of Device.
int32_t DefectType
Definition: ItalaCDefs.h:110
Available read and write.
Definition: ItalaCDefs.h:86
Out of range.
Definition: ItalaCDefs.h:68
P45.
Definition: ItalaCDefs.h:181
H_IMAGE P90
P90 image.
Definition: ItalaCDefs.h:220
H_IMAGE P45
P45 image.
Definition: ItalaCDefs.h:219
int32_t ItalaError
Definition: ItalaCDefs.h:80
Convenient POD structure used as container for ExtractAllPolarComponentsColor &#39;s multi-result.
Definition: ItalaCDefs.h:228
P0.
Definition: ItalaCDefs.h:180
Hot.
Definition: ItalaCDefs.h:103
uint64_t Y
The Y image coordinate of the defective pixel.
Definition: ItalaCDefs.h:169
uint64_t MacAddress
Mac address of the interface in host byte order.
Definition: ItalaCDefs.h:134
Runtime execution error.
Definition: ItalaCDefs.h:70
D10Bit.
Definition: ItalaCDefs.h:116
No error occures.
Definition: ItalaCDefs.h:64
D12Bit.
Definition: ItalaCDefs.h:117
H_IMAGE P135
P135 image.
Definition: ItalaCDefs.h:221
P135.
Definition: ItalaCDefs.h:183
DeviceAccessStatus AccessStatus
Accessibility status of the device.
Definition: ItalaCDefs.h:151
Leaky.
Definition: ItalaCDefs.h:102
H_IMAGE S1
S1 stokes vector.
Definition: ItalaCDefs.h:240
_PolarDemosaicingAlgorithm
Definition: ItalaCDefs.h:201
H_IMAGE S2
S2 stokes vector.
Definition: ItalaCDefs.h:241
D8Bit.
Definition: ItalaCDefs.h:115
_DeviceAccessStatus
Definition: ItalaCDefs.h:84
_DefectType
Definition: ItalaCDefs.h:101
InterfaceInfo InterfaceInfo
Definition: ItalaCDefs.h:158
Busy.
Definition: ItalaCDefs.h:89
int32_t DeviceAccessStatus
Definition: ItalaCDefs.h:97
Cold.
Definition: ItalaCDefs.h:104
Bad allocation memory.
Definition: ItalaCDefs.h:66
uint32_t SubnetMask
Subnet mask of the interface in the same format described in IpAddress.
Definition: ItalaCDefs.h:135
DefectType DefectType
The type of defect the pixel has.
Definition: ItalaCDefs.h:170
Access error, invalid permission.
Definition: ItalaCDefs.h:72
uint64_t X
The X image coordinate of the defective pixel.
Definition: ItalaCDefs.h:168
Already open read only.
Definition: ItalaCDefs.h:91
PolarComponents GreenComponents
Green component containing all the 4 polarized image.
Definition: ItalaCDefs.h:230
uint32_t IpAddress
IP address of the device in host order.
Definition: ItalaCDefs.h:152
Unreachable.
Definition: ItalaCDefs.h:88
This is a struct to contain all the data of inteferfaces. This struct contains all the data of the in...
Definition: ItalaCDefs.h:129
Convenient POD structure used as container for ComputeAllStokes &#39;s multi-result.
Definition: ItalaCDefs.h:238
_PixelDepth
Definition: ItalaCDefs.h:114
This is a struct to contain all the data of defective pixels. This struct contains all the data of th...
Definition: ItalaCDefs.h:167
int32_t PolarComponent
Definition: ItalaCDefs.h:189
Convenient POD structure used as container for ExtractAllPolarComponents &#39;s multi-result.
Definition: ItalaCDefs.h:217
PolarComponents BlueComponents
Blue component containing all the 4 polarized image.
Definition: ItalaCDefs.h:231
Bilinear.
Definition: ItalaCDefs.h:204
uint32_t SubnetMask
Definition: ItalaCDefs.h:153
Timeout.
Definition: ItalaCDefs.h:73
H_IMAGE S0
S0 stokes vector.
Definition: ItalaCDefs.h:239
WeightedBilinear.
Definition: ItalaCDefs.h:205
Unknown access status.
Definition: ItalaCDefs.h:85
NearestNeighbour.
Definition: ItalaCDefs.h:203
Logical runtime error.
Definition: ItalaCDefs.h:71
_ItalaError
Definition: ItalaCDefs.h:63
P90.
Definition: ItalaCDefs.h:182
H_IMAGE P0
P0 image.
Definition: ItalaCDefs.h:218
_PolarComponent
Definition: ItalaCDefs.h:179