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
// 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;

/// Acts as a base interface for components, such as device, function block, channel and signal.
/// The IComponent provides a set of methods that are common to all components:
/// LocalID, GlobalID and Active properties.
/// Wrapper over the openDAQ `daqComponent` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Component(pub(crate) PropertyObject);

impl std::ops::Deref for Component {
    type Target = PropertyObject;
    fn deref(&self) -> &PropertyObject { &self.0 }
}
impl crate::sealed::Sealed for Component {}
unsafe impl Interface for Component {
    const NAME: &'static str = "daqComponent";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqComponent_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 Component {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { Component(PropertyObject::__from_ref(r)) }
}
impl std::fmt::Display for Component {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&Component> for Value {
    fn from(value: &Component) -> Value { Value::Object(value.to_base_object()) }
}
impl From<Component> for Value {
    fn from(value: Component) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for Component {
    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 `daqComponentDeserializeContext` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentDeserializeContext(pub(crate) BaseObject);

impl std::ops::Deref for ComponentDeserializeContext {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for ComponentDeserializeContext {}
unsafe impl Interface for ComponentDeserializeContext {
    const NAME: &'static str = "daqComponentDeserializeContext";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqComponentDeserializeContext_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 ComponentDeserializeContext {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ComponentDeserializeContext(BaseObject(r)) }
}
impl std::fmt::Display for ComponentDeserializeContext {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ComponentDeserializeContext> for Value {
    fn from(value: &ComponentDeserializeContext) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ComponentDeserializeContext> for Value {
    fn from(value: ComponentDeserializeContext) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ComponentDeserializeContext {
    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 `daqComponentHolder` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentHolder(pub(crate) BaseObject);

impl std::ops::Deref for ComponentHolder {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for ComponentHolder {}
unsafe impl Interface for ComponentHolder {
    const NAME: &'static str = "daqComponentHolder";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqComponentHolder_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 ComponentHolder {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ComponentHolder(BaseObject(r)) }
}
impl std::fmt::Display for ComponentHolder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ComponentHolder> for Value {
    fn from(value: &ComponentHolder) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ComponentHolder> for Value {
    fn from(value: ComponentHolder) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ComponentHolder {
    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 of the component.
/// Said methods allow for triggering a Core event of the component, and locking/unlocking attributes of
/// the component.
/// Wrapper over the openDAQ `daqComponentPrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentPrivate(pub(crate) BaseObject);

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

/// A container of Component Statuses and their corresponding values.
/// Each status has a unique name and represents an actual status related to the openDAQ Component,
/// such as connection status, synchronization status, etc. The statuses' values are represented
/// by Enumeration objects.
/// Wrapper over the openDAQ `daqComponentStatusContainer` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentStatusContainer(pub(crate) BaseObject);

impl std::ops::Deref for ComponentStatusContainer {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for ComponentStatusContainer {}
unsafe impl Interface for ComponentStatusContainer {
    const NAME: &'static str = "daqComponentStatusContainer";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqComponentStatusContainer_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 ComponentStatusContainer {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { ComponentStatusContainer(BaseObject(r)) }
}
impl std::fmt::Display for ComponentStatusContainer {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&ComponentStatusContainer> for Value {
    fn from(value: &ComponentStatusContainer) -> Value { Value::Object(value.to_base_object()) }
}
impl From<ComponentStatusContainer> for Value {
    fn from(value: ComponentStatusContainer) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for ComponentStatusContainer {
    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 of the Component status container.
/// Said methods allow for adding new statuses and setting a value for existing statuses stored in
/// the component status container. Device connection statuses, however, are managed independently
/// via IConnectionStatusContainerPrivate.
/// "StatusChanged" Core events are triggered whenever there is a change in the status of the openDAQ Component.
/// Wrapper over the openDAQ `daqComponentStatusContainerPrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentStatusContainerPrivate(pub(crate) BaseObject);

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

/// Provides information about the component types.
/// Is a Struct core type, and has access to Struct methods internally. Note that the Default config is not part of
/// the Struct fields.
/// Wrapper over the openDAQ `daqComponentType` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentType(pub(crate) BaseObject);

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

/// Builder component of Component type objects. Contains setter methods to configure the Component type parameters, and a `build` method that builds the object.
/// Depending on the set "Type" builder parameter, a different Component type is created - eg. Streaming type,
/// Device type, Function block type, or Server type
/// Wrapper over the openDAQ `daqComponentTypeBuilder` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentTypeBuilder(pub(crate) BaseObject);

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

/// Private interface to component type. Allows for setting the module information.
/// Wrapper over the openDAQ `daqComponentTypePrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentTypePrivate(pub(crate) BaseObject);

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

/// @ingroup types_utility
/// @defgroup types_updatable Updatable
/// Wrapper over the openDAQ `daqComponentUpdateContext` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ComponentUpdateContext(pub(crate) BaseObject);

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

/// The Context serves as a container for the Scheduler and Logger. It originates at the instance, and is passed to the root device, which forwards it to components such as function blocks and signals.
/// Note: The context holds a strong reference to the Module Manager until  the reference is moved via the
/// ContextInternal move function. The strong reference moved to an external owner to avoid memory leaks
/// due to circular references. This is done automatically when the Context is used in the openDAQ Instance
/// constructor.
/// Wrapper over the openDAQ `daqContext` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Context(pub(crate) BaseObject);

impl std::ops::Deref for Context {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for Context {}
unsafe impl Interface for Context {
    const NAME: &'static str = "daqContext";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqContext_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 Context {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { Context(BaseObject(r)) }
}
impl std::fmt::Display for Context {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&Context> for Value {
    fn from(value: &Context) -> Value { Value::Object(value.to_base_object()) }
}
impl From<Context> for Value {
    fn from(value: Context) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for Context {
    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 `daqDeserializeComponent` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeserializeComponent(pub(crate) BaseObject);

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

/// Allows for specifying how a device and its subdevices are to be updated when loading a configuration.
/// The device options object can be created using a serialized openDAQ JSON setup. The options are structured
/// hierarchically, so that options for subdevices are stored in the parent device options. The following metadata
/// is read from the setup: local ID, manufacturer, serial number, and connection string.
/// For each individual device in the setup, the update mode can be specified. The update mode defines how the device is updated when loading:
/// - Load: Updates the device. Adds the device if missing.
/// - UpdateOnly: The device is updated, but not added if missing.
/// - Skip: The device is not updated. Does neither add nor remove the device.
/// - Remove: Removes the device from the tree, if present.
/// - Remap: Same as load, but removes old device (if present) and uses the new manufacturer, serial number, and connection string to add a new one and update.
/// @subsection opendaq_device_options_remapping Remapping
/// When the update mode is set to Remap, the device is removed and added again with the new manufacturer, serial number, and connection
/// string. This can be used when swapping out a device with a different one of the same make/model. This option will try and load the same
/// settings used to configure the original device to the new one.
/// When loading, the new manufacturer + serial number combination will have priority over the new connection string. In case a device with
/// the new manufacturer + serial number combination is not found, the new connection string will be used as fallback.
/// If the remapping fails (e.g. due to missing device with the new manufacturer + serial number combination and invalid connection string),
/// the original device will be removed (if present) and no new device will be added.
/// Signal-\>Input port connections will be preserved when remapping, assuming the new device has the same signal and input port structure and IDs.
/// Wrapper over the openDAQ `daqDeviceUpdateOptions` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct DeviceUpdateOptions(pub(crate) BaseObject);

impl std::ops::Deref for DeviceUpdateOptions {
    type Target = BaseObject;
    fn deref(&self) -> &BaseObject { &self.0 }
}
impl crate::sealed::Sealed for DeviceUpdateOptions {}
unsafe impl Interface for DeviceUpdateOptions {
    const NAME: &'static str = "daqDeviceUpdateOptions";
    fn interface_id() -> Option<crate::IntfID> {
        let mut id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        unsafe { (crate::sys::api().daqDeviceUpdateOptions_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 DeviceUpdateOptions {
    #[doc(hidden)]
    pub(crate) fn __from_ref(r: Ref) -> Self { DeviceUpdateOptions(BaseObject(r)) }
}
impl std::fmt::Display for DeviceUpdateOptions {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self.as_base_object(), f)
    }
}
impl From<&DeviceUpdateOptions> for Value {
    fn from(value: &DeviceUpdateOptions) -> Value { Value::Object(value.to_base_object()) }
}
impl From<DeviceUpdateOptions> for Value {
    fn from(value: DeviceUpdateOptions) -> Value { Value::Object(value.to_base_object()) }
}
impl crate::value::FromDaqOwned for DeviceUpdateOptions {
    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 other components
/// Other components use the folder component to organize the children components,
/// such as channels, signals, function blocks, etc.
/// Wrapper over the openDAQ `daqFolder` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Folder(pub(crate) Component);

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

/// Allows write access to folder.
/// Provides methods to add and remove items to the folder.
/// Wrapper over the openDAQ `daqFolderConfig` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct FolderConfig(pub(crate) Folder);

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

/// Give module information composing of: - version info (major, minor, patch) - name - id.
/// Wrapper over the openDAQ `daqModuleInfo` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct ModuleInfo(pub(crate) BaseObject);

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

/// Allows the component to be notified when it is removed.
/// Wrapper over the openDAQ `daqRemovable` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Removable(pub(crate) BaseObject);

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

/// A signal with an unique ID that sends event/data packets through connections to input ports the signal is connected to.
/// A signal features an unique ID within a given device. It sends data along its signal path to all
/// connected input ports, if its set to be active via its active property.
/// A signal is visible, and its data is streamed to all clients connected to a device only if its public
/// property is set to `True`.
/// Each signal has a domain descriptor, which is set by the owner of the signal - most often a function
/// block or device. The descriptor defines all properties of the signal, such as its name, description
/// and data structure.
/// Signals can have a reference to another signal, which is used for determining the domain data. The domain
/// signal outputs data at the same rate as the signal itself, providing domain (most often time - timestamps)
/// information for each sample sent along the signal path. Each value packet sent by a signal thus contains
/// a reference to another data packet containing domain data (if the signal is associated with another domain signal).
/// Additionally, a list of related signals can be defined, containing any signals relevant to interpreting the
/// signal data.
/// To get the list of connections to input ports of the signal, `getConnections` can be used.
/// Wrapper over the openDAQ `daqSignal` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Signal(pub(crate) Component);

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

/// List of string tags. Provides helpers to get and search the list of tags.
/// Tags provide a view into an underlying list of tags. The list can be retrieved via
/// `getList`, and inspected through `contains` and `query`.
/// To manipulate the list of tags, the add/remove tag functions can be used. The Tags
/// object can only be modified if the object is not locked by the owning Component.
/// Wrapper over the openDAQ `daqTags` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct Tags(pub(crate) BaseObject);

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

/// Private interface to component tags. Allows for adding/removing tags.
/// Modifying the tags of a component might have unintended sideffects and should in most cases only be done
/// by the component owner module.
/// Wrapper over the openDAQ `daqTagsPrivate` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct TagsPrivate(pub(crate) BaseObject);

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

/// IUpdateParameters interface provides a set of methods to give user flexibility to load instance configuration.
/// Wrapper over the openDAQ `daqUpdateParameters` interface.
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct UpdateParameters(pub(crate) PropertyObject);

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

impl ComponentDeserializeContext {
    /// Calls the openDAQ C function `daqComponentDeserializeContext_clone()`.
    pub fn clone_object(&self, new_parent: &Component, new_local_id: &str) -> Result<(Option<ComponentDeserializeContext>, crate::IntfID)> {
        let __new_local_id = crate::marshal::make_string(new_local_id)?;
        let mut __new_component_deserialize_context: *mut sys::daqComponentDeserializeContext = std::ptr::null_mut();
        let mut __new_intf_id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        let __code = unsafe { (crate::sys::api().daqComponentDeserializeContext_clone)(self.as_raw() as *mut _, new_parent.as_raw() as *mut _, __new_local_id.as_ptr() as *mut _, &mut __new_component_deserialize_context, &mut __new_intf_id, std::ptr::null_mut()) };
        check(__code, "daqComponentDeserializeContext_clone")?;
        Ok((unsafe { crate::marshal::take_object::<ComponentDeserializeContext>(__new_component_deserialize_context as *mut _) }, __new_intf_id))
    }

    /// Calls the openDAQ C function `daqComponentDeserializeContext_clone()`.
    pub fn clone_object_with(&self, new_parent: &Component, new_local_id: &str, new_trigger_core_event: Option<&Procedure>) -> Result<(Option<ComponentDeserializeContext>, crate::IntfID)> {
        let __new_local_id = crate::marshal::make_string(new_local_id)?;
        let mut __new_component_deserialize_context: *mut sys::daqComponentDeserializeContext = std::ptr::null_mut();
        let mut __new_intf_id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        let __code = unsafe { (crate::sys::api().daqComponentDeserializeContext_clone)(self.as_raw() as *mut _, new_parent.as_raw() as *mut _, __new_local_id.as_ptr() as *mut _, &mut __new_component_deserialize_context, &mut __new_intf_id, new_trigger_core_event.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqComponentDeserializeContext_clone")?;
        Ok((unsafe { crate::marshal::take_object::<ComponentDeserializeContext>(__new_component_deserialize_context as *mut _) }, __new_intf_id))
    }

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

    /// Calls the openDAQ C function `daqComponentDeserializeContext_getIntfID()`.
    pub fn intf_id(&self) -> Result<crate::IntfID> {
        let mut __intf_id = crate::IntfID { Data1: 0, Data2: 0, Data3: 0, Data4: 0 };
        let __code = unsafe { (crate::sys::api().daqComponentDeserializeContext_getIntfID)(self.as_raw() as *mut _, &mut __intf_id) };
        check(__code, "daqComponentDeserializeContext_getIntfID")?;
        Ok(__intf_id)
    }

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

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

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

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

}

impl ComponentHolder {
    /// Calls the openDAQ C function `daqComponentHolder_createComponentHolder()`.
    pub fn new(component: &Component) -> Result<ComponentHolder> {
        let mut __obj: *mut sys::daqComponentHolder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentHolder_createComponentHolder)(&mut __obj, component.as_raw() as *mut _) };
        check(__code, "daqComponentHolder_createComponentHolder")?;
        Ok(unsafe { crate::marshal::require_object::<ComponentHolder>(__obj as *mut _, "daqComponentHolder_createComponentHolder") }?)
    }

    /// Calls the openDAQ C function `daqComponentHolder_createComponentHolderWithIds()`.
    pub fn with_ids(id: &str, parent_global_id: &str, component: &Component) -> Result<ComponentHolder> {
        let __id = crate::marshal::make_string(id)?;
        let __parent_global_id = crate::marshal::make_string(parent_global_id)?;
        let mut __obj: *mut sys::daqComponentHolder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentHolder_createComponentHolderWithIds)(&mut __obj, __id.as_ptr() as *mut _, __parent_global_id.as_ptr() as *mut _, component.as_raw() as *mut _) };
        check(__code, "daqComponentHolder_createComponentHolderWithIds")?;
        Ok(unsafe { crate::marshal::require_object::<ComponentHolder>(__obj as *mut _, "daqComponentHolder_createComponentHolderWithIds") }?)
    }

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

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

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

}

impl ComponentPrivate {
    /// Retrieves the configuration which was used to create the component.
    ///
    /// # Parameters
    /// - `config`: The configuration of the component.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_getComponentConfig()`.
    pub fn component_config(&self) -> Result<Option<PropertyObject>> {
        let mut __config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_getComponentConfig)(self.as_raw() as *mut _, &mut __config) };
        check(__code, "daqComponentPrivate_getComponentConfig")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__config as *mut _) })
    }

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

    /// Locks the attributes contained in the provided list.
    ///
    /// # Parameters
    /// - `attributes`: The list of attributes that should be locked. Is not case sensitive.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_lockAttributes()`.
    pub fn lock_attributes(&self, attributes: &[&str]) -> Result<()> {
        let __attributes = crate::marshal::list_from_strs(attributes)?;
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_lockAttributes)(self.as_raw() as *mut _, __attributes.as_ptr() as *mut _) };
        check(__code, "daqComponentPrivate_lockAttributes")?;
        Ok(())
    }

    /// Sets the configuration which was used to create the component.
    ///
    /// # Parameters
    /// - `config`: The configuration of the component.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_setComponentConfig()`.
    pub fn set_component_config(&self, config: &PropertyObject) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_setComponentConfig)(self.as_raw() as *mut _, config.as_raw() as *mut _) };
        check(__code, "daqComponentPrivate_setComponentConfig")?;
        Ok(())
    }

    /// Called by parent component to notify this component about parent's active state change.
    ///
    /// # Parameters
    /// - `parent_active`: True if parent is active. The component updates its internal parentActive flag and recomputes its effective active state. If the effective active state changes, triggers an AttributeChanged event. Container components (folders, devices) propagate this call to their children.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_setParentActive()`.
    pub fn set_parent_active(&self, parent_active: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_setParentActive)(self.as_raw() as *mut _, u8::from(parent_active)) };
        check(__code, "daqComponentPrivate_setParentActive")?;
        Ok(())
    }

    /// Triggers the component-specific core event with the provided arguments.
    ///
    /// # Parameters
    /// - `args`: The arguments of the core event.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_triggerComponentCoreEvent()`.
    pub fn trigger_component_core_event(&self, args: &CoreEventArgs) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_triggerComponentCoreEvent)(self.as_raw() as *mut _, args.as_raw() as *mut _) };
        check(__code, "daqComponentPrivate_triggerComponentCoreEvent")?;
        Ok(())
    }

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

    /// Unlocks the attributes contained in the provided list.
    ///
    /// # Parameters
    /// - `attributes`: The list of attributes that should be unlocked. Is not case sensitive.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_unlockAttributes()`.
    pub fn unlock_attributes(&self, attributes: &[&str]) -> Result<()> {
        let __attributes = crate::marshal::list_from_strs(attributes)?;
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_unlockAttributes)(self.as_raw() as *mut _, __attributes.as_ptr() as *mut _) };
        check(__code, "daqComponentPrivate_unlockAttributes")?;
        Ok(())
    }

    /// Notifies component about the change of the operation mode.
    ///
    /// # Parameters
    /// - `mode_type`: The new operation mode.
    ///
    /// Calls the openDAQ C function `daqComponentPrivate_updateOperationMode()`.
    pub fn update_operation_mode(&self, mode_type: OperationModeType) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentPrivate_updateOperationMode)(self.as_raw() as *mut _, mode_type as u32) };
        check(__code, "daqComponentPrivate_updateOperationMode")?;
        Ok(())
    }

}

impl ComponentStatusContainerPrivate {
    /// Adds the new status with given name and initial value.
    ///
    /// # Parameters
    /// - `name`: The name of the component status.
    /// - `initial_value`: The initial value of the component status.
    ///
    /// Calls the openDAQ C function `daqComponentStatusContainerPrivate_addStatus()`.
    pub fn add_status(&self, name: &str, initial_value: &Enumeration) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqComponentStatusContainerPrivate_addStatus)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, initial_value.as_raw() as *mut _) };
        check(__code, "daqComponentStatusContainerPrivate_addStatus")?;
        Ok(())
    }

    /// Adds the new status with given name, initial value, and message.
    ///
    /// # Parameters
    /// - `name`: The name of the component status.
    /// - `initial_value`: The initial value of the component status.
    /// - `message`: The message of the component status.
    ///
    /// Calls the openDAQ C function `daqComponentStatusContainerPrivate_addStatusWithMessage()`.
    pub fn add_status_with_message(&self, name: &str, initial_value: &Enumeration, message: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __message = crate::marshal::make_string(message)?;
        let __code = unsafe { (crate::sys::api().daqComponentStatusContainerPrivate_addStatusWithMessage)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, initial_value.as_raw() as *mut _, __message.as_ptr() as *mut _) };
        check(__code, "daqComponentStatusContainerPrivate_addStatusWithMessage")?;
        Ok(())
    }

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

    /// Sets the value for the existing component status with a message.
    ///
    /// # Parameters
    /// - `name`: The name of the component status.
    /// - `value`: The new value of the component status.
    /// - `message`: The new message of the component status.
    ///
    /// Calls the openDAQ C function `daqComponentStatusContainerPrivate_setStatusWithMessage()`.
    pub fn set_status_with_message(&self, name: &str, value: &Enumeration, message: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __message = crate::marshal::make_string(message)?;
        let __code = unsafe { (crate::sys::api().daqComponentStatusContainerPrivate_setStatusWithMessage)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, value.as_raw() as *mut _, __message.as_ptr() as *mut _) };
        check(__code, "daqComponentStatusContainerPrivate_setStatusWithMessage")?;
        Ok(())
    }

}

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

    /// Gets the current value of Component status with a given name.
    ///
    /// # Parameters
    /// - `name`: The name of Component status.
    ///
    /// # Returns
    /// - `value`: The current value of Component status.
    ///
    /// Calls the openDAQ C function `daqComponentStatusContainer_getStatus()`.
    pub fn status(&self, name: &str) -> Result<Option<Enumeration>> {
        let __name = crate::marshal::make_string(name)?;
        let mut __value: *mut sys::daqEnumeration = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentStatusContainer_getStatus)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, &mut __value) };
        check(__code, "daqComponentStatusContainer_getStatus")?;
        Ok(unsafe { crate::marshal::take_object::<Enumeration>(__value as *mut _) })
    }

    /// Gets the status message of Component status with a given name.
    ///
    /// # Parameters
    /// - `name`: The name of Component status.
    ///
    /// # Returns
    /// - `message`: The current message of Component status.
    ///
    /// Calls the openDAQ C function `daqComponentStatusContainer_getStatusMessage()`.
    pub fn status_message(&self, name: &str) -> Result<String> {
        let __name = crate::marshal::make_string(name)?;
        let mut __message: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentStatusContainer_getStatusMessage)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, &mut __message) };
        check(__code, "daqComponentStatusContainer_getStatusMessage")?;
        Ok(unsafe { crate::marshal::take_string(__message) })
    }

    /// Gets the current values of all Component statuses.
    ///
    /// # Returns
    /// - `statuses`: The Component statuses as a dictionary. All objects in the statuses dictionary are key value pairs of \<IString, IEnumeration\>.
    ///
    /// Calls the openDAQ C function `daqComponentStatusContainer_getStatuses()`.
    pub fn statuses(&self) -> Result<std::collections::HashMap<String, Enumeration>> {
        let mut __statuses: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentStatusContainer_getStatuses)(self.as_raw() as *mut _, &mut __statuses) };
        check(__code, "daqComponentStatusContainer_getStatuses")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Enumeration>(__statuses as *mut _, "daqComponentStatusContainer_getStatuses") }?)
    }

}

