opendaq 0.1.1

Safe Rust bindings for openDAQ, the open-source data acquisition SDK
Documentation
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
// Generated by tools/generate_bindings.py -- do not edit by hand.

// Mechanical output: lint findings here are the generator's business.
#![allow(clippy::all, unused_imports, rustdoc::bare_urls)]

use crate::error::{check, Error, Result};
use crate::object::{BaseObject, Interface, Ref};
use crate::sys;
use crate::value::{Complex, Ratio, Value};
use crate::generated::*;
use std::ffi::c_char;

/// @ingroup opendaq_server_capability
/// @addtogroup opendaq_address_info Address info
/// Wrapper over the openDAQ `daqAddressInfo` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct AddressInfo(pub(crate) PropertyObject);

impl std::ops::Deref for AddressInfo {
    type Target = PropertyObject;
    fn deref(&self) -> &PropertyObject { &self.0 }
}
impl crate::sealed::Sealed for AddressInfo {}
unsafe impl Interface for AddressInfo {
    const NAME: &'static str = "daqAddressInfo";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqAddressInfo_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl AddressInfo {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { AddressInfo(PropertyObject::__from_ref(r)) }
}
impl std::fmt::Display for AddressInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&AddressInfo> for Value {
    fn from(value: &AddressInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl From<AddressInfo> for Value {
    fn from(value: AddressInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for AddressInfo {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// @ingroup opendaq_server_capability
/// @addtogroup opendaq_address_info Address info
/// Wrapper over the openDAQ `daqAddressInfoBuilder` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct AddressInfoBuilder(pub(crate) BaseObject);

impl std::ops::Deref for AddressInfoBuilder {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for AddressInfoBuilder {}
unsafe impl Interface for AddressInfoBuilder {
    const NAME: &'static str = "daqAddressInfoBuilder";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqAddressInfoBuilder_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl AddressInfoBuilder {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { AddressInfoBuilder(BaseObject(r)) }
}
impl std::fmt::Display for AddressInfoBuilder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&AddressInfoBuilder> for Value {
    fn from(value: &AddressInfoBuilder) -> Value { Value::Object(value.to_base_object()) }
}
impl From<AddressInfoBuilder> for Value {
    fn from(value: AddressInfoBuilder) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for AddressInfoBuilder {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Wrapper over the openDAQ `daqAddressInfoPrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct AddressInfoPrivate(pub(crate) BaseObject);

impl std::ops::Deref for AddressInfoPrivate {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for AddressInfoPrivate {}
unsafe impl Interface for AddressInfoPrivate {
    const NAME: &'static str = "daqAddressInfoPrivate";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqAddressInfoPrivate_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl AddressInfoPrivate {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { AddressInfoPrivate(BaseObject(r)) }
}
impl std::fmt::Display for AddressInfoPrivate {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&AddressInfoPrivate> for Value {
    fn from(value: &AddressInfoPrivate) -> Value { Value::Object(value.to_base_object()) }
}
impl From<AddressInfoPrivate> for Value {
    fn from(value: AddressInfoPrivate) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for AddressInfoPrivate {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// @ingroup opendaq_server_capability
/// @addtogroup opendaq_connected_client_info Connected client info
/// Wrapper over the openDAQ `daqConnectedClientInfo` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ConnectedClientInfo(pub(crate) PropertyObject);

impl std::ops::Deref for ConnectedClientInfo {
    type Target = PropertyObject;
    fn deref(&self) -> &PropertyObject { &self.0 }
}
impl crate::sealed::Sealed for ConnectedClientInfo {}
unsafe impl Interface for ConnectedClientInfo {
    const NAME: &'static str = "daqConnectedClientInfo";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqConnectedClientInfo_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl ConnectedClientInfo {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ConnectedClientInfo(PropertyObject::__from_ref(r)) }
}
impl std::fmt::Display for ConnectedClientInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ConnectedClientInfo> for Value {
    fn from(value: &ConnectedClientInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ConnectedClientInfo> for Value {
    fn from(value: ConnectedClientInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ConnectedClientInfo {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Provides access to private methods for managing the Device's connection statuses.
/// Enables adding, removing, and updating statuses stored in the connection status container.
/// Statuses are identified by unique connection strings and can be accessed via
/// IComponentStatusContainer using name aliases. A configuration status, accessible via alias "ConfigurationStatus",
/// is unique per container and cannot be removed if added.
/// On the other hand, multiple streaming statuses are supported, one per each streaming source attached to the device.
/// Aliases for these follow the pattern "StreamingStatus_n," with optional protocol-based prefixes (e.g.,
/// "OpenDAQNativeStreamingStatus_1", "OpenDAQLTStreamingStatus_2", "StreamingStatus_3" etc.).
/// "ConnectionStatusChanged" Core events are triggered whenever there is a change in the connection status of the openDAQ Device,
/// including parameters such as status name alias, value, protocol type, connection string, and streaming
/// object (nullptr for configuration statuses). Removing streaming statuses also triggers said Core event with
/// "Removed" as the value and nullptr for the streaming object parameters.
/// Wrapper over the openDAQ `daqConnectionStatusContainerPrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ConnectionStatusContainerPrivate(pub(crate) BaseObject);

impl std::ops::Deref for ConnectionStatusContainerPrivate {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for ConnectionStatusContainerPrivate {}
unsafe impl Interface for ConnectionStatusContainerPrivate {
    const NAME: &'static str = "daqConnectionStatusContainerPrivate";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqConnectionStatusContainerPrivate_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl ConnectionStatusContainerPrivate {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ConnectionStatusContainerPrivate(BaseObject(r)) }
}
impl std::fmt::Display for ConnectionStatusContainerPrivate {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ConnectionStatusContainerPrivate> for Value {
    fn from(value: &ConnectionStatusContainerPrivate) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ConnectionStatusContainerPrivate> for Value {
    fn from(value: ConnectionStatusContainerPrivate) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ConnectionStatusContainerPrivate {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Represents an openDAQ device. The device contains a list of signals and physical channels. Some devices support adding function blocks, or connecting to devices. The list of available function blocks/devices can be obtained via the `getAvailable` functions, and added via the `add` functions.
/// Devices can be split up into three different types, with each devices supporting one or more:
/// 1. Physical devices
/// Physical devices provide access to physical channels. They measure real-world data and send
/// it via packets through output signals of channels. The list of channels can be obtained via
/// `getChannels` as a flat list.
/// 2. Client devices
/// Client devices can connect to other devices via their supported connection protocol. openDAQ
/// natively supports connecting to TMS devices via its openDAQ OpcUa Client Module. A list of available
/// devices a client device can connect to can be obtained via `getAvailableDevices`. The
/// `addDevice` is used to connect to/add a device.
/// 3. Function block devices
/// Function block devices provide a dictionary of available function block types that can be added to them
/// and configured. The calculation of function blocks is done on the device itself. The dictionary
/// of available function block types can be obtained via `getAvailableFunctionBlockTypes`. They
/// can then be added via `addFunctionBlock`.
/// All devices also provide access to their Device information, containing metadata such as the
/// device's serial number, location... They can also be queried for their current domain values
/// (time) through its device domain.
/// As each device is a property object, a device has access to all Property object methods, allowing
/// each device to expose a list of custom properties such as sample rate, scaling factor and many
/// others. By default, openDAQ devices have the UserName and Location string Properties.
/// Wrapper over the openDAQ `daqDevice` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Device(pub(crate) Folder);

impl std::ops::Deref for Device {
    type Target = Folder;
    fn deref(&self) -> &Folder { &self.0 }
}
impl crate::sealed::Sealed for Device {}
unsafe impl Interface for Device {
    const NAME: &'static str = "daqDevice";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDevice_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl Device {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { Device(Folder::__from_ref(r)) }
}
impl std::fmt::Display for Device {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&Device> for Value {
    fn from(value: &Device) -> Value { Value::Object(value.to_base_object()) }
}
impl From<Device> for Value {
    fn from(value: Device) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for Device {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Contains information about the domain of the device.
/// The device domain contains a general view into the device's domain data. While devices most often operate
/// in the time domain, this interface allows for description of any other domain commonly used in signal processing.
/// For example, common domains include the angle domain, frequency domain, the spatial domain, and the wavelet domain.
/// The device domain allows for users to query a device for its current domain value via `getTicksSinceOrigin`
/// and convert that into its domain unit by multiplying the tick count with the resolution. To get the absolute
/// domain value, we can then also add the value to the Origin, which is most often provided
/// as a time epoch in the ISO 8601 format.
/// Note that all devices might note provide a device domain implementation. Such devices cannot be directly queried
/// for their domain data. In such a case, the domain data can be obtained through the device's output signals.
/// Wrapper over the openDAQ `daqDeviceDomain` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceDomain(pub(crate) BaseObject);

impl std::ops::Deref for DeviceDomain {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for DeviceDomain {}
unsafe impl Interface for DeviceDomain {
    const NAME: &'static str = "daqDeviceDomain";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceDomain_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DeviceDomain {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceDomain(BaseObject(r)) }
}
impl std::fmt::Display for DeviceDomain {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceDomain> for Value {
    fn from(value: &DeviceDomain) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceDomain> for Value {
    fn from(value: DeviceDomain) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceDomain {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Contains standard information about an openDAQ device and device type. The Device Info object is a Property Object, allowing for custom String, Int, Bool, or Float-type properties to be added.
/// The getter methods represent a standardized set of Device properties according to the
/// OPC UA: Devices standard. Any additional String, Int, Bool, or Float-type properties can be added, using the
/// appropriate Property Object "add property" method. Any other types of properties are invalid.
/// Although Integer-type properties are valid additions, Selection properties cannot be added to
/// Device Info.
/// As the Device Info object adheres to the OPC UA: Devices standard, it behaves differently than
/// standard Property Objects. No metadata except the Value Type and Default Value are published
/// via OPC UA, and this only said Property metadata is visible to any clients.
/// All fields - default (e.g. platform, manufacturer...) and custom are represented as either:
/// - String-type properties
/// - Integer-type properties
/// - Bool-type properties
/// - Float type properties
/// As such, listing all properties via Property Object methods, will return both the
/// names of the default and custom properties. All default properties are initialized to an empty
/// string except for RevisionCounter and Position that are integer properties and are
/// thus initialized to '0'. The names of the properties are written in camelCase - for
/// example "systemUuid", "parentMacAddress", "manufacturerUri".
/// If the DeviceInfo object is obtained from a device, or when listing available devices, the
/// object is frozen (immutable). As such, Property Object setter methods cannot be used
/// and will fail when called.
/// Wrapper over the openDAQ `daqDeviceInfo` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceInfo(pub(crate) PropertyObject);

impl std::ops::Deref for DeviceInfo {
    type Target = PropertyObject;
    fn deref(&self) -> &PropertyObject { &self.0 }
}
impl crate::sealed::Sealed for DeviceInfo {}
unsafe impl Interface for DeviceInfo {
    const NAME: &'static str = "daqDeviceInfo";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceInfo_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DeviceInfo {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceInfo(PropertyObject::__from_ref(r)) }
}
impl std::fmt::Display for DeviceInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceInfo> for Value {
    fn from(value: &DeviceInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceInfo> for Value {
    fn from(value: DeviceInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceInfo {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Configuration component of Device info objects. Contains setter methods that are available until the object is frozen.
/// Device info config contains functions that allow for the configuration of Device info objects.
/// The implementation of `config` also implements the `freeze` function that freezes the object making it
/// immutable. Once frozen, the setter methods fail as the object can no longer be modified.
/// Wrapper over the openDAQ `daqDeviceInfoConfig` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceInfoConfig(pub(crate) DeviceInfo);

impl std::ops::Deref for DeviceInfoConfig {
    type Target = DeviceInfo;
    fn deref(&self) -> &DeviceInfo { &self.0 }
}
impl crate::sealed::Sealed for DeviceInfoConfig {}
unsafe impl Interface for DeviceInfoConfig {
    const NAME: &'static str = "daqDeviceInfoConfig";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceInfoConfig_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DeviceInfoConfig {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceInfoConfig(DeviceInfo::__from_ref(r)) }
}
impl std::fmt::Display for DeviceInfoConfig {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceInfoConfig> for Value {
    fn from(value: &DeviceInfoConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceInfoConfig> for Value {
    fn from(value: DeviceInfoConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceInfoConfig {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// @ingroup opendaq_devices
/// @addtogroup opendaq_device_info Device info internal
/// Wrapper over the openDAQ `daqDeviceInfoInternal` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceInfoInternal(pub(crate) BaseObject);

impl std::ops::Deref for DeviceInfoInternal {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for DeviceInfoInternal {}
unsafe impl Interface for DeviceInfoInternal {
    const NAME: &'static str = "daqDeviceInfoInternal";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceInfoInternal_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DeviceInfoInternal {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceInfoInternal(BaseObject(r)) }
}
impl std::fmt::Display for DeviceInfoInternal {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceInfoInternal> for Value {
    fn from(value: &DeviceInfoInternal) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceInfoInternal> for Value {
    fn from(value: DeviceInfoInternal) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceInfoInternal {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Interface for managing device network configuration information and settings.
/// The interface is typically used by the discovery server, if present, to obtain the necessary
/// information for advertising the device's network configuration capabilities and handling related requests.
/// The device must be designated as the root device to enable the use of this interface's methods.
/// Wrapper over the openDAQ `daqDeviceNetworkConfig` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceNetworkConfig(pub(crate) BaseObject);

impl std::ops::Deref for DeviceNetworkConfig {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for DeviceNetworkConfig {}
unsafe impl Interface for DeviceNetworkConfig {
    const NAME: &'static str = "daqDeviceNetworkConfig";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceNetworkConfig_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DeviceNetworkConfig {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceNetworkConfig(BaseObject(r)) }
}
impl std::fmt::Display for DeviceNetworkConfig {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceNetworkConfig> for Value {
    fn from(value: &DeviceNetworkConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceNetworkConfig> for Value {
    fn from(value: DeviceNetworkConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceNetworkConfig {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// @ingroup opendaq_devices
/// @addtogroup opendaq_device Device private
/// Wrapper over the openDAQ `daqDevicePrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DevicePrivate(pub(crate) BaseObject);

impl std::ops::Deref for DevicePrivate {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for DevicePrivate {}
unsafe impl Interface for DevicePrivate {
    const NAME: &'static str = "daqDevicePrivate";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDevicePrivate_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DevicePrivate {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DevicePrivate(BaseObject(r)) }
}
impl std::fmt::Display for DevicePrivate {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DevicePrivate> for Value {
    fn from(value: &DevicePrivate) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DevicePrivate> for Value {
    fn from(value: DevicePrivate) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DevicePrivate {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Provides information on what device type can be created by a given module. Can be used to obtain the default configuration used when either adding/creating a new device.
/// Wrapper over the openDAQ `daqDeviceType` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceType(pub(crate) ComponentType);

impl std::ops::Deref for DeviceType {
    type Target = ComponentType;
    fn deref(&self) -> &ComponentType { &self.0 }
}
impl crate::sealed::Sealed for DeviceType {}
unsafe impl Interface for DeviceType {
    const NAME: &'static str = "daqDeviceType";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceType_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl DeviceType {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceType(ComponentType::__from_ref(r)) }
}
impl std::fmt::Display for DeviceType {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceType> for Value {
    fn from(value: &DeviceType) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceType> for Value {
    fn from(value: DeviceType) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceType {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Function blocks perform calculations on inputs/generate data, outputting new data in its output signals as packets.
/// Each function block describes its behaviour and identifiers in its FunctionBlockType structure. It
/// provides a list of input ports that can be connected to signals that the input port accepts, as well as a
/// list of output signals that carry the function block's output data.
/// Additionally, as each function block is a property object, it can define its own set of properties, providing
/// user-configurable settings. In example, a FFT function block would expose a `blockSize` property, defining the
/// amount of samples to be used for calculation in each block.
/// Function blocks also provide a status signal, through which a status packet is sent whenever a connection to a
/// new input port is formed, or when the status changes.
/// Wrapper over the openDAQ `daqFunctionBlock` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct FunctionBlock(pub(crate) Folder);

impl std::ops::Deref for FunctionBlock {
    type Target = Folder;
    fn deref(&self) -> &Folder { &self.0 }
}
impl crate::sealed::Sealed for FunctionBlock {}
unsafe impl Interface for FunctionBlock {
    const NAME: &'static str = "daqFunctionBlock";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqFunctionBlock_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl FunctionBlock {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { FunctionBlock(Folder::__from_ref(r)) }
}
impl std::fmt::Display for FunctionBlock {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&FunctionBlock> for Value {
    fn from(value: &FunctionBlock) -> Value { Value::Object(value.to_base_object()) }
}
impl From<FunctionBlock> for Value {
    fn from(value: FunctionBlock) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for FunctionBlock {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Acts as a container for channels and other io folders.
/// Every device has an IO folder, which allows only other IO folders and
/// channels as children.
/// Wrapper over the openDAQ `daqIoFolderConfig` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct IoFolderConfig(pub(crate) FolderConfig);

impl std::ops::Deref for IoFolderConfig {
    type Target = FolderConfig;
    fn deref(&self) -> &FolderConfig { &self.0 }
}
impl crate::sealed::Sealed for IoFolderConfig {}
unsafe impl Interface for IoFolderConfig {
    const NAME: &'static str = "daqIoFolderConfig";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqIoFolderConfig_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl IoFolderConfig {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { IoFolderConfig(FolderConfig::__from_ref(r)) }
}
impl std::fmt::Display for IoFolderConfig {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&IoFolderConfig> for Value {
    fn from(value: &IoFolderConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl From<IoFolderConfig> for Value {
    fn from(value: IoFolderConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for IoFolderConfig {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// @ingroup opendaq_log_file_info
/// @addtogroup opendaq_log_file_info log_file_info
/// Wrapper over the openDAQ `daqLogFileInfo` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct LogFileInfo(pub(crate) BaseObject);

impl std::ops::Deref for LogFileInfo {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for LogFileInfo {}
unsafe impl Interface for LogFileInfo {
    const NAME: &'static str = "daqLogFileInfo";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqLogFileInfo_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl LogFileInfo {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { LogFileInfo(BaseObject(r)) }
}
impl std::fmt::Display for LogFileInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&LogFileInfo> for Value {
    fn from(value: &LogFileInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl From<LogFileInfo> for Value {
    fn from(value: LogFileInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for LogFileInfo {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// @ingroup opendaq_log_file_info
/// @addtogroup opendaq_log_file_info log_file_info_builder
/// Wrapper over the openDAQ `daqLogFileInfoBuilder` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct LogFileInfoBuilder(pub(crate) BaseObject);

impl std::ops::Deref for LogFileInfoBuilder {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for LogFileInfoBuilder {}
unsafe impl Interface for LogFileInfoBuilder {
    const NAME: &'static str = "daqLogFileInfoBuilder";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqLogFileInfoBuilder_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl LogFileInfoBuilder {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { LogFileInfoBuilder(BaseObject(r)) }
}
impl std::fmt::Display for LogFileInfoBuilder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&LogFileInfoBuilder> for Value {
    fn from(value: &LogFileInfoBuilder) -> Value { Value::Object(value.to_base_object()) }
}
impl From<LogFileInfoBuilder> for Value {
    fn from(value: LogFileInfoBuilder) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for LogFileInfoBuilder {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Provides an interface to manipulate the configuration of a device's (server's) network interface. Offers methods to update the IP configuration and retrieve the currently active one, if the corresponding feature supported by the device. Additionally, includes a helper method to create a prebuilt property object with valid default configuration.
/// The configuration property object, passed as a parameter to said methods, should include the following properties:
/// - **"dhcp4"**: A boolean property indicating whether DHCP is enabled for IPv4. Defaults to `True` (DHCP enabled).
/// If set to `False` (DHCP disabled), non-empty static configuration properties are required.
/// - **"address4"**: A string property specifying the statically assigned IPv4 address in the format `address/netmask` (e.g. 192.168.1.2/24).
/// This property is ignored when DHCP is enabled for IPv4. However, if DHCP is disabled, the list must include at least one address. Defaults to an empty string.
/// - **"gateway4"**: A string property specifying the IPv4 gateway address. This is required if DHCP is disabled and ignored otherwise. Defaults to an empty string.
/// - **"dhcp6"**, **"address6"**, **"gateway6"**: These properties follow the same format and rules as their IPv4 counterparts but apply to IPv6 configuration.
/// Wrapper over the openDAQ `daqNetworkInterface` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct NetworkInterface(pub(crate) BaseObject);

impl std::ops::Deref for NetworkInterface {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for NetworkInterface {}
unsafe impl Interface for NetworkInterface {
    const NAME: &'static str = "daqNetworkInterface";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqNetworkInterface_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl NetworkInterface {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { NetworkInterface(BaseObject(r)) }
}
impl std::fmt::Display for NetworkInterface {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&NetworkInterface> for Value {
    fn from(value: &NetworkInterface) -> Value { Value::Object(value.to_base_object()) }
}
impl From<NetworkInterface> for Value {
    fn from(value: NetworkInterface) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for NetworkInterface {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// If set, gives additional information about the reference domain.
/// Wrapper over the openDAQ `daqReferenceDomainInfo` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ReferenceDomainInfo(pub(crate) BaseObject);

impl std::ops::Deref for ReferenceDomainInfo {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for ReferenceDomainInfo {}
unsafe impl Interface for ReferenceDomainInfo {
    const NAME: &'static str = "daqReferenceDomainInfo";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqReferenceDomainInfo_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl ReferenceDomainInfo {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ReferenceDomainInfo(BaseObject(r)) }
}
impl std::fmt::Display for ReferenceDomainInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ReferenceDomainInfo> for Value {
    fn from(value: &ReferenceDomainInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ReferenceDomainInfo> for Value {
    fn from(value: ReferenceDomainInfo) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ReferenceDomainInfo {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Represents a server. The server provides access to the openDAQ device. Depend of the implementation, it can support configuring the device, reading configuration, and data streaming.
/// We do not make the server directly. But through the instance and module manager. For that reason, the server must be uniquely
/// defined with "ServerType". The server is then created with the current root device, context and configuration object.
/// Configuration of the server can be done with custom property object.
/// The configuration object is created with the corresponding ServerType object (IServerType::createDefaultConfig method).
/// For example, with a configuration object, we can define connection timeout.
/// Wrapper over the openDAQ `daqServer` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Server(pub(crate) Folder);

impl std::ops::Deref for Server {
    type Target = Folder;
    fn deref(&self) -> &Folder { &self.0 }
}
impl crate::sealed::Sealed for Server {}
unsafe impl Interface for Server {
    const NAME: &'static str = "daqServer";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqServer_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl Server {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { Server(Folder::__from_ref(r)) }
}
impl std::fmt::Display for Server {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&Server> for Value {
    fn from(value: &Server) -> Value { Value::Object(value.to_base_object()) }
}
impl From<Server> for Value {
    fn from(value: Server) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for Server {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Represents standard information about a server's capability to support various protocols. The Server Capability object functions as a Property Object, facilitating the inclusion of custom properties of String, Int, Bool, or Float types. This interface serves to store essential details regarding the supported protocol by a device. It adheres to a standardized set of properties, including methods to retrieve information such as the connection string, protocol name, protocol type, connection type, and core events enabled.
/// Additional String, Int, Bool, or Float-type properties can be added using the appropriate Property Object "add property" method.
/// However, other property types are considered invalid for this interface.
/// The Server Capability object conforms to a standardized format, ensuring compatibility with communication standards.
/// For instance, it provides methods to retrieve details like
/// - the connection string (URL),
/// - protocol name (e.g., "OpenDAQNativeStreaming", "OpenDAQOPCUA"),
/// - protocol type (e.g., "Configuration&Streaming", "Streaming"),
/// - connection type (e.g., IPv4, IPv6),
/// - core events enabled (indicating communication mode).
/// Wrapper over the openDAQ `daqServerCapability` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ServerCapability(pub(crate) PropertyObject);

impl std::ops::Deref for ServerCapability {
    type Target = PropertyObject;
    fn deref(&self) -> &PropertyObject { &self.0 }
}
impl crate::sealed::Sealed for ServerCapability {}
unsafe impl Interface for ServerCapability {
    const NAME: &'static str = "daqServerCapability";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqServerCapability_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl ServerCapability {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ServerCapability(PropertyObject::__from_ref(r)) }
}
impl std::fmt::Display for ServerCapability {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ServerCapability> for Value {
    fn from(value: &ServerCapability) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ServerCapability> for Value {
    fn from(value: ServerCapability) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ServerCapability {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Wrapper over the openDAQ `daqServerCapabilityConfig` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ServerCapabilityConfig(pub(crate) ServerCapability);

impl std::ops::Deref for ServerCapabilityConfig {
    type Target = ServerCapability;
    fn deref(&self) -> &ServerCapability { &self.0 }
}
impl crate::sealed::Sealed for ServerCapabilityConfig {}
unsafe impl Interface for ServerCapabilityConfig {
    const NAME: &'static str = "daqServerCapabilityConfig";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqServerCapabilityConfig_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl ServerCapabilityConfig {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ServerCapabilityConfig(ServerCapability::__from_ref(r)) }
}
impl std::fmt::Display for ServerCapabilityConfig {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ServerCapabilityConfig> for Value {
    fn from(value: &ServerCapabilityConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ServerCapabilityConfig> for Value {
    fn from(value: ServerCapabilityConfig) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ServerCapabilityConfig {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Represents the client-side part of a streaming service responsible for initiating communication with the openDAQ device streaming server and processing the received data. Wraps the client-side implementation details of the particular data transfer protocol used by openDAQ to send processed/acquired data from devices running an openDAQ Server to an openDAQ Client.
/// The Streaming is used as a selectable data source for mirrored signals. For this, it
/// provides methods, allowing mirrored signals to be added/removed dynamically,
/// to enable/disable the use of Streaming as a data source of these signals.
/// Forwarding of packets received from the remote device through the data transfer protocol down to
/// the signal path is enabled when the following conditions are met:
/// - Streaming object itself is in active state.
/// - Streaming is selected as an active source of the corresponding signal.
/// Usually, the data transfer protocol provides information about the signals whose data can be sent
/// over the protocol. It allows the implementation to reject unsupported signals from being added to
/// the streaming. Each Streaming object provides the string representation of a connection address
/// used to connect to the streaming service of the device. This string representation is used as
/// a unique ID to determine the streaming source for the mirrored signal.
/// When the generalized client-to-device streaming mechanism is employed, however, the roles are effectively switched:
/// the server becomes a consumer of signal data, while the client-side Streaming object acts as
/// the producer, sending signal data over the protocol. In this context, Streaming objects are expected
/// to exist on the server side as well to interact with mirrored copies of client signals.
/// In context of client-to-device streaming, in addition to signals, mirrored input ports can also be added or removed
/// dynamically through the corresponding methods of the Streaming interface, similarly to mirrored signals.
/// The support for client-to-device streaming can be checked via `getClientToDeviceStreamingEnabled`.
/// If it is not enabled or not supported by the protocol, the method provides `false` value, and adding or removing
/// mirrored input ports is not allowed, therefore disabling any client-to-device streaming operations.
/// Wrapper over the openDAQ `daqStreaming` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Streaming(pub(crate) BaseObject);

impl std::ops::Deref for Streaming {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for Streaming {}
unsafe impl Interface for Streaming {
    const NAME: &'static str = "daqStreaming";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqStreaming_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl Streaming {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { Streaming(BaseObject(r)) }
}
impl std::fmt::Display for Streaming {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&Streaming> for Value {
    fn from(value: &Streaming) -> Value { Value::Object(value.to_base_object()) }
}
impl From<Streaming> for Value {
    fn from(value: Streaming) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for Streaming {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// Interface representing a Synchronization Component in a Test & Measurement system. A SynchronizationComponent ensures synchronization among measurement devices in the system. It can act as a sync source and/or as a sync output, with each component having one sync input and 0 to n sync outputs.
/// SynchronizationComponents are configured via interfaces, which can include PTP, IRIQ, GPS,
/// and CLK sync interfaces, among others.
///
/// # Notes
/// Every SynchronizationComponent has at least one interface. Only one interface can be set as an input, while others can be used as sync outputs to synchronize other devices. The configuration of these interfaces and the reading of their status is defined in Part 4.
/// Depending on the setup, some interfaces may be switched off, and some interfaces may act as sync sources or outputs.
/// A CLK interface can be used to let a device run in Fre-Run mode, where the device syncs internally to an internal quartz.
/// Wrapper over the openDAQ `daqSyncComponent` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct SyncComponent(pub(crate) Component);

impl std::ops::Deref for SyncComponent {
    type Target = Component;
    fn deref(&self) -> &Component { &self.0 }
}
impl crate::sealed::Sealed for SyncComponent {}
unsafe impl Interface for SyncComponent {
    const NAME: &'static str = "daqSyncComponent";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqSyncComponent_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl SyncComponent {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { SyncComponent(Component::__from_ref(r)) }
}
impl std::fmt::Display for SyncComponent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&SyncComponent> for Value {
    fn from(value: &SyncComponent) -> Value { Value::Object(value.to_base_object()) }
}
impl From<SyncComponent> for Value {
    fn from(value: SyncComponent) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for SyncComponent {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

/// This class manages the lock state of an object, usually a device. A device can be locked either with a specific user or without one. If the device is locked with a specific user, only that user can unlock it. If the device is locked without a user, any user can unlock it.
/// Wrapper over the openDAQ `daqUserLock` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct UserLock(pub(crate) BaseObject);

impl std::ops::Deref for UserLock {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for UserLock {}
unsafe impl Interface for UserLock {
    const NAME: &'static str = "daqUserLock";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqUserLock_getInterfaceId)(&mut id) };
        Some(id)
    }
    unsafe fn from_raw(ptr: *mut std::ffi::c_void) -> Option<Self> {
        Ref::from_owned(ptr).map(Self::__from_ref)
    }
    fn as_base_object(&self) -> &BaseObject { &self.0 }
}
impl UserLock {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { UserLock(BaseObject(r)) }
}
impl std::fmt::Display for UserLock {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&UserLock> for Value {
    fn from(value: &UserLock) -> Value { Value::Object(value.to_base_object()) }
}
impl From<UserLock> for Value {
    fn from(value: UserLock) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for UserLock {
    unsafe fn from_daq_owned(ptr: *mut std::ffi::c_void, op: &'static str) -> Result<Self> {
        crate::value::cast_owned(ptr, op)
    }
}

impl AddressInfoBuilder {
    /// Builds the address.
    ///
    /// # Returns
    /// - `address`: The address.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_build()`.
    pub fn build(&self) -> Result<Option<AddressInfo>> {
        let mut __address: *mut sys::daqAddressInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_build)(self.as_raw() as *mut _, &mut __address) };
        check(__code, "daqAddressInfoBuilder_build")?;
        Ok(unsafe { crate::marshal::take_object::<AddressInfo>(__address as *mut _) })
    }

    /// Creates an Address builder with no parameters configured.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_createAddressInfoBuilder()`.
    pub fn new() -> Result<AddressInfoBuilder> {
        let mut __obj: *mut sys::daqAddressInfoBuilder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_createAddressInfoBuilder)(&mut __obj) };
        check(__code, "daqAddressInfoBuilder_createAddressInfoBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<AddressInfoBuilder>(__obj as *mut _, "daqAddressInfoBuilder_createAddressInfoBuilder") }?)
    }

    /// Gets the server address as a string.
    ///
    /// # Returns
    /// - `address`: The server address as a string.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_getAddress()`.
    pub fn address(&self) -> Result<String> {
        let mut __address: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_getAddress)(self.as_raw() as *mut _, &mut __address) };
        check(__code, "daqAddressInfoBuilder_getAddress")?;
        Ok(unsafe { crate::marshal::take_string(__address) })
    }

    /// Gets the connection string corresponding to the address.
    ///
    /// # Returns
    /// - `connection_string`: The connection string.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_getConnectionString()`.
    pub fn connection_string(&self) -> Result<String> {
        let mut __connection_string: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_getConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqAddressInfoBuilder_getConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the reachability status of the address.
    ///
    /// # Parameters
    /// - `address_reachability`: The reachability status of the address. This status is set to "Unknown" by default. For IPv4 address types, the module manager checks reachability when querying for available devices.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_getReachabilityStatus()`.
    pub fn reachability_status(&self) -> Result<AddressReachabilityStatus> {
        let mut __address_reachability: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_getReachabilityStatus)(self.as_raw() as *mut _, &mut __address_reachability) };
        check(__code, "daqAddressInfoBuilder_getReachabilityStatus")?;
        Ok(crate::marshal::enum_out(AddressReachabilityStatus::from_raw(__address_reachability), "daqAddressInfoBuilder_getReachabilityStatus")?)
    }

    /// Gets the type of the address.
    ///
    /// # Returns
    /// - `type`: The type the address. Currently available address types in the main openDAQ modules are: IPv4 and IPv6.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_getType()`.
    pub fn type_(&self) -> Result<String> {
        let mut __type_: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_getType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqAddressInfoBuilder_getType")?;
        Ok(unsafe { crate::marshal::take_string(__type_) })
    }

    /// Sets the server address as a string.
    ///
    /// # Parameters
    /// - `address`: The server address as a string.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_setAddress()`.
    pub fn set_address(&self, address: &str) -> Result<()> {
        let __address = crate::marshal::make_string(address)?;
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_setAddress)(self.as_raw() as *mut _, __address.as_ptr() as *mut _) };
        check(__code, "daqAddressInfoBuilder_setAddress")?;
        Ok(())
    }

    /// Sets the connection string corresponding to the address.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_setConnectionString()`.
    pub fn set_connection_string(&self, connection_string: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_setConnectionString)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqAddressInfoBuilder_setConnectionString")?;
        Ok(())
    }

    /// Sets the reachability status of the address.
    ///
    /// # Parameters
    /// - `address_reachability`: The reachability status of the address. This status is set to "Unknown" by default. For IPv4 address types, the module manager checks reachability when querying for available devices.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_setReachabilityStatus()`.
    pub fn set_reachability_status(&self, address_reachability: AddressReachabilityStatus) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_setReachabilityStatus)(self.as_raw() as *mut _, address_reachability as u32) };
        check(__code, "daqAddressInfoBuilder_setReachabilityStatus")?;
        Ok(())
    }

    /// Sets the type of the address.
    ///
    /// # Parameters
    /// - `type`: The type the address. Currently available address types in the main openDAQ modules are: IPv4 and IPv6.
    ///
    /// Calls the openDAQ C function `daqAddressInfoBuilder_setType()`.
    pub fn set_type(&self, type_: &str) -> Result<()> {
        let __type_ = crate::marshal::make_string(type_)?;
        let __code = unsafe { (crate::sys::api().daqAddressInfoBuilder_setType)(self.as_raw() as *mut _, __type_.as_ptr() as *mut _) };
        check(__code, "daqAddressInfoBuilder_setType")?;
        Ok(())
    }

}

impl AddressInfoPrivate {
    /// Sets the reachability status of the address, ignoring the "Frozen" status of the address.
    ///
    /// # Parameters
    /// - `address_reachability`: The reachability status of the address. This status is set to "Unknown" by default. For IPv4 address types, the module manager checks reachability when querying for available devices.
    ///
    /// Calls the openDAQ C function `daqAddressInfoPrivate_setReachabilityStatusPrivate()`.
    pub fn set_reachability_status_private(&self, address_reachability: AddressReachabilityStatus) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqAddressInfoPrivate_setReachabilityStatusPrivate)(self.as_raw() as *mut _, address_reachability as u32) };
        check(__code, "daqAddressInfoPrivate_setReachabilityStatusPrivate")?;
        Ok(())
    }

}

impl AddressInfo {
    /// Creates an Address with no parameters configured.
    ///
    /// Calls the openDAQ C function `daqAddressInfo_createAddressInfo()`.
    pub fn new() -> Result<AddressInfo> {
        let mut __obj: *mut sys::daqAddressInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfo_createAddressInfo)(&mut __obj) };
        check(__code, "daqAddressInfo_createAddressInfo")?;
        Ok(unsafe { crate::marshal::require_object::<AddressInfo>(__obj as *mut _, "daqAddressInfo_createAddressInfo") }?)
    }

    /// Creates an Address using the builder's configuration parameters.
    ///
    /// # Parameters
    /// - `builder`: The address info builder.
    ///
    /// Calls the openDAQ C function `daqAddressInfo_createAddressInfoFromBuilder()`.
    pub fn from_builder(builder: &AddressInfoBuilder) -> Result<AddressInfo> {
        let mut __obj: *mut sys::daqAddressInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfo_createAddressInfoFromBuilder)(&mut __obj, builder.as_raw() as *mut _) };
        check(__code, "daqAddressInfo_createAddressInfoFromBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<AddressInfo>(__obj as *mut _, "daqAddressInfo_createAddressInfoFromBuilder") }?)
    }

    /// Gets the server address as a string.
    ///
    /// # Returns
    /// - `address`: The server address as a string.
    ///
    /// Calls the openDAQ C function `daqAddressInfo_getAddress()`.
    pub fn address(&self) -> Result<String> {
        let mut __address: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfo_getAddress)(self.as_raw() as *mut _, &mut __address) };
        check(__code, "daqAddressInfo_getAddress")?;
        Ok(unsafe { crate::marshal::take_string(__address) })
    }

    /// Gets the connection string corresponding to the address.
    ///
    /// # Returns
    /// - `connection_string`: The connection string.
    ///
    /// Calls the openDAQ C function `daqAddressInfo_getConnectionString()`.
    pub fn connection_string(&self) -> Result<String> {
        let mut __connection_string: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfo_getConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqAddressInfo_getConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the reachability status of the address.
    ///
    /// # Parameters
    /// - `address_reachability`: The reachability status of the address. This status is set to "Unknown" by default. For IPv4 address types, the module manager checks reachability when querying for available devices.
    ///
    /// Calls the openDAQ C function `daqAddressInfo_getReachabilityStatus()`.
    pub fn reachability_status(&self) -> Result<AddressReachabilityStatus> {
        let mut __address_reachability: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqAddressInfo_getReachabilityStatus)(self.as_raw() as *mut _, &mut __address_reachability) };
        check(__code, "daqAddressInfo_getReachabilityStatus")?;
        Ok(crate::marshal::enum_out(AddressReachabilityStatus::from_raw(__address_reachability), "daqAddressInfo_getReachabilityStatus")?)
    }

    /// Gets the type of the address.
    ///
    /// # Parameters
    /// - `type`: The type the address. Currently available address types in the main openDAQ modules are: IPv4 and IPv6.
    ///
    /// Calls the openDAQ C function `daqAddressInfo_getType()`.
    pub fn type_(&self) -> Result<String> {
        let mut __type_: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqAddressInfo_getType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqAddressInfo_getType")?;
        Ok(unsafe { crate::marshal::take_string(__type_) })
    }

}

impl ConnectedClientInfo {
    /// Creates a Connected client with no parameters configured.
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_createConnectedClientInfo()`.
    pub fn new() -> Result<ConnectedClientInfo> {
        let mut __obj: *mut sys::daqConnectedClientInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_createConnectedClientInfo)(&mut __obj) };
        check(__code, "daqConnectedClientInfo_createConnectedClientInfo")?;
        Ok(unsafe { crate::marshal::require_object::<ConnectedClientInfo>(__obj as *mut _, "daqConnectedClientInfo_createConnectedClientInfo") }?)
    }

    /// Creates a Connected client info using the provided parameters.
    ///
    /// # Parameters
    /// - `address`: The address of connected client.
    /// - `protocol_type`: The type of the protocol type used by the client.
    /// - `protocol_name`: The name of the protocol name used by the client.
    /// - `client_type`: The configuration connection client type name.
    /// - `host_name`: The host name of connected client.
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_createConnectedClientInfoWithParams()`.
    pub fn with_params(address: &str, protocol_type: ProtocolType, protocol_name: &str, client_type: &str, host_name: &str) -> Result<ConnectedClientInfo> {
        let __address = crate::marshal::make_string(address)?;
        let __protocol_name = crate::marshal::make_string(protocol_name)?;
        let __client_type = crate::marshal::make_string(client_type)?;
        let __host_name = crate::marshal::make_string(host_name)?;
        let mut __obj: *mut sys::daqConnectedClientInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_createConnectedClientInfoWithParams)(&mut __obj, __address.as_ptr() as *mut _, protocol_type as u32, __protocol_name.as_ptr() as *mut _, __client_type.as_ptr() as *mut _, __host_name.as_ptr() as *mut _) };
        check(__code, "daqConnectedClientInfo_createConnectedClientInfoWithParams")?;
        Ok(unsafe { crate::marshal::require_object::<ConnectedClientInfo>(__obj as *mut _, "daqConnectedClientInfo_createConnectedClientInfoWithParams") }?)
    }

    /// Gets the client address string.
    ///
    /// # Returns
    /// - `address`: The client address string.
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_getAddress()`.
    pub fn address(&self) -> Result<String> {
        let mut __address: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_getAddress)(self.as_raw() as *mut _, &mut __address) };
        check(__code, "daqConnectedClientInfo_getAddress")?;
        Ok(unsafe { crate::marshal::take_string(__address) })
    }

    /// Gets the type of connected configuration connection client.
    ///
    /// # Returns
    /// - `type`: The string representation of client type ("Control", "ExclusiveControl", "ViewOnly").
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_getClientTypeName()`.
    pub fn client_type_name(&self) -> Result<String> {
        let mut __type_: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_getClientTypeName)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqConnectedClientInfo_getClientTypeName")?;
        Ok(unsafe { crate::marshal::take_string(__type_) })
    }

    /// Gets the client host name.
    ///
    /// # Returns
    /// - `host_name`: The client host name.
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_getHostName()`.
    pub fn host_name(&self) -> Result<String> {
        let mut __host_name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_getHostName)(self.as_raw() as *mut _, &mut __host_name) };
        check(__code, "daqConnectedClientInfo_getHostName")?;
        Ok(unsafe { crate::marshal::take_string(__host_name) })
    }

    /// Gets the name of the protocol used by the client.
    ///
    /// # Returns
    /// - `protocol_name`: The name of the protocol (e.g., "OpenDAQNativeStreaming", "OpenDAQOPCUA", "OpenDAQLTStreaming").
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_getProtocolName()`.
    pub fn protocol_name(&self) -> Result<String> {
        let mut __protocol_name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_getProtocolName)(self.as_raw() as *mut _, &mut __protocol_name) };
        check(__code, "daqConnectedClientInfo_getProtocolName")?;
        Ok(unsafe { crate::marshal::take_string(__protocol_name) })
    }

    /// Gets the type of protocol used by the client.
    ///
    /// # Returns
    /// - `type`: The type of protocol (Enumeration value reflecting protocol type: "ConfigurationAndStreaming", "Configuration", "Streaming", "Unknown").
    ///
    /// Calls the openDAQ C function `daqConnectedClientInfo_getProtocolType()`.
    pub fn protocol_type(&self) -> Result<ProtocolType> {
        let mut __type_: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqConnectedClientInfo_getProtocolType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqConnectedClientInfo_getProtocolType")?;
        Ok(crate::marshal::enum_out(ProtocolType::from_raw(__type_), "daqConnectedClientInfo_getProtocolType")?)
    }

}

impl ConnectionStatusContainerPrivate {
    /// Adds a new configuration connection status with the specified connection string and initial value.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string identifying the status.
    /// - `initial_value`: The initial value of the status.
    ///
    /// Calls the openDAQ C function `daqConnectionStatusContainerPrivate_addConfigurationConnectionStatus()`.
    pub fn add_configuration_connection_status(&self, connection_string: &str, initial_value: &Enumeration) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqConnectionStatusContainerPrivate_addConfigurationConnectionStatus)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _, initial_value.as_raw() as *mut _) };
        check(__code, "daqConnectionStatusContainerPrivate_addConfigurationConnectionStatus")?;
        Ok(())
    }

    /// Adds a new streaming connection status with the specified connection string, initial value, and streaming object.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string identifying the status.
    /// - `initial_value`: The initial value of the status.
    /// - `streaming_object`: The streaming object associated with the status.
    ///
    /// Calls the openDAQ C function `daqConnectionStatusContainerPrivate_addStreamingConnectionStatus()`.
    pub fn add_streaming_connection_status(&self, connection_string: &str, initial_value: &Enumeration, streaming_object: &Streaming) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqConnectionStatusContainerPrivate_addStreamingConnectionStatus)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _, initial_value.as_raw() as *mut _, streaming_object.as_raw() as *mut _) };
        check(__code, "daqConnectionStatusContainerPrivate_addStreamingConnectionStatus")?;
        Ok(())
    }

    /// Removes a streaming connection status associated with the specified connection string.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string identifying the status to remove.
    ///
    /// Calls the openDAQ C function `daqConnectionStatusContainerPrivate_removeStreamingConnectionStatus()`.
    pub fn remove_streaming_connection_status(&self, connection_string: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqConnectionStatusContainerPrivate_removeStreamingConnectionStatus)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqConnectionStatusContainerPrivate_removeStreamingConnectionStatus")?;
        Ok(())
    }

    /// Updates the value of an existing connection status.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string identifying the status to update.
    /// - `value`: The new value of the status.
    /// - `streaming_object`: The streaming object associated with the connection, used in triggered Core events. Set to nullptr for configuration connections.
    ///
    /// Calls the openDAQ C function `daqConnectionStatusContainerPrivate_updateConnectionStatus()`.
    pub fn update_connection_status(&self, connection_string: &str, value: &Enumeration, streaming_object: &Streaming) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqConnectionStatusContainerPrivate_updateConnectionStatus)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _, value.as_raw() as *mut _, streaming_object.as_raw() as *mut _) };
        check(__code, "daqConnectionStatusContainerPrivate_updateConnectionStatus")?;
        Ok(())
    }

    /// Updates the value of an existing connection status with a message.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string identifying the status to update.
    /// - `value`: The new value of the status.
    /// - `streaming_object`: The streaming object associated with the connection, used in triggered Core events. Set to nullptr for configuration connections.
    /// - `message`: The new message of the connection status. Usually describes last reconnect attempt failure.
    ///
    /// Calls the openDAQ C function `daqConnectionStatusContainerPrivate_updateConnectionStatusWithMessage()`.
    pub fn update_connection_status_with_message(&self, connection_string: &str, value: &Enumeration, streaming_object: &Streaming, message: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __message = crate::marshal::make_string(message)?;
        let __code = unsafe { (crate::sys::api().daqConnectionStatusContainerPrivate_updateConnectionStatusWithMessage)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _, value.as_raw() as *mut _, streaming_object.as_raw() as *mut _, __message.as_ptr() as *mut _) };
        check(__code, "daqConnectionStatusContainerPrivate_updateConnectionStatusWithMessage")?;
        Ok(())
    }

}

impl DeviceDomain {
    /// Calls the openDAQ C function `daqDeviceDomain_createDeviceDomain()`.
    pub fn new(tick_resolution: Ratio, origin: &str, unit: &Unit) -> Result<DeviceDomain> {
        let __tick_resolution = crate::value::ratio_to_ref(tick_resolution)?;
        let __origin = crate::marshal::make_string(origin)?;
        let mut __obj: *mut sys::daqDeviceDomain = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceDomain_createDeviceDomain)(&mut __obj, __tick_resolution.as_ptr() as *mut _, __origin.as_ptr() as *mut _, unit.as_raw() as *mut _) };
        check(__code, "daqDeviceDomain_createDeviceDomain")?;
        Ok(unsafe { crate::marshal::require_object::<DeviceDomain>(__obj as *mut _, "daqDeviceDomain_createDeviceDomain") }?)
    }

    /// Calls the openDAQ C function `daqDeviceDomain_createDeviceDomainWithReferenceDomainInfo()`.
    pub fn with_reference_domain_info(tick_resolution: Ratio, origin: &str, unit: &Unit, reference_domain_info: &ReferenceDomainInfo) -> Result<DeviceDomain> {
        let __tick_resolution = crate::value::ratio_to_ref(tick_resolution)?;
        let __origin = crate::marshal::make_string(origin)?;
        let mut __obj: *mut sys::daqDeviceDomain = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceDomain_createDeviceDomainWithReferenceDomainInfo)(&mut __obj, __tick_resolution.as_ptr() as *mut _, __origin.as_ptr() as *mut _, unit.as_raw() as *mut _, reference_domain_info.as_raw() as *mut _) };
        check(__code, "daqDeviceDomain_createDeviceDomainWithReferenceDomainInfo")?;
        Ok(unsafe { crate::marshal::require_object::<DeviceDomain>(__obj as *mut _, "daqDeviceDomain_createDeviceDomainWithReferenceDomainInfo") }?)
    }

    /// Gets the device's absolute origin. Most often this is a time epoch in the ISO 8601 format.
    ///
    /// # Returns
    /// - `origin`: The origin.
    ///
    /// Calls the openDAQ C function `daqDeviceDomain_getOrigin()`.
    pub fn origin(&self) -> Result<String> {
        let mut __origin: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceDomain_getOrigin)(self.as_raw() as *mut _, &mut __origin) };
        check(__code, "daqDeviceDomain_getOrigin")?;
        Ok(unsafe { crate::marshal::take_string(__origin) })
    }

    /// Gets the Reference Domain Info.
    ///
    /// # Returns
    /// - `reference_domain_info`: The Reference Domain Info. If set, gives additional information about the reference domain.
    ///
    /// Calls the openDAQ C function `daqDeviceDomain_getReferenceDomainInfo()`.
    pub fn reference_domain_info(&self) -> Result<Option<ReferenceDomainInfo>> {
        let mut __reference_domain_info: *mut sys::daqReferenceDomainInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceDomain_getReferenceDomainInfo)(self.as_raw() as *mut _, &mut __reference_domain_info) };
        check(__code, "daqDeviceDomain_getReferenceDomainInfo")?;
        Ok(unsafe { crate::marshal::take_object::<ReferenceDomainInfo>(__reference_domain_info as *mut _) })
    }

    /// Gets domain (usually time) between two consecutive ticks. Resolution is provided in a domain unit.
    ///
    /// # Returns
    /// - `tick_resolution`: The device's resolution.
    ///
    /// Calls the openDAQ C function `daqDeviceDomain_getTickResolution()`.
    pub fn tick_resolution(&self) -> Result<Option<Ratio>> {
        let mut __tick_resolution: *mut sys::daqRatio = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceDomain_getTickResolution)(self.as_raw() as *mut _, &mut __tick_resolution) };
        check(__code, "daqDeviceDomain_getTickResolution")?;
        Ok(unsafe { crate::value::take_ratio(__tick_resolution, "daqDeviceDomain_getTickResolution") }?)
    }

    /// Gets the domain unit (eg. seconds, hours, degrees...)
    ///
    /// # Returns
    /// - `unit`: The domain unit.
    ///
    /// Calls the openDAQ C function `daqDeviceDomain_getUnit()`.
    pub fn unit(&self) -> Result<Option<Unit>> {
        let mut __unit: *mut sys::daqUnit = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceDomain_getUnit)(self.as_raw() as *mut _, &mut __unit) };
        check(__code, "daqDeviceDomain_getUnit")?;
        Ok(unsafe { crate::marshal::take_object::<Unit>(__unit as *mut _) })
    }

}

impl DeviceInfoConfig {
    /// Calls the openDAQ C function `daqDeviceInfoConfig_createDeviceInfoConfig()`.
    pub fn new(name: &str, connection_string: &str) -> Result<DeviceInfoConfig> {
        let __name = crate::marshal::make_string(name)?;
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let mut __obj: *mut sys::daqDeviceInfoConfig = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_createDeviceInfoConfig)(&mut __obj, __name.as_ptr() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_createDeviceInfoConfig")?;
        Ok(unsafe { crate::marshal::require_object::<DeviceInfoConfig>(__obj as *mut _, "daqDeviceInfoConfig_createDeviceInfoConfig") }?)
    }

    /// Calls the openDAQ C function `daqDeviceInfoConfig_createDeviceInfoConfigWithCustomSdkVersion()`.
    pub fn with_custom_sdk_version(name: &str, connection_string: &str, sdk_version: &str) -> Result<DeviceInfoConfig> {
        let __name = crate::marshal::make_string(name)?;
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __sdk_version = crate::marshal::make_string(sdk_version)?;
        let mut __obj: *mut sys::daqDeviceInfoConfig = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_createDeviceInfoConfigWithCustomSdkVersion)(&mut __obj, __name.as_ptr() as *mut _, __connection_string.as_ptr() as *mut _, __sdk_version.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_createDeviceInfoConfigWithCustomSdkVersion")?;
        Ok(unsafe { crate::marshal::require_object::<DeviceInfoConfig>(__obj as *mut _, "daqDeviceInfoConfig_createDeviceInfoConfigWithCustomSdkVersion") }?)
    }

    /// Sets the asset ID of the device. Represents a user writable alphanumeric character sequence uniquely identifying a component.
    ///
    /// # Parameters
    /// - `id`: The asset ID of the device. The ID is provided by the integrator or user of the device. It contains typically an identifier in a branch, use case or user specific naming scheme. This could be for example a reference to an electric scheme.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setAssetId()`.
    pub fn set_asset_id(&self, id: &str) -> Result<()> {
        let __id = crate::marshal::make_string(id)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setAssetId)(self.as_raw() as *mut _, __id.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setAssetId")?;
        Ok(())
    }

    /// Sets the string representation of a connection address used to connect to the device.
    ///
    /// # Parameters
    /// - `connection_string`: The string used to connect to the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setConnectionString()`.
    pub fn set_connection_string(&self, connection_string: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setConnectionString)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setConnectionString")?;
        Ok(())
    }

    /// Sets the purpose of the device. For example "TestMeasurementDevice".
    ///
    /// # Parameters
    /// - `device_class`: The class of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setDeviceClass()`.
    pub fn set_device_class(&self, device_class: &str) -> Result<()> {
        let __device_class = crate::marshal::make_string(device_class)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setDeviceClass)(self.as_raw() as *mut _, __device_class.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setDeviceClass")?;
        Ok(())
    }

    /// Sets the address of the user manual. It may be a pathname in the file system or a URL (Web address)
    ///
    /// # Parameters
    /// - `device_manual`: The manual of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setDeviceManual()`.
    pub fn set_device_manual(&self, device_manual: &str) -> Result<()> {
        let __device_manual = crate::marshal::make_string(device_manual)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setDeviceManual)(self.as_raw() as *mut _, __device_manual.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setDeviceManual")?;
        Ok(())
    }

    /// Sets the revision level of the device.
    ///
    /// # Parameters
    /// - `device_revision`: The device revision level.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setDeviceRevision()`.
    pub fn set_device_revision(&self, device_revision: &str) -> Result<()> {
        let __device_revision = crate::marshal::make_string(device_revision)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setDeviceRevision)(self.as_raw() as *mut _, __device_revision.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setDeviceRevision")?;
        Ok(())
    }

    /// Sets a device type as an object providing type id, name, short description and default device configuration.
    ///
    /// # Returns
    /// - `device_type`: The device type object
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setDeviceType()`.
    pub fn set_device_type(&self, device_type: &DeviceType) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setDeviceType)(self.as_raw() as *mut _, device_type.as_raw() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setDeviceType")?;
        Ok(())
    }

    /// Sets the revision level of the hardware
    ///
    /// # Parameters
    /// - `hardware_revision`: The hardware revision of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setHardwareRevision()`.
    pub fn set_hardware_revision(&self, hardware_revision: &str) -> Result<()> {
        let __hardware_revision = crate::marshal::make_string(hardware_revision)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setHardwareRevision)(self.as_raw() as *mut _, __hardware_revision.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setHardwareRevision")?;
        Ok(())
    }

    /// Sets the location of the device.
    ///
    /// # Returns
    /// - `location`: The location of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setLocation()`.
    pub fn set_location(&self, location: &str) -> Result<()> {
        let __location = crate::marshal::make_string(location)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setLocation)(self.as_raw() as *mut _, __location.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setLocation")?;
        Ok(())
    }

    /// Sets the Mac address of the device.
    ///
    /// # Parameters
    /// - `mac_address`: The Mac address.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setMacAddress()`.
    pub fn set_mac_address(&self, mac_address: &str) -> Result<()> {
        let __mac_address = crate::marshal::make_string(mac_address)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setMacAddress)(self.as_raw() as *mut _, __mac_address.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setMacAddress")?;
        Ok(())
    }

    /// Sets the company that manufactured the device
    ///
    /// # Parameters
    /// - `manufacturer`: The manufacturer of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setManufacturer()`.
    pub fn set_manufacturer(&self, manufacturer: &str) -> Result<()> {
        let __manufacturer = crate::marshal::make_string(manufacturer)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setManufacturer)(self.as_raw() as *mut _, __manufacturer.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setManufacturer")?;
        Ok(())
    }

    /// Sets the unique identifier of the company that manufactured the device. This identifier should be a fully qualified domain name; however, it may be a GUID or similar construct that ensures global uniqueness.
    ///
    /// # Parameters
    /// - `manufacturer_uri`: The manufacturer uri of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setManufacturerUri()`.
    pub fn set_manufacturer_uri(&self, manufacturer_uri: &str) -> Result<()> {
        let __manufacturer_uri = crate::marshal::make_string(manufacturer_uri)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setManufacturerUri)(self.as_raw() as *mut _, __manufacturer_uri.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setManufacturerUri")?;
        Ok(())
    }

    /// Sets the model of the device
    ///
    /// # Parameters
    /// - `model`: The model of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setModel()`.
    pub fn set_model(&self, model: &str) -> Result<()> {
        let __model = crate::marshal::make_string(model)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setModel)(self.as_raw() as *mut _, __model.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setModel")?;
        Ok(())
    }

    /// Sets the name of the device
    ///
    /// # Parameters
    /// - `name`: The name of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setName()`.
    pub fn set_name(&self, name: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setName)(self.as_raw() as *mut _, __name.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setName")?;
        Ok(())
    }

    /// Sets the Mac address of the device's parent.
    ///
    /// # Parameters
    /// - `mac_address`: The parent's Mac address.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setParentMacAddress()`.
    pub fn set_parent_mac_address(&self, mac_address: &str) -> Result<()> {
        let __mac_address = crate::marshal::make_string(mac_address)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setParentMacAddress)(self.as_raw() as *mut _, __mac_address.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setParentMacAddress")?;
        Ok(())
    }

    /// Sets the platform of the device. The platform specifies whether real hardware is used or if the device is simulated.
    ///
    /// # Parameters
    /// - `platform`: The platform of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setPlatform()`.
    pub fn set_platform(&self, platform: &str) -> Result<()> {
        let __platform = crate::marshal::make_string(platform)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setPlatform)(self.as_raw() as *mut _, __platform.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setPlatform")?;
        Ok(())
    }

    /// Sets the position of the device. The position specifies the position within a given system. For example in which slot or slice the device is in.
    ///
    /// # Parameters
    /// - `position`: The position of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setPosition()`.
    pub fn set_position(&self, position: i64) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setPosition)(self.as_raw() as *mut _, position) };
        check(__code, "daqDeviceInfoConfig_setPosition")?;
        Ok(())
    }

    /// Sets the unique combination of numbers and letters used to identify the device.
    ///
    /// # Parameters
    /// - `product_code`: The product code of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setProductCode()`.
    pub fn set_product_code(&self, product_code: &str) -> Result<()> {
        let __product_code = crate::marshal::make_string(product_code)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setProductCode)(self.as_raw() as *mut _, __product_code.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setProductCode")?;
        Ok(())
    }

    /// Sets the globally unique resource identifier provided by the manufacturer. The recommended syntax of the ProductInstanceUri is: \<ManufacturerUri\>/\<any string\> where \<any string\> is unique among all instances using the same ManufacturerUri.
    ///
    /// # Parameters
    /// - `product_instance_uri`: The product instance uri of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setProductInstanceUri()`.
    pub fn set_product_instance_uri(&self, product_instance_uri: &str) -> Result<()> {
        let __product_instance_uri = crate::marshal::make_string(product_instance_uri)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setProductInstanceUri)(self.as_raw() as *mut _, __product_instance_uri.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setProductInstanceUri")?;
        Ok(())
    }

    /// Sets the incremental counter indicating the number of times the configuration data has been modified.
    ///
    /// # Parameters
    /// - `revision_counter`: The revision counter of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setRevisionCounter()`.
    pub fn set_revision_counter(&self, revision_counter: i64) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setRevisionCounter)(self.as_raw() as *mut _, revision_counter) };
        check(__code, "daqDeviceInfoConfig_setRevisionCounter")?;
        Ok(())
    }

    /// Sets the serial number of the device
    ///
    /// # Parameters
    /// - `serial_number`: The serial number of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setSerialNumber()`.
    pub fn set_serial_number(&self, serial_number: &str) -> Result<()> {
        let __serial_number = crate::marshal::make_string(serial_number)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setSerialNumber)(self.as_raw() as *mut _, __serial_number.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setSerialNumber")?;
        Ok(())
    }

    /// sets the revision level of the software component
    ///
    /// # Parameters
    /// - `software_revision`: The software revision of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setSoftwareRevision()`.
    pub fn set_software_revision(&self, software_revision: &str) -> Result<()> {
        let __software_revision = crate::marshal::make_string(software_revision)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setSoftwareRevision)(self.as_raw() as *mut _, __software_revision.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setSoftwareRevision")?;
        Ok(())
    }

    /// Sets the system type. The system type can, for example, be LayeredSystem, StandaloneSystem, or RackSystem.
    ///
    /// # Parameters
    /// - `type`: The system type of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setSystemType()`.
    pub fn set_system_type(&self, type_: &str) -> Result<()> {
        let __type_ = crate::marshal::make_string(type_)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setSystemType)(self.as_raw() as *mut _, __type_.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setSystemType")?;
        Ok(())
    }

    /// Sets the system UUID that represents a unique ID of a system. All devices in a system share this UUID.
    ///
    /// # Parameters
    /// - `uuid`: The unique ID of a system.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setSystemUuid()`.
    pub fn set_system_uuid(&self, uuid: &str) -> Result<()> {
        let __uuid = crate::marshal::make_string(uuid)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setSystemUuid)(self.as_raw() as *mut _, __uuid.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setSystemUuid")?;
        Ok(())
    }

    /// Sets the name of the current user of the device.
    ///
    /// # Returns
    /// - `user_name`: The location of the device. If the info object is obtained from a device that is already added (not through discovery), the username string value matches that of the device's "userName" property.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoConfig_setUserName()`.
    pub fn set_user_name(&self, user_name: &str) -> Result<()> {
        let __user_name = crate::marshal::make_string(user_name)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoConfig_setUserName)(self.as_raw() as *mut _, __user_name.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoConfig_setUserName")?;
        Ok(())
    }

}

impl DeviceInfoInternal {
    /// Registers a newly connected client or re-registers a reconnected client.
    ///
    /// # Parameters
    /// - `client_number`: If provided, represents the original ordinal number of the re-registered client. If unassigned or exceeding the total number of clients ever registered (including those that were later deregistered), it is set to the incremented total count; otherwise, the client is registered under the specified number.
    /// - `client_info`: The connected client information object.
    ///
    /// # Returns
    /// OPENDAQ_ERR_ALREADYEXISTS if a client with the specified number already registered.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoInternal_addConnectedClient()`.
    pub fn add_connected_client(&self, client_info: &ConnectedClientInfo) -> Result<usize> {
        let mut __client_number: usize = Default::default();
        let __code = unsafe { (crate::sys::api().daqDeviceInfoInternal_addConnectedClient)(self.as_raw() as *mut _, &mut __client_number, client_info.as_raw() as *mut _) };
        check(__code, "daqDeviceInfoInternal_addConnectedClient")?;
        Ok(__client_number)
    }

    /// Adds a network interface to the dictionary of available interfaces.
    ///
    /// # Parameters
    /// - `network_interface`: The available interface to add.
    /// - `name`: The name of available interface to add. The provided name should be unique within the device info as used as the key in the dictionary of available interfaces.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoInternal_addNetworkInteface()`.
    pub fn add_network_inteface(&self, name: &str, network_interface: &NetworkInterface) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoInternal_addNetworkInteface)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, network_interface.as_raw() as *mut _) };
        check(__code, "daqDeviceInfoInternal_addNetworkInteface")?;
        Ok(())
    }

    /// Adds a protocol to the list of supported capabilities.
    ///
    /// # Parameters
    /// - `server_capability`: The supported protocol to add.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoInternal_addServerCapability()`.
    pub fn add_server_capability(&self, server_capability: &ServerCapability) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceInfoInternal_addServerCapability)(self.as_raw() as *mut _, server_capability.as_raw() as *mut _) };
        check(__code, "daqDeviceInfoInternal_addServerCapability")?;
        Ok(())
    }

    /// Removes all server streaming capabilities from the list of supported capabilities.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoInternal_clearServerStreamingCapabilities()`.
    pub fn clear_server_streaming_capabilities(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceInfoInternal_clearServerStreamingCapabilities)(self.as_raw() as *mut _) };
        check(__code, "daqDeviceInfoInternal_clearServerStreamingCapabilities")?;
        Ok(())
    }

    /// Unregisters a previously connected client upon disconnection.
    ///
    /// # Parameters
    /// - `client_number`: The number identifying the disconnected client.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoInternal_removeConnectedClient()`.
    pub fn remove_connected_client(&self, client_number: usize) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceInfoInternal_removeConnectedClient)(self.as_raw() as *mut _, client_number) };
        check(__code, "daqDeviceInfoInternal_removeConnectedClient")?;
        Ok(())
    }

    /// Removes a protocol from the list of supported capabilities.
    ///
    /// # Parameters
    /// - `protocol_id`: The ID of the protocol to remove.
    ///
    /// Calls the openDAQ C function `daqDeviceInfoInternal_removeServerCapability()`.
    pub fn remove_server_capability(&self, protocol_id: &str) -> Result<()> {
        let __protocol_id = crate::marshal::make_string(protocol_id)?;
        let __code = unsafe { (crate::sys::api().daqDeviceInfoInternal_removeServerCapability)(self.as_raw() as *mut _, __protocol_id.as_ptr() as *mut _) };
        check(__code, "daqDeviceInfoInternal_removeServerCapability")?;
        Ok(())
    }

}

impl DeviceInfo {
    /// Gets the asset ID of the device. Represents a user writable alphanumeric character sequence uniquely identifying a component.
    ///
    /// # Returns
    /// - `id`: The asset ID of the device. The ID is provided by the integrator or user of the device. It contains typically an identifier in a branch, use case or user specific naming scheme. This could be for example a reference to an electric scheme. The ID must be a string representation of an Int32 number.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getAssetId()`.
    pub fn asset_id(&self) -> Result<String> {
        let mut __id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getAssetId)(self.as_raw() as *mut _, &mut __id) };
        check(__code, "daqDeviceInfo_getAssetId")?;
        Ok(unsafe { crate::marshal::take_string(__id) })
    }

    /// Retrieves the configuration connection information of the server to which the client is connected.
    ///
    /// # Returns
    /// - `connection_info`: The server capability with the configuration connection information. This method returns the configuration connection information of the server to which the client is connected. If the connection to the server is not established, the fields of the server capability object are empty.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getConfigurationConnectionInfo()`.
    pub fn configuration_connection_info(&self) -> Result<Option<ServerCapability>> {
        let mut __connection_info: *mut sys::daqServerCapability = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getConfigurationConnectionInfo)(self.as_raw() as *mut _, &mut __connection_info) };
        check(__code, "daqDeviceInfo_getConfigurationConnectionInfo")?;
        Ok(unsafe { crate::marshal::take_object::<ServerCapability>(__connection_info as *mut _) })
    }

    /// Gets the list of connected client information objects.
    ///
    /// # Returns
    /// - `connected_clients_info`: The list of connected client information objects.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getConnectedClientsInfo()`.
    pub fn connected_clients_info(&self) -> Result<Vec<ConnectedClientInfo>> {
        let mut __connected_clients_info: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getConnectedClientsInfo)(self.as_raw() as *mut _, &mut __connected_clients_info) };
        check(__code, "daqDeviceInfo_getConnectedClientsInfo")?;
        Ok(unsafe { crate::marshal::take_list::<ConnectedClientInfo>(__connected_clients_info as *mut _, "daqDeviceInfo_getConnectedClientsInfo") }?)
    }

    /// Gets the string representation of a connection address used to connect to the device.
    ///
    /// # Returns
    /// - `connection_string`: The string used to connect to the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getConnectionString()`.
    pub fn connection_string(&self) -> Result<String> {
        let mut __connection_string: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqDeviceInfo_getConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the list of property names that are not in the default set of Device info properties. Default properties are all info properties that have a corresponding getter method.
    ///
    /// # Returns
    /// - `custom_info_names`: The list of names of custom properties.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getCustomInfoPropertyNames()`.
    pub fn custom_info_property_names(&self) -> Result<Vec<String>> {
        let mut __custom_info_names: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getCustomInfoPropertyNames)(self.as_raw() as *mut _, &mut __custom_info_names) };
        check(__code, "daqDeviceInfo_getCustomInfoPropertyNames")?;
        Ok(unsafe { crate::marshal::take_list::<String>(__custom_info_names as *mut _, "daqDeviceInfo_getCustomInfoPropertyNames") }?)
    }

    /// Gets the purpose of the device. For example "TestMeasurementDevice".
    ///
    /// # Returns
    /// - `device_class`: The class of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getDeviceClass()`.
    pub fn device_class(&self) -> Result<String> {
        let mut __device_class: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getDeviceClass)(self.as_raw() as *mut _, &mut __device_class) };
        check(__code, "daqDeviceInfo_getDeviceClass")?;
        Ok(unsafe { crate::marshal::take_string(__device_class) })
    }

    /// Gets the address of the user manual. It may be a pathname in the file system or a URL (Web address)
    ///
    /// # Returns
    /// - `device_manual`: The manual of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getDeviceManual()`.
    pub fn device_manual(&self) -> Result<String> {
        let mut __device_manual: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getDeviceManual)(self.as_raw() as *mut _, &mut __device_manual) };
        check(__code, "daqDeviceInfo_getDeviceManual")?;
        Ok(unsafe { crate::marshal::take_string(__device_manual) })
    }

    /// Gets the revision level of the device.
    ///
    /// # Returns
    /// - `device_revision`: The device revision level.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getDeviceRevision()`.
    pub fn device_revision(&self) -> Result<String> {
        let mut __device_revision: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getDeviceRevision)(self.as_raw() as *mut _, &mut __device_revision) };
        check(__code, "daqDeviceInfo_getDeviceRevision")?;
        Ok(unsafe { crate::marshal::take_string(__device_revision) })
    }

    /// Gets a device type as an object providing type id, name, short description and default device configuration. By using default config object as a starting point, users can easily modify the preset properties to tailor the configuration of the client device accordingly.
    ///
    /// # Returns
    /// - `device_type`: The device type object
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getDeviceType()`.
    pub fn device_type(&self) -> Result<Option<DeviceType>> {
        let mut __device_type: *mut sys::daqDeviceType = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getDeviceType)(self.as_raw() as *mut _, &mut __device_type) };
        check(__code, "daqDeviceInfo_getDeviceType")?;
        Ok(unsafe { crate::marshal::take_object::<DeviceType>(__device_type as *mut _) })
    }

    /// Gets the revision level of the hardware.
    ///
    /// # Returns
    /// - `hardware_revision`: The hardware revision of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getHardwareRevision()`.
    pub fn hardware_revision(&self) -> Result<String> {
        let mut __hardware_revision: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getHardwareRevision)(self.as_raw() as *mut _, &mut __hardware_revision) };
        check(__code, "daqDeviceInfo_getHardwareRevision")?;
        Ok(unsafe { crate::marshal::take_string(__hardware_revision) })
    }

    /// Gets the location of the device.
    ///
    /// # Returns
    /// - `location`: The location of the device. If the info object is obtained from a device that is already added (not through discovery), the location string value matches that of the device's "location" property.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getLocation()`.
    pub fn location(&self) -> Result<String> {
        let mut __location: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getLocation)(self.as_raw() as *mut _, &mut __location) };
        check(__code, "daqDeviceInfo_getLocation")?;
        Ok(unsafe { crate::marshal::take_string(__location) })
    }

    /// Gets the Mac address of the device.
    ///
    /// # Returns
    /// - `mac_address`: The Mac address.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getMacAddress()`.
    pub fn mac_address(&self) -> Result<String> {
        let mut __mac_address: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getMacAddress)(self.as_raw() as *mut _, &mut __mac_address) };
        check(__code, "daqDeviceInfo_getMacAddress")?;
        Ok(unsafe { crate::marshal::take_string(__mac_address) })
    }

    /// Gets the company that manufactured the device
    ///
    /// # Returns
    /// - `manufacturer`: The manufacturer of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getManufacturer()`.
    pub fn manufacturer(&self) -> Result<String> {
        let mut __manufacturer: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getManufacturer)(self.as_raw() as *mut _, &mut __manufacturer) };
        check(__code, "daqDeviceInfo_getManufacturer")?;
        Ok(unsafe { crate::marshal::take_string(__manufacturer) })
    }

    /// Gets the unique identifier of the company that manufactured the device This identifier should be a fully qualified domain name; however, it may be a GUID or similar construct that ensures global uniqueness.
    ///
    /// # Returns
    /// - `manufacturer_uri`: The manufacturer uri of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getManufacturerUri()`.
    pub fn manufacturer_uri(&self) -> Result<String> {
        let mut __manufacturer_uri: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getManufacturerUri)(self.as_raw() as *mut _, &mut __manufacturer_uri) };
        check(__code, "daqDeviceInfo_getManufacturerUri")?;
        Ok(unsafe { crate::marshal::take_string(__manufacturer_uri) })
    }

    /// Gets the model of the device
    ///
    /// # Returns
    /// - `model`: The model of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getModel()`.
    pub fn model(&self) -> Result<String> {
        let mut __model: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getModel)(self.as_raw() as *mut _, &mut __model) };
        check(__code, "daqDeviceInfo_getModel")?;
        Ok(unsafe { crate::marshal::take_string(__model) })
    }

    /// Gets the name of the device
    ///
    /// # Returns
    /// - `name`: The name of the device. If the info object is obtained from a device that is already added (not through discovery), the name string value matches that of the device's "Name" attribute.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getName()`.
    pub fn name(&self) -> Result<String> {
        let mut __name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getName)(self.as_raw() as *mut _, &mut __name) };
        check(__code, "daqDeviceInfo_getName")?;
        Ok(unsafe { crate::marshal::take_string(__name) })
    }

    /// Gets the network interface with a given name.
    ///
    /// # Parameters
    /// - `interface_name`: The name of the device network interface.
    ///
    /// # Returns
    /// - `intf`: The device network interface with the given name.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTFOUND`: if the network interface with the given name is not available.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getNetworkInterface()`.
    pub fn network_interface(&self, interface_name: &str) -> Result<Option<NetworkInterface>> {
        let __interface_name = crate::marshal::make_string(interface_name)?;
        let mut __intf: *mut sys::daqNetworkInterface = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getNetworkInterface)(self.as_raw() as *mut _, __interface_name.as_ptr() as *mut _, &mut __intf) };
        check(__code, "daqDeviceInfo_getNetworkInterface")?;
        Ok(unsafe { crate::marshal::take_object::<NetworkInterface>(__intf as *mut _) })
    }

    /// Gets the dictionary of network interfaces stored in device info.
    ///
    /// # Returns
    /// - `interfaces`: The dictionary of device network interfaces. Obtained dictionary contains INetworkInterface objects, representing the available network interfaces and allowing to manage their configurations. The dictionary key corresponds to interface identifier (e.g. "eth0").
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getNetworkInterfaces()`.
    pub fn network_interfaces(&self) -> Result<std::collections::HashMap<String, NetworkInterface>> {
        let mut __interfaces: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getNetworkInterfaces)(self.as_raw() as *mut _, &mut __interfaces) };
        check(__code, "daqDeviceInfo_getNetworkInterfaces")?;
        Ok(unsafe { crate::marshal::take_dict::<String, NetworkInterface>(__interfaces as *mut _, "daqDeviceInfo_getNetworkInterfaces") }?)
    }

    /// Gets the Mac address of the device's parent.
    ///
    /// # Returns
    /// - `mac_address`: The parent's Mac address.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getParentMacAddress()`.
    pub fn parent_mac_address(&self) -> Result<String> {
        let mut __mac_address: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getParentMacAddress)(self.as_raw() as *mut _, &mut __mac_address) };
        check(__code, "daqDeviceInfo_getParentMacAddress")?;
        Ok(unsafe { crate::marshal::take_string(__mac_address) })
    }

    /// Gets the platform of the device. The platform specifies whether real hardware is used or if the device is simulated.
    ///
    /// # Returns
    /// - `platform`: The platform of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getPlatform()`.
    pub fn platform(&self) -> Result<String> {
        let mut __platform: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getPlatform)(self.as_raw() as *mut _, &mut __platform) };
        check(__code, "daqDeviceInfo_getPlatform")?;
        Ok(unsafe { crate::marshal::take_string(__platform) })
    }

    /// Gets the position of the device. The position specifies the position within a given system. For example in which slot or slice the device is in.
    ///
    /// # Returns
    /// - `position`: The position of the device. The Position should be a positive integer in the range supported by the UInt16 data type.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getPosition()`.
    pub fn position(&self) -> Result<i64> {
        let mut __position: i64 = Default::default();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getPosition)(self.as_raw() as *mut _, &mut __position) };
        check(__code, "daqDeviceInfo_getPosition")?;
        Ok(__position)
    }

    /// Gets the unique combination of numbers and letters used to identify the device.
    ///
    /// # Returns
    /// - `product_code`: The product code of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getProductCode()`.
    pub fn product_code(&self) -> Result<String> {
        let mut __product_code: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getProductCode)(self.as_raw() as *mut _, &mut __product_code) };
        check(__code, "daqDeviceInfo_getProductCode")?;
        Ok(unsafe { crate::marshal::take_string(__product_code) })
    }

    /// Gets the globally unique resource identifier provided by the manufacturer. The recommended syntax of the ProductInstanceUri is: \<ManufacturerUri\>/\<any string\> where \<any string\> is unique among all instances using the same ManufacturerUri.
    ///
    /// # Returns
    /// - `product_instance_uri`: The product instance uri of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getProductInstanceUri()`.
    pub fn product_instance_uri(&self) -> Result<String> {
        let mut __product_instance_uri: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getProductInstanceUri)(self.as_raw() as *mut _, &mut __product_instance_uri) };
        check(__code, "daqDeviceInfo_getProductInstanceUri")?;
        Ok(unsafe { crate::marshal::take_string(__product_instance_uri) })
    }

    /// Gets the incremental counter indicating the number of times the configuration data has been modified.
    ///
    /// # Returns
    /// - `revision_counter`: The revision counter of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getRevisionCounter()`.
    pub fn revision_counter(&self) -> Result<i64> {
        let mut __revision_counter: i64 = Default::default();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getRevisionCounter)(self.as_raw() as *mut _, &mut __revision_counter) };
        check(__code, "daqDeviceInfo_getRevisionCounter")?;
        Ok(__revision_counter)
    }

    /// Gets the version of the SDK used to build said device. Can be empty if the device does not use the SDK as its firmware/is implemented at a protocol-level.
    ///
    /// # Returns
    /// - `version`: The SDK version.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getSdkVersion()`.
    pub fn sdk_version(&self) -> Result<String> {
        let mut __version: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getSdkVersion)(self.as_raw() as *mut _, &mut __version) };
        check(__code, "daqDeviceInfo_getSdkVersion")?;
        Ok(unsafe { crate::marshal::take_string(__version) })
    }

    /// Gets the unique production number provided by the manufacturer
    ///
    /// # Returns
    /// - `serial_number`: The serial number of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getSerialNumber()`.
    pub fn serial_number(&self) -> Result<String> {
        let mut __serial_number: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getSerialNumber)(self.as_raw() as *mut _, &mut __serial_number) };
        check(__code, "daqDeviceInfo_getSerialNumber")?;
        Ok(unsafe { crate::marshal::take_string(__serial_number) })
    }

    /// Gets the list of server capabilities stored in device info.
    ///
    /// # Returns
    /// - `server_capabilities`: The list of device supported protocols (List containing IServerCapability objects, representing the supported protocols along with their properties).
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getServerCapabilities()`.
    pub fn server_capabilities(&self) -> Result<Vec<ServerCapability>> {
        let mut __server_capabilities: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getServerCapabilities)(self.as_raw() as *mut _, &mut __server_capabilities) };
        check(__code, "daqDeviceInfo_getServerCapabilities")?;
        Ok(unsafe { crate::marshal::take_list::<ServerCapability>(__server_capabilities as *mut _, "daqDeviceInfo_getServerCapabilities") }?)
    }

    /// Gets the server capability with a given ID.
    ///
    /// # Parameters
    /// - `protocol_id`: The ID of the server capability protocol.
    ///
    /// # Returns
    /// - `server_capability`: The server capability with the given ID.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTFOUND`: if the server capability is not available.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getServerCapability()`.
    pub fn server_capability(&self, protocol_id: &str) -> Result<Option<ServerCapability>> {
        let __protocol_id = crate::marshal::make_string(protocol_id)?;
        let mut __server_capability: *mut sys::daqServerCapability = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getServerCapability)(self.as_raw() as *mut _, __protocol_id.as_ptr() as *mut _, &mut __server_capability) };
        check(__code, "daqDeviceInfo_getServerCapability")?;
        Ok(unsafe { crate::marshal::take_object::<ServerCapability>(__server_capability as *mut _) })
    }

    /// Gets the revision level of the software component.
    ///
    /// # Returns
    /// - `software_revision`: The software revision of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getSoftwareRevision()`.
    pub fn software_revision(&self) -> Result<String> {
        let mut __software_revision: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getSoftwareRevision)(self.as_raw() as *mut _, &mut __software_revision) };
        check(__code, "daqDeviceInfo_getSoftwareRevision")?;
        Ok(unsafe { crate::marshal::take_string(__software_revision) })
    }

    /// Gets the system type. The system type can, for example, be LayeredSystem, StandaloneSystem, or RackSystem.
    ///
    /// # Returns
    /// - `type`: The system type of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getSystemType()`.
    pub fn system_type(&self) -> Result<String> {
        let mut __type_: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getSystemType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqDeviceInfo_getSystemType")?;
        Ok(unsafe { crate::marshal::take_string(__type_) })
    }

    /// Gets the system UUID that represents a unique ID of a system. All devices in a system share this UUID.
    ///
    /// # Returns
    /// - `uuid`: The unique ID of a system.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getSystemUuid()`.
    pub fn system_uuid(&self) -> Result<String> {
        let mut __uuid: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getSystemUuid)(self.as_raw() as *mut _, &mut __uuid) };
        check(__code, "daqDeviceInfo_getSystemUuid")?;
        Ok(unsafe { crate::marshal::take_string(__uuid) })
    }

    /// Gets the name of the current user of the device.
    ///
    /// # Returns
    /// - `user_name`: The name of the current user of the device. If the info object is obtained from a device that is already added (not through discovery), the username string value matches that of the device's "userName" property.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_getUserName()`.
    pub fn user_name(&self) -> Result<String> {
        let mut __user_name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_getUserName)(self.as_raw() as *mut _, &mut __user_name) };
        check(__code, "daqDeviceInfo_getUserName")?;
        Ok(unsafe { crate::marshal::take_string(__user_name) })
    }

    /// Checks whether the server capability with a given ID is available.
    ///
    /// # Parameters
    /// - `protocol_id`: The ID of the server capability protocol.
    ///
    /// # Returns
    /// - `has_capability`: True if the protocol is available; False otherwise.
    ///
    /// Calls the openDAQ C function `daqDeviceInfo_hasServerCapability()`.
    pub fn has_server_capability(&self, protocol_id: &str) -> Result<bool> {
        let __protocol_id = crate::marshal::make_string(protocol_id)?;
        let mut __has_capability: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqDeviceInfo_hasServerCapability)(self.as_raw() as *mut _, __protocol_id.as_ptr() as *mut _, &mut __has_capability) };
        check(__code, "daqDeviceInfo_hasServerCapability")?;
        Ok(__has_capability != 0)
    }

}

impl DeviceNetworkConfig {
    /// Checks if the device supports network configuration management.
    ///
    /// # Returns
    /// - `enabled`: A flag indicating whether the device supports managing network configurations.
    ///
    /// Calls the openDAQ C function `daqDeviceNetworkConfig_getNetworkConfigurationEnabled()`.
    pub fn network_configuration_enabled(&self) -> Result<bool> {
        let mut __enabled: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqDeviceNetworkConfig_getNetworkConfigurationEnabled)(self.as_raw() as *mut _, &mut __enabled) };
        check(__code, "daqDeviceNetworkConfig_getNetworkConfigurationEnabled")?;
        Ok(__enabled != 0)
    }

    /// Gets the names of all configurable network interfaces on the device.
    ///
    /// # Returns
    /// - `iface_names`: A list containing the names of network interface adapters available for configuration.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTIMPLEMENTED`: if the device does not support network configuration management.
    ///
    /// Calls the openDAQ C function `daqDeviceNetworkConfig_getNetworkInterfaceNames()`.
    pub fn network_interface_names(&self) -> Result<Vec<String>> {
        let mut __iface_names: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceNetworkConfig_getNetworkInterfaceNames)(self.as_raw() as *mut _, &mut __iface_names) };
        check(__code, "daqDeviceNetworkConfig_getNetworkInterfaceNames")?;
        Ok(unsafe { crate::marshal::take_list::<String>(__iface_names as *mut _, "daqDeviceNetworkConfig_getNetworkInterfaceNames") }?)
    }

    /// Retrieves the currently active configuration of a specified network interface.
    ///
    /// # Parameters
    /// - `iface_name`: The name of the network interface adapter as registered in the operating system. Typically, this is a short symbolic identifier for the adapter, e.g. "eth0".
    ///
    /// # Returns
    /// - `config`: The property object containing the active configuration of the network interface.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTIMPLEMENTED`: if the device does not support retrieving network configurations.
    ///
    /// Calls the openDAQ C function `daqDeviceNetworkConfig_retrieveNetworkConfiguration()`.
    pub fn retrieve_network_configuration(&self, iface_name: &str) -> Result<Option<PropertyObject>> {
        let __iface_name = crate::marshal::make_string(iface_name)?;
        let mut __config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceNetworkConfig_retrieveNetworkConfiguration)(self.as_raw() as *mut _, __iface_name.as_ptr() as *mut _, &mut __config) };
        check(__code, "daqDeviceNetworkConfig_retrieveNetworkConfiguration")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__config as *mut _) })
    }

    /// Submits a new configuration parameters to a specified network interface.
    ///
    /// # Parameters
    /// - `iface_name`: The name of the network interface adapter as registered in the operating system. Typically, this is a short symbolic identifier for the adapter, e.g. "eth0".
    /// - `config`: The property object with new configuration parameters to submit. The format of the properties matches that used in INetworkInterface.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTIMPLEMENTED`: if the device does not support network configuration management.
    ///
    /// Calls the openDAQ C function `daqDeviceNetworkConfig_submitNetworkConfiguration()`.
    pub fn submit_network_configuration(&self, iface_name: &str, config: &PropertyObject) -> Result<()> {
        let __iface_name = crate::marshal::make_string(iface_name)?;
        let __code = unsafe { (crate::sys::api().daqDeviceNetworkConfig_submitNetworkConfiguration)(self.as_raw() as *mut _, __iface_name.as_ptr() as *mut _, config.as_raw() as *mut _) };
        check(__code, "daqDeviceNetworkConfig_submitNetworkConfiguration")?;
        Ok(())
    }

}