impl ComponentTypeBuilder {
    /// Builds and returns a Component type object using the currently set values of the Builder.
    ///
    /// # Returns
    /// - `component_type`: The built Component type. Depending on the set "sort" builder parameter, a different Component type is created - eg. Streaming type, Device type, Function block type, or Server type
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_build()`.
    pub fn build(&self) -> Result<Option<ComponentType>> {
        let mut __component_type: *mut sys::daqComponentType = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_build)(self.as_raw() as *mut _, &mut __component_type) };
        check(__code, "daqComponentTypeBuilder_build")?;
        Ok(unsafe { crate::marshal::take_object::<ComponentType>(__component_type as *mut _) })
    }

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

    /// Creates a ComponentTypeBuilder with the type sort set to "Device".
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_createDeviceTypeBuilder()`.
    pub fn device() -> Result<ComponentTypeBuilder> {
        let mut __obj: *mut sys::daqComponentTypeBuilder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_createDeviceTypeBuilder)(&mut __obj) };
        check(__code, "daqComponentTypeBuilder_createDeviceTypeBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<ComponentTypeBuilder>(__obj as *mut _, "daqComponentTypeBuilder_createDeviceTypeBuilder") }?)
    }

    /// Creates a ComponentTypeBuilder with the type sort set to "FunctionBlock".
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_createFunctionBlockTypeBuilder()`.
    pub fn function_block() -> Result<ComponentTypeBuilder> {
        let mut __obj: *mut sys::daqComponentTypeBuilder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_createFunctionBlockTypeBuilder)(&mut __obj) };
        check(__code, "daqComponentTypeBuilder_createFunctionBlockTypeBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<ComponentTypeBuilder>(__obj as *mut _, "daqComponentTypeBuilder_createFunctionBlockTypeBuilder") }?)
    }

    /// Creates a ComponentTypeBuilder with the type sort set to "Server".
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_createServerTypeBuilder()`.
    pub fn server() -> Result<ComponentTypeBuilder> {
        let mut __obj: *mut sys::daqComponentTypeBuilder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_createServerTypeBuilder)(&mut __obj) };
        check(__code, "daqComponentTypeBuilder_createServerTypeBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<ComponentTypeBuilder>(__obj as *mut _, "daqComponentTypeBuilder_createServerTypeBuilder") }?)
    }

    /// Creates a ComponentTypeBuilder with the type sort set to "Streaming".
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_createStreamingTypeBuilder()`.
    pub fn streaming() -> Result<ComponentTypeBuilder> {
        let mut __obj: *mut sys::daqComponentTypeBuilder = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_createStreamingTypeBuilder)(&mut __obj) };
        check(__code, "daqComponentTypeBuilder_createStreamingTypeBuilder")?;
        Ok(unsafe { crate::marshal::require_object::<ComponentTypeBuilder>(__obj as *mut _, "daqComponentTypeBuilder_createStreamingTypeBuilder") }?)
    }

    /// Calls the openDAQ C function `daqComponentTypeBuilder_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().daqComponentTypeBuilder_getConnectionStringPrefix)(self.as_raw() as *mut _, &mut __prefix) };
        check(__code, "daqComponentTypeBuilder_getConnectionStringPrefix")?;
        Ok(unsafe { crate::marshal::take_string(__prefix) })
    }

    /// Gets the default configuration object that will be cloned and passed to users by the built Component type when requested.
    ///
    /// # Returns
    /// - `default_config`: The default configuration object. Configuration objects are property object with user-defined key-value pairs. For example: Port=1000, OutputRate=5000, ...
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_getDefaultConfig()`.
    pub fn default_config(&self) -> Result<Option<PropertyObject>> {
        let mut __default_config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_getDefaultConfig)(self.as_raw() as *mut _, &mut __default_config) };
        check(__code, "daqComponentTypeBuilder_getDefaultConfig")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__default_config as *mut _) })
    }

    /// Gets the description of a component type.
    ///
    /// # Returns
    /// - `description`: The description of a component type. A short description of a component type and the associated configuration parameters it offers.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_getDescription()`.
    pub fn description(&self) -> Result<String> {
        let mut __description: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_getDescription)(self.as_raw() as *mut _, &mut __description) };
        check(__code, "daqComponentTypeBuilder_getDescription")?;
        Ok(unsafe { crate::marshal::take_string(__description) })
    }

    /// Gets the unique component type id.
    ///
    /// # Returns
    /// - `id`: The unique id of a component type. Unique id should not be presented on the UI.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_getId()`.
    pub fn id(&self) -> Result<String> {
        let mut __id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_getId)(self.as_raw() as *mut _, &mut __id) };
        check(__code, "daqComponentTypeBuilder_getId")?;
        Ok(unsafe { crate::marshal::take_string(__id) })
    }

    /// Gets the user-friendly name of a component type.
    ///
    /// # Returns
    /// - `name`: The user-friendly name of a component type. Name is usually presented on the UI. Does not have to be unique.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_getName()`.
    pub fn name(&self) -> Result<String> {
        let mut __name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_getName)(self.as_raw() as *mut _, &mut __name) };
        check(__code, "daqComponentTypeBuilder_getName")?;
        Ok(unsafe { crate::marshal::take_string(__name) })
    }

    /// Gets the component type sort. Can be either Streaming, Function block, Device, or Server. Depending on the setting, the corresponding Component type object will be built.
    ///
    /// # Parameters
    /// - `sort`: The sort of the component type.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_getTypeSort()`.
    pub fn type_sort(&self) -> Result<ComponentTypeSort> {
        let mut __sort: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_getTypeSort)(self.as_raw() as *mut _, &mut __sort) };
        check(__code, "daqComponentTypeBuilder_getTypeSort")?;
        Ok(crate::marshal::enum_out(ComponentTypeSort::from_raw(__sort), "daqComponentTypeBuilder_getTypeSort")?)
    }

    /// Calls the openDAQ C function `daqComponentTypeBuilder_setConnectionStringPrefix()`.
    pub fn set_connection_string_prefix(&self, prefix: &str) -> Result<()> {
        let __prefix = crate::marshal::make_string(prefix)?;
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_setConnectionStringPrefix)(self.as_raw() as *mut _, __prefix.as_ptr() as *mut _) };
        check(__code, "daqComponentTypeBuilder_setConnectionStringPrefix")?;
        Ok(())
    }

    /// Sets the default configuration object that will be cloned and passed to users by the built Component type when requested.
    ///
    /// # Parameters
    /// - `default_config`: The default configuration object. Configuration objects are property object with user-defined key-value pairs. For example: Port=1000, OutputRate=5000, ...
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_setDefaultConfig()`.
    pub fn set_default_config(&self, default_config: &PropertyObject) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_setDefaultConfig)(self.as_raw() as *mut _, default_config.as_raw() as *mut _) };
        check(__code, "daqComponentTypeBuilder_setDefaultConfig")?;
        Ok(())
    }

    /// Sets the description of a component type.
    ///
    /// # Parameters
    /// - `description`: The description of a component type. A short description of a component type and the associated configuration parameters it offers.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_setDescription()`.
    pub fn set_description(&self, description: &str) -> Result<()> {
        let __description = crate::marshal::make_string(description)?;
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_setDescription)(self.as_raw() as *mut _, __description.as_ptr() as *mut _) };
        check(__code, "daqComponentTypeBuilder_setDescription")?;
        Ok(())
    }

    /// Sets the unique component type id.
    ///
    /// # Parameters
    /// - `id`: The unique id of a component type. Unique id should not be presented on the UI.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_setId()`.
    pub fn set_id(&self, id: &str) -> Result<()> {
        let __id = crate::marshal::make_string(id)?;
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_setId)(self.as_raw() as *mut _, __id.as_ptr() as *mut _) };
        check(__code, "daqComponentTypeBuilder_setId")?;
        Ok(())
    }

    /// Sets the user-friendly name of a component type.
    ///
    /// # Parameters
    /// - `name`: The user-friendly name of a component type. Name is usually presented on the UI. Does not have to be unique.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_setName()`.
    pub fn set_name(&self, name: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_setName)(self.as_raw() as *mut _, __name.as_ptr() as *mut _) };
        check(__code, "daqComponentTypeBuilder_setName")?;
        Ok(())
    }

    /// Sets the component type sort. Can be either Streaming, Function block, Device, or Server. Depending on the setting, the corresponding Component type object will be built.
    ///
    /// # Parameters
    /// - `sort`: The sort of the component type.
    ///
    /// Calls the openDAQ C function `daqComponentTypeBuilder_setTypeSort()`.
    pub fn set_type_sort(&self, sort: ComponentTypeSort) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentTypeBuilder_setTypeSort)(self.as_raw() as *mut _, sort as u32) };
        check(__code, "daqComponentTypeBuilder_setTypeSort")?;
        Ok(())
    }

}

impl ComponentTypePrivate {
    /// Sets the module information.
    ///
    /// # Parameters
    /// - `info`: The module information.
    ///
    /// Calls the openDAQ C function `daqComponentTypePrivate_setModuleInfo()`.
    pub fn set_module_info(&self, info: &ModuleInfo) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentTypePrivate_setModuleInfo)(self.as_raw() as *mut _, info.as_raw() as *mut _) };
        check(__code, "daqComponentTypePrivate_setModuleInfo")?;
        Ok(())
    }

}

impl ComponentType {
    /// The function clones and returns default configuration. On each call, we need to create new object, because we want that each instance of the component has its own configuration object.
    ///
    /// # Returns
    /// - `default_config`: Newly created configuration object. Configuration objects are property object with user-defined key-value pairs. For example: Port=1000, OutputRate=5000, ...
    ///
    /// Calls the openDAQ C function `daqComponentType_createDefaultConfig()`.
    pub fn create_default_config(&self) -> Result<Option<PropertyObject>> {
        let mut __default_config: *mut sys::daqPropertyObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentType_createDefaultConfig)(self.as_raw() as *mut _, &mut __default_config) };
        check(__code, "daqComponentType_createDefaultConfig")?;
        Ok(unsafe { crate::marshal::take_object::<PropertyObject>(__default_config as *mut _) })
    }

    /// Gets the description of a component type.
    ///
    /// # Returns
    /// - `description`: The description of a component type. A short description of a component type and the associated configuration parameters it offers.
    ///
    /// Calls the openDAQ C function `daqComponentType_getDescription()`.
    pub fn description(&self) -> Result<String> {
        let mut __description: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentType_getDescription)(self.as_raw() as *mut _, &mut __description) };
        check(__code, "daqComponentType_getDescription")?;
        Ok(unsafe { crate::marshal::take_string(__description) })
    }

    /// Gets the unique component type id.
    ///
    /// # Returns
    /// - `id`: The unique id of a component type. Unique id should not be presented on the UI.
    ///
    /// Calls the openDAQ C function `daqComponentType_getId()`.
    pub fn id(&self) -> Result<String> {
        let mut __id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentType_getId)(self.as_raw() as *mut _, &mut __id) };
        check(__code, "daqComponentType_getId")?;
        Ok(unsafe { crate::marshal::take_string(__id) })
    }

    /// Retrieves the module information.
    ///
    /// # Returns
    /// - `info`: The module information.
    ///
    /// Calls the openDAQ C function `daqComponentType_getModuleInfo()`.
    pub fn module_info(&self) -> Result<Option<ModuleInfo>> {
        let mut __info: *mut sys::daqModuleInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentType_getModuleInfo)(self.as_raw() as *mut _, &mut __info) };
        check(__code, "daqComponentType_getModuleInfo")?;
        Ok(unsafe { crate::marshal::take_object::<ModuleInfo>(__info as *mut _) })
    }

    /// Gets the user-friendly name of a component type.
    ///
    /// # Returns
    /// - `name`: The user-friendly name of a component type. Name is usually presented on the UI. Does not have to be unique.
    ///
    /// Calls the openDAQ C function `daqComponentType_getName()`.
    pub fn name(&self) -> Result<String> {
        let mut __name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentType_getName)(self.as_raw() as *mut _, &mut __name) };
        check(__code, "daqComponentType_getName")?;
        Ok(unsafe { crate::marshal::take_string(__name) })
    }

}