impl DevicePrivate {
    /// Calls the openDAQ C function `daqDevicePrivate_forceUnlock()`.
    pub fn force_unlock(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_forceUnlock)(self.as_raw() as *mut _) };
        check(__code, "daqDevicePrivate_forceUnlock")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqDevicePrivate_getDeviceConfig()`.
    pub fn device_config(&self) -> Result<Option<PropertyObject>> {
        let mut __config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_getDeviceConfig)(self.as_raw() as *mut _, &mut __config) };
        check(__code, "daqDevicePrivate_getDeviceConfig")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__config as *mut _) })
    }

    /// Calls the openDAQ C function `daqDevicePrivate_isLockedInternal()`.
    pub fn is_locked_internal(&self) -> Result<bool> {
        let mut __locked: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_isLockedInternal)(self.as_raw() as *mut _, &mut __locked) };
        check(__code, "daqDevicePrivate_isLockedInternal")?;
        Ok(__locked != 0)
    }

    /// Calls the openDAQ C function `daqDevicePrivate_lock()`.
    pub fn lock(&self, user: &User) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_lock)(self.as_raw() as *mut _, user.as_raw() as *mut _) };
        check(__code, "daqDevicePrivate_lock")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqDevicePrivate_setAsRoot()`.
    pub fn set_as_root(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_setAsRoot)(self.as_raw() as *mut _) };
        check(__code, "daqDevicePrivate_setAsRoot")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqDevicePrivate_setDeviceConfig()`.
    pub fn set_device_config(&self, config: &PropertyObject) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_setDeviceConfig)(self.as_raw() as *mut _, config.as_raw() as *mut _) };
        check(__code, "daqDevicePrivate_setDeviceConfig")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqDevicePrivate_unlock()`.
    pub fn unlock(&self, user: &User) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevicePrivate_unlock)(self.as_raw() as *mut _, user.as_raw() as *mut _) };
        check(__code, "daqDevicePrivate_unlock")?;
        Ok(())
    }

}

impl DeviceType {
    /// Creates a Device type object, with the id, name, description and optional defaultConfig.
    ///
    /// # Parameters
    /// - `id`: The unique type ID of the device.
    /// - `name`: The name of the device type.
    /// - `description`: A short description of the device type.
    /// - `default_config`: The property object, to be cloned and returned, each time user creates default configuration object. This way each instance of the device has its own configuration object.
    ///
    /// Calls the openDAQ C function `daqDeviceType_createDeviceType()`.
    pub fn new(id: &str, name: &str, description: &str, default_config: &PropertyObject, prefix: &str) -> Result<DeviceType> {
        let __id = crate::marshal::make_string(id)?;
        let __name = crate::marshal::make_string(name)?;
        let __description = crate::marshal::make_string(description)?;
        let __prefix = crate::marshal::make_string(prefix)?;
        let mut __obj: *mut sys::daqDeviceType = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceType_createDeviceType)(&mut __obj, __id.as_ptr() as *mut _, __name.as_ptr() as *mut _, __description.as_ptr() as *mut _, default_config.as_raw() as *mut _, __prefix.as_ptr() as *mut _) };
        check(__code, "daqDeviceType_createDeviceType")?;
        Ok(unsafe { crate::marshal::require_object::<DeviceType>(__obj as *mut _, "daqDeviceType_createDeviceType") }?)
    }

    /// Calls the openDAQ C function `daqDeviceType_getConnectionStringPrefix()`.
    pub fn connection_string_prefix(&self) -> Result<String> {
        let mut __prefix: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceType_getConnectionStringPrefix)(self.as_raw() as *mut _, &mut __prefix) };
        check(__code, "daqDeviceType_getConnectionStringPrefix")?;
        Ok(unsafe { crate::marshal::take_string(__prefix) })
    }

}