impl ComponentUpdateContext {
    /// Adds a device remapping from the original device's local ID to the new device local ID.
    ///
    /// # Parameters
    /// - `original_device_id`: The local ID of the original device to be remapped.
    /// - `new_device_id`: The local ID of the new device to be used for remapping. Used to remap signal -\> input port connections to the remapped device when loading.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_addDeviceRemapping()`.
    pub fn add_device_remapping(&self, original_device_id: &str, new_device_id: &str) -> Result<()> {
        let __original_device_id = crate::marshal::make_string(original_device_id)?;
        let __new_device_id = crate::marshal::make_string(new_device_id)?;
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_addDeviceRemapping)(self.as_raw() as *mut _, __original_device_id.as_ptr() as *mut _, __new_device_id.as_ptr() as *mut _) };
        check(__code, "daqComponentUpdateContext_addDeviceRemapping")?;
        Ok(())
    }

    /// Gets the DeviceUpdateOptions object for the device with the specified local ID. Returns null if no options are found for the device.
    ///
    /// # Parameters
    /// - `local_id`: The local ID of the device to get the options for.
    /// - `options`: The DeviceUpdateOptions object for the device with the specified local ID; null if no options are found for the device.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_getDeviceUpdateOptionsWithLocalIdOrNull()`.
    pub fn device_update_options_with_local_id_or_null(&self, local_id: &str) -> Result<Option<DeviceUpdateOptions>> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __options: *mut sys::daqDeviceUpdateOptions = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_getDeviceUpdateOptionsWithLocalIdOrNull)(self.as_raw() as *mut _, __local_id.as_ptr() as *mut _, &mut __options) };
        check(__code, "daqComponentUpdateContext_getDeviceUpdateOptionsWithLocalIdOrNull")?;
        Ok(unsafe { crate::marshal::take_object::<DeviceUpdateOptions>(__options as *mut _) })
    }

    /// Gets the dictionary with key-value pairs of input port local IDs and signal IDs for the specified parent component.
    ///
    /// # Parameters
    /// - `parent_id`: The ID of the parent component.
    ///
    /// # Returns
    /// - `connections`: The connections to the input ports.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_getInputPortConnections()`.
    pub fn input_port_connections(&self, parent_id: &str) -> Result<std::collections::HashMap<String, String>> {
        let __parent_id = crate::marshal::make_string(parent_id)?;
        let mut __connections: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_getInputPortConnections)(self.as_raw() as *mut _, __parent_id.as_ptr() as *mut _, &mut __connections) };
        check(__code, "daqComponentUpdateContext_getInputPortConnections")?;
        Ok(unsafe { crate::marshal::take_dict::<String, String>(__connections as *mut _, "daqComponentUpdateContext_getInputPortConnections") }?)
    }

    /// Calls the openDAQ C function `daqComponentUpdateContext_getInternalState()`.
    pub fn internal_state(&self) -> Result<std::collections::HashMap<String, Value>> {
        let mut __state: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_getInternalState)(self.as_raw() as *mut _, &mut __state) };
        check(__code, "daqComponentUpdateContext_getInternalState")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Value>(__state as *mut _, "daqComponentUpdateContext_getInternalState") }?)
    }

    /// Gets the root component of the current component.
    ///
    /// # Returns
    /// - `root_component`: The root component.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_getRootComponent()`.
    pub fn root_component(&self) -> Result<Option<Component>> {
        let mut __root_component: *mut sys::daqComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_getRootComponent)(self.as_raw() as *mut _, &mut __root_component) };
        check(__code, "daqComponentUpdateContext_getRootComponent")?;
        Ok(unsafe { crate::marshal::take_object::<Component>(__root_component as *mut _) })
    }

    /// Gets the signal by the specified parent and port ID.
    ///
    /// # Parameters
    /// - `parent_id`: The ID of the parent component.
    /// - `port_id`: The ID of the input port.
    ///
    /// # Returns
    /// - `signal`: The found signal. If signal is not found signal is set to nullptr.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_getSignal()`.
    pub fn signal(&self, parent_id: &str, port_id: &str) -> Result<Option<Signal>> {
        let __parent_id = crate::marshal::make_string(parent_id)?;
        let __port_id = crate::marshal::make_string(port_id)?;
        let mut __signal: *mut sys::daqSignal = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_getSignal)(self.as_raw() as *mut _, __parent_id.as_ptr() as *mut _, __port_id.as_ptr() as *mut _, &mut __signal) };
        check(__code, "daqComponentUpdateContext_getSignal")?;
        Ok(unsafe { crate::marshal::take_object::<Signal>(__signal as *mut _) })
    }

    /// Gets the update parameters provided by the user through the `update` call.
    ///
    /// # Parameters
    /// - `update_parameters`: The update parameters.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_getUpdateParameters()`.
    pub fn update_parameters(&self) -> Result<Option<UpdateParameters>> {
        let mut __update_parameters: *mut sys::daqUpdateParameters = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_getUpdateParameters)(self.as_raw() as *mut _, &mut __update_parameters) };
        check(__code, "daqComponentUpdateContext_getUpdateParameters")?;
        Ok(unsafe { crate::marshal::take_object::<UpdateParameters>(__update_parameters as *mut _) })
    }

    /// Overrides the internal context state with that of another.
    ///
    /// # Parameters
    /// - `update_context`: The context with which the object is to be overridden.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_overrideState()`.
    pub fn override_state(&self, update_context: &ComponentUpdateContext) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_overrideState)(self.as_raw() as *mut _, update_context.as_raw() as *mut _) };
        check(__code, "daqComponentUpdateContext_overrideState")?;
        Ok(())
    }

    /// Internal method that uses the device mapping to remap the input port connections.
    /// Should be called after the initial update, but before `onUpdatableUpdateEnd`.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_remapInputPortConnections()`.
    pub fn remap_input_port_connections(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_remapInputPortConnections)(self.as_raw() as *mut _) };
        check(__code, "daqComponentUpdateContext_remapInputPortConnections")?;
        Ok(())
    }

    /// Removes the connection to the input port for the specified parent component.
    ///
    /// # Parameters
    /// - `parent_id`: The ID of the parent component.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_removeInputPortConnection()`.
    pub fn remove_input_port_connection(&self, parent_id: &str) -> Result<()> {
        let __parent_id = crate::marshal::make_string(parent_id)?;
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_removeInputPortConnection)(self.as_raw() as *mut _, __parent_id.as_ptr() as *mut _) };
        check(__code, "daqComponentUpdateContext_removeInputPortConnection")?;
        Ok(())
    }

    /// Sets signal connection to the input port for the specified parent component which is usualy a function block.
    ///
    /// # Parameters
    /// - `parent_id`: The ID of the parent component.
    /// - `port_id`: The ID of the input port.
    /// - `signal_id`: The ID of the signal.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_setInputPortConnection()`.
    pub fn set_input_port_connection(&self, parent_id: &str, port_id: &str, signal_id: &str) -> Result<()> {
        let __parent_id = crate::marshal::make_string(parent_id)?;
        let __port_id = crate::marshal::make_string(port_id)?;
        let __signal_id = crate::marshal::make_string(signal_id)?;
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_setInputPortConnection)(self.as_raw() as *mut _, __parent_id.as_ptr() as *mut _, __port_id.as_ptr() as *mut _, __signal_id.as_ptr() as *mut _) };
        check(__code, "daqComponentUpdateContext_setInputPortConnection")?;
        Ok(())
    }

    /// Sets the root component of the current component. Iterates through the parent components until the root is found and sets it as the root component for the context.
    ///
    /// # Parameters
    /// - `base_component`: The base component from which we iterate to the openDAQ root. This method shortcuts the need for callers to provide the openDAQ root device as the component, by automatically iterating to the root component from any component in the hierarchy.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_setRootComponent()`.
    pub fn set_root_component(&self, root_component: &Component) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_setRootComponent)(self.as_raw() as *mut _, root_component.as_raw() as *mut _) };
        check(__code, "daqComponentUpdateContext_setRootComponent")?;
        Ok(())
    }

    /// Sets the signal dependency to the function block.
    ///
    /// # Parameters
    /// - `signal_id`: The ID of the signal.
    /// - `parent_id`: The ID of the parent component.
    ///
    /// Calls the openDAQ C function `daqComponentUpdateContext_setSignalDependency()`.
    pub fn set_signal_dependency(&self, signal_id: &str, parent_id: &str) -> Result<()> {
        let __signal_id = crate::marshal::make_string(signal_id)?;
        let __parent_id = crate::marshal::make_string(parent_id)?;
        let __code = unsafe { (crate::sys::api().daqComponentUpdateContext_setSignalDependency)(self.as_raw() as *mut _, __signal_id.as_ptr() as *mut _, __parent_id.as_ptr() as *mut _) };
        check(__code, "daqComponentUpdateContext_setSignalDependency")?;
        Ok(())
    }

}

impl Component {
    /// Creates a component.
    ///
    /// # Parameters
    /// - `context`: The Context. Most often the creating function-block/device passes its own Context to the Folder.
    /// - `parent`: The parent component.
    /// - `local_id`: The local ID of the component.
    ///
    /// Calls the openDAQ C function `daqComponent_createComponent()`.
    pub fn new(context: &Context, parent: Option<&Component>, local_id: &str, class_name: Option<&str>) -> Result<Component> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let __class_name = match class_name { Some(s) => Some(crate::marshal::make_string(s)?), None => None };
        let mut __obj: *mut sys::daqComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_createComponent)(&mut __obj, context.as_raw() as *mut _, parent.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _), __local_id.as_ptr() as *mut _, __class_name.as_ref().map_or(std::ptr::null_mut(), |r| r.as_ptr()) as *mut _) };
        check(__code, "daqComponent_createComponent")?;
        Ok(unsafe { crate::marshal::require_object::<Component>(__obj as *mut _, "daqComponent_createComponent") }?)
    }

    /// Finds the component (signal/device/function block) with the specified (global) id.
    ///
    /// # Parameters
    /// - `id`: The id of the component to search for.
    ///
    /// # Returns
    /// - `out_component`: The resulting component. If the component parameter is true, the starting component is the root device. The id provided should be in relative form from the starting component. E.g., to find a signal in the starting component, the id should be in the form of "Dev/dev_id/Ch/ch_id/Sig/sig_id.
    ///
    /// Calls the openDAQ C function `daqComponent_findComponent()`.
    pub fn find_component(&self, id: &str) -> Result<Option<Component>> {
        let __id = crate::marshal::make_string(id)?;
        let mut __out_component: *mut sys::daqComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_findComponent)(self.as_raw() as *mut _, __id.as_ptr() as *mut _, &mut __out_component) };
        check(__code, "daqComponent_findComponent")?;
        Ok(unsafe { crate::marshal::take_object::<Component>(__out_component as *mut _) })
    }

    /// Returns true if the component is active; false otherwise.
    ///
    /// # Returns
    /// - `active`: True if the component is active; false otherwise. A component is active if its local active state is true and its parent is active. An active component acquires data, performs calculations and send packets on the signal path.
    ///
    /// Calls the openDAQ C function `daqComponent_getActive()`.
    pub fn active(&self) -> Result<bool> {
        let mut __active: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqComponent_getActive)(self.as_raw() as *mut _, &mut __active) };
        check(__code, "daqComponent_getActive")?;
        Ok(__active != 0)
    }

    /// Gets the context object.
    ///
    /// # Returns
    /// - `context`: The context object.
    ///
    /// Calls the openDAQ C function `daqComponent_getContext()`.
    pub fn context(&self) -> Result<Option<Context>> {
        let mut __context: *mut sys::daqContext = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getContext)(self.as_raw() as *mut _, &mut __context) };
        check(__code, "daqComponent_getContext")?;
        Ok(unsafe { crate::marshal::take_object::<Context>(__context as *mut _) })
    }

    /// Gets the description of the component.
    ///
    /// # Returns
    /// - `description`: The description of the component. Empty if not configured. The object that implements this interface defines how the description is specified.
    ///
    /// Calls the openDAQ C function `daqComponent_getDescription()`.
    pub fn description(&self) -> Result<String> {
        let mut __description: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getDescription)(self.as_raw() as *mut _, &mut __description) };
        check(__code, "daqComponent_getDescription")?;
        Ok(unsafe { crate::marshal::take_string(__description) })
    }

    /// Gets the global ID of the component.
    ///
    /// # Returns
    /// - `global_id`: The global ID of the component. Represents the identifier that is globally unique. Globally unique identifier is composed from local identifiers from the parent components separated by '/' character. Device component must make sure that its ID is globally unique.
    ///
    /// Calls the openDAQ C function `daqComponent_getGlobalId()`.
    pub fn global_id(&self) -> Result<String> {
        let mut __global_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getGlobalId)(self.as_raw() as *mut _, &mut __global_id) };
        check(__code, "daqComponent_getGlobalId")?;
        Ok(unsafe { crate::marshal::take_string(__global_id) })
    }

    /// Returns true if the component is local active; false otherwise.
    ///
    /// # Returns
    /// - `local_active`: True if the component is local active; false otherwise. An active component acquires data, performs calculations and send packets on the signal path. Note that is local active is True, the component may still be inactive if its parents are inactive.
    ///
    /// Calls the openDAQ C function `daqComponent_getLocalActive()`.
    pub fn local_active(&self) -> Result<bool> {
        let mut __local_active: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqComponent_getLocalActive)(self.as_raw() as *mut _, &mut __local_active) };
        check(__code, "daqComponent_getLocalActive")?;
        Ok(__local_active != 0)
    }

    /// Gets the local ID of the component.
    ///
    /// # Returns
    /// - `local_id`: The local ID of the component. Represents the identifier that is unique in a relation to the parent component. There is no predefined format for local ID. It is a string defined by its parent component.
    ///
    /// Calls the openDAQ C function `daqComponent_getLocalId()`.
    pub fn local_id(&self) -> Result<String> {
        let mut __local_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getLocalId)(self.as_raw() as *mut _, &mut __local_id) };
        check(__code, "daqComponent_getLocalId")?;
        Ok(unsafe { crate::marshal::take_string(__local_id) })
    }

    /// Gets a list of the component's locked attributes. The locked attributes cannot be modified via their respective setters.
    ///
    /// # Returns
    /// - `attributes`: A list of strings containing the names of locked attributes in capital case (eg. "Name", "Description").
    ///
    /// Calls the openDAQ C function `daqComponent_getLockedAttributes()`.
    pub fn locked_attributes(&self) -> Result<Vec<String>> {
        let mut __attributes: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getLockedAttributes)(self.as_raw() as *mut _, &mut __attributes) };
        check(__code, "daqComponent_getLockedAttributes")?;
        Ok(unsafe { crate::marshal::take_list::<String>(__attributes as *mut _, "daqComponent_getLockedAttributes") }?)
    }

    /// Gets the name of the component.
    ///
    /// # Returns
    /// - `name`: The name of the component. Local ID if name is not configured. The object that implements this interface defines how the name is specified.
    ///
    /// Calls the openDAQ C function `daqComponent_getName()`.
    pub fn name(&self) -> Result<String> {
        let mut __name: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getName)(self.as_raw() as *mut _, &mut __name) };
        check(__code, "daqComponent_getName")?;
        Ok(unsafe { crate::marshal::take_string(__name) })
    }

    /// Gets the Core Event object that triggers whenever a change to this component happens within the openDAQ core structure.
    ///
    /// # Returns
    /// - `event`: The Core Event object. The event triggers with a Component reference and a CoreEventArgs object as arguments. The Core Event is triggered on various changes to the openDAQ Components. This includes changes to property values, addition/removal of child components, connecting signals to input ports and others. The event type can be identified via the event ID available within the CoreEventArgs object. Each event type has a set of predetermined parameters available in the `parameters` field of the arguments. These can be used by any openDAQ server, or other listener to react to changes within the core structure.
    ///
    /// Calls the openDAQ C function `daqComponent_getOnComponentCoreEvent()`.
    pub fn on_component_core_event(&self) -> Result<Option<Event>> {
        let mut __event: *mut sys::daqEvent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getOnComponentCoreEvent)(self.as_raw() as *mut _, &mut __event) };
        check(__code, "daqComponent_getOnComponentCoreEvent")?;
        Ok(unsafe { crate::marshal::take_object::<Event>(__event as *mut _) })
    }

    /// Gets the operation mode of the device.
    ///
    /// # Returns
    /// - `mode_type`: The current operation mode.
    ///
    /// Calls the openDAQ C function `daqComponent_getOperationMode()`.
    pub fn operation_mode(&self) -> Result<OperationModeType> {
        let mut __mode_type: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqComponent_getOperationMode)(self.as_raw() as *mut _, &mut __mode_type) };
        check(__code, "daqComponent_getOperationMode")?;
        Ok(crate::marshal::enum_out(OperationModeType::from_raw(__mode_type), "daqComponent_getOperationMode")?)
    }

    /// Gets the parent of the component.
    ///
    /// # Returns
    /// - `parent`: The parent of the component. Every openDAQ component has a parent, except for instance. Parent should be passed as a parameter to the constructor/factory. Once the component is created, the parent cannot be changed.
    ///
    /// Calls the openDAQ C function `daqComponent_getParent()`.
    pub fn parent(&self) -> Result<Option<Component>> {
        let mut __parent: *mut sys::daqComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getParent)(self.as_raw() as *mut _, &mut __parent) };
        check(__code, "daqComponent_getParent")?;
        Ok(unsafe { crate::marshal::take_object::<Component>(__parent as *mut _) })
    }

    /// Returns true if the component's parent is active; false otherwise.
    ///
    /// # Returns
    /// - `parent_active`: True if the component's parent is active; false otherwise.
    ///
    /// Calls the openDAQ C function `daqComponent_getParentActive()`.
    pub fn parent_active(&self) -> Result<bool> {
        let mut __parent_active: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqComponent_getParentActive)(self.as_raw() as *mut _, &mut __parent_active) };
        check(__code, "daqComponent_getParentActive")?;
        Ok(__parent_active != 0)
    }

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

    /// Gets the tags of the component.
    ///
    /// # Returns
    /// - `tags`: The tags of the component. Tags are user definable labels that can be attached to the component.
    ///
    /// Calls the openDAQ C function `daqComponent_getTags()`.
    pub fn tags(&self) -> Result<Option<Tags>> {
        let mut __tags: *mut sys::daqTags = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqComponent_getTags)(self.as_raw() as *mut _, &mut __tags) };
        check(__code, "daqComponent_getTags")?;
        Ok(unsafe { crate::marshal::take_object::<Tags>(__tags as *mut _) })
    }

    /// Gets `visible` metadata state of the component
    ///
    /// # Returns
    /// - `visible`: True if the component is visible; False otherwise. Visible determines whether search/getter methods return find the component by default.
    ///
    /// Calls the openDAQ C function `daqComponent_getVisible()`.
    pub fn visible(&self) -> Result<bool> {
        let mut __visible: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqComponent_getVisible)(self.as_raw() as *mut _, &mut __visible) };
        check(__code, "daqComponent_getVisible")?;
        Ok(__visible != 0)
    }

    /// Sets the component to be either active or inactive. Sets the local active state and notifies children about the parent active state change.
    ///
    /// # Parameters
    /// - `active`: The new local active state of the component.
    ///
    /// # Errors
    /// - `OPENDAQ_IGNORED`: if "Active" is part of the component's list of locked attributes, or if the new active value is equal to the previous. An active component acquires data, performs calculations and send packets on the signal path.
    ///
    /// Calls the openDAQ C function `daqComponent_setActive()`.
    pub fn set_active(&self, active: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponent_setActive)(self.as_raw() as *mut _, u8::from(active)) };
        check(__code, "daqComponent_setActive")?;
        Ok(())
    }

    /// Sets the description of the component.
    ///
    /// # Parameters
    /// - `description`: The description of the component.
    ///
    /// # Errors
    /// - `OPENDAQ_IGNORED`: if "Description" is part of the component's list of locked attributes, or if the new description value is equal to the previous. The object that implements this interface defines how the description is specified.
    ///
    /// Calls the openDAQ C function `daqComponent_setDescription()`.
    pub fn set_description(&self, description: &str) -> Result<()> {
        let __description = crate::marshal::make_string(description)?;
        let __code = unsafe { (crate::sys::api().daqComponent_setDescription)(self.as_raw() as *mut _, __description.as_ptr() as *mut _) };
        check(__code, "daqComponent_setDescription")?;
        Ok(())
    }

    /// Sets the name of the component.
    ///
    /// # Parameters
    /// - `name`: The name of the component.
    ///
    /// # Errors
    /// - `OPENDAQ_IGNORED`: if "Name" is part of the component's list of locked attributes, or if the new name value is equal to the previous. The object that implements this interface defines how the name is specified.
    ///
    /// Calls the openDAQ C function `daqComponent_setName()`.
    pub fn set_name(&self, name: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqComponent_setName)(self.as_raw() as *mut _, __name.as_ptr() as *mut _) };
        check(__code, "daqComponent_setName")?;
        Ok(())
    }

    /// Sets `visible` attribute state of the component
    ///
    /// # Parameters
    /// - `visible`: True if the component is visible; False otherwise.
    ///
    /// # Errors
    /// - `OPENDAQ_IGNORED`: if "Visible" is part of the component's list of locked attributes. Visible determines whether search/getter methods return find the component by default.
    ///
    /// Calls the openDAQ C function `daqComponent_setVisible()`.
    pub fn set_visible(&self, visible: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqComponent_setVisible)(self.as_raw() as *mut _, u8::from(visible)) };
        check(__code, "daqComponent_setVisible")?;
        Ok(())
    }

}