impl Device {
    /// Connects to a device at the given connection string and returns it.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string containing the address of the device. In example an IPv4/IPv6 address. The connection string can be found in the Device Info objects returned by `getAvailableDevices`.
    /// - `config`: A config object to configure a client device. This object can contain properties like max sample rate, port to use for 3rd party communication, number of channels to generate, or other device specific settings. Can be created from its corresponding Device type object. In case of a null value, it will use the default configuration.
    ///
    /// # Returns
    /// - `device`: The added device.
    ///
    /// Calls the openDAQ C function `daqDevice_addDevice()`.
    pub fn add_device(&self, connection_string: &str) -> Result<Option<Device>> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let mut __device: *mut sys::daqDevice = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addDevice)(self.as_raw() as *mut _, &mut __device, __connection_string.as_ptr() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqDevice_addDevice")?;
        Ok(unsafe { crate::marshal::take_object::<Device>(__device as *mut _) })
    }

    /// Connects to a device at the given connection string and returns it.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string containing the address of the device. In example an IPv4/IPv6 address. The connection string can be found in the Device Info objects returned by `getAvailableDevices`.
    /// - `config`: A config object to configure a client device. This object can contain properties like max sample rate, port to use for 3rd party communication, number of channels to generate, or other device specific settings. Can be created from its corresponding Device type object. In case of a null value, it will use the default configuration.
    ///
    /// # Returns
    /// - `device`: The added device.
    ///
    /// Calls the openDAQ C function `daqDevice_addDevice()`.
    pub fn add_device_with(&self, connection_string: &str, config: Option<&PropertyObject>) -> Result<Option<Device>> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let mut __device: *mut sys::daqDevice = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addDevice)(self.as_raw() as *mut _, &mut __device, __connection_string.as_ptr() as *mut _, config.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_addDevice")?;
        Ok(unsafe { crate::marshal::take_object::<Device>(__device as *mut _) })
    }

    /// Connects to multiple devices in parallel using the provided connection strings and returns the connected devices. Each connection is established concurrently to improve performance when handling multiple devices. The additions, in turn, are performed sequentially in the order specified by connectionArgs.
    ///
    /// # Parameters
    /// - `connection_args`: A dictionary where each key is a connection string identifying the target device (e.g., IPv4/IPv6), and each value is a configuration object that customizes the connection. The configuration may specify parameters such as maximum sample rate, communication port, number of channels, or other device-specific settings. A `nullptr` value indicates that the default configuration should be used.
    /// - `err_codes`: An optional dictionary used to populate error codes for failed connection or addition attempts. For each failed attempt, the key is the connection string, and the value contains the error code.
    /// - `error_infos`: An optional dictionary used to populate detailed error info for failed connection or addition attempts. For each failed attempt, the key is the connection string, and the value contains the error info object.
    ///
    /// # Returns
    /// OPENDAQ_PARTIAL_SUCCESS if at least one device was successfully created and added, but not all of them; OPENDAQ_ERR_GENERALERROR if no devices were created or added; OPENDAQ_IGNORED if adding the devices from modules is not allowed within the device.
    /// - `devices`: A dictionary that maps each connection string to the corresponding added device object. If a device connection or addition attempt fails, the value will be `nullptr` for that entry.
    ///
    /// Calls the openDAQ C function `daqDevice_addDevices()`.
    pub fn add_devices(&self, connection_args: impl Into<Value>) -> Result<std::collections::HashMap<String, Device>> {
        let __connection_args = crate::value::to_daq(&connection_args.into())?;
        let mut __devices: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addDevices)(self.as_raw() as *mut _, &mut __devices, crate::value::opt_ref_ptr(&__connection_args) as *mut _, std::ptr::null_mut(), std::ptr::null_mut()) };
        check(__code, "daqDevice_addDevices")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Device>(__devices as *mut _, "daqDevice_addDevices") }?)
    }

    /// Connects to multiple devices in parallel using the provided connection strings and returns the connected devices. Each connection is established concurrently to improve performance when handling multiple devices. The additions, in turn, are performed sequentially in the order specified by connectionArgs.
    ///
    /// # Parameters
    /// - `connection_args`: A dictionary where each key is a connection string identifying the target device (e.g., IPv4/IPv6), and each value is a configuration object that customizes the connection. The configuration may specify parameters such as maximum sample rate, communication port, number of channels, or other device-specific settings. A `nullptr` value indicates that the default configuration should be used.
    /// - `err_codes`: An optional dictionary used to populate error codes for failed connection or addition attempts. For each failed attempt, the key is the connection string, and the value contains the error code.
    /// - `error_infos`: An optional dictionary used to populate detailed error info for failed connection or addition attempts. For each failed attempt, the key is the connection string, and the value contains the error info object.
    ///
    /// # Returns
    /// OPENDAQ_PARTIAL_SUCCESS if at least one device was successfully created and added, but not all of them; OPENDAQ_ERR_GENERALERROR if no devices were created or added; OPENDAQ_IGNORED if adding the devices from modules is not allowed within the device.
    /// - `devices`: A dictionary that maps each connection string to the corresponding added device object. If a device connection or addition attempt fails, the value will be `nullptr` for that entry.
    ///
    /// Calls the openDAQ C function `daqDevice_addDevices()`.
    pub fn add_devices_with(&self, connection_args: impl Into<Value>, err_codes: impl Into<Value>, error_infos: impl Into<Value>) -> Result<std::collections::HashMap<String, Device>> {
        let __connection_args = crate::value::to_daq(&connection_args.into())?;
        let __err_codes = crate::value::to_daq(&err_codes.into())?;
        let __error_infos = crate::value::to_daq(&error_infos.into())?;
        let mut __devices: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addDevices)(self.as_raw() as *mut _, &mut __devices, crate::value::opt_ref_ptr(&__connection_args) as *mut _, crate::value::opt_ref_ptr(&__err_codes) as *mut _, crate::value::opt_ref_ptr(&__error_infos) as *mut _) };
        check(__code, "daqDevice_addDevices")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Device>(__devices as *mut _, "daqDevice_addDevices") }?)
    }

    /// Creates and adds a function block to the device with the provided unique ID and returns it.
    ///
    /// # Parameters
    /// - `type_id`: The unique ID of the function block. Can be obtained from its corresponding Function Block Info object.
    /// - `config`: A config object to configure a function block with custom settings specific to that function block type.
    ///
    /// # Returns
    /// - `function_block`: The added function block.
    ///
    /// Calls the openDAQ C function `daqDevice_addFunctionBlock()`.
    pub fn add_function_block(&self, type_id: &str) -> Result<Option<FunctionBlock>> {
        let __type_id = crate::marshal::make_string(type_id)?;
        let mut __function_block: *mut sys::daqFunctionBlock = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addFunctionBlock)(self.as_raw() as *mut _, &mut __function_block, __type_id.as_ptr() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqDevice_addFunctionBlock")?;
        Ok(unsafe { crate::marshal::take_object::<FunctionBlock>(__function_block as *mut _) })
    }

    /// Creates and adds a function block to the device with the provided unique ID and returns it.
    ///
    /// # Parameters
    /// - `type_id`: The unique ID of the function block. Can be obtained from its corresponding Function Block Info object.
    /// - `config`: A config object to configure a function block with custom settings specific to that function block type.
    ///
    /// # Returns
    /// - `function_block`: The added function block.
    ///
    /// Calls the openDAQ C function `daqDevice_addFunctionBlock()`.
    pub fn add_function_block_with(&self, type_id: &str, config: Option<&PropertyObject>) -> Result<Option<FunctionBlock>> {
        let __type_id = crate::marshal::make_string(type_id)?;
        let mut __function_block: *mut sys::daqFunctionBlock = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addFunctionBlock)(self.as_raw() as *mut _, &mut __function_block, __type_id.as_ptr() as *mut _, config.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_addFunctionBlock")?;
        Ok(unsafe { crate::marshal::take_object::<FunctionBlock>(__function_block as *mut _) })
    }

    /// Creates and adds to the device a server with the provided unique type ID and returns it.
    ///
    /// # Parameters
    /// - `type_id`: The unique type ID of the server. Can be obtained from its corresponding Server type object.
    /// - `config`: A config object to configure a server with custom settings specific to that server type.
    ///
    /// # Returns
    /// - `server`: The added server.
    ///
    /// Calls the openDAQ C function `daqDevice_addServer()`.
    pub fn add_server(&self, type_id: &str, config: &PropertyObject) -> Result<Option<Server>> {
        let __type_id = crate::marshal::make_string(type_id)?;
        let mut __server: *mut sys::daqServer = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addServer)(self.as_raw() as *mut _, __type_id.as_ptr() as *mut _, config.as_raw() as *mut _, &mut __server) };
        check(__code, "daqDevice_addServer")?;
        Ok(unsafe { crate::marshal::take_object::<Server>(__server as *mut _) })
    }

    /// Connects to a streaming at the given connection string, adds it as a streaming source of device and returns created streaming object.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string containing the address of the streaming. In example an IPv4/IPv6 address. The connection string can be found in the Server Capability objects returned by `getInfo().getServerCapabilities()`.
    /// - `config`: A config object to configure a streaming connection. This object can contain properties like various connection timeouts or other streaming protocol specific settings. Can be created from its corresponding Streaming type object. In case of a null value, it will use the default configuration.
    ///
    /// # Returns
    /// - `streaming`: The added streaming source.
    ///
    /// Calls the openDAQ C function `daqDevice_addStreaming()`.
    pub fn add_streaming(&self, connection_string: &str) -> Result<Option<Streaming>> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let mut __streaming: *mut sys::daqStreaming = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addStreaming)(self.as_raw() as *mut _, &mut __streaming, __connection_string.as_ptr() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqDevice_addStreaming")?;
        Ok(unsafe { crate::marshal::take_object::<Streaming>(__streaming as *mut _) })
    }

    /// Connects to a streaming at the given connection string, adds it as a streaming source of device and returns created streaming object.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string containing the address of the streaming. In example an IPv4/IPv6 address. The connection string can be found in the Server Capability objects returned by `getInfo().getServerCapabilities()`.
    /// - `config`: A config object to configure a streaming connection. This object can contain properties like various connection timeouts or other streaming protocol specific settings. Can be created from its corresponding Streaming type object. In case of a null value, it will use the default configuration.
    ///
    /// # Returns
    /// - `streaming`: The added streaming source.
    ///
    /// Calls the openDAQ C function `daqDevice_addStreaming()`.
    pub fn add_streaming_with(&self, connection_string: &str, config: Option<&PropertyObject>) -> Result<Option<Streaming>> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let mut __streaming: *mut sys::daqStreaming = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_addStreaming)(self.as_raw() as *mut _, &mut __streaming, __connection_string.as_ptr() as *mut _, config.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_addStreaming")?;
        Ok(unsafe { crate::marshal::take_object::<Streaming>(__streaming as *mut _) })
    }

    /// Creates an openDAQ client.
    ///
    /// # Parameters
    /// - `ctx`: The context object.
    /// - `local_id`: The localID of the client.
    /// - `default_device_info`: The DeviceInfo to be used by the client device.
    /// - `parent`: The parent component of the client.
    ///
    /// Calls the openDAQ C function `daqDevice_createClient()`.
    pub fn client(ctx: &Context, local_id: &str, default_device_info: &DeviceInfo, parent: &Component) -> Result<Device> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __obj: *mut sys::daqDevice = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_createClient)(&mut __obj, ctx.as_raw() as *mut _, __local_id.as_ptr() as *mut _, default_device_info.as_raw() as *mut _, parent.as_raw() as *mut _) };
        check(__code, "daqDevice_createClient")?;
        Ok(unsafe { crate::marshal::require_object::<Device>(__obj as *mut _, "daqDevice_createClient") }?)
    }

    /// Creates config object that can be used when adding a device. Contains Device and Streaming default configuration for all available Device/Streaming types. Also contains general add-device configuration settings.
    ///
    /// # Returns
    /// - `default_config`: The configuration object containing default settings for adding a device. The default config object is organized to always have 3 object-type properties: - "General" Contains general properties such as "AutomaticallyConnectStreaming" - "Device": Contains a child object-type property for each available device type, with the key of each property being the ID of the device type. These can be configured to customize the `addDevice` call when using connecting to the selected device type (eg. via the native or OPC UA protocols). - "Streaming": Same as device, but used to configure each individual streaming connection established when calling `addDevice`.
    ///
    /// Calls the openDAQ C function `daqDevice_createDefaultAddDeviceConfig()`.
    pub fn create_default_add_device_config(&self) -> Result<Option<PropertyObject>> {
        let mut __default_config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_createDefaultAddDeviceConfig)(self.as_raw() as *mut _, &mut __default_config) };
        check(__code, "daqDevice_createDefaultAddDeviceConfig")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__default_config as *mut _) })
    }

    /// Get a dictionary of available device types as \<IString, IDeviceType\> pairs
    ///
    /// # Returns
    /// - `device_types`: The dictionary of available device types.
    ///
    /// Calls the openDAQ C function `daqDevice_getAvailableDeviceTypes()`.
    pub fn available_device_types(&self) -> Result<std::collections::HashMap<String, DeviceType>> {
        let mut __device_types: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getAvailableDeviceTypes)(self.as_raw() as *mut _, &mut __device_types) };
        check(__code, "daqDevice_getAvailableDeviceTypes")?;
        Ok(unsafe { crate::marshal::take_dict::<String, DeviceType>(__device_types as *mut _, "daqDevice_getAvailableDeviceTypes") }?)
    }

    /// Gets a list of available devices, containing their Device Info.
    ///
    /// # Returns
    /// - `available_devices`: The list of available devices. The getAvailableDevices most often runs a discovery client, querying for available devices that a device module can connect to. The replies are formed into Device Info objects and inserted to the list of available devices.
    ///
    /// Calls the openDAQ C function `daqDevice_getAvailableDevices()`.
    pub fn available_devices(&self) -> Result<Vec<DeviceInfo>> {
        let mut __available_devices: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getAvailableDevices)(self.as_raw() as *mut _, &mut __available_devices) };
        check(__code, "daqDevice_getAvailableDevices")?;
        Ok(unsafe { crate::marshal::take_list::<DeviceInfo>(__available_devices as *mut _, "daqDevice_getAvailableDevices") }?)
    }

    /// Gets all function block types that are supported by the device, containing their description.
    ///
    /// # Returns
    /// - `function_block_types`: A dictionary of available function block types.
    ///
    /// Calls the openDAQ C function `daqDevice_getAvailableFunctionBlockTypes()`.
    pub fn available_function_block_types(&self) -> Result<std::collections::HashMap<String, FunctionBlockType>> {
        let mut __function_block_types: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getAvailableFunctionBlockTypes)(self.as_raw() as *mut _, &mut __function_block_types) };
        check(__code, "daqDevice_getAvailableFunctionBlockTypes")?;
        Ok(unsafe { crate::marshal::take_dict::<String, FunctionBlockType>(__function_block_types as *mut _, "daqDevice_getAvailableFunctionBlockTypes") }?)
    }

    /// Gets a list of available operation modes for the device.
    ///
    /// # Returns
    /// - `available_op_modes`: The list of available operation modes.
    ///
    /// Calls the openDAQ C function `daqDevice_getAvailableOperationModes()`.
    pub fn available_operation_modes(&self) -> Result<Vec<i64>> {
        let mut __available_op_modes: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getAvailableOperationModes)(self.as_raw() as *mut _, &mut __available_op_modes) };
        check(__code, "daqDevice_getAvailableOperationModes")?;
        Ok(unsafe { crate::marshal::take_list::<i64>(__available_op_modes as *mut _, "daqDevice_getAvailableOperationModes") }?)
    }

    /// Gets a flat list of the device's physical channels.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `channels`: The flat list of channels. If searchFilter is not provided, the returned list contains only visible channels and does not include those of child devices.
    ///
    /// Calls the openDAQ C function `daqDevice_getChannels()`.
    pub fn channels(&self) -> Result<Vec<Channel>> {
        let mut __channels: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getChannels)(self.as_raw() as *mut _, &mut __channels, std::ptr::null_mut()) };
        check(__code, "daqDevice_getChannels")?;
        Ok(unsafe { crate::marshal::take_list::<Channel>(__channels as *mut _, "daqDevice_getChannels") }?)
    }

    /// Gets a flat list of the device's physical channels.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `channels`: The flat list of channels. If searchFilter is not provided, the returned list contains only visible channels and does not include those of child devices.
    ///
    /// Calls the openDAQ C function `daqDevice_getChannels()`.
    pub fn channels_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Channel>> {
        let mut __channels: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getChannels)(self.as_raw() as *mut _, &mut __channels, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_getChannels")?;
        Ok(unsafe { crate::marshal::take_list::<Channel>(__channels as *mut _, "daqDevice_getChannels") }?)
    }

    /// Gets a flat list of the device's physical channels. Also finds all visible channels of visible child devices
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `channels`: The flat list of channels.
    ///
    /// Calls the openDAQ C function `daqDevice_getChannelsRecursive()`.
    pub fn channels_recursive(&self) -> Result<Vec<Channel>> {
        let mut __channels: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getChannelsRecursive)(self.as_raw() as *mut _, &mut __channels, std::ptr::null_mut()) };
        check(__code, "daqDevice_getChannelsRecursive")?;
        Ok(unsafe { crate::marshal::take_list::<Channel>(__channels as *mut _, "daqDevice_getChannelsRecursive") }?)
    }

    /// Gets a flat list of the device's physical channels. Also finds all visible channels of visible child devices
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `channels`: The flat list of channels.
    ///
    /// Calls the openDAQ C function `daqDevice_getChannelsRecursive()`.
    pub fn channels_recursive_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Channel>> {
        let mut __channels: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getChannelsRecursive)(self.as_raw() as *mut _, &mut __channels, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_getChannelsRecursive")?;
        Ok(unsafe { crate::marshal::take_list::<Channel>(__channels as *mut _, "daqDevice_getChannelsRecursive") }?)
    }

    /// Gets the container holding the statuses of device configuration and streaming connections.
    ///
    /// # Returns
    /// - `status_container`: The container for the device connection statuses.
    ///
    /// Calls the openDAQ C function `daqDevice_getConnectionStatusContainer()`.
    pub fn connection_status_container(&self) -> Result<Option<ComponentStatusContainer>> {
        let mut __status_container: *mut sys::daqComponentStatusContainer = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getConnectionStatusContainer)(self.as_raw() as *mut _, &mut __status_container) };
        check(__code, "daqDevice_getConnectionStatusContainer")?;
        Ok(unsafe { crate::marshal::take_object::<ComponentStatusContainer>(__status_container as *mut _) })
    }

    /// Gets a list of all components/folders in a device that are not titled 'IO', 'Sig', 'Dev', 'Synchronization' or 'FB'
    ///
    /// # Returns
    /// - `custom_components`: The list of custom components.
    ///
    /// Calls the openDAQ C function `daqDevice_getCustomComponents()`.
    pub fn custom_components(&self) -> Result<Vec<Component>> {
        let mut __custom_components: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getCustomComponents)(self.as_raw() as *mut _, &mut __custom_components) };
        check(__code, "daqDevice_getCustomComponents")?;
        Ok(unsafe { crate::marshal::take_list::<Component>(__custom_components as *mut _, "daqDevice_getCustomComponents") }?)
    }

    /// Gets a list of child devices that the device is connected to.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `devices`: The list of devices. If searchFilter is not provided, the returned list contains only visible devices and does not include those of child devices.
    ///
    /// Calls the openDAQ C function `daqDevice_getDevices()`.
    pub fn devices(&self) -> Result<Vec<Device>> {
        let mut __devices: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getDevices)(self.as_raw() as *mut _, &mut __devices, std::ptr::null_mut()) };
        check(__code, "daqDevice_getDevices")?;
        Ok(unsafe { crate::marshal::take_list::<Device>(__devices as *mut _, "daqDevice_getDevices") }?)
    }

    /// Gets a list of child devices that the device is connected to.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `devices`: The list of devices. If searchFilter is not provided, the returned list contains only visible devices and does not include those of child devices.
    ///
    /// Calls the openDAQ C function `daqDevice_getDevices()`.
    pub fn devices_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Device>> {
        let mut __devices: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getDevices)(self.as_raw() as *mut _, &mut __devices, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_getDevices")?;
        Ok(unsafe { crate::marshal::take_list::<Device>(__devices as *mut _, "daqDevice_getDevices") }?)
    }

    /// Gets the device's domain data. It allows for querying the device for its domain (time) values.
    ///
    /// # Returns
    /// - `domain`: The device domain.
    ///
    /// Calls the openDAQ C function `daqDevice_getDomain()`.
    pub fn domain(&self) -> Result<Option<DeviceDomain>> {
        let mut __domain: *mut sys::daqDeviceDomain = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getDomain)(self.as_raw() as *mut _, &mut __domain) };
        check(__code, "daqDevice_getDomain")?;
        Ok(unsafe { crate::marshal::take_object::<DeviceDomain>(__domain as *mut _) })
    }

    /// Gets the list of added function blocks.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `function_blocks`: The list of added function blocks. If searchFilter is not provided, the returned list contains only visible function blocks and does not include those of child function blocks, devices, or channels.
    ///
    /// Calls the openDAQ C function `daqDevice_getFunctionBlocks()`.
    pub fn function_blocks(&self) -> Result<Vec<FunctionBlock>> {
        let mut __function_blocks: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getFunctionBlocks)(self.as_raw() as *mut _, &mut __function_blocks, std::ptr::null_mut()) };
        check(__code, "daqDevice_getFunctionBlocks")?;
        Ok(unsafe { crate::marshal::take_list::<FunctionBlock>(__function_blocks as *mut _, "daqDevice_getFunctionBlocks") }?)
    }

    /// Gets the list of added function blocks.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `function_blocks`: The list of added function blocks. If searchFilter is not provided, the returned list contains only visible function blocks and does not include those of child function blocks, devices, or channels.
    ///
    /// Calls the openDAQ C function `daqDevice_getFunctionBlocks()`.
    pub fn function_blocks_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<FunctionBlock>> {
        let mut __function_blocks: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getFunctionBlocks)(self.as_raw() as *mut _, &mut __function_blocks, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_getFunctionBlocks")?;
        Ok(unsafe { crate::marshal::take_list::<FunctionBlock>(__function_blocks as *mut _, "daqDevice_getFunctionBlocks") }?)
    }

    /// Gets the device info. It contains data about the device such as the device's serial number, location, and connection string.
    ///
    /// # Returns
    /// - `info`: The device info.
    ///
    /// Calls the openDAQ C function `daqDevice_getInfo()`.
    pub fn info(&self) -> Result<Option<DeviceInfo>> {
        let mut __info: *mut sys::daqDeviceInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getInfo)(self.as_raw() as *mut _, &mut __info) };
        check(__code, "daqDevice_getInfo")?;
        Ok(unsafe { crate::marshal::take_object::<DeviceInfo>(__info as *mut _) })
    }

    /// Gets a folder containing channels.
    ///
    /// # Returns
    /// - `inputs_outputs_folder`: The folder that contains channels. The InputsOutputs folder can contain other folders that themselves contain channels.
    ///
    /// Calls the openDAQ C function `daqDevice_getInputsOutputsFolder()`.
    pub fn inputs_outputs_folder(&self) -> Result<Option<Folder>> {
        let mut __inputs_outputs_folder: *mut sys::daqFolder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getInputsOutputsFolder)(self.as_raw() as *mut _, &mut __inputs_outputs_folder) };
        check(__code, "daqDevice_getInputsOutputsFolder")?;
        Ok(unsafe { crate::marshal::take_object::<Folder>(__inputs_outputs_folder as *mut _) })
    }

    /// Retrieves a chunk of the log file with the provided ID.
    /// This function extracts a specified portion (or the entire content) of the log file, starting at the given offset.
    /// If the size and offset are not specified, it will attempt to return the entire log file by default.
    ///
    /// # Parameters
    /// - `id`: Rhe ID of the log file to retrieve.
    /// - `size`: The size of the log chunk to retrieve in bytes. Defaults to -1, which means it will return all remaining bytes from the offset.
    /// - `offset`: The offset, in bytes, from where the log chunk should be read. Defaults to 0 (start of the file). If size is set to -1, and offset is 0, the entire log file will be returned.
    ///
    /// # Returns
    /// - `log`: A string which stores requested log chunk.
    ///
    /// Calls the openDAQ C function `daqDevice_getLog()`.
    pub fn log(&self, id: &str) -> Result<String> {
        let __id = crate::marshal::make_string(id)?;
        let mut __log: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getLog)(self.as_raw() as *mut _, &mut __log, __id.as_ptr() as *mut _, -1, 0) };
        check(__code, "daqDevice_getLog")?;
        Ok(unsafe { crate::marshal::take_string(__log) })
    }

    /// Retrieves a chunk of the log file with the provided ID.
    /// This function extracts a specified portion (or the entire content) of the log file, starting at the given offset.
    /// If the size and offset are not specified, it will attempt to return the entire log file by default.
    ///
    /// # Parameters
    /// - `id`: Rhe ID of the log file to retrieve.
    /// - `size`: The size of the log chunk to retrieve in bytes. Defaults to -1, which means it will return all remaining bytes from the offset.
    /// - `offset`: The offset, in bytes, from where the log chunk should be read. Defaults to 0 (start of the file). If size is set to -1, and offset is 0, the entire log file will be returned.
    ///
    /// # Returns
    /// - `log`: A string which stores requested log chunk.
    ///
    /// Calls the openDAQ C function `daqDevice_getLog()`.
    pub fn log_with(&self, id: &str, size: i64, offset: i64) -> Result<String> {
        let __id = crate::marshal::make_string(id)?;
        let mut __log: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getLog)(self.as_raw() as *mut _, &mut __log, __id.as_ptr() as *mut _, size, offset) };
        check(__code, "daqDevice_getLog")?;
        Ok(unsafe { crate::marshal::take_string(__log) })
    }

    /// Gets a list of available log files.
    ///
    /// # Returns
    /// - `log_file_infos`: The list of available log files.
    ///
    /// Calls the openDAQ C function `daqDevice_getLogFileInfos()`.
    pub fn log_file_infos(&self) -> Result<Vec<LogFileInfo>> {
        let mut __log_file_infos: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getLogFileInfos)(self.as_raw() as *mut _, &mut __log_file_infos) };
        check(__code, "daqDevice_getLogFileInfos")?;
        Ok(unsafe { crate::marshal::take_list::<LogFileInfo>(__log_file_infos as *mut _, "daqDevice_getLogFileInfos") }?)
    }

    /// Get list of added servers.
    ///
    /// # Returns
    /// - `servers`: List of added servers.
    ///
    /// Calls the openDAQ C function `daqDevice_getServers()`.
    pub fn servers(&self) -> Result<Vec<Server>> {
        let mut __servers: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getServers)(self.as_raw() as *mut _, &mut __servers) };
        check(__code, "daqDevice_getServers")?;
        Ok(unsafe { crate::marshal::take_list::<Server>(__servers as *mut _, "daqDevice_getServers") }?)
    }

    /// Gets a list of the device's signals.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The flat list of signals. If searchFilter is not provided, the returned list contains only visible signals and does not include those of child function blocks, devices, or channels. Device signals are most often domain signals shared by other signals that belong to channels and/or function blocks.
    ///
    /// Calls the openDAQ C function `daqDevice_getSignals()`.
    pub fn signals(&self) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getSignals)(self.as_raw() as *mut _, &mut __signals, std::ptr::null_mut()) };
        check(__code, "daqDevice_getSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqDevice_getSignals") }?)
    }

    /// Gets a list of the device's signals.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The flat list of signals. If searchFilter is not provided, the returned list contains only visible signals and does not include those of child function blocks, devices, or channels. Device signals are most often domain signals shared by other signals that belong to channels and/or function blocks.
    ///
    /// Calls the openDAQ C function `daqDevice_getSignals()`.
    pub fn signals_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getSignals)(self.as_raw() as *mut _, &mut __signals, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_getSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqDevice_getSignals") }?)
    }

    /// Gets a list of the signals that belong to the device.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The flat list of signals. The list includes visible signals that belong to visible channels, function blocks, or sub devices of the device.
    ///
    /// Calls the openDAQ C function `daqDevice_getSignalsRecursive()`.
    pub fn signals_recursive(&self) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getSignalsRecursive)(self.as_raw() as *mut _, &mut __signals, std::ptr::null_mut()) };
        check(__code, "daqDevice_getSignalsRecursive")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqDevice_getSignalsRecursive") }?)
    }

    /// Gets a list of the signals that belong to the device.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The flat list of signals. The list includes visible signals that belong to visible channels, function blocks, or sub devices of the device.
    ///
    /// Calls the openDAQ C function `daqDevice_getSignalsRecursive()`.
    pub fn signals_recursive_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getSignalsRecursive)(self.as_raw() as *mut _, &mut __signals, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_getSignalsRecursive")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqDevice_getSignalsRecursive") }?)
    }

    /// Gets the sync component of the device.
    ///
    /// # Returns
    /// - `sync`: The sync component.
    ///
    /// Calls the openDAQ C function `daqDevice_getSyncComponent()`.
    pub fn sync_component(&self) -> Result<Option<SyncComponent>> {
        let mut __sync: *mut sys::daqSyncComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_getSyncComponent)(self.as_raw() as *mut _, &mut __sync) };
        check(__code, "daqDevice_getSyncComponent")?;
        Ok(unsafe { crate::marshal::take_object::<SyncComponent>(__sync as *mut _) })
    }

    /// Gets the number of ticks passed since the device's absolute origin.
    ///
    /// # Returns
    /// - `ticks`: The number of ticks. To scale the ticks into a domain unit, the Device's Domain should be used.
    ///
    /// Calls the openDAQ C function `daqDevice_getTicksSinceOrigin()`.
    pub fn ticks_since_origin(&self) -> Result<u64> {
        let mut __ticks: u64 = Default::default();
        let __code = unsafe { (crate::sys::api().daqDevice_getTicksSinceOrigin)(self.as_raw() as *mut _, &mut __ticks) };
        check(__code, "daqDevice_getTicksSinceOrigin")?;
        Ok(__ticks)
    }

    /// Returns true if device is locked. Once locked, no properties of the device can be changed via the protocol layer.
    ///
    /// # Returns
    /// - `locked`: True if device is locked.
    ///
    /// Calls the openDAQ C function `daqDevice_isLocked()`.
    pub fn is_locked(&self) -> Result<bool> {
        let mut __locked: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqDevice_isLocked)(self.as_raw() as *mut _, &mut __locked) };
        check(__code, "daqDevice_isLocked")?;
        Ok(__locked != 0)
    }

    /// Loads the configuration of the device from string.
    ///
    /// # Parameters
    /// - `configuration`: Serialized configuration of the device.
    ///
    /// Calls the openDAQ C function `daqDevice_loadConfiguration()`.
    pub fn load_configuration(&self, configuration: &str) -> Result<()> {
        let __configuration = crate::marshal::make_string(configuration)?;
        let __code = unsafe { (crate::sys::api().daqDevice_loadConfiguration)(self.as_raw() as *mut _, __configuration.as_ptr() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqDevice_loadConfiguration")?;
        Ok(())
    }

    /// Loads the configuration of the device from string.
    ///
    /// # Parameters
    /// - `configuration`: Serialized configuration of the device.
    ///
    /// Calls the openDAQ C function `daqDevice_loadConfiguration()`.
    pub fn load_configuration_with(&self, configuration: &str, config: Option<&UpdateParameters>) -> Result<()> {
        let __configuration = crate::marshal::make_string(configuration)?;
        let __code = unsafe { (crate::sys::api().daqDevice_loadConfiguration)(self.as_raw() as *mut _, __configuration.as_ptr() as *mut _, config.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqDevice_loadConfiguration")?;
        Ok(())
    }

    /// Lock a device with a session user. Once locked, no properties of the device can be changed via the protocol layer. Only the same user who locked the device can unlock it. If no user was specified when the device was locked, any user will be able to unlock it.
    ///
    /// Calls the openDAQ C function `daqDevice_lock()`.
    pub fn lock(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_lock)(self.as_raw() as *mut _) };
        check(__code, "daqDevice_lock")?;
        Ok(())
    }

    /// Disconnects from the device provided as argument and removes it from the internal list of devices.
    ///
    /// # Parameters
    /// - `device`: The device to be removed.
    ///
    /// Calls the openDAQ C function `daqDevice_removeDevice()`.
    pub fn remove_device(&self, device: &Device) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_removeDevice)(self.as_raw() as *mut _, device.as_raw() as *mut _) };
        check(__code, "daqDevice_removeDevice")?;
        Ok(())
    }

    /// Removes the function block provided as argument, disconnecting its signals and input ports.
    ///
    /// # Parameters
    /// - `function_block`: The function block to be removed.
    ///
    /// Calls the openDAQ C function `daqDevice_removeFunctionBlock()`.
    pub fn remove_function_block(&self, function_block: &FunctionBlock) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_removeFunctionBlock)(self.as_raw() as *mut _, function_block.as_raw() as *mut _) };
        check(__code, "daqDevice_removeFunctionBlock")?;
        Ok(())
    }

    /// Removes the server provided as argument.
    ///
    /// # Parameters
    /// - `server`: The server to be removed.
    ///
    /// Calls the openDAQ C function `daqDevice_removeServer()`.
    pub fn remove_server(&self, server: &Server) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_removeServer)(self.as_raw() as *mut _, server.as_raw() as *mut _) };
        check(__code, "daqDevice_removeServer")?;
        Ok(())
    }

    /// Saves the configuration of the device to string.
    ///
    /// # Returns
    /// - `configuration`: Serialized configuration of the device.
    ///
    /// Calls the openDAQ C function `daqDevice_saveConfiguration()`.
    pub fn save_configuration(&self) -> Result<String> {
        let mut __configuration: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDevice_saveConfiguration)(self.as_raw() as *mut _, &mut __configuration) };
        check(__code, "daqDevice_saveConfiguration")?;
        Ok(unsafe { crate::marshal::take_string(__configuration) })
    }

    /// Sets the operation mode of the device subtree excluding the sub-devices.
    ///
    /// # Parameters
    /// - `mode_type`: The operation mode to set.
    ///
    /// Calls the openDAQ C function `daqDevice_setOperationMode()`.
    pub fn set_operation_mode(&self, mode_type: OperationModeType) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_setOperationMode)(self.as_raw() as *mut _, mode_type as u32) };
        check(__code, "daqDevice_setOperationMode")?;
        Ok(())
    }

    /// Sets the operation mode of the device subtree including the sub-devices.
    ///
    /// # Parameters
    /// - `mode_type`: The operation mode to set.
    ///
    /// Calls the openDAQ C function `daqDevice_setOperationModeRecursive()`.
    pub fn set_operation_mode_recursive(&self, mode_type: OperationModeType) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_setOperationModeRecursive)(self.as_raw() as *mut _, mode_type as u32) };
        check(__code, "daqDevice_setOperationModeRecursive")?;
        Ok(())
    }

    /// Unlock a device with a session user. A device can only be unlocked by the same user who locked it. If no user was specified when the device was locked, any user will be able to unlock it.
    ///
    /// Calls the openDAQ C function `daqDevice_unlock()`.
    pub fn unlock(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDevice_unlock)(self.as_raw() as *mut _) };
        check(__code, "daqDevice_unlock")?;
        Ok(())
    }

}

impl FunctionBlock {
    /// Creates and adds a function block as the nested of current function block with the provided unique ID and returns it.
    ///
    /// # Parameters
    /// - `type_id`: The unique ID of the function block. Can be obtained from its corresponding Function Block Info object.
    /// - `config`: A config object to configure a function block with custom settings specific to that function block type.
    ///
    /// # Returns
    /// - `function_block`: The added function block.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_addFunctionBlock()`.
    pub fn add_function_block(&self, type_id: &str) -> Result<Option<FunctionBlock>> {
        let __type_id = crate::marshal::make_string(type_id)?;
        let mut __function_block: *mut sys::daqFunctionBlock = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_addFunctionBlock)(self.as_raw() as *mut _, &mut __function_block, __type_id.as_ptr() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqFunctionBlock_addFunctionBlock")?;
        Ok(unsafe { crate::marshal::take_object::<FunctionBlock>(__function_block as *mut _) })
    }

    /// Creates and adds a function block as the nested of current function block with the provided unique ID and returns it.
    ///
    /// # Parameters
    /// - `type_id`: The unique ID of the function block. Can be obtained from its corresponding Function Block Info object.
    /// - `config`: A config object to configure a function block with custom settings specific to that function block type.
    ///
    /// # Returns
    /// - `function_block`: The added function block.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_addFunctionBlock()`.
    pub fn add_function_block_with(&self, type_id: &str, config: Option<&PropertyObject>) -> Result<Option<FunctionBlock>> {
        let __type_id = crate::marshal::make_string(type_id)?;
        let mut __function_block: *mut sys::daqFunctionBlock = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_addFunctionBlock)(self.as_raw() as *mut _, &mut __function_block, __type_id.as_ptr() as *mut _, config.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqFunctionBlock_addFunctionBlock")?;
        Ok(unsafe { crate::marshal::take_object::<FunctionBlock>(__function_block as *mut _) })
    }

    /// Gets all nested function block types that are supported, containing their description.
    ///
    /// # Returns
    /// - `function_block_types`: A dictionary of available function block types.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getAvailableFunctionBlockTypes()`.
    pub fn available_function_block_types(&self) -> Result<std::collections::HashMap<String, FunctionBlockType>> {
        let mut __function_block_types: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getAvailableFunctionBlockTypes)(self.as_raw() as *mut _, &mut __function_block_types) };
        check(__code, "daqFunctionBlock_getAvailableFunctionBlockTypes")?;
        Ok(unsafe { crate::marshal::take_dict::<String, FunctionBlockType>(__function_block_types as *mut _, "daqFunctionBlock_getAvailableFunctionBlockTypes") }?)
    }

    /// Gets an information structure contain metadata of the function block type.
    ///
    /// # Returns
    /// - `type`: The Function block type object.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getFunctionBlockType()`.
    pub fn function_block_type(&self) -> Result<Option<FunctionBlockType>> {
        let mut __type_: *mut sys::daqFunctionBlockType = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getFunctionBlockType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqFunctionBlock_getFunctionBlockType")?;
        Ok(unsafe { crate::marshal::take_object::<FunctionBlockType>(__type_ as *mut _) })
    }

    /// Gets a list of sub-function blocks.
    ///
    /// # Parameters
    /// - `search_filter`: Provides optional parameters such as "recursive" and "visibleOnly" to modify the search pattern.
    ///
    /// # Returns
    /// - `function_blocks`: The list of sub-function blocks. If searchFilter is not provided, the returned list contains only visible function blocks and does not include those of child function blocks.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getFunctionBlocks()`.
    pub fn function_blocks(&self) -> Result<Vec<FunctionBlock>> {
        let mut __function_blocks: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getFunctionBlocks)(self.as_raw() as *mut _, &mut __function_blocks, std::ptr::null_mut()) };
        check(__code, "daqFunctionBlock_getFunctionBlocks")?;
        Ok(unsafe { crate::marshal::take_list::<FunctionBlock>(__function_blocks as *mut _, "daqFunctionBlock_getFunctionBlocks") }?)
    }

    /// Gets a list of sub-function blocks.
    ///
    /// # Parameters
    /// - `search_filter`: Provides optional parameters such as "recursive" and "visibleOnly" to modify the search pattern.
    ///
    /// # Returns
    /// - `function_blocks`: The list of sub-function blocks. If searchFilter is not provided, the returned list contains only visible function blocks and does not include those of child function blocks.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getFunctionBlocks()`.
    pub fn function_blocks_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<FunctionBlock>> {
        let mut __function_blocks: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getFunctionBlocks)(self.as_raw() as *mut _, &mut __function_blocks, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqFunctionBlock_getFunctionBlocks")?;
        Ok(unsafe { crate::marshal::take_list::<FunctionBlock>(__function_blocks as *mut _, "daqFunctionBlock_getFunctionBlocks") }?)
    }

    /// Gets a list of the function block's input ports.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `ports`: The list of input ports. If searchFilter is not provided, the returned list contains only visible input ports and does not include those of child function blocks.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getInputPorts()`.
    pub fn input_ports(&self) -> Result<Vec<InputPort>> {
        let mut __ports: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getInputPorts)(self.as_raw() as *mut _, &mut __ports, std::ptr::null_mut()) };
        check(__code, "daqFunctionBlock_getInputPorts")?;
        Ok(unsafe { crate::marshal::take_list::<InputPort>(__ports as *mut _, "daqFunctionBlock_getInputPorts") }?)
    }

    /// Gets a list of the function block's input ports.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `ports`: The list of input ports. If searchFilter is not provided, the returned list contains only visible input ports and does not include those of child function blocks.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getInputPorts()`.
    pub fn input_ports_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<InputPort>> {
        let mut __ports: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getInputPorts)(self.as_raw() as *mut _, &mut __ports, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqFunctionBlock_getInputPorts")?;
        Ok(unsafe { crate::marshal::take_list::<InputPort>(__ports as *mut _, "daqFunctionBlock_getInputPorts") }?)
    }

    /// Gets the list of the function block's output signals.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The list of output signals. If searchFilter is not provided, the returned list contains only visible signals and does not include those of child function blocks.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getSignals()`.
    pub fn signals(&self) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getSignals)(self.as_raw() as *mut _, &mut __signals, std::ptr::null_mut()) };
        check(__code, "daqFunctionBlock_getSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqFunctionBlock_getSignals") }?)
    }

    /// Gets the list of the function block's output signals.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The list of output signals. If searchFilter is not provided, the returned list contains only visible signals and does not include those of child function blocks.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getSignals()`.
    pub fn signals_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getSignals)(self.as_raw() as *mut _, &mut __signals, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqFunctionBlock_getSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqFunctionBlock_getSignals") }?)
    }

    /// Gets the list of the function block's visible output signals including signals from visible child function blocks.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The list of output signals.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getSignalsRecursive()`.
    pub fn signals_recursive(&self) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getSignalsRecursive)(self.as_raw() as *mut _, &mut __signals, std::ptr::null_mut()) };
        check(__code, "daqFunctionBlock_getSignalsRecursive")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqFunctionBlock_getSignalsRecursive") }?)
    }

    /// Gets the list of the function block's visible output signals including signals from visible child function blocks.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `signals`: The list of output signals.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getSignalsRecursive()`.
    pub fn signals_recursive_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getSignalsRecursive)(self.as_raw() as *mut _, &mut __signals, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqFunctionBlock_getSignalsRecursive")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqFunctionBlock_getSignalsRecursive") }?)
    }

    /// Gets the function block's status signal.
    ///
    /// # Returns
    /// - `status_signal`: The status signal. The status signal sends out a status event packet every time it is connected to an input port. Additionally, a status event packet is sent whenever the status of the function block changes.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_getStatusSignal()`.
    pub fn status_signal(&self) -> Result<Option<Signal>> {
        let mut __status_signal: *mut sys::daqSignal = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_getStatusSignal)(self.as_raw() as *mut _, &mut __status_signal) };
        check(__code, "daqFunctionBlock_getStatusSignal")?;
        Ok(unsafe { crate::marshal::take_object::<Signal>(__status_signal as *mut _) })
    }

    /// Removes the function block provided as argument, disconnecting its signals and input ports.
    ///
    /// # Parameters
    /// - `function_block`: The function block to be removed.
    ///
    /// Calls the openDAQ C function `daqFunctionBlock_removeFunctionBlock()`.
    pub fn remove_function_block(&self, function_block: &FunctionBlock) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqFunctionBlock_removeFunctionBlock)(self.as_raw() as *mut _, function_block.as_raw() as *mut _) };
        check(__code, "daqFunctionBlock_removeFunctionBlock")?;
        Ok(())
    }

}