impl Context {
    /// @ingroup opendaq_context
    /// @addtogroup opendaq_context_factories Factories
    ///
    /// Calls the openDAQ C function `daqContext_createContext()`.
    pub fn new(scheduler: Option<&Scheduler>, logger: &Logger, type_manager: &TypeManager, module_manager: Option<&ModuleManager>, authentication_provider: Option<&AuthenticationProvider>, options: impl Into<Value>, discovery_servers: impl Into<Value>) -> Result<Context> {
        let __options = crate::value::to_daq(&options.into())?;
        let __discovery_servers = crate::value::to_daq(&discovery_servers.into())?;
        let mut __obj: *mut sys::daqContext = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_createContext)(&mut __obj, scheduler.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _), logger.as_raw() as *mut _, type_manager.as_raw() as *mut _, module_manager.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _), authentication_provider.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _), crate::value::opt_ref_ptr(&__options) as *mut _, crate::value::opt_ref_ptr(&__discovery_servers) as *mut _) };
        check(__code, "daqContext_createContext")?;
        Ok(unsafe { crate::marshal::require_object::<Context>(__obj as *mut _, "daqContext_createContext") }?)
    }

    /// Gets the Authentication provider.
    ///
    /// # Returns
    /// - `authentication_provider`: The authentication provider.
    ///
    /// Calls the openDAQ C function `daqContext_getAuthenticationProvider()`.
    pub fn authentication_provider(&self) -> Result<Option<AuthenticationProvider>> {
        let mut __authentication_provider: *mut sys::daqAuthenticationProvider = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getAuthenticationProvider)(self.as_raw() as *mut _, &mut __authentication_provider) };
        check(__code, "daqContext_getAuthenticationProvider")?;
        Ok(unsafe { crate::marshal::take_object::<AuthenticationProvider>(__authentication_provider as *mut _) })
    }

    /// Gets the dictionary of available discovery servers.
    ///
    /// # Returns
    /// - `servers`: The dictionary of available discovery servers.
    ///
    /// Calls the openDAQ C function `daqContext_getDiscoveryServers()`.
    pub fn discovery_servers(&self) -> Result<std::collections::HashMap<String, Value>> {
        let mut __servers: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getDiscoveryServers)(self.as_raw() as *mut _, &mut __servers) };
        check(__code, "daqContext_getDiscoveryServers")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Value>(__servers as *mut _, "daqContext_getDiscoveryServers") }?)
    }

    /// Gets the logger.
    ///
    /// # Returns
    /// - `logger`: The logger.
    ///
    /// Calls the openDAQ C function `daqContext_getLogger()`.
    pub fn logger(&self) -> Result<Option<Logger>> {
        let mut __logger: *mut sys::daqLogger = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getLogger)(self.as_raw() as *mut _, &mut __logger) };
        check(__code, "daqContext_getLogger")?;
        Ok(unsafe { crate::marshal::take_object::<Logger>(__logger as *mut _) })
    }

    /// Gets the Module Manager as a Base Object.
    ///
    /// # Returns
    /// - `manager`: The module manager.
    ///
    /// Calls the openDAQ C function `daqContext_getModuleManager()`.
    pub fn module_manager(&self) -> Result<Value> {
        let mut __manager: *mut sys::daqBaseObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getModuleManager)(self.as_raw() as *mut _, &mut __manager) };
        check(__code, "daqContext_getModuleManager")?;
        Ok(unsafe { crate::value::take_value(__manager, "daqContext_getModuleManager") }?)
    }

    /// Retrieves the options associated with the specified module ID.
    ///
    /// # Parameters
    /// - `module_id`: The identifier of the module for which options are requested.
    ///
    /// # Returns
    /// - `options`: A dictionary containing the options associated with the specified module ID.
    ///
    /// Calls the openDAQ C function `daqContext_getModuleOptions()`.
    pub fn module_options(&self, module_id: &str) -> Result<std::collections::HashMap<String, Value>> {
        let __module_id = crate::marshal::make_string(module_id)?;
        let mut __options: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getModuleOptions)(self.as_raw() as *mut _, __module_id.as_ptr() as *mut _, &mut __options) };
        check(__code, "daqContext_getModuleOptions")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Value>(__options as *mut _, "daqContext_getModuleOptions") }?)
    }

    /// Gets the Core Event object that triggers whenever a change happens within the openDAQ core structure.
    ///
    /// # Returns
    /// - `event`: The Core Event object. The event triggers with a Component reference and a CoreEventArgs object as arguments. The Core Event is triggered on various changes to the openDAQ Components. This includes changes to property values, addition/removal of child components, connecting signals to input ports and others. The event type can be identified via the event ID available within the CoreEventArgs object. Each event type has a set of predetermined parameters available in the `parameters` field of the arguments. These can be used by any openDAQ server, or other listener to react to changes within the core structure.
    ///
    /// Calls the openDAQ C function `daqContext_getOnCoreEvent()`.
    pub fn on_core_event(&self) -> Result<Option<Event>> {
        let mut __event: *mut sys::daqEvent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getOnCoreEvent)(self.as_raw() as *mut _, &mut __event) };
        check(__code, "daqContext_getOnCoreEvent")?;
        Ok(unsafe { crate::marshal::take_object::<Event>(__event as *mut _) })
    }

    /// Gets the dictionary of options
    ///
    /// # Returns
    /// - `options`: The dictionary of options
    ///
    /// Calls the openDAQ C function `daqContext_getOptions()`.
    pub fn options(&self) -> Result<std::collections::HashMap<String, Value>> {
        let mut __options: *mut sys::daqDict = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getOptions)(self.as_raw() as *mut _, &mut __options) };
        check(__code, "daqContext_getOptions")?;
        Ok(unsafe { crate::marshal::take_dict::<String, Value>(__options as *mut _, "daqContext_getOptions") }?)
    }

    /// Gets the scheduler.
    ///
    /// # Returns
    /// - `scheduler`: The scheduler.
    ///
    /// Calls the openDAQ C function `daqContext_getScheduler()`.
    pub fn scheduler(&self) -> Result<Option<Scheduler>> {
        let mut __scheduler: *mut sys::daqScheduler = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getScheduler)(self.as_raw() as *mut _, &mut __scheduler) };
        check(__code, "daqContext_getScheduler")?;
        Ok(unsafe { crate::marshal::take_object::<Scheduler>(__scheduler as *mut _) })
    }

    /// Gets the Type Manager.
    ///
    /// # Returns
    /// - `manager`: The type manager.
    ///
    /// Calls the openDAQ C function `daqContext_getTypeManager()`.
    pub fn type_manager(&self) -> Result<Option<TypeManager>> {
        let mut __manager: *mut sys::daqTypeManager = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqContext_getTypeManager)(self.as_raw() as *mut _, &mut __manager) };
        check(__code, "daqContext_getTypeManager")?;
        Ok(unsafe { crate::marshal::take_object::<TypeManager>(__manager as *mut _) })
    }

}

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

    /// Calls the openDAQ C function `daqDeserializeComponent_deserializeValues()`.
    pub fn deserialize_values(&self, serialized_object: &SerializedObject, context: impl Into<Value>, callback_factory: &FunctionObject) -> Result<()> {
        let __context = crate::value::to_daq(&context.into())?;
        let __code = unsafe { (crate::sys::api().daqDeserializeComponent_deserializeValues)(self.as_raw() as *mut _, serialized_object.as_raw() as *mut _, crate::value::opt_ref_ptr(&__context) as *mut _, callback_factory.as_raw() as *mut _) };
        check(__code, "daqDeserializeComponent_deserializeValues")?;
        Ok(())
    }

    /// Calls the openDAQ C function `daqDeserializeComponent_getDeserializedParameter()`.
    pub fn deserialized_parameter(&self, parameter: &str) -> Result<Value> {
        let __parameter = crate::marshal::make_string(parameter)?;
        let mut __value: *mut sys::daqBaseObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeserializeComponent_getDeserializedParameter)(self.as_raw() as *mut _, __parameter.as_ptr() as *mut _, &mut __value) };
        check(__code, "daqDeserializeComponent_getDeserializedParameter")?;
        Ok(unsafe { crate::value::take_value(__value, "daqDeserializeComponent_getDeserializedParameter") }?)
    }

}

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

    /// Gets the list of child device options for the device. These are used to configure subdevices of the current device.
    ///
    /// # Parameters
    /// - `child_device_options`: The list of child device options for the device.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_getChildDeviceOptions()`.
    pub fn child_device_options(&self) -> Result<Vec<DeviceUpdateOptions>> {
        let mut __child_device_options: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_getChildDeviceOptions)(self.as_raw() as *mut _, &mut __child_device_options) };
        check(__code, "daqDeviceUpdateOptions_getChildDeviceOptions")?;
        Ok(unsafe { crate::marshal::take_list::<DeviceUpdateOptions>(__child_device_options as *mut _, "daqDeviceUpdateOptions_getChildDeviceOptions") }?)
    }

    /// Gets the connection string of the device, as written in the setup string.
    ///
    /// # Parameters
    /// - `connection_string`: The connection string of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_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().daqDeviceUpdateOptions_getConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqDeviceUpdateOptions_getConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the local ID of the device. The local ID is obtained from the JSON key for the device entry.
    ///
    /// # Parameters
    /// - `local_id`: The local ID of the device. The root device might not have the local ID configured. In this case the local ID will be set to "Root".
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_getLocalId()`.
    pub fn local_id(&self) -> Result<String> {
        let mut __local_id: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_getLocalId)(self.as_raw() as *mut _, &mut __local_id) };
        check(__code, "daqDeviceUpdateOptions_getLocalId")?;
        Ok(unsafe { crate::marshal::take_string(__local_id) })
    }

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

    /// Gets the new connection string of the device to be used for remapping.
    ///
    /// # Parameters
    /// - `connection_string`: The new connection string of the device to be used for remapping. The manufacturer and serial number combination has priority over the connection string when remapping.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_getNewConnectionString()`.
    pub fn new_connection_string(&self) -> Result<String> {
        let mut __connection_string: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_getNewConnectionString)(self.as_raw() as *mut _, &mut __connection_string) };
        check(__code, "daqDeviceUpdateOptions_getNewConnectionString")?;
        Ok(unsafe { crate::marshal::take_string(__connection_string) })
    }

    /// Gets the new manufacturer of the device to be used for remapping.
    ///
    /// # Parameters
    /// - `manufacturer`: The new manufacturer of the device to be used for remapping.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_getNewManufacturer()`.
    pub fn new_manufacturer(&self) -> Result<String> {
        let mut __manufacturer: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_getNewManufacturer)(self.as_raw() as *mut _, &mut __manufacturer) };
        check(__code, "daqDeviceUpdateOptions_getNewManufacturer")?;
        Ok(unsafe { crate::marshal::take_string(__manufacturer) })
    }

    /// Gets the new serial number of the device to be used for remapping.
    ///
    /// # Parameters
    /// - `serial_number`: The new serial number of the device to be used for remapping.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_getNewSerialNumber()`.
    pub fn new_serial_number(&self) -> Result<String> {
        let mut __serial_number: *mut sys::daqString = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_getNewSerialNumber)(self.as_raw() as *mut _, &mut __serial_number) };
        check(__code, "daqDeviceUpdateOptions_getNewSerialNumber")?;
        Ok(unsafe { crate::marshal::take_string(__serial_number) })
    }

    /// Gets the serial number of the device, as written in the setup string.
    ///
    /// # Parameters
    /// - `serial_number`: The serial number of the device.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_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().daqDeviceUpdateOptions_getSerialNumber)(self.as_raw() as *mut _, &mut __serial_number) };
        check(__code, "daqDeviceUpdateOptions_getSerialNumber")?;
        Ok(unsafe { crate::marshal::take_string(__serial_number) })
    }

    /// Gets the update mode for the device.
    ///
    /// # Parameters
    /// - `mode`: The update mode for the device.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_getUpdateMode()`.
    pub fn update_mode(&self) -> Result<DeviceUpdateMode> {
        let mut __mode: u32 = 0;
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_getUpdateMode)(self.as_raw() as *mut _, &mut __mode) };
        check(__code, "daqDeviceUpdateOptions_getUpdateMode")?;
        Ok(crate::marshal::enum_out(DeviceUpdateMode::from_raw(__mode), "daqDeviceUpdateOptions_getUpdateMode")?)
    }

    /// Sets the new connection string of the device to be used for remapping.
    ///
    /// # Parameters
    /// - `connection_string`: The new connection string of the device to be used for remapping. The manufacturer and serial number combination has priority over the connection string when remapping.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_setNewConnectionString()`.
    pub fn set_new_connection_string(&self, connection_string: &str) -> Result<()> {
        let __connection_string = crate::marshal::make_string(connection_string)?;
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_setNewConnectionString)(self.as_raw() as *mut _, __connection_string.as_ptr() as *mut _) };
        check(__code, "daqDeviceUpdateOptions_setNewConnectionString")?;
        Ok(())
    }

    /// Sets the new manufacturer of the device to be used for remapping.
    ///
    /// # Parameters
    /// - `manufacturer`: The new manufacturer of the device to be used for remapping.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_setNewManufacturer()`.
    pub fn set_new_manufacturer(&self, manufacturer: &str) -> Result<()> {
        let __manufacturer = crate::marshal::make_string(manufacturer)?;
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_setNewManufacturer)(self.as_raw() as *mut _, __manufacturer.as_ptr() as *mut _) };
        check(__code, "daqDeviceUpdateOptions_setNewManufacturer")?;
        Ok(())
    }

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

    /// Sets the update mode for the device.
    ///
    /// # Parameters
    /// - `mode`: The update mode for the device.
    ///
    /// Calls the openDAQ C function `daqDeviceUpdateOptions_setUpdateMode()`.
    pub fn set_update_mode(&self, mode: DeviceUpdateMode) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqDeviceUpdateOptions_setUpdateMode)(self.as_raw() as *mut _, mode as u32) };
        check(__code, "daqDeviceUpdateOptions_setUpdateMode")?;
        Ok(())
    }

}