impl LogFileInfoBuilder {
    /// Builds the log file info.
    ///
    /// # Returns
    /// - `log_file_info`: The log file info.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_build()`.
    pub fn build(&self) -> Result<Option<LogFileInfo>> {
        let mut __log_file_info: *mut sys::daqLogFileInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_build)(self.as_raw() as *mut _, &mut __log_file_info) };
        check(__code, "daqLogFileInfoBuilder_build")?;
        Ok(unsafe { crate::marshal::take_object::<LogFileInfo>(__log_file_info as *mut _) })
    }

    /// Creates an LogFileInfo Builder with no parameters configured.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_createLogFileInfoBuilder()`.
    pub fn new() -> Result<LogFileInfoBuilder> {
        let mut __obj: *mut sys::daqLogFileInfoBuilder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_createLogFileInfoBuilder)(&mut __obj) };
        check(__code, "daqLogFileInfoBuilder_createLogFileInfoBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<LogFileInfoBuilder>(__obj as *mut _, "daqLogFileInfoBuilder_createLogFileInfoBuilder") }?)
    }

    /// Gets the description of the log file.
    ///
    /// # Returns
    /// - `description`: The description of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getDescription()`.
    pub fn description(&self) -> Result<String> {
        let mut __description: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getDescription)(self.as_raw() as *mut _, &mut __description) };
        check(__code, "daqLogFileInfoBuilder_getDescription")?;
        Ok(unsafe { crate::marshal::take_string(__description) })
    }

    /// Gets the encoding of the log file.
    ///
    /// # Returns
    /// - `encoding`: The encoding of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getEncoding()`.
    pub fn encoding(&self) -> Result<String> {
        let mut __encoding: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getEncoding)(self.as_raw() as *mut _, &mut __encoding) };
        check(__code, "daqLogFileInfoBuilder_getEncoding")?;
        Ok(unsafe { crate::marshal::take_string(__encoding) })
    }

    /// Gets the id of the log file. If the local path is not assigned, the id is equal to the `localPath + "/" + name`.
    ///
    /// # Parameters
    /// - `id`: The id of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getId()`.
    pub fn id(&self) -> Result<String> {
        let mut __id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getId)(self.as_raw() as *mut _, &mut __id) };
        check(__code, "daqLogFileInfoBuilder_getId")?;
        Ok(unsafe { crate::marshal::take_string(__id) })
    }

    /// Gets the date of the last modification of the log file in ISO 8601 format.
    ///
    /// # Returns
    /// - `last_modified`: The date of the last modification of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getLastModified()`.
    pub fn last_modified(&self) -> Result<String> {
        let mut __last_modified: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getLastModified)(self.as_raw() as *mut _, &mut __last_modified) };
        check(__code, "daqLogFileInfoBuilder_getLastModified")?;
        Ok(unsafe { crate::marshal::take_string(__last_modified) })
    }

    /// Gets the local path of the log file. The local path can be not assigned as it is optional.
    ///
    /// # Returns
    /// - `local_path`: The local path of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getLocalPath()`.
    pub fn local_path(&self) -> Result<String> {
        let mut __local_path: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getLocalPath)(self.as_raw() as *mut _, &mut __local_path) };
        check(__code, "daqLogFileInfoBuilder_getLocalPath")?;
        Ok(unsafe { crate::marshal::take_string(__local_path) })
    }

    /// Gets the name of the log file.
    ///
    /// # Returns
    /// - `name`: The name of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getName()`.
    pub fn name(&self) -> Result<String> {
        let mut __name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getName)(self.as_raw() as *mut _, &mut __name) };
        check(__code, "daqLogFileInfoBuilder_getName")?;
        Ok(unsafe { crate::marshal::take_string(__name) })
    }

    /// Gets the size of the log file in bytes.
    ///
    /// # Returns
    /// - `size`: The size of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_getSize()`.
    pub fn size(&self) -> Result<usize> {
        let mut __size: usize = Default::default();
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_getSize)(self.as_raw() as *mut _, &mut __size) };
        check(__code, "daqLogFileInfoBuilder_getSize")?;
        Ok(__size)
    }

    /// Sets the description of the log file.
    ///
    /// # Parameters
    /// - `description`: The description of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setDescription()`.
    pub fn set_description(&self, description: &str) -> Result<()> {
        let __description = crate::marshal::make_string(description)?;
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setDescription)(self.as_raw() as *mut _, __description.as_ptr() as *mut _) };
        check(__code, "daqLogFileInfoBuilder_setDescription")?;
        Ok(())
    }

    /// Sets the encoding of the log file.
    ///
    /// # Parameters
    /// - `encoding`: The encoding of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setEncoding()`.
    pub fn set_encoding(&self, encoding: &str) -> Result<()> {
        let __encoding = crate::marshal::make_string(encoding)?;
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setEncoding)(self.as_raw() as *mut _, __encoding.as_ptr() as *mut _) };
        check(__code, "daqLogFileInfoBuilder_setEncoding")?;
        Ok(())
    }

    /// Sets the id of the log file. Oth
    ///
    /// # Parameters
    /// - `id`: The id of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setId()`.
    pub fn set_id(&self, id: &str) -> Result<()> {
        let __id = crate::marshal::make_string(id)?;
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setId)(self.as_raw() as *mut _, __id.as_ptr() as *mut _) };
        check(__code, "daqLogFileInfoBuilder_setId")?;
        Ok(())
    }

    /// Sets the date of the last modification of the log file in ISO 8601 format.
    ///
    /// # Parameters
    /// - `last_modified`: The date of the last modification of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setLastModified()`.
    pub fn set_last_modified(&self, last_modified: &str) -> Result<()> {
        let __last_modified = crate::marshal::make_string(last_modified)?;
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setLastModified)(self.as_raw() as *mut _, __last_modified.as_ptr() as *mut _) };
        check(__code, "daqLogFileInfoBuilder_setLastModified")?;
        Ok(())
    }

    /// Sets the local path of the log file. The local path can be not assigned as it is optional.
    ///
    /// # Parameters
    /// - `local_path`: The local path of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setLocalPath()`.
    pub fn set_local_path(&self, local_path: &str) -> Result<()> {
        let __local_path = crate::marshal::make_string(local_path)?;
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setLocalPath)(self.as_raw() as *mut _, __local_path.as_ptr() as *mut _) };
        check(__code, "daqLogFileInfoBuilder_setLocalPath")?;
        Ok(())
    }

    /// Sets the name of the log file.
    ///
    /// # Parameters
    /// - `name`: The name of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setName()`.
    pub fn set_name(&self, name: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setName)(self.as_raw() as *mut _, __name.as_ptr() as *mut _) };
        check(__code, "daqLogFileInfoBuilder_setName")?;
        Ok(())
    }

    /// Sets the size of the log file in bytes.
    ///
    /// # Parameters
    /// - `size`: The size of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfoBuilder_setSize()`.
    pub fn set_size(&self, size: usize) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqLogFileInfoBuilder_setSize)(self.as_raw() as *mut _, size) };
        check(__code, "daqLogFileInfoBuilder_setSize")?;
        Ok(())
    }

}

impl LogFileInfo {
    /// Creates an log file info from the builder.
    ///
    /// # Parameters
    /// - `builder`: The log file info builder.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_createLogFileInfoFromBuilder()`.
    pub fn from_builder(builder: &LogFileInfoBuilder) -> Result<LogFileInfo> {
        let mut __obj: *mut sys::daqLogFileInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_createLogFileInfoFromBuilder)(&mut __obj, builder.as_raw() as *mut _) };
        check(__code, "daqLogFileInfo_createLogFileInfoFromBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<LogFileInfo>(__obj as *mut _, "daqLogFileInfo_createLogFileInfoFromBuilder") }?)
    }

    /// Gets the description of the log file.
    ///
    /// # Returns
    /// - `description`: The description of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getDescription()`.
    pub fn description(&self) -> Result<String> {
        let mut __description: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getDescription)(self.as_raw() as *mut _, &mut __description) };
        check(__code, "daqLogFileInfo_getDescription")?;
        Ok(unsafe { crate::marshal::take_string(__description) })
    }

    /// Gets the encoding of the log file.
    ///
    /// # Returns
    /// - `encoding`: The encoding of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getEncoding()`.
    pub fn encoding(&self) -> Result<String> {
        let mut __encoding: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getEncoding)(self.as_raw() as *mut _, &mut __encoding) };
        check(__code, "daqLogFileInfo_getEncoding")?;
        Ok(unsafe { crate::marshal::take_string(__encoding) })
    }

    /// Gets the id of the log file in format `getLocalPath() + "/" + getName()`.
    ///
    /// # Returns
    /// - `id`: The id of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getId()`.
    pub fn id(&self) -> Result<String> {
        let mut __id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getId)(self.as_raw() as *mut _, &mut __id) };
        check(__code, "daqLogFileInfo_getId")?;
        Ok(unsafe { crate::marshal::take_string(__id) })
    }

    /// Gets the date of the last modification of the log file in ISO 8601 format.
    ///
    /// # Returns
    /// - `last_modified`: The date of the last modification of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getLastModified()`.
    pub fn last_modified(&self) -> Result<String> {
        let mut __last_modified: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getLastModified)(self.as_raw() as *mut _, &mut __last_modified) };
        check(__code, "daqLogFileInfo_getLastModified")?;
        Ok(unsafe { crate::marshal::take_string(__last_modified) })
    }

    /// Gets the local path of the log file. The local path can be not assigned as it is optional.
    ///
    /// # Returns
    /// - `local_path`: The local path of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getLocalPath()`.
    pub fn local_path(&self) -> Result<String> {
        let mut __local_path: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getLocalPath)(self.as_raw() as *mut _, &mut __local_path) };
        check(__code, "daqLogFileInfo_getLocalPath")?;
        Ok(unsafe { crate::marshal::take_string(__local_path) })
    }

    /// Gets the name of the log file.
    ///
    /// # Returns
    /// - `name`: The name of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getName()`.
    pub fn name(&self) -> Result<String> {
        let mut __name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getName)(self.as_raw() as *mut _, &mut __name) };
        check(__code, "daqLogFileInfo_getName")?;
        Ok(unsafe { crate::marshal::take_string(__name) })
    }

    /// Gets the size of the log file in bytes.
    ///
    /// # Returns
    /// - `size`: The size of the log file.
    ///
    /// Calls the openDAQ C function `daqLogFileInfo_getSize()`.
    pub fn size(&self) -> Result<usize> {
        let mut __size: usize = Default::default();
        let __code = unsafe { (crate::sys::api().daqLogFileInfo_getSize)(self.as_raw() as *mut _, &mut __size) };
        check(__code, "daqLogFileInfo_getSize")?;
        Ok(__size)
    }

}

impl NetworkInterface {
    /// Creates a property object containing default configuration values for a network interface.
    ///
    /// # Returns
    /// - `default_config`: The configuration object containing default settings for configuring device's network interface. The created object can be modified or directly submitted using the `submitConfiguration` method.
    ///
    /// Calls the openDAQ C function `daqNetworkInterface_createDefaultConfiguration()`.
    pub fn create_default_configuration(&self) -> Result<Option<PropertyObject>> {
        let mut __default_config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqNetworkInterface_createDefaultConfiguration)(self.as_raw() as *mut _, &mut __default_config) };
        check(__code, "daqNetworkInterface_createDefaultConfiguration")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__default_config as *mut _) })
    }

    /// Calls the openDAQ C function `daqNetworkInterface_createNetworkInterface()`.
    pub fn new(name: &str, owner_device_manufacturer_name: &str, owner_device_serial_number: &str, module_manager: impl Into<Value>) -> Result<NetworkInterface> {
        let __name = crate::marshal::make_string(name)?;
        let __owner_device_manufacturer_name = crate::marshal::make_string(owner_device_manufacturer_name)?;
        let __owner_device_serial_number = crate::marshal::make_string(owner_device_serial_number)?;
        let __module_manager = crate::value::to_daq(&module_manager.into())?;
        let mut __obj: *mut sys::daqNetworkInterface = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqNetworkInterface_createNetworkInterface)(&mut __obj, __name.as_ptr() as *mut _, __owner_device_manufacturer_name.as_ptr() as *mut _, __owner_device_serial_number.as_ptr() as *mut _, crate::value::opt_ref_ptr(&__module_manager) as *mut _) };
        check(__code, "daqNetworkInterface_createNetworkInterface")?;
        Ok(unsafe { crate::marshal::require_object::<NetworkInterface>(__obj as *mut _, "daqNetworkInterface_createNetworkInterface") }?)
    }

    /// Requests the currently active configuration for the network interface.
    ///
    /// # Returns
    /// - `config`: The property object containing the currently active configuration.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTIMPLEMENTED`: if the device doesn't support retrieving the active configuration.
    ///
    /// Calls the openDAQ C function `daqNetworkInterface_requestCurrentConfiguration()`.
    pub fn request_current_configuration(&self) -> Result<Option<PropertyObject>> {
        let mut __config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqNetworkInterface_requestCurrentConfiguration)(self.as_raw() as *mut _, &mut __config) };
        check(__code, "daqNetworkInterface_requestCurrentConfiguration")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__config as *mut _) })
    }

    /// Submits a new configuration for the network interface.
    ///
    /// # Parameters
    /// - `config`: The new configuration to apply.
    ///
    /// # Errors
    /// - `OPENDAQ_SUCCESS`: if the new configuration is applied successfully; otherwise, returns an informative error code. The provided configuration must adhere to the required properties, including "dhcp4", "address4", "gateway4", and their IPv6 equivalents, as described in the class-level documentation.
    ///
    /// Calls the openDAQ C function `daqNetworkInterface_submitConfiguration()`.
    pub fn submit_configuration(&self, config: &PropertyObject) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqNetworkInterface_submitConfiguration)(self.as_raw() as *mut _, config.as_raw() as *mut _) };
        check(__code, "daqNetworkInterface_submitConfiguration")?;
        Ok(())
    }

}

impl ReferenceDomainInfo {
    /// Creates a Reference Domain Info using Builder
    ///
    /// # Parameters
    /// - `builder`: Reference Domain Info Builder
    ///
    /// Calls the openDAQ C function `daqReferenceDomainInfo_createReferenceDomainInfoFromBuilder()`.
    pub fn from_builder(builder: &ReferenceDomainInfoBuilder) -> Result<ReferenceDomainInfo> {
        let mut __obj: *mut sys::daqReferenceDomainInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqReferenceDomainInfo_createReferenceDomainInfoFromBuilder)(&mut __obj, builder.as_raw() as *mut _) };
        check(__code, "daqReferenceDomainInfo_createReferenceDomainInfoFromBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<ReferenceDomainInfo>(__obj as *mut _, "daqReferenceDomainInfo_createReferenceDomainInfoFromBuilder") }?)
    }

    /// Gets the Reference Domain ID.
    ///
    /// # Returns
    /// - `reference_domain_id`: The Reference Domain ID. If set, gives the common identifier of one domain group. Signals with the same Reference Domain ID share a common synchronization source (all the signals in a group either come from the same device or are synchronized using a protocol, such as PTP, NTP, IRIG, etc.). Those signals can always be read together, implying that a Multi Reader can be used to read the signals if their sampling rates are compatible.
    ///
    /// Calls the openDAQ C function `daqReferenceDomainInfo_getReferenceDomainId()`.
    pub fn reference_domain_id(&self) -> Result<String> {
        let mut __reference_domain_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqReferenceDomainInfo_getReferenceDomainId)(self.as_raw() as *mut _, &mut __reference_domain_id) };
        check(__code, "daqReferenceDomainInfo_getReferenceDomainId")?;
        Ok(unsafe { crate::marshal::take_string(__reference_domain_id) })
    }

    /// Gets the Reference Domain Offset.
    ///
    /// # Returns
    /// - `reference_domain_offset`: The Reference Domain Offset. If set, denotes the offset in ticks that must be added to the domain values of the signal for them to be equal to that of the sync source. The sync source will always have an offset of 0. This offset is changed only if the sync source changes and should be kept at 0 otherwise, allowing clients to differentiate between data loss and resync events. Any device can choose to always keep the offset at 0, representing changes in the offset in the domain packet values instead. This implementation prevents clients from differentiating between errors (data loss) and resync events. Additionally, if the offset is not configured, clients have no way of detecting a resync event in the case of asynchronous signals.
    ///
    /// Calls the openDAQ C function `daqReferenceDomainInfo_getReferenceDomainOffset()`.
    pub fn reference_domain_offset(&self) -> Result<Option<i64>> {
        let mut __reference_domain_offset: *mut sys::daqInteger = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqReferenceDomainInfo_getReferenceDomainOffset)(self.as_raw() as *mut _, &mut __reference_domain_offset) };
        check(__code, "daqReferenceDomainInfo_getReferenceDomainOffset")?;
        Ok(unsafe { crate::value::take_boxed_int(__reference_domain_offset, "daqReferenceDomainInfo_getReferenceDomainOffset") }?)
    }

    /// Gets the value that indicates the Reference Time Source.
    ///
    /// # Returns
    /// - `reference_time_protocol`: The value that indicates the Reference Time Source. If not set to Unknown, the domain quantity is “time”, and the timestamps are absolute according to the chosen time standard. The possible values are Gps, Tai, and Utc. This field is used to determine if two signals with different Domain IDs can be read together. Signals that have configured a Reference Time Source are trusted to have absolute time stamps that correlate to the chosen time standard (eg. two separate PTP networks, both driven through GPS can be read together, as their absolute time is the same).
    ///
    /// Calls the openDAQ C function `daqReferenceDomainInfo_getReferenceTimeProtocol()`.
    pub fn reference_time_protocol(&self) -> Result<TimeProtocol> {
        let mut __reference_time_protocol: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqReferenceDomainInfo_getReferenceTimeProtocol)(self.as_raw() as *mut _, &mut __reference_time_protocol) };
        check(__code, "daqReferenceDomainInfo_getReferenceTimeProtocol")?;
        Ok(crate::marshal::enum_out(TimeProtocol::from_raw(__reference_time_protocol), "daqReferenceDomainInfo_getReferenceTimeProtocol")?)
    }

    /// Gets the value that indicates if offset is used.
    ///
    /// # Returns
    /// - `uses_offset`: The value that indicates if offset is used. If False, a device will contain time jumps due to resync in the domain signal data.
    ///
    /// Calls the openDAQ C function `daqReferenceDomainInfo_getUsesOffset()`.
    pub fn uses_offset(&self) -> Result<UsesOffset> {
        let mut __uses_offset: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqReferenceDomainInfo_getUsesOffset)(self.as_raw() as *mut _, &mut __uses_offset) };
        check(__code, "daqReferenceDomainInfo_getUsesOffset")?;
        Ok(crate::marshal::enum_out(UsesOffset::from_raw(__uses_offset), "daqReferenceDomainInfo_getUsesOffset")?)
    }

}

impl ServerCapabilityConfig {
    /// Sets the device's address
    ///
    /// # Returns
    /// - `address`: The device's address
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_addAddress()`.
    pub fn add_address(&self, address: &str) -> Result<()> {
        let __address = crate::marshal::make_string(address)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_addAddress)(self.as_raw() as *mut _, __address.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_addAddress")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqServerCapabilityConfig_addAddressInfo()`.
    pub fn add_address_info(&self, address_info: &AddressInfo) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_addAddressInfo)(self.as_raw() as *mut _, address_info.as_raw() as *mut _) };
        check(__code, "daqServerCapabilityConfig_addAddressInfo")?;
        Ok(())
    }

    /// Sets the connection string of device with current protocol
    ///
    /// # Parameters
    /// - `connection_string`: The connection string of device
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_addConnectionString()`.
    pub fn add_connection_string(&self, connection_string: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_addConnectionString)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_addConnectionString")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqServerCapabilityConfig_createServerCapability()`.
    pub fn server_capability(protocol_id: &str, protocol_name: &str, protocol_type: ProtocolType) -> Result<ServerCapabilityConfig> {
        let __protocol_id = crate::marshal::make_string(protocol_id)?;
        let __protocol_name = crate::marshal::make_string(protocol_name)?;
        let mut __obj: *mut sys::daqServerCapabilityConfig = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_createServerCapability)(&mut __obj, __protocol_id.as_ptr() as *mut _, __protocol_name.as_ptr() as *mut _, protocol_type as u32) };
        check(__code, "daqServerCapabilityConfig_createServerCapability")?;
        Ok(unsafe { crate::marshal::require_object::<ServerCapabilityConfig>(__obj as *mut _, "daqServerCapabilityConfig_createServerCapability") }?)
    }

    /// Sets the connection string of device with current protocol
    ///
    /// # Parameters
    /// - `connection_string`: The connection string of device
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setConnectionString()`.
    pub fn set_connection_string(&self, connection_string: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setConnectionString)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setConnectionString")?;
        Ok(())
    }

    /// Sets the type of connection
    ///
    /// # Parameters
    /// - `type`: The type of connection
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setConnectionType()`.
    pub fn set_connection_type(&self, type_: &str) -> Result<()> {
        let __type_ = crate::marshal::make_string(type_)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setConnectionType)(self.as_raw() as *mut _, __type_.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setConnectionType")?;
        Ok(())
    }

    /// Sets the boolean flag indicating whether the server capability supports core event propagation to clients
    ///
    /// # Parameters
    /// - `enabled`: True if core events are enabled; false otherwise
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setCoreEventsEnabled()`.
    pub fn set_core_events_enabled(&self, enabled: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setCoreEventsEnabled)(self.as_raw() as *mut _, u8::from(enabled)) };
        check(__code, "daqServerCapabilityConfig_setCoreEventsEnabled")?;
        Ok(())
    }

    /// Sets the port of the device
    ///
    /// # Parameters
    /// - `port`: The port of the device
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setPort()`.
    pub fn set_port(&self, port: i64) -> Result<()> {
        let __port = crate::value::int_to_ref(port)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setPort)(self.as_raw() as *mut _, __port.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setPort")?;
        Ok(())
    }

    /// Sets the prefix of the connection string (eg. "daq.nd" or "daq.opcua")
    ///
    /// # Parameters
    /// - `prefix`: The connection string prefix
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setPrefix()`.
    pub fn set_prefix(&self, prefix: &str) -> Result<()> {
        let __prefix = crate::marshal::make_string(prefix)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setPrefix)(self.as_raw() as *mut _, __prefix.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setPrefix")?;
        Ok(())
    }

    /// Sets the ID of protocol
    ///
    /// # Parameters
    /// - `protocol_id`: The ID of protocol
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setProtocolId()`.
    pub fn set_protocol_id(&self, protocol_id: &str) -> Result<()> {
        let __protocol_id = crate::marshal::make_string(protocol_id)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setProtocolId)(self.as_raw() as *mut _, __protocol_id.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setProtocolId")?;
        Ok(())
    }

    /// Sets the name of protocol
    ///
    /// # Parameters
    /// - `protocol_name`: The name of protocol
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setProtocolName()`.
    pub fn set_protocol_name(&self, protocol_name: &str) -> Result<()> {
        let __protocol_name = crate::marshal::make_string(protocol_name)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setProtocolName)(self.as_raw() as *mut _, __protocol_name.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setProtocolName")?;
        Ok(())
    }

    /// Sets the type of protocol
    ///
    /// # Parameters
    /// - `type`: The type of protocol
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setProtocolType()`.
    pub fn set_protocol_type(&self, type_: ProtocolType) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setProtocolType)(self.as_raw() as *mut _, type_ as u32) };
        check(__code, "daqServerCapabilityConfig_setProtocolType")?;
        Ok(())
    }

    /// Sets the protocol version
    ///
    /// # Parameters
    /// - `version`: The protocol version
    ///
    /// Calls the openDAQ C function `daqServerCapabilityConfig_setProtocolVersion()`.
    pub fn set_protocol_version(&self, version: &str) -> Result<()> {
        let __version = crate::marshal::make_string(version)?;
        let __code = unsafe { (crate::sys::api().daqServerCapabilityConfig_setProtocolVersion)(self.as_raw() as *mut _, __version.as_ptr() as *mut _) };
        check(__code, "daqServerCapabilityConfig_setProtocolVersion")?;
        Ok(())
    }

}

impl ServerCapability {
    /// Gets the list of address information objects.
    ///
    /// # Returns
    /// - `address_info`: The list of address information objects. Address information duplicates the connection string and address as available on the Server Capability object. Additionally, it provides information on what type of address it is (e.g., IPv4, IPv6), as well as whether the address is reachable.
    ///
    /// Calls the openDAQ C function `daqServerCapability_getAddressInfo()`.
    pub fn address_info(&self) -> Result<Vec<AddressInfo>> {
        let mut __address_info: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getAddressInfo)(self.as_raw() as *mut _, &mut __address_info) };
        check(__code, "daqServerCapability_getAddressInfo")?;
        Ok(unsafe { crate::marshal::take_list::<AddressInfo>(__address_info as *mut _, "daqServerCapability_getAddressInfo") }?)
    }

    /// Gets the device's list of addresses with the current protocol.
    ///
    /// # Returns
    /// - `addresses`: The device's list of addresses (hosts)
    ///
    /// Calls the openDAQ C function `daqServerCapability_getAddresses()`.
    pub fn addresses(&self) -> Result<Vec<String>> {
        let mut __addresses: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getAddresses)(self.as_raw() as *mut _, &mut __addresses) };
        check(__code, "daqServerCapability_getAddresses")?;
        Ok(unsafe { crate::marshal::take_list::<String>(__addresses as *mut _, "daqServerCapability_getAddresses") }?)
    }

    /// Gets the connection string of the device with the current protocol.
    ///
    /// # Returns
    /// - `connection_string`: The connection string of the device (URL to connect).
    ///
    /// Calls the openDAQ C function `daqServerCapability_getConnectionString()`.
    pub fn connection_string(&self) -> Result<String> {
        let mut __connection_string: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqServerCapability_getConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the connection string of the device with the current protocol.
    ///
    /// # Returns
    /// - `connection_strings`: The connection string of the device (URL to connect).
    ///
    /// Calls the openDAQ C function `daqServerCapability_getConnectionStrings()`.
    pub fn connection_strings(&self) -> Result<Vec<String>> {
        let mut __connection_strings: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getConnectionStrings)(self.as_raw() as *mut _, &mut __connection_strings) };
        check(__code, "daqServerCapability_getConnectionStrings")?;
        Ok(unsafe { crate::marshal::take_list::<String>(__connection_strings as *mut _, "daqServerCapability_getConnectionStrings") }?)
    }

    /// Gets the type of connection supported by the device.
    ///
    /// # Returns
    /// - `type`: The type of connection (e.g., "TCP/IP").
    ///
    /// Calls the openDAQ C function `daqServerCapability_getConnectionType()`.
    pub fn connection_type(&self) -> Result<String> {
        let mut __type_: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getConnectionType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqServerCapability_getConnectionType")?;
        Ok(unsafe { crate::marshal::take_string(__type_) })
    }

    /// Gets the client update method supported by the device.
    ///
    /// # Returns
    /// - `enabled`: The client update method (Boolean value indicating if core events are enabled for communication between server and client device).
    ///
    /// Calls the openDAQ C function `daqServerCapability_getCoreEventsEnabled()`.
    pub fn core_events_enabled(&self) -> Result<bool> {
        let mut __enabled: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqServerCapability_getCoreEventsEnabled)(self.as_raw() as *mut _, &mut __enabled) };
        check(__code, "daqServerCapability_getCoreEventsEnabled")?;
        Ok(__enabled != 0)
    }

    /// Gets the port of the device with the current protocol.
    ///
    /// # Returns
    /// - `port`: The port of the device.
    ///
    /// Calls the openDAQ C function `daqServerCapability_getPort()`.
    pub fn port(&self) -> Result<Option<i64>> {
        let mut __port: *mut sys::daqInteger = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getPort)(self.as_raw() as *mut _, &mut __port) };
        check(__code, "daqServerCapability_getPort")?;
        Ok(unsafe { crate::value::take_boxed_int(__port, "daqServerCapability_getPort") }?)
    }

    /// Gets the prefix of the connection string (eg. "daq.nd" or "daq.opcua")
    ///
    /// # Parameters
    /// - `prefix`: The connection string prefix
    ///
    /// Calls the openDAQ C function `daqServerCapability_getPrefix()`.
    pub fn prefix(&self) -> Result<String> {
        let mut __prefix: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getPrefix)(self.as_raw() as *mut _, &mut __prefix) };
        check(__code, "daqServerCapability_getPrefix")?;
        Ok(unsafe { crate::marshal::take_string(__prefix) })
    }

    /// Gets the id of the protocol supported by the device. Should not contain spaces or special characters except for '_' and '-'.
    ///
    /// # Returns
    /// - `protocol_id`: The id of the protocol.
    ///
    /// Calls the openDAQ C function `daqServerCapability_getProtocolId()`.
    pub fn protocol_id(&self) -> Result<String> {
        let mut __protocol_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getProtocolId)(self.as_raw() as *mut _, &mut __protocol_id) };
        check(__code, "daqServerCapability_getProtocolId")?;
        Ok(unsafe { crate::marshal::take_string(__protocol_id) })
    }

    /// Gets the name of the protocol supported by the device.
    ///
    /// # Returns
    /// - `protocol_name`: The name of the protocol (e.g., "OpenDAQNativeStreaming", "OpenDAQOPCUA", "OpenDAQLTStreaming").
    ///
    /// Calls the openDAQ C function `daqServerCapability_getProtocolName()`.
    pub fn protocol_name(&self) -> Result<String> {
        let mut __protocol_name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getProtocolName)(self.as_raw() as *mut _, &mut __protocol_name) };
        check(__code, "daqServerCapability_getProtocolName")?;
        Ok(unsafe { crate::marshal::take_string(__protocol_name) })
    }

    /// Gets the type of protocol supported by the device.
    ///
    /// # Returns
    /// - `type`: The type of protocol (Enumeration value reflecting protocol type: "ConfigurationAndStreaming", "Configuration", "Streaming", "Unknown").
    ///
    /// Calls the openDAQ C function `daqServerCapability_getProtocolType()`.
    pub fn protocol_type(&self) -> Result<ProtocolType> {
        let mut __type_: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqServerCapability_getProtocolType)(self.as_raw() as *mut _, &mut __type_) };
        check(__code, "daqServerCapability_getProtocolType")?;
        Ok(crate::marshal::enum_out(ProtocolType::from_raw(__type_), "daqServerCapability_getProtocolType")?)
    }

    /// Gets the protocol version supported by the device's protocol.
    ///
    /// # Returns
    /// - `version`: The protocol version.
    ///
    /// Calls the openDAQ C function `daqServerCapability_getProtocolVersion()`.
    pub fn protocol_version(&self) -> Result<String> {
        let mut __version: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServerCapability_getProtocolVersion)(self.as_raw() as *mut _, &mut __version) };
        check(__code, "daqServerCapability_getProtocolVersion")?;
        Ok(unsafe { crate::marshal::take_string(__version) })
    }

}

impl Server {
    /// Disables the server to be discovered by the clients.
    ///
    /// Calls the openDAQ C function `daqServer_disableDiscovery()`.
    pub fn disable_discovery(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqServer_disableDiscovery)(self.as_raw() as *mut _) };
        check(__code, "daqServer_disableDiscovery")?;
        Ok(())
    }

    /// Enables the server to be discovered by the clients.
    ///
    /// Calls the openDAQ C function `daqServer_enableDiscovery()`.
    pub fn enable_discovery(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqServer_enableDiscovery)(self.as_raw() as *mut _) };
        check(__code, "daqServer_enableDiscovery")?;
        Ok(())
    }

    /// Gets the server id.
    ///
    /// # Returns
    /// - `server_id`: The server id.
    ///
    /// Calls the openDAQ C function `daqServer_getId()`.
    pub fn id(&self) -> Result<String> {
        let mut __server_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServer_getId)(self.as_raw() as *mut _, &mut __server_id) };
        check(__code, "daqServer_getId")?;
        Ok(unsafe { crate::marshal::take_string(__server_id) })
    }

    /// Gets a list of the server's signals.
    ///
    /// # Returns
    /// - `signals`: The flat list of signals. Server signals are most often the mirrored representations of signals that belong to the client connected to the instance via this server.
    ///
    /// Calls the openDAQ C function `daqServer_getSignals()`.
    pub fn signals(&self) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServer_getSignals)(self.as_raw() as *mut _, &mut __signals, std::ptr::null_mut()) };
        check(__code, "daqServer_getSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqServer_getSignals") }?)
    }

    /// Gets a list of the server's signals.
    ///
    /// # Returns
    /// - `signals`: The flat list of signals. Server signals are most often the mirrored representations of signals that belong to the client connected to the instance via this server.
    ///
    /// Calls the openDAQ C function `daqServer_getSignals()`.
    pub fn signals_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServer_getSignals)(self.as_raw() as *mut _, &mut __signals, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqServer_getSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqServer_getSignals") }?)
    }

    /// Gets a streaming source associated with server.
    ///
    /// # Returns
    /// - `streaming`: The streaming object that represents the server’s client-to-device streaming source. The streaming object is assigned on servers that support the generalized client-to-device streaming mechanism. The object is expected to be associated with mirrored server-side copies of client signals and is responsible for receiving their data sent from the client to the device.
    ///
    /// Calls the openDAQ C function `daqServer_getStreaming()`.
    pub fn streaming(&self) -> Result<Option<Streaming>> {
        let mut __streaming: *mut sys::daqStreaming = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqServer_getStreaming)(self.as_raw() as *mut _, &mut __streaming) };
        check(__code, "daqServer_getStreaming")?;
        Ok(unsafe { crate::marshal::take_object::<Streaming>(__streaming as *mut _) })
    }

    /// Stops the server. This is called when we remove the server from the Instance or Instance is closing.
    ///
    /// Calls the openDAQ C function `daqServer_stop()`.
    pub fn stop(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqServer_stop)(self.as_raw() as *mut _) };
        check(__code, "daqServer_stop")?;
        Ok(())
    }

}

impl Streaming {
    /// Adds input ports to the Streaming.
    ///
    /// # Parameters
    /// - `input_ports`: The list of input ports to be added.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_DUPLICATEITEM`: if an input port on the list is already added to the Streaming.
    /// - `OPENDAQ_ERR_NOINTERFACE`: if an input port on the list is not a mirrored signal. After an input port is added to the Streaming, the Streaming automatically appears in the list of available streaming sources of an input port.
    ///
    /// Calls the openDAQ C function `daqStreaming_addInputPorts()`.
    pub fn add_input_ports(&self, input_ports: &[MirroredInputPortConfig]) -> Result<()> {
        let __input_ports = crate::marshal::list_from_interfaces(input_ports)?;
        let __code = unsafe { (crate::sys::api().daqStreaming_addInputPorts)(self.as_raw() as *mut _, __input_ports.as_ptr() as *mut _) };
        check(__code, "daqStreaming_addInputPorts")?;
        Ok(())
    }

    /// Adds signals to the Streaming.
    ///
    /// # Parameters
    /// - `signals`: The list of signals to be added.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_DUPLICATEITEM`: if a signal on the list is already added to the Streaming.
    /// - `OPENDAQ_ERR_NOINTERFACE`: if a signal on the list is not a mirrored signal. After a signal is added to the Streaming, the Streaming automatically appears in the list of available streaming sources of a signal. Some signals, however, may be silently ignored without triggering an error - for example, private signals are excluded by default.
    ///
    /// Calls the openDAQ C function `daqStreaming_addSignals()`.
    pub fn add_signals(&self, signals: &[Signal]) -> Result<()> {
        let __signals = crate::marshal::list_from_interfaces(signals)?;
        let __code = unsafe { (crate::sys::api().daqStreaming_addSignals)(self.as_raw() as *mut _, __signals.as_ptr() as *mut _) };
        check(__code, "daqStreaming_addSignals")?;
        Ok(())
    }

    /// Gets the active state of the Streaming.
    ///
    /// # Returns
    /// - `active`: True if the Streaming is active; false otherwise.
    ///
    /// Calls the openDAQ C function `daqStreaming_getActive()`.
    pub fn active(&self) -> Result<bool> {
        let mut __active: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqStreaming_getActive)(self.as_raw() as *mut _, &mut __active) };
        check(__code, "daqStreaming_getActive")?;
        Ok(__active != 0)
    }

    /// Checks whether client-to-device streaming is enabled for this streaming object.
    ///
    /// # Returns
    /// - `enabled`: The flag indicating if client-to-device streaming is enabled.
    ///
    /// Calls the openDAQ C function `daqStreaming_getClientToDeviceStreamingEnabled()`.
    pub fn client_to_device_streaming_enabled(&self) -> Result<bool> {
        let mut __enabled: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqStreaming_getClientToDeviceStreamingEnabled)(self.as_raw() as *mut _, &mut __enabled) };
        check(__code, "daqStreaming_getClientToDeviceStreamingEnabled")?;
        Ok(__enabled != 0)
    }

    /// Retrieves the current status of the streaming connection.
    ///
    /// # Returns
    /// - `connection_status`: The connection status, represented as an enumeration of type "ConnectionStatusType" with possible values: "Connected", "Reconnecting", or "Unrecoverable".
    ///
    /// Calls the openDAQ C function `daqStreaming_getConnectionStatus()`.
    pub fn connection_status(&self) -> Result<Option<Enumeration>> {
        let mut __connection_status: *mut sys::daqEnumeration = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqStreaming_getConnectionStatus)(self.as_raw() as *mut _, &mut __connection_status) };
        check(__code, "daqStreaming_getConnectionStatus")?;
        Ok(unsafe { crate::marshal::take_object::<Enumeration>(__connection_status as *mut _) })
    }

    /// Gets the string representation of a connection address used to connect to the streaming service of the device.
    ///
    /// # Returns
    /// - `connection_string`: The string used to connect to the streaming service.
    ///
    /// Calls the openDAQ C function `daqStreaming_getConnectionString()`.
    pub fn connection_string(&self) -> Result<String> {
        let mut __connection_string: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqStreaming_getConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqStreaming_getConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the global ID of the device (as it appears on the remote instance) to which this streaming object establishes a connection.
    ///
    /// # Returns
    /// - `device_remote_id`: The string representing the device's remote ID.
    ///
    /// Calls the openDAQ C function `daqStreaming_getOwnerDeviceRemoteId()`.
    pub fn owner_device_remote_id(&self) -> Result<String> {
        let mut __device_remote_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqStreaming_getOwnerDeviceRemoteId)(self.as_raw() as *mut _, &mut __device_remote_id) };
        check(__code, "daqStreaming_getOwnerDeviceRemoteId")?;
        Ok(unsafe { crate::marshal::take_string(__device_remote_id) })
    }

    /// Gets the identifier of the data transfer protocol (e.g., "OpenDAQNativeStreaming", "OpenDAQLTStreaming") used by this streaming object.
    ///
    /// # Returns
    /// - `protocol_id`: The string representing the protocol ID.
    ///
    /// Calls the openDAQ C function `daqStreaming_getProtocolId()`.
    pub fn protocol_id(&self) -> Result<String> {
        let mut __protocol_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqStreaming_getProtocolId)(self.as_raw() as *mut _, &mut __protocol_id) };
        check(__code, "daqStreaming_getProtocolId")?;
        Ok(unsafe { crate::marshal::take_string(__protocol_id) })
    }

    /// Removes all added input ports from the Streaming.
    ///
    /// Calls the openDAQ C function `daqStreaming_removeAllInputPorts()`.
    pub fn remove_all_input_ports(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqStreaming_removeAllInputPorts)(self.as_raw() as *mut _) };
        check(__code, "daqStreaming_removeAllInputPorts")?;
        Ok(())
    }

    /// Removes all added signals from the Streaming.
    ///
    /// Calls the openDAQ C function `daqStreaming_removeAllSignals()`.
    pub fn remove_all_signals(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqStreaming_removeAllSignals)(self.as_raw() as *mut _) };
        check(__code, "daqStreaming_removeAllSignals")?;
        Ok(())
    }

    /// Removes input ports from the Streaming.
    ///
    /// # Parameters
    /// - `input_ports`: The list of input ports to be removed.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTFOUND`: if an input port on the list was not added to the Streaming. After an input port is removed from the Streaming, the Streaming is automatically excluded in the list of available streaming sources of an input port.
    ///
    /// Calls the openDAQ C function `daqStreaming_removeInputPorts()`.
    pub fn remove_input_ports(&self, input_ports: &[MirroredInputPortConfig]) -> Result<()> {
        let __input_ports = crate::marshal::list_from_interfaces(input_ports)?;
        let __code = unsafe { (crate::sys::api().daqStreaming_removeInputPorts)(self.as_raw() as *mut _, __input_ports.as_ptr() as *mut _) };
        check(__code, "daqStreaming_removeInputPorts")?;
        Ok(())
    }

    /// Removes signals from the Streaming.
    ///
    /// # Parameters
    /// - `signals`: The list of signals to be removed.
    ///
    /// # Errors
    /// - `OPENDAQ_ERR_NOTFOUND`: if a signal on the list was not added to the Streaming. After a signal is removed from the Streaming, the Streaming is automatically excluded in the list of available streaming sources of a signal.
    ///
    /// Calls the openDAQ C function `daqStreaming_removeSignals()`.
    pub fn remove_signals(&self, signals: &[Signal]) -> Result<()> {
        let __signals = crate::marshal::list_from_interfaces(signals)?;
        let __code = unsafe { (crate::sys::api().daqStreaming_removeSignals)(self.as_raw() as *mut _, __signals.as_ptr() as *mut _) };
        check(__code, "daqStreaming_removeSignals")?;
        Ok(())
    }

    /// Sets the Streaming to be either active or inactive.
    ///
    /// # Parameters
    /// - `active`: The new active state of the Streaming.
    ///
    /// Calls the openDAQ C function `daqStreaming_setActive()`.
    pub fn set_active(&self, active: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqStreaming_setActive)(self.as_raw() as *mut _, u8::from(active)) };
        check(__code, "daqStreaming_setActive")?;
        Ok(())
    }

}

impl SyncComponent {
    /// Calls the openDAQ C function `daqSyncComponent_createSyncComponent()`.
    pub fn new(context: &Context, parse_failed_exception: &Component, local_id: &str) -> Result<SyncComponent> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __obj: *mut sys::daqSyncComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSyncComponent_createSyncComponent)(&mut __obj, context.as_raw() as *mut _, parse_failed_exception.as_raw() as *mut _, __local_id.as_ptr() as *mut _) };
        check(__code, "daqSyncComponent_createSyncComponent")?;
        Ok(unsafe { crate::marshal::require_object::<SyncComponent>(__obj as *mut _, "daqSyncComponent_createSyncComponent") }?)
    }

    /// Retrieves the list of interfaces associated with this synchronization component.
    ///
    /// # Returns
    /// - `interfaces`: List of interfaces associated with this component.
    ///
    /// Calls the openDAQ C function `daqSyncComponent_getInterfaces()`.
    pub fn interfaces(&self) -> Result<std::collections::HashMap<String, PropertyObject>> {
        let mut __interfaces: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSyncComponent_getInterfaces)(self.as_raw() as *mut _, &mut __interfaces) };
        check(__code, "daqSyncComponent_getInterfaces")?;
        Ok(unsafe { crate::marshal::take_dict::<String, PropertyObject>(__interfaces as *mut _, "daqSyncComponent_getInterfaces") }?)
    }

    /// Retrieves the selected sync source interface.
    ///
    /// # Returns
    /// - `selected_source`: The selected sync source interface.
    ///
    /// Calls the openDAQ C function `daqSyncComponent_getSelectedSource()`.
    pub fn selected_source(&self) -> Result<i64> {
        let mut __selected_source: i64 = Default::default();
        let __code = unsafe { (crate::sys::api().daqSyncComponent_getSelectedSource)(self.as_raw() as *mut _, &mut __selected_source) };
        check(__code, "daqSyncComponent_getSelectedSource")?;
        Ok(__selected_source)
    }

    /// Retrieves the synchronization lock status.
    ///
    /// # Returns
    /// - `synchronization_locked`: True if synchronization is locked; false otherwise.
    ///
    /// Calls the openDAQ C function `daqSyncComponent_getSyncLocked()`.
    pub fn sync_locked(&self) -> Result<bool> {
        let mut __synchronization_locked: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqSyncComponent_getSyncLocked)(self.as_raw() as *mut _, &mut __synchronization_locked) };
        check(__code, "daqSyncComponent_getSyncLocked")?;
        Ok(__synchronization_locked != 0)
    }

    /// Sets the selected sync source interface.
    ///
    /// # Parameters
    /// - `selected_source`: The selected sync source interface.
    ///
    /// Calls the openDAQ C function `daqSyncComponent_setSelectedSource()`.
    pub fn set_selected_source(&self, selected_source: i64) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqSyncComponent_setSelectedSource)(self.as_raw() as *mut _, selected_source) };
        check(__code, "daqSyncComponent_setSelectedSource")?;
        Ok(())
    }

}

impl UserLock {
    /// Creates an unlocked UserLock object.
    ///
    /// Calls the openDAQ C function `daqUserLock_createUserLock()`.
    pub fn new() -> Result<UserLock> {
        let mut __obj: *mut sys::daqUserLock = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqUserLock_createUserLock)(&mut __obj) };
        check(__code, "daqUserLock_createUserLock")?;
        Ok(unsafe { crate::marshal::require_object::<UserLock>(__obj as *mut _, "daqUserLock_createUserLock") }?)
    }

    /// Forcefully unlock the object. A force unlock will always succeed, regardless of which user initially locked the object.
    ///
    /// Calls the openDAQ C function `daqUserLock_forceUnlock()`.
    pub fn force_unlock(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqUserLock_forceUnlock)(self.as_raw() as *mut _) };
        check(__code, "daqUserLock_forceUnlock")?;
        Ok(())
    }

    /// Returns true if the object is locked.
    ///
    /// # Parameters
    /// - `is_locked_out`: \[out\] True if the object is locked.
    ///
    /// Calls the openDAQ C function `daqUserLock_isLocked()`.
    pub fn is_locked(&self) -> Result<bool> {
        let mut __is_locked_out: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqUserLock_isLocked)(self.as_raw() as *mut _, &mut __is_locked_out) };
        check(__code, "daqUserLock_isLocked")?;
        Ok(__is_locked_out != 0)
    }

    /// Lock the object. Only the user who locked the object can unlock it. If the object was locked without a specific user, or with an anonymous user, any user can unlock it.
    ///
    /// # Parameters
    /// - `user`: User performing the lock action.
    ///
    /// Calls the openDAQ C function `daqUserLock_lock()`.
    pub fn lock(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqUserLock_lock)(self.as_raw() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqUserLock_lock")?;
        Ok(())
    }

    /// Lock the object. Only the user who locked the object can unlock it. If the object was locked without a specific user, or with an anonymous user, any user can unlock it.
    ///
    /// # Parameters
    /// - `user`: User performing the lock action.
    ///
    /// Calls the openDAQ C function `daqUserLock_lock()`.
    pub fn lock_with(&self, user: Option<&User>) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqUserLock_lock)(self.as_raw() as *mut _, user.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqUserLock_lock")?;
        Ok(())
    }

    /// Unlock the object. Only the user who locked the object can unlock it. If the object was locked without a specific user, or with an anonymous user, any user can unlock it.
    ///
    /// # Parameters
    /// - `user`: User performing the unlock action.
    ///
    /// Calls the openDAQ C function `daqUserLock_unlock()`.
    pub fn unlock(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqUserLock_unlock)(self.as_raw() as *mut _, std::ptr::null_mut()) };
        check(__code, "daqUserLock_unlock")?;
        Ok(())
    }

    /// Unlock the object. Only the user who locked the object can unlock it. If the object was locked without a specific user, or with an anonymous user, any user can unlock it.
    ///
    /// # Parameters
    /// - `user`: User performing the unlock action.
    ///
    /// Calls the openDAQ C function `daqUserLock_unlock()`.
    pub fn unlock_with(&self, user: Option<&User>) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqUserLock_unlock)(self.as_raw() as *mut _, user.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqUserLock_unlock")?;
        Ok(())
    }

}