impl FolderConfig {
    /// Adds a component to the folder.
    ///
    /// # Parameters
    /// - `item`: The component.
    ///
    /// Calls the openDAQ C function `daqFolderConfig_addItem()`.
    pub fn add_item(&self, item: &Component) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqFolderConfig_addItem)(self.as_raw() as *mut _, item.as_raw() as *mut _) };
        check(__code, "daqFolderConfig_addItem")?;
        Ok(())
    }

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

    /// Creates a folder.
    ///
    /// # Parameters
    /// - `context`: The Context. Most often the creating function-block/device passes its own Context to the Folder.
    /// - `parent`: The parent component.
    /// - `local_id`: The local ID of the component.
    ///
    /// Calls the openDAQ C function `daqFolderConfig_createFolder()`.
    pub fn folder(context: &Context, parent: &Component, local_id: &str) -> Result<FolderConfig> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __obj: *mut sys::daqFolderConfig = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFolderConfig_createFolder)(&mut __obj, context.as_raw() as *mut _, parent.as_raw() as *mut _, __local_id.as_ptr() as *mut _) };
        check(__code, "daqFolderConfig_createFolder")?;
        Ok(unsafe { crate::marshal::require_object::<FolderConfig>(__obj as *mut _, "daqFolderConfig_createFolder") }?)
    }

    /// Creates a folder with an interface ID that must be implemented by its children.
    ///
    /// # Parameters
    /// - `context`: The Context. Most often the creating function-block/device passes its own Context to the Folder.
    /// - `item_type`: The ID of interface that child objects of the folder must implement.
    /// - `parent`: The parent component.
    /// - `local_id`: The local ID of the component.
    ///
    /// Calls the openDAQ C function `daqFolderConfig_createFolderWithItemType()`.
    pub fn folder_with_item_type(item_type: crate::IntfID, context: &Context, parent: &Component, local_id: &str) -> Result<FolderConfig> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __obj: *mut sys::daqFolderConfig = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFolderConfig_createFolderWithItemType)(&mut __obj, item_type, context.as_raw() as *mut _, parent.as_raw() as *mut _, __local_id.as_ptr() as *mut _) };
        check(__code, "daqFolderConfig_createFolderWithItemType")?;
        Ok(unsafe { crate::marshal::require_object::<FolderConfig>(__obj as *mut _, "daqFolderConfig_createFolderWithItemType") }?)
    }

    /// Creates an IO folder.
    ///
    /// # Parameters
    /// - `context`: The Context. Most often the creating function-block/device passes its own Context to the Folder.
    /// - `parent`: The parent component.
    /// - `local_id`: The local ID of the parent. IO folders are folder created by device and may contain only channels and other IO folders.
    ///
    /// Calls the openDAQ C function `daqFolderConfig_createIoFolder()`.
    pub fn io_folder(context: &Context, parent: &Component, local_id: &str) -> Result<FolderConfig> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __obj: *mut sys::daqFolderConfig = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFolderConfig_createIoFolder)(&mut __obj, context.as_raw() as *mut _, parent.as_raw() as *mut _, __local_id.as_ptr() as *mut _) };
        check(__code, "daqFolderConfig_createIoFolder")?;
        Ok(unsafe { crate::marshal::require_object::<FolderConfig>(__obj as *mut _, "daqFolderConfig_createIoFolder") }?)
    }

    /// Removes the item from the folder.
    ///
    /// # Parameters
    /// - `item`: The item component.
    ///
    /// Calls the openDAQ C function `daqFolderConfig_removeItem()`.
    pub fn remove_item(&self, item: &Component) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqFolderConfig_removeItem)(self.as_raw() as *mut _, item.as_raw() as *mut _) };
        check(__code, "daqFolderConfig_removeItem")?;
        Ok(())
    }

    /// Removes the item from the folder using local id of the component.
    ///
    /// # Parameters
    /// - `local_id`: The local id of the component.
    ///
    /// Calls the openDAQ C function `daqFolderConfig_removeItemWithLocalId()`.
    pub fn remove_item_with_local_id(&self, local_id: &str) -> Result<()> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let __code = unsafe { (crate::sys::api().daqFolderConfig_removeItemWithLocalId)(self.as_raw() as *mut _, __local_id.as_ptr() as *mut _) };
        check(__code, "daqFolderConfig_removeItemWithLocalId")?;
        Ok(())
    }

}

impl Folder {
    /// Gets the item component with the specified localId.
    ///
    /// # Parameters
    /// - `local_id`: The local id of the child component.
    ///
    /// # Returns
    /// - `item`: The item component.
    ///
    /// # Errors
    /// - `OPENDAQ_SUCCESS`: if succeeded.
    /// - `OPENDAQ_NOT_FOUND`: if folder with the specified ID not found.
    ///
    /// Calls the openDAQ C function `daqFolder_getItem()`.
    pub fn item(&self, local_id: &str) -> Result<Option<Component>> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __item: *mut sys::daqComponent = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFolder_getItem)(self.as_raw() as *mut _, __local_id.as_ptr() as *mut _, &mut __item) };
        check(__code, "daqFolder_getItem")?;
        Ok(unsafe { crate::marshal::take_object::<Component>(__item as *mut _) })
    }

    /// Gets the list of the items in the folder.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `items`: The list of the items. If searchFilter is not provided, the returned list contains only immediate children with visible set to `true`.
    ///
    /// Calls the openDAQ C function `daqFolder_getItems()`.
    pub fn items(&self) -> Result<Vec<Component>> {
        let mut __items: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFolder_getItems)(self.as_raw() as *mut _, &mut __items, std::ptr::null_mut()) };
        check(__code, "daqFolder_getItems")?;
        Ok(unsafe { crate::marshal::take_list::<Component>(__items as *mut _, "daqFolder_getItems") }?)
    }

    /// Gets the list of the items in the folder.
    ///
    /// # Parameters
    /// - `search_filter`: Provides an optional filter that filters out unwanted components and allows for recursion.
    ///
    /// # Returns
    /// - `items`: The list of the items. If searchFilter is not provided, the returned list contains only immediate children with visible set to `true`.
    ///
    /// Calls the openDAQ C function `daqFolder_getItems()`.
    pub fn items_with(&self, search_filter: Option<&SearchFilter>) -> Result<Vec<Component>> {
        let mut __items: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqFolder_getItems)(self.as_raw() as *mut _, &mut __items, search_filter.map_or(std::ptr::null_mut(), |o| o.as_raw() as *mut _)) };
        check(__code, "daqFolder_getItems")?;
        Ok(unsafe { crate::marshal::take_list::<Component>(__items as *mut _, "daqFolder_getItems") }?)
    }

    /// Returns True if the folder has an item with local ID.
    ///
    /// # Parameters
    /// - `local_id`: The local ID of the item.
    ///
    /// # Returns
    /// - `value`: True if the folder contains item with local ID.
    ///
    /// Calls the openDAQ C function `daqFolder_hasItem()`.
    pub fn has_item(&self, local_id: &str) -> Result<bool> {
        let __local_id = crate::marshal::make_string(local_id)?;
        let mut __value: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqFolder_hasItem)(self.as_raw() as *mut _, __local_id.as_ptr() as *mut _, &mut __value) };
        check(__code, "daqFolder_hasItem")?;
        Ok(__value != 0)
    }

    /// Returns True if the folder is empty.
    ///
    /// # Returns
    /// - `empty`: True if the folder is empty.
    ///
    /// Calls the openDAQ C function `daqFolder_isEmpty()`.
    pub fn is_empty(&self) -> Result<bool> {
        let mut __empty: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqFolder_isEmpty)(self.as_raw() as *mut _, &mut __empty) };
        check(__code, "daqFolder_isEmpty")?;
        Ok(__empty != 0)
    }

}

impl ModuleInfo {
    /// Calls the openDAQ C function `daqModuleInfo_createModuleInfo()`.
    pub fn new(version_info: &VersionInfo, name: &str, id: &str) -> Result<ModuleInfo> {
        let __name = crate::marshal::make_string(name)?;
        let __id = crate::marshal::make_string(id)?;
        let mut __obj: *mut sys::daqModuleInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqModuleInfo_createModuleInfo)(&mut __obj, version_info.as_raw() as *mut _, __name.as_ptr() as *mut _, __id.as_ptr() as *mut _) };
        check(__code, "daqModuleInfo_createModuleInfo")?;
        Ok(unsafe { crate::marshal::require_object::<ModuleInfo>(__obj as *mut _, "daqModuleInfo_createModuleInfo") }?)
    }

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

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

    /// Retrieves the module version information.
    ///
    /// # Returns
    /// - `version`: The semantic version information.
    ///
    /// Calls the openDAQ C function `daqModuleInfo_getVersionInfo()`.
    pub fn version_info(&self) -> Result<Option<VersionInfo>> {
        let mut __version: *mut sys::daqVersionInfo = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqModuleInfo_getVersionInfo)(self.as_raw() as *mut _, &mut __version) };
        check(__code, "daqModuleInfo_getVersionInfo")?;
        Ok(unsafe { crate::marshal::take_object::<VersionInfo>(__version as *mut _) })
    }

}

impl Removable {
    /// Returns True if component was removed.
    ///
    /// # Returns
    /// - `removed`: True if component was removed; otherwise False.
    ///
    /// Calls the openDAQ C function `daqRemovable_isRemoved()`.
    pub fn is_removed(&self) -> Result<bool> {
        let mut __removed: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqRemovable_isRemoved)(self.as_raw() as *mut _, &mut __removed) };
        check(__code, "daqRemovable_isRemoved")?;
        Ok(__removed != 0)
    }

    /// Notifies the component that it is being removed.
    /// Call `remove` on the component to mark it as removed. It's up to the implementation
    /// to define what is does on the act of removal. Basic implementation of `Component`
    /// will switch it to inactive state and it cannot be activated again.
    ///
    /// Calls the openDAQ C function `daqRemovable_remove()`.
    pub fn remove(&self) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqRemovable_remove)(self.as_raw() as *mut _) };
        check(__code, "daqRemovable_remove")?;
        Ok(())
    }

}

impl Signal {
    /// Gets the list of connections to input ports formed by the signal.
    ///
    /// # Returns
    /// - `connections`: The list of connections.
    ///
    /// Calls the openDAQ C function `daqSignal_getConnections()`.
    pub fn connections(&self) -> Result<Vec<Connection>> {
        let mut __connections: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSignal_getConnections)(self.as_raw() as *mut _, &mut __connections) };
        check(__code, "daqSignal_getConnections")?;
        Ok(unsafe { crate::marshal::take_list::<Connection>(__connections as *mut _, "daqSignal_getConnections") }?)
    }

    /// Gets the signal's data descriptor.
    ///
    /// # Returns
    /// - `descriptor`: The signal's data descriptor. The descriptor contains metadata about the signal, providing information about its name, description,... and defines how the data in it's packet's buffers should be interpreted.
    ///
    /// Calls the openDAQ C function `daqSignal_getDescriptor()`.
    pub fn descriptor(&self) -> Result<Option<DataDescriptor>> {
        let mut __descriptor: *mut sys::daqDataDescriptor = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSignal_getDescriptor)(self.as_raw() as *mut _, &mut __descriptor) };
        check(__code, "daqSignal_getDescriptor")?;
        Ok(unsafe { crate::marshal::take_object::<DataDescriptor>(__descriptor as *mut _) })
    }

    /// Gets the signal that carries its domain data.
    ///
    /// # Returns
    /// - `signal`: The domain signal. The domain signal contains domain (most often time) data that is used to interpret a signal's data in a given domain. It has the same sampling rate as the signal.
    ///
    /// Calls the openDAQ C function `daqSignal_getDomainSignal()`.
    pub fn domain_signal(&self) -> Result<Option<Signal>> {
        let mut __signal: *mut sys::daqSignal = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSignal_getDomainSignal)(self.as_raw() as *mut _, &mut __signal) };
        check(__code, "daqSignal_getDomainSignal")?;
        Ok(unsafe { crate::marshal::take_object::<Signal>(__signal as *mut _) })
    }

    /// Gets the signal last value.
    ///
    /// # Returns
    /// - `value`: The IBaseObject value can be a nullptr if there is no value, or if the data type is not supported by the function. If a value is assigned, it can be cast based on the signal description to IFloat if the type is Float32 or Float64, to IInteger if the type is Int8 through Int64 or UInt8 through UInt64, to IComplexNumber if the type is ComplexFloat32 or ComplexFloat64, to IRange if the type is RangeInt64, to IString if the type is String, to IStruct if the type is Struct, and to IList of the forementioned types if there is exactly one dimension. For String type signals in binary data packets, the string data must be encoded as UTF-8 strings. The string length is determined by the sample size, and the string does not need to be null-terminated. The method extracts the string value from the packet data and returns it as an IString object.
    ///
    /// Calls the openDAQ C function `daqSignal_getLastValue()`.
    pub fn last_value(&self) -> Result<Value> {
        let mut __value: *mut sys::daqBaseObject = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSignal_getLastValue)(self.as_raw() as *mut _, &mut __value) };
        check(__code, "daqSignal_getLastValue")?;
        Ok(unsafe { crate::value::take_value(__value, "daqSignal_getLastValue") }?)
    }

    /// Returns true if the signal is public; false otherwise.
    ///
    /// # Returns
    /// - `is_public`: True if the signal is public; false otherwise. Public signals are visible to clients connected to the device, and are streamed.
    ///
    /// Calls the openDAQ C function `daqSignal_getPublic()`.
    pub fn public(&self) -> Result<bool> {
        let mut __is_public: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqSignal_getPublic)(self.as_raw() as *mut _, &mut __is_public) };
        check(__code, "daqSignal_getPublic")?;
        Ok(__is_public != 0)
    }

    /// Gets a list of related signals.
    ///
    /// # Returns
    /// - `signals`: The list of related signals. Signals within the related signals list are facilitate the interpretation of a given signal's data, or are otherwise relevant when working with the signal.
    ///
    /// Calls the openDAQ C function `daqSignal_getRelatedSignals()`.
    pub fn related_signals(&self) -> Result<Vec<Signal>> {
        let mut __signals: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqSignal_getRelatedSignals)(self.as_raw() as *mut _, &mut __signals) };
        check(__code, "daqSignal_getRelatedSignals")?;
        Ok(unsafe { crate::marshal::take_list::<Signal>(__signals as *mut _, "daqSignal_getRelatedSignals") }?)
    }

    /// Returns true if the signal is streamed; false otherwise.
    ///
    /// # Returns
    /// - `streamed`: True if the signal is streamed; false otherwise. A streamed signal receives packets from a streaming server and forwards packets on the signal path. Method always sets `streamed` parameter to False if the signal is local to the current Instance.
    ///
    /// Calls the openDAQ C function `daqSignal_getStreamed()`.
    pub fn streamed(&self) -> Result<bool> {
        let mut __streamed: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqSignal_getStreamed)(self.as_raw() as *mut _, &mut __streamed) };
        check(__code, "daqSignal_getStreamed")?;
        Ok(__streamed != 0)
    }

    /// Sets the signal to be either public or private.
    ///
    /// # Parameters
    /// - `is_public`: If false, the signal is set to private; if true, the signal is set to be public. Public signals are visible to clients connected to the device, and are streamed.
    ///
    /// Calls the openDAQ C function `daqSignal_setPublic()`.
    pub fn set_public(&self, is_public: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqSignal_setPublic)(self.as_raw() as *mut _, u8::from(is_public)) };
        check(__code, "daqSignal_setPublic")?;
        Ok(())
    }

    /// Sets the signal to be either streamed or not.
    ///
    /// # Parameters
    /// - `streamed`: The new streamed state of the signal. A streamed signal receives packets from a streaming server and forwards packets on the signal path. Setting the "Streamed" flag has no effect if the signal is local to the current Instance. Method returns OPENDAQ_IGNORED if that is the case.
    ///
    /// Calls the openDAQ C function `daqSignal_setStreamed()`.
    pub fn set_streamed(&self, streamed: bool) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqSignal_setStreamed)(self.as_raw() as *mut _, u8::from(streamed)) };
        check(__code, "daqSignal_setStreamed")?;
        Ok(())
    }

}

impl TagsPrivate {
    /// Adds a new tag to the list.
    ///
    /// # Parameters
    /// - `name`: The name of the tag to be added.
    ///
    /// # Errors
    /// - `OPENDAQ_IGNORED`: if a node with the `name` is already in the list of tags.
    ///
    /// Calls the openDAQ C function `daqTagsPrivate_add()`.
    pub fn add(&self, name: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqTagsPrivate_add)(self.as_raw() as *mut _, __name.as_ptr() as *mut _) };
        check(__code, "daqTagsPrivate_add")?;
        Ok(())
    }

    /// Removes a new tag from the list.
    ///
    /// # Parameters
    /// - `name`: The name of the tag to be removed.
    ///
    /// # Errors
    /// - `OPENDAQ_IGNORED`: if a node with the `name` is not in the list of tags.
    ///
    /// Calls the openDAQ C function `daqTagsPrivate_remove()`.
    pub fn remove(&self, name: &str) -> Result<()> {
        let __name = crate::marshal::make_string(name)?;
        let __code = unsafe { (crate::sys::api().daqTagsPrivate_remove)(self.as_raw() as *mut _, __name.as_ptr() as *mut _) };
        check(__code, "daqTagsPrivate_remove")?;
        Ok(())
    }

    /// Replaces all tags.
    ///
    /// # Parameters
    /// - `tags`: The new list of tags.
    ///
    /// Calls the openDAQ C function `daqTagsPrivate_replace()`.
    pub fn replace(&self, tags: &[&str]) -> Result<()> {
        let __tags = crate::marshal::list_from_strs(tags)?;
        let __code = unsafe { (crate::sys::api().daqTagsPrivate_replace)(self.as_raw() as *mut _, __tags.as_ptr() as *mut _) };
        check(__code, "daqTagsPrivate_replace")?;
        Ok(())
    }

}

impl Tags {
    /// Checks whether a tag is present in the list of tags.
    ///
    /// # Parameters
    /// - `name`: The name of the tag being checked.
    ///
    /// # Returns
    /// - `value`: True if a tag is found; false otherwise.
    ///
    /// Calls the openDAQ C function `daqTags_contains()`.
    pub fn contains(&self, name: &str) -> Result<bool> {
        let __name = crate::marshal::make_string(name)?;
        let mut __value: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqTags_contains)(self.as_raw() as *mut _, __name.as_ptr() as *mut _, &mut __value) };
        check(__code, "daqTags_contains")?;
        Ok(__value != 0)
    }

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

    /// Gets the list of all tags in the list.
    ///
    /// # Returns
    /// - `value`: The list of tag strings.
    ///
    /// Calls the openDAQ C function `daqTags_getList()`.
    pub fn list(&self) -> Result<Vec<String>> {
        let mut __value: *mut sys::daqList = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqTags_getList)(self.as_raw() as *mut _, &mut __value) };
        check(__code, "daqTags_getList")?;
        Ok(unsafe { crate::marshal::take_list::<String>(__value as *mut _, "daqTags_getList") }?)
    }

    /// Queries the list of tags, creating an EvalValue expression from the `query` string. Returns true if the list of tags matches the query, false otherwise.
    ///
    /// # Parameters
    /// - `query`: The query string. I.e. "tag1 || (tag2 && tag3)"
    ///
    /// # Returns
    /// - `value`: The result of the query
    ///
    /// Calls the openDAQ C function `daqTags_query()`.
    pub fn query(&self, query: &str) -> Result<bool> {
        let __query = crate::marshal::make_string(query)?;
        let mut __value: u8 = 0;
        let __code = unsafe { (crate::sys::api().daqTags_query)(self.as_raw() as *mut _, __query.as_ptr() as *mut _, &mut __value) };
        check(__code, "daqTags_query")?;
        Ok(__value != 0)
    }

}

impl UpdateParameters {
    /// @ingroup opendaq_update_parameters
    /// @addtogroup opendaq_update_parameters Factories
    ///
    /// Calls the openDAQ C function `daqUpdateParameters_createUpdateParameters()`.
    pub fn new() -> Result<UpdateParameters> {
        let mut __obj: *mut sys::daqUpdateParameters = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqUpdateParameters_createUpdateParameters)(&mut __obj) };
        check(__code, "daqUpdateParameters_createUpdateParameters")?;
        Ok(unsafe { crate::marshal::require_object::<UpdateParameters>(__obj as *mut _, "daqUpdateParameters_createUpdateParameters") }?)
    }

    /// Gets the device update options object that allows for specifying how a device and its subdevices are to be updated.
    ///
    /// # Parameters
    /// - `options`: The device update options object.
    ///
    /// Calls the openDAQ C function `daqUpdateParameters_getDeviceUpdateOptions()`.
    pub fn device_update_options(&self) -> Result<Option<DeviceUpdateOptions>> {
        let mut __options: *mut sys::daqDeviceUpdateOptions = std::ptr::null_mut();
        let __code = unsafe { (crate::sys::api().daqUpdateParameters_getDeviceUpdateOptions)(self.as_raw() as *mut _, &mut __options) };
        check(__code, "daqUpdateParameters_getDeviceUpdateOptions")?;
        Ok(unsafe { crate::marshal::take_object::<DeviceUpdateOptions>(__options as *mut _) })
    }

    /// Sets the device update options object that allows for specifying how a device and its subdevices are to be updated.
    ///
    /// # Parameters
    /// - `options`: The device update options object.
    ///
    /// Calls the openDAQ C function `daqUpdateParameters_setDeviceUpdateOptions()`.
    pub fn set_device_update_options(&self, options: &DeviceUpdateOptions) -> Result<()> {
        let __code = unsafe { (crate::sys::api().daqUpdateParameters_setDeviceUpdateOptions)(self.as_raw() as *mut _, options.as_raw() as *mut _) };
        check(__code, "daqUpdateParameters_setDeviceUpdateOptions")?;
        Ok(())
    }

}