@ikalogic/at1000 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/build/at1000-B3HgANSi.d.mts +109 -0
- package/build/at1000-B3HgANSi.d.mts.map +1 -0
- package/build/at1000-B_udjy0I.cjs +8 -0
- package/build/at1000-B_udjy0I.cjs.map +1 -0
- package/build/at1000-BjVj0Ujk.mjs +8 -0
- package/build/at1000-BjVj0Ujk.mjs.map +1 -0
- package/build/at1000-C6w5G8L4.d.cts +109 -0
- package/build/at1000-C6w5G8L4.d.cts.map +1 -0
- package/build/browser.cjs +1 -1
- package/build/browser.cjs.map +1 -1
- package/build/browser.d.cts +9 -2
- package/build/browser.d.cts.map +1 -1
- package/build/browser.d.mts +9 -2
- package/build/browser.d.mts.map +1 -1
- package/build/browser.mjs +1 -1
- package/build/browser.mjs.map +1 -1
- package/build/{com-CBhjFJPB.d.cts → com-BLw4CGid.d.cts} +61 -61
- package/build/{com-CBhjFJPB.d.cts.map → com-BLw4CGid.d.cts.map} +1 -1
- package/build/{com-CBhjFJPB.d.mts → com-BLw4CGid.d.mts} +61 -61
- package/build/{com-CBhjFJPB.d.mts.map → com-BLw4CGid.d.mts.map} +1 -1
- package/build/com.cjs +1 -1
- package/build/com.cjs.map +1 -1
- package/build/com.d.cts +2 -2
- package/build/com.d.mts +2 -2
- package/build/com.mjs +1 -1
- package/build/com.mjs.map +1 -1
- package/build/events-CBVQfojK.d.cts +359 -0
- package/build/events-CBVQfojK.d.cts.map +1 -0
- package/build/events-CBVQfojK.d.mts +359 -0
- package/build/events-CBVQfojK.d.mts.map +1 -0
- package/build/events.cjs +1 -0
- package/build/events.d.cts +2 -0
- package/build/events.d.mts +2 -0
- package/build/events.mjs +1 -0
- package/build/{gpio-DNrdX-QV.d.cts → gpio-BuvDysYa.d.cts} +65 -16
- package/build/gpio-BuvDysYa.d.cts.map +1 -0
- package/build/{gpio-DchxrXWK.d.mts → gpio-DgQHE5fr.d.mts} +65 -16
- package/build/gpio-DgQHE5fr.d.mts.map +1 -0
- package/build/gpio.cjs +1 -1
- package/build/gpio.cjs.map +1 -1
- package/build/gpio.d.cts +2 -2
- package/build/gpio.d.mts +2 -2
- package/build/gpio.mjs +1 -1
- package/build/gpio.mjs.map +1 -1
- package/build/{hmi-DszM-Hfp.d.cts → hmi-BrdqKB3o.d.cts} +17 -5
- package/build/hmi-BrdqKB3o.d.cts.map +1 -0
- package/build/{hmi-DszM-Hfp.d.mts → hmi-BrdqKB3o.d.mts} +17 -5
- package/build/hmi-BrdqKB3o.d.mts.map +1 -0
- package/build/hmi.cjs +1 -1
- package/build/hmi.cjs.map +1 -1
- package/build/hmi.d.cts +2 -2
- package/build/hmi.d.mts +2 -2
- package/build/hmi.mjs +1 -1
- package/build/hmi.mjs.map +1 -1
- package/build/management.cjs +1 -2
- package/build/management.d.cts +816 -2
- package/build/management.d.cts.map +1 -0
- package/build/management.d.mts +816 -2
- package/build/management.d.mts.map +1 -0
- package/build/management.mjs +1 -2
- package/build/node.cjs +1 -1
- package/build/node.cjs.map +1 -1
- package/build/node.d.cts +16 -3
- package/build/node.d.cts.map +1 -1
- package/build/node.d.mts +16 -3
- package/build/node.d.mts.map +1 -1
- package/build/node.mjs +1 -1
- package/build/node.mjs.map +1 -1
- package/build/package-Bcvmz2Lx.cjs +2 -0
- package/build/package-Bcvmz2Lx.cjs.map +1 -0
- package/build/package-CN49oc-F.mjs +2 -0
- package/build/package-CN49oc-F.mjs.map +1 -0
- package/build/{power-o75Gjpwf.d.cts → power-FmknBUz2.d.cts} +30 -30
- package/build/{power-CN_9o_NX.d.mts.map → power-FmknBUz2.d.cts.map} +1 -1
- package/build/{power-CN_9o_NX.d.mts → power-HWfK-Ybw.d.mts} +30 -30
- package/build/{power-o75Gjpwf.d.cts.map → power-HWfK-Ybw.d.mts.map} +1 -1
- package/build/power.cjs +1 -1
- package/build/power.cjs.map +1 -1
- package/build/power.d.cts +2 -2
- package/build/power.d.mts +2 -2
- package/build/power.mjs +1 -1
- package/build/power.mjs.map +1 -1
- package/build/{relays-BCn6rQN1.d.cts → relays-8EGNIK1T.d.cts} +5 -2
- package/build/relays-8EGNIK1T.d.cts.map +1 -0
- package/build/{relays-BCn6rQN1.d.mts → relays-8EGNIK1T.d.mts} +5 -2
- package/build/relays-8EGNIK1T.d.mts.map +1 -0
- package/build/relays.cjs +1 -1
- package/build/relays.cjs.map +1 -1
- package/build/relays.d.cts +2 -2
- package/build/relays.d.mts +2 -2
- package/build/relays.mjs +1 -1
- package/build/relays.mjs.map +1 -1
- package/build/session-D7TpUd6L.d.cts +44 -0
- package/build/session-D7TpUd6L.d.cts.map +1 -0
- package/build/session-D7TpUd6L.d.mts +44 -0
- package/build/session-D7TpUd6L.d.mts.map +1 -0
- package/build/session.cjs +1 -0
- package/build/session.d.cts +2 -0
- package/build/session.d.mts +2 -0
- package/build/session.mjs +1 -0
- package/package.json +22 -2
- package/build/at1000-BXtrf8Rt.d.cts +0 -50
- package/build/at1000-BXtrf8Rt.d.cts.map +0 -1
- package/build/at1000-BuI_g7jF.cjs +0 -3
- package/build/at1000-BuI_g7jF.cjs.map +0 -1
- package/build/at1000-DVDltAyk.mjs +0 -3
- package/build/at1000-DVDltAyk.mjs.map +0 -1
- package/build/at1000-D_rOUVFH.d.mts +0 -50
- package/build/at1000-D_rOUVFH.d.mts.map +0 -1
- package/build/gpio-DNrdX-QV.d.cts.map +0 -1
- package/build/gpio-DchxrXWK.d.mts.map +0 -1
- package/build/hmi-DszM-Hfp.d.cts.map +0 -1
- package/build/hmi-DszM-Hfp.d.mts.map +0 -1
- package/build/management-C0iQha23.d.cts +0 -512
- package/build/management-C0iQha23.d.cts.map +0 -1
- package/build/management-C0iQha23.d.mts +0 -512
- package/build/management-C0iQha23.d.mts.map +0 -1
- package/build/management.cjs.map +0 -1
- package/build/management.mjs.map +0 -1
- package/build/relays-BCn6rQN1.d.cts.map +0 -1
- package/build/relays-BCn6rQN1.d.mts.map +0 -1
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
|
|
3
|
+
//#region src/api/events.d.ts
|
|
4
|
+
declare const eventDataSchemas: {
|
|
5
|
+
readonly 'com.can_config': v.ObjectSchema<{
|
|
6
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
7
|
+
readonly baud_rate: v.PicklistSchema<[5000, 10000, 20000, 31250, 33000, 40000, 50000, 80000, 83300, 95000, 100000, 125000, 200000, 250000, 500000, 1000000], undefined>;
|
|
8
|
+
readonly termination_resistors: v.BooleanSchema<undefined>;
|
|
9
|
+
readonly rx_filter: v.ObjectSchema<{
|
|
10
|
+
readonly extended_id: v.BooleanSchema<undefined>;
|
|
11
|
+
readonly id: v.NumberSchema<undefined>;
|
|
12
|
+
readonly mask: v.NumberSchema<undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
readonly 'com.rs232_config': v.ObjectSchema<{
|
|
16
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
17
|
+
readonly baud_rate: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 50, undefined>, v.MaxValueAction<number, 1000000, undefined>]>;
|
|
18
|
+
readonly data_bits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 7, undefined>, v.MaxValueAction<number, 8, undefined>]>;
|
|
19
|
+
readonly stop_bits: v.PicklistSchema<["1", "1.5", "2"], undefined>;
|
|
20
|
+
readonly parity: v.PicklistSchema<["none", "odd", "even", "mark", "space"], undefined>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
readonly 'com.rs485_config': v.ObjectSchema<{
|
|
23
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
24
|
+
readonly baud_rate: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 300, undefined>, v.MaxValueAction<number, 20000000, undefined>]>;
|
|
25
|
+
readonly data_bits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 7, undefined>, v.MaxValueAction<number, 8, undefined>]>;
|
|
26
|
+
readonly stop_bits: v.PicklistSchema<["1", "1.5", "2"], undefined>;
|
|
27
|
+
readonly parity: v.PicklistSchema<["none", "odd", "even", "mark", "space"], undefined>;
|
|
28
|
+
readonly termination_resistors: v.BooleanSchema<undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
readonly 'com.spi_config': v.ObjectSchema<{
|
|
31
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
32
|
+
readonly baud_rate: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 300, undefined>, v.MaxValueAction<number, 10000000, undefined>]>;
|
|
33
|
+
readonly vcc: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1.6, undefined>, v.MaxValueAction<number, 5, undefined>]>;
|
|
34
|
+
readonly mode: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 3, undefined>]>;
|
|
35
|
+
}, undefined>;
|
|
36
|
+
readonly 'com.i2c_config': v.ObjectSchema<{
|
|
37
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
38
|
+
readonly baud_rate: v.PicklistSchema<[100000, 400000, 1000000], undefined>;
|
|
39
|
+
readonly vcc: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1.6, undefined>, v.MaxValueAction<number, 5, undefined>]>;
|
|
40
|
+
}, undefined>;
|
|
41
|
+
readonly 'com.uart_config': v.ObjectSchema<{
|
|
42
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
43
|
+
readonly baud_rate: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 300, undefined>, v.MaxValueAction<number, 12000000, undefined>]>;
|
|
44
|
+
readonly vcc: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1.6, undefined>, v.MaxValueAction<number, 5, undefined>]>;
|
|
45
|
+
readonly data_bits: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 7, undefined>, v.MaxValueAction<number, 8, undefined>]>;
|
|
46
|
+
readonly stop_bits: v.PicklistSchema<["1", "1.5", "2"], undefined>;
|
|
47
|
+
readonly parity: v.PicklistSchema<["none", "odd", "even", "mark", "space"], undefined>;
|
|
48
|
+
}, undefined>;
|
|
49
|
+
readonly 'com.can_rx': v.ArraySchema<v.ObjectSchema<{
|
|
50
|
+
readonly id: v.NumberSchema<undefined>;
|
|
51
|
+
readonly extended_id: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
52
|
+
readonly rtr: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
53
|
+
readonly data: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.NumberSchema<undefined>, undefined>, v.MinLengthAction<number[], 0, undefined>, v.MaxLengthAction<number[], 8, undefined>]>, readonly []>;
|
|
54
|
+
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5000, undefined>]>, undefined>;
|
|
55
|
+
}, undefined>, undefined>;
|
|
56
|
+
readonly 'com.uart_rx': v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 255, undefined>]>, undefined>;
|
|
57
|
+
readonly 'com.rs232_rx': v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 255, undefined>]>, undefined>;
|
|
58
|
+
readonly 'com.rs485_rx': v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 255, undefined>]>, undefined>;
|
|
59
|
+
readonly 'gpio.state': v.UnionSchema<[v.ObjectSchema<{
|
|
60
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
61
|
+
}, undefined>, v.ObjectSchema<{
|
|
62
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
63
|
+
}, undefined>], undefined>;
|
|
64
|
+
readonly 'gpio.config': v.UnionSchema<[v.ObjectSchema<{
|
|
65
|
+
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
66
|
+
readonly direction: v.LiteralSchema<"input", undefined>;
|
|
67
|
+
}, undefined>, v.ObjectSchema<{
|
|
68
|
+
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
69
|
+
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
70
|
+
readonly value: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>, undefined>;
|
|
71
|
+
}, undefined>, v.ObjectSchema<{
|
|
72
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
73
|
+
readonly direction: v.LiteralSchema<"input", undefined>;
|
|
74
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
75
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
76
|
+
}, undefined>, v.ObjectSchema<{
|
|
77
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
78
|
+
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
79
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
80
|
+
readonly vol: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>;
|
|
81
|
+
readonly voh: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>;
|
|
82
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
83
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
84
|
+
}, undefined>, v.ObjectSchema<{
|
|
85
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
86
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
87
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
88
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
89
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
90
|
+
}, undefined>], undefined>;
|
|
91
|
+
readonly 'gpio.sync': v.ObjectSchema<{
|
|
92
|
+
readonly hold_state: v.PicklistSchema<["held", "released"], undefined>;
|
|
93
|
+
}, undefined>;
|
|
94
|
+
readonly 'hmi.text': v.ObjectSchema<{
|
|
95
|
+
readonly text: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>;
|
|
96
|
+
}, undefined>;
|
|
97
|
+
readonly 'hmi.colors': v.ObjectSchema<{
|
|
98
|
+
readonly text: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.LengthAction<string, 7, undefined>, v.HexColorAction<string, undefined>]>, undefined>;
|
|
99
|
+
readonly progress: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.LengthAction<string, 7, undefined>, v.HexColorAction<string, undefined>]>, undefined>;
|
|
100
|
+
readonly background: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.LengthAction<string, 7, undefined>, v.HexColorAction<string, undefined>]>, undefined>;
|
|
101
|
+
}, undefined>;
|
|
102
|
+
readonly 'hmi.progress': v.OptionalSchema<v.ObjectSchema<{
|
|
103
|
+
readonly progress: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 100, undefined>]>;
|
|
104
|
+
}, undefined>, undefined>;
|
|
105
|
+
readonly 'hmi.play': v.ObjectSchema<{
|
|
106
|
+
readonly sound_id: v.PicklistSchema<["success", "warning", "failure", "notification_1", "notification_2", "imperial_march"], undefined>;
|
|
107
|
+
readonly volume: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 100, undefined>]>;
|
|
108
|
+
}, undefined>;
|
|
109
|
+
readonly 'hmi.knob': v.ObjectSchema<{
|
|
110
|
+
readonly button_pressed: v.BooleanSchema<undefined>;
|
|
111
|
+
readonly button_held: v.BooleanSchema<undefined>;
|
|
112
|
+
readonly rotation_delta: v.NumberSchema<undefined>;
|
|
113
|
+
}, undefined>;
|
|
114
|
+
readonly 'management.datetime': v.ObjectSchema<{
|
|
115
|
+
readonly epoch_seconds: v.NumberSchema<undefined>;
|
|
116
|
+
}, undefined>;
|
|
117
|
+
readonly 'management.calibration': v.ObjectSchema<{
|
|
118
|
+
readonly schema_version: v.LiteralSchema<1, undefined>;
|
|
119
|
+
readonly tool_version: v.StringSchema<undefined>;
|
|
120
|
+
readonly device_id: v.StringSchema<undefined>;
|
|
121
|
+
readonly timestamp: v.StringSchema<undefined>;
|
|
122
|
+
readonly firmware_version: v.StringSchema<undefined>;
|
|
123
|
+
readonly dac: v.ArraySchema<v.ObjectSchema<{
|
|
124
|
+
readonly channel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 31, undefined>]>;
|
|
125
|
+
readonly points: v.ArraySchema<v.ObjectSchema<{
|
|
126
|
+
readonly set: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
127
|
+
readonly measured: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
128
|
+
readonly reading: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
|
|
129
|
+
}, undefined>, undefined>;
|
|
130
|
+
readonly max_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
131
|
+
readonly avg_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
132
|
+
}, undefined>, undefined>;
|
|
133
|
+
readonly adc_positive: v.ArraySchema<v.ObjectSchema<{
|
|
134
|
+
readonly channel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 31, undefined>]>;
|
|
135
|
+
readonly points: v.ArraySchema<v.ObjectSchema<{
|
|
136
|
+
readonly set: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
137
|
+
readonly measured: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
138
|
+
readonly reading: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
|
|
139
|
+
}, undefined>, undefined>;
|
|
140
|
+
readonly max_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
141
|
+
readonly avg_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
142
|
+
}, undefined>, undefined>;
|
|
143
|
+
readonly adc_negative: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
144
|
+
readonly channel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 31, undefined>]>;
|
|
145
|
+
readonly points: v.ArraySchema<v.ObjectSchema<{
|
|
146
|
+
readonly set: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
147
|
+
readonly measured: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
148
|
+
readonly reading: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
|
|
149
|
+
}, undefined>, undefined>;
|
|
150
|
+
readonly max_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
151
|
+
readonly avg_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
152
|
+
}, undefined>, undefined>, undefined>;
|
|
153
|
+
readonly dut_psu: v.ObjectSchema<{
|
|
154
|
+
readonly voltage: v.ObjectSchema<{
|
|
155
|
+
readonly points: v.ArraySchema<v.ObjectSchema<{
|
|
156
|
+
readonly set: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
157
|
+
readonly measured: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
158
|
+
readonly reading: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
|
|
159
|
+
}, undefined>, undefined>;
|
|
160
|
+
readonly max_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
161
|
+
readonly avg_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
162
|
+
}, undefined>;
|
|
163
|
+
readonly current: v.ObjectSchema<{
|
|
164
|
+
readonly load_ohms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>, v.MinValueAction<number, number, undefined>]>;
|
|
165
|
+
readonly points: v.ArraySchema<v.ObjectSchema<{
|
|
166
|
+
readonly set: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
167
|
+
readonly measured: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
168
|
+
readonly reading: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
|
|
169
|
+
}, undefined>, undefined>;
|
|
170
|
+
readonly max_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
171
|
+
readonly avg_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
172
|
+
}, undefined>;
|
|
173
|
+
}, undefined>;
|
|
174
|
+
readonly relays: v.ArraySchema<v.ObjectSchema<{
|
|
175
|
+
readonly relay: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 7, undefined>]>;
|
|
176
|
+
readonly status: v.PicklistSchema<["pass", "fail"], undefined>;
|
|
177
|
+
readonly test_voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
178
|
+
readonly closed_current: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
179
|
+
readonly open_current: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
180
|
+
readonly calibration: v.OptionalSchema<v.ObjectSchema<{
|
|
181
|
+
readonly channel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 31, undefined>]>;
|
|
182
|
+
readonly points: v.ArraySchema<v.ObjectSchema<{
|
|
183
|
+
readonly set: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
184
|
+
readonly measured: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
185
|
+
readonly reading: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, undefined>;
|
|
186
|
+
}, undefined>, undefined>;
|
|
187
|
+
readonly max_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
188
|
+
readonly avg_error: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
189
|
+
}, undefined>, undefined>;
|
|
190
|
+
}, undefined>, undefined>;
|
|
191
|
+
readonly usb: v.ArraySchema<v.ObjectSchema<{
|
|
192
|
+
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
193
|
+
readonly status: v.PicklistSchema<["pass", "fail"], undefined>;
|
|
194
|
+
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
195
|
+
readonly current_tests: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
196
|
+
readonly load_ohms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>, v.MinValueAction<number, number, undefined>]>;
|
|
197
|
+
readonly voltage_applied: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
198
|
+
readonly measured_current: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
199
|
+
readonly expected_current: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
200
|
+
readonly error_percent: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
201
|
+
}, undefined>, undefined>, undefined>;
|
|
202
|
+
}, undefined>, undefined>;
|
|
203
|
+
}, undefined>;
|
|
204
|
+
readonly 'management.calibration_state': v.ObjectSchema<{
|
|
205
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
206
|
+
readonly loaded: v.BooleanSchema<undefined>;
|
|
207
|
+
readonly last_error: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
208
|
+
readonly calibrated_at: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
209
|
+
}, undefined>;
|
|
210
|
+
readonly 'management.project': v.VariantSchema<"change", [v.ObjectSchema<{
|
|
211
|
+
readonly change: v.LiteralSchema<"state_changed", undefined>;
|
|
212
|
+
readonly id: v.StringSchema<undefined>;
|
|
213
|
+
readonly state: v.PicklistSchema<["created", "started", "stopped", "removed", "error"], undefined>;
|
|
214
|
+
}, undefined>, v.ObjectSchema<{
|
|
215
|
+
readonly change: v.LiteralSchema<"renamed", undefined>;
|
|
216
|
+
readonly id: v.StringSchema<undefined>;
|
|
217
|
+
readonly name: v.StringSchema<undefined>;
|
|
218
|
+
}, undefined>, v.ObjectSchema<{
|
|
219
|
+
readonly change: v.LiteralSchema<"default_changed", undefined>;
|
|
220
|
+
readonly id: v.StringSchema<undefined>;
|
|
221
|
+
readonly is_default: v.BooleanSchema<undefined>;
|
|
222
|
+
}, undefined>], undefined>;
|
|
223
|
+
readonly 'management.update_status': v.ObjectSchema<{
|
|
224
|
+
readonly state: v.PicklistSchema<["idle", "installing", "failed"], undefined>;
|
|
225
|
+
readonly progress: v.NumberSchema<undefined>;
|
|
226
|
+
readonly message: v.StringSchema<undefined>;
|
|
227
|
+
readonly error: v.StringSchema<undefined>;
|
|
228
|
+
}, undefined>;
|
|
229
|
+
readonly 'power.dut': v.ObjectSchema<{
|
|
230
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
231
|
+
readonly target_voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
232
|
+
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
233
|
+
readonly current: v.NumberSchema<undefined>;
|
|
234
|
+
}, undefined>;
|
|
235
|
+
readonly 'power.usb': Omit<v.ObjectSchema<{
|
|
236
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
237
|
+
readonly target_voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
238
|
+
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
239
|
+
readonly current: v.NumberSchema<undefined>;
|
|
240
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
241
|
+
readonly entries: Pick<{
|
|
242
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
243
|
+
readonly target_voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
244
|
+
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
245
|
+
readonly current: v.NumberSchema<undefined>;
|
|
246
|
+
}, "enabled" | "voltage" | "current">;
|
|
247
|
+
readonly "~standard": v.StandardProps<{
|
|
248
|
+
enabled: boolean;
|
|
249
|
+
voltage: number;
|
|
250
|
+
current: number;
|
|
251
|
+
}, {
|
|
252
|
+
enabled: boolean;
|
|
253
|
+
voltage: number;
|
|
254
|
+
current: number;
|
|
255
|
+
}>;
|
|
256
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
257
|
+
enabled: boolean;
|
|
258
|
+
voltage: number;
|
|
259
|
+
current: number;
|
|
260
|
+
}, v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
|
|
261
|
+
readonly "~types"?: {
|
|
262
|
+
readonly input: {
|
|
263
|
+
enabled: boolean;
|
|
264
|
+
voltage: number;
|
|
265
|
+
current: number;
|
|
266
|
+
};
|
|
267
|
+
readonly output: {
|
|
268
|
+
enabled: boolean;
|
|
269
|
+
voltage: number;
|
|
270
|
+
current: number;
|
|
271
|
+
};
|
|
272
|
+
readonly issue: v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>;
|
|
273
|
+
} | undefined;
|
|
274
|
+
};
|
|
275
|
+
readonly 'relays.state': v.ObjectSchema<{
|
|
276
|
+
readonly state: v.PicklistSchema<["open", "closed"], undefined>;
|
|
277
|
+
}, undefined>;
|
|
278
|
+
readonly 'relays.states': v.ArraySchema<v.PicklistSchema<["open", "closed"], undefined>, undefined>;
|
|
279
|
+
readonly 'session.state': v.ObjectSchema<{
|
|
280
|
+
readonly active: v.BooleanSchema<undefined>;
|
|
281
|
+
readonly kind: v.OptionalSchema<v.PicklistSchema<["remote", "project"], undefined>, undefined>;
|
|
282
|
+
readonly label: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
283
|
+
readonly project: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
284
|
+
readonly since: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
285
|
+
}, undefined>;
|
|
286
|
+
};
|
|
287
|
+
declare const dataLessEvents: readonly ["com.reset", "gpio.reset", "hmi.clear", "hmi.reset", "power.reset", "relays.reset"];
|
|
288
|
+
type EventDataSchemas = typeof eventDataSchemas;
|
|
289
|
+
/** Every event `type` literal the server can emit. */
|
|
290
|
+
type EventType = keyof EventDataSchemas | (typeof dataLessEvents)[number];
|
|
291
|
+
type PayloadEvent = { [K in keyof EventDataSchemas]: {
|
|
292
|
+
type: K;
|
|
293
|
+
id?: number;
|
|
294
|
+
ts: number;
|
|
295
|
+
data: v.InferOutput<EventDataSchemas[K]>;
|
|
296
|
+
} }[keyof EventDataSchemas];
|
|
297
|
+
type DataLessEvent = {
|
|
298
|
+
type: (typeof dataLessEvents)[number];
|
|
299
|
+
id?: number;
|
|
300
|
+
ts: number;
|
|
301
|
+
};
|
|
302
|
+
/** A fully-typed device event for a known `type`. */
|
|
303
|
+
type DeviceEvent = PayloadEvent | DataLessEvent;
|
|
304
|
+
/**
|
|
305
|
+
* Shape delivered to `'*'` listeners. Forward-compatible: a newer server may emit
|
|
306
|
+
* a `type` this SDK does not model, surfaced here with an untyped `data`.
|
|
307
|
+
*/
|
|
308
|
+
type AnyDeviceEvent = DeviceEvent | {
|
|
309
|
+
type: string;
|
|
310
|
+
id?: number;
|
|
311
|
+
ts: number;
|
|
312
|
+
data?: unknown;
|
|
313
|
+
};
|
|
314
|
+
type StateListener = (connected: boolean) => void;
|
|
315
|
+
/** @hideconstructor */
|
|
316
|
+
declare class EventsApi {
|
|
317
|
+
private readonly host;
|
|
318
|
+
private socket;
|
|
319
|
+
private readonly listeners;
|
|
320
|
+
private readonly stateListeners;
|
|
321
|
+
private shouldReconnect;
|
|
322
|
+
private reconnectDelayMs;
|
|
323
|
+
private reconnectTimer;
|
|
324
|
+
private _connected;
|
|
325
|
+
private connectPromise;
|
|
326
|
+
constructor(host: string);
|
|
327
|
+
/** Whether the WebSocket is currently open. */
|
|
328
|
+
get connected(): boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Open the event stream. Resolves once the socket is open, rejects on failure or
|
|
331
|
+
* after `timeout` ms. A no-op while already connected. Auto-reconnect arms only
|
|
332
|
+
* after the first successful open, so a failed initial `connect()` (e.g. old
|
|
333
|
+
* firmware without `/v0/events`) rejects without scheduling retries.
|
|
334
|
+
*/
|
|
335
|
+
connect(options?: {
|
|
336
|
+
timeout?: number;
|
|
337
|
+
}): Promise<void>;
|
|
338
|
+
/** Close the stream and cancel any pending reconnect. */
|
|
339
|
+
close(): void;
|
|
340
|
+
/**
|
|
341
|
+
* Subscribe to an event `type`, or `'*'` for every event. Returns an unsubscribe
|
|
342
|
+
* function. Listeners survive reconnects and are isolated: a throwing listener
|
|
343
|
+
* does not break dispatch to the others.
|
|
344
|
+
*/
|
|
345
|
+
on<T extends EventType>(type: T, listener: (event: Extract<DeviceEvent, {
|
|
346
|
+
type: T;
|
|
347
|
+
}>) => void): () => void;
|
|
348
|
+
on(type: '*', listener: (event: AnyDeviceEvent) => void): () => void;
|
|
349
|
+
/** Subscribe to connection state changes. Returns an unsubscribe function. */
|
|
350
|
+
onStateChange(listener: StateListener): () => void;
|
|
351
|
+
private openSocket;
|
|
352
|
+
private scheduleReconnect;
|
|
353
|
+
private handleMessage;
|
|
354
|
+
private emitTo;
|
|
355
|
+
private setConnected;
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
358
|
+
export { EventsApi as i, DeviceEvent as n, EventType as r, AnyDeviceEvent as t };
|
|
359
|
+
//# sourceMappingURL=events-CBVQfojK.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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AAA,EACN,QAAA,GAAW,KAAA,EAAO,OAAA,CAAQ,WAAA;IAAe,IAAA,EAAM,CAAA;EAAA;EAEjD,EAAA,CAAG,IAAA,OAAW,QAAA,GAAW,KAAA,EAAO,cAAA;;EAqBhC,aAAA,CAAc,QAAA,EAAU,aAAA;EAAA,QAOhB,UAAA;EAAA,QA+DA,iBAAA;EAAA,QAiBA,aAAA;EAAA,QAgDA,MAAA;EAAA,QAcA,YAAA;AAAA"}
|
package/build/events.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./at1000-B_udjy0I.cjs");exports.EventsApi=e.o;
|
package/build/events.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./at1000-BjVj0Ujk.mjs";export{e as EventsApi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AnalogOutputLevel } from "./common-BY1vXz1l.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Information } from "./management.cjs";
|
|
3
3
|
import { UpFetch } from "up-fetch";
|
|
4
4
|
import * as v from "valibot";
|
|
5
5
|
|
|
@@ -44,7 +44,7 @@ declare const partialAnalogOutputConfiguration: Omit<v.ObjectSchema<{
|
|
|
44
44
|
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
45
45
|
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
46
46
|
readonly value: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>, undefined>;
|
|
47
|
-
}, undefined>, "~
|
|
47
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
48
48
|
readonly entries: Omit<{
|
|
49
49
|
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
50
50
|
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
@@ -57,7 +57,7 @@ declare const partialAnalogOutputConfiguration: Omit<v.ObjectSchema<{
|
|
|
57
57
|
}>;
|
|
58
58
|
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
59
59
|
value?: number | undefined;
|
|
60
|
-
}, v.NumberIssue | v.MinValueIssue<number, 0> | v.
|
|
60
|
+
}, v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, 0> | v.MaxValueIssue<number, 24>>;
|
|
61
61
|
readonly "~types"?: {
|
|
62
62
|
readonly input: {
|
|
63
63
|
value?: number | undefined;
|
|
@@ -65,7 +65,7 @@ declare const partialAnalogOutputConfiguration: Omit<v.ObjectSchema<{
|
|
|
65
65
|
readonly output: {
|
|
66
66
|
value?: number | undefined;
|
|
67
67
|
};
|
|
68
|
-
readonly issue: v.NumberIssue | v.MinValueIssue<number, 0> | v.
|
|
68
|
+
readonly issue: v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, 0> | v.MaxValueIssue<number, 24>;
|
|
69
69
|
} | undefined;
|
|
70
70
|
};
|
|
71
71
|
type PartialAnalogOutputConfiguration = v.InferOutput<typeof partialAnalogOutputConfiguration>;
|
|
@@ -74,7 +74,7 @@ declare const partialDigitalInputConfiguration: Omit<v.ObjectSchema<{
|
|
|
74
74
|
readonly direction: v.LiteralSchema<"input", undefined>;
|
|
75
75
|
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
76
76
|
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
77
|
-
}, undefined>, "~
|
|
77
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
78
78
|
readonly entries: Omit<{
|
|
79
79
|
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
80
80
|
readonly direction: v.LiteralSchema<"input", undefined>;
|
|
@@ -113,7 +113,7 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
113
113
|
readonly voh: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>;
|
|
114
114
|
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
115
115
|
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
116
|
-
}, undefined>, "~
|
|
116
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
117
117
|
readonly entries: Omit<{
|
|
118
118
|
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
119
119
|
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
@@ -142,7 +142,7 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
142
142
|
vih: number;
|
|
143
143
|
vol: number;
|
|
144
144
|
voh: number;
|
|
145
|
-
}, v.NumberIssue | v.
|
|
145
|
+
}, v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, 0> | v.UnionIssue<v.BooleanIssue | v.NumberIssue> | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.MaxValueIssue<number, 24>>;
|
|
146
146
|
readonly "~types"?: {
|
|
147
147
|
readonly input: {
|
|
148
148
|
value: number | boolean;
|
|
@@ -158,9 +158,9 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
158
158
|
vol: number;
|
|
159
159
|
voh: number;
|
|
160
160
|
};
|
|
161
|
-
readonly issue: v.NumberIssue | v.
|
|
161
|
+
readonly issue: v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, 0> | v.UnionIssue<v.BooleanIssue | v.NumberIssue> | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.MaxValueIssue<number, 24>;
|
|
162
162
|
} | undefined;
|
|
163
|
-
}, "~
|
|
163
|
+
}, "~types" | "~run" | "~standard" | "entries"> & {
|
|
164
164
|
readonly entries: {
|
|
165
165
|
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
166
166
|
readonly vil: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>, undefined>;
|
|
@@ -187,7 +187,7 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
187
187
|
vih?: number | undefined;
|
|
188
188
|
vol: number;
|
|
189
189
|
voh: number;
|
|
190
|
-
}, v.NumberIssue | v.
|
|
190
|
+
}, v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, 0> | v.UnionIssue<v.BooleanIssue | v.NumberIssue> | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.MaxValueIssue<number, 24>>;
|
|
191
191
|
readonly "~types"?: {
|
|
192
192
|
readonly input: {
|
|
193
193
|
value: number | boolean;
|
|
@@ -203,7 +203,7 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
203
203
|
vol: number;
|
|
204
204
|
voh: number;
|
|
205
205
|
};
|
|
206
|
-
readonly issue: v.NumberIssue | v.
|
|
206
|
+
readonly issue: v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.MinValueIssue<number, 0> | v.UnionIssue<v.BooleanIssue | v.NumberIssue> | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.MaxValueIssue<number, 24>;
|
|
207
207
|
} | undefined;
|
|
208
208
|
};
|
|
209
209
|
type PartialDigitalOutputConfiguration = v.InferInput<typeof partialDigitalOutputConfiguration>;
|
|
@@ -213,7 +213,7 @@ declare const partialOpenDrainConfiguration: Omit<v.ObjectSchema<{
|
|
|
213
213
|
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
214
214
|
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
215
215
|
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
216
|
-
}, undefined>, "~
|
|
216
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
217
217
|
readonly entries: Omit<{
|
|
218
218
|
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
219
219
|
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
@@ -234,7 +234,7 @@ declare const partialOpenDrainConfiguration: Omit<v.ObjectSchema<{
|
|
|
234
234
|
value: boolean;
|
|
235
235
|
vil: number;
|
|
236
236
|
vih: number;
|
|
237
|
-
}, v.
|
|
237
|
+
}, v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.UnionIssue<v.BooleanIssue | v.NumberIssue> | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>>;
|
|
238
238
|
readonly "~types"?: {
|
|
239
239
|
readonly input: {
|
|
240
240
|
value: number | boolean;
|
|
@@ -246,14 +246,52 @@ declare const partialOpenDrainConfiguration: Omit<v.ObjectSchema<{
|
|
|
246
246
|
vil: number;
|
|
247
247
|
vih: number;
|
|
248
248
|
};
|
|
249
|
-
readonly issue: v.
|
|
249
|
+
readonly issue: v.BooleanIssue | v.NumberIssue | v.ObjectIssue | v.UnionIssue<v.BooleanIssue | v.NumberIssue> | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25>;
|
|
250
250
|
} | undefined;
|
|
251
251
|
};
|
|
252
252
|
type PartialOpenDrainConfiguration = v.InferOutput<typeof partialOpenDrainConfiguration>;
|
|
253
|
+
declare const digitalState: v.ObjectSchema<{
|
|
254
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
255
|
+
}, undefined>;
|
|
256
|
+
declare const analogState: v.ObjectSchema<{
|
|
257
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
258
|
+
}, undefined>;
|
|
253
259
|
declare const syncConfiguration: v.ObjectSchema<{
|
|
254
260
|
readonly action: v.PicklistSchema<["release", "hold"], "Invalid sync action">;
|
|
255
261
|
}, undefined>;
|
|
256
262
|
type SyncConfiguration = v.InferOutput<typeof syncConfiguration>;
|
|
263
|
+
declare const syncState: v.ObjectSchema<{
|
|
264
|
+
readonly hold_state: v.PicklistSchema<["held", "released"], undefined>;
|
|
265
|
+
}, undefined>;
|
|
266
|
+
type SyncState = v.InferOutput<typeof syncState>;
|
|
267
|
+
declare const gpioConfiguration: v.UnionSchema<[v.ObjectSchema<{
|
|
268
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
269
|
+
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
270
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
271
|
+
readonly vol: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>;
|
|
272
|
+
readonly voh: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>;
|
|
273
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
274
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
275
|
+
}, undefined>, v.ObjectSchema<{
|
|
276
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
277
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
278
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
279
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
280
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
281
|
+
}, undefined>, v.ObjectSchema<{
|
|
282
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
283
|
+
readonly direction: v.LiteralSchema<"input", undefined>;
|
|
284
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
285
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
286
|
+
}, undefined>, v.ObjectSchema<{
|
|
287
|
+
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
288
|
+
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
289
|
+
readonly value: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 24, undefined>]>, undefined>;
|
|
290
|
+
}, undefined>, v.ObjectSchema<{
|
|
291
|
+
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
292
|
+
readonly direction: v.LiteralSchema<"input", undefined>;
|
|
293
|
+
}, undefined>], undefined>;
|
|
294
|
+
type GpioConfiguration = v.InferOutput<typeof gpioConfiguration>;
|
|
257
295
|
/** @hideconstructor */
|
|
258
296
|
declare class GpioApi {
|
|
259
297
|
private readonly fetch;
|
|
@@ -288,6 +326,17 @@ declare class GpioApi {
|
|
|
288
326
|
* @returns The applied sync state.
|
|
289
327
|
*/
|
|
290
328
|
release(): Promise<SyncConfiguration>;
|
|
329
|
+
/**
|
|
330
|
+
* Reads back the current configuration of a specific IO pin.
|
|
331
|
+
* @param io The IO pin id.
|
|
332
|
+
* @returns The pin's current configuration.
|
|
333
|
+
*/
|
|
334
|
+
read_config(io: number): Promise<GpioConfiguration>;
|
|
335
|
+
/**
|
|
336
|
+
* Reads the current hold state of all GPIO pins.
|
|
337
|
+
* @returns The current sync state.
|
|
338
|
+
*/
|
|
339
|
+
read_sync(): Promise<SyncState>;
|
|
291
340
|
}
|
|
292
341
|
/** @hideconstructor */
|
|
293
342
|
declare class DigitalIO {
|
|
@@ -354,5 +403,5 @@ declare class AnalogIO {
|
|
|
354
403
|
write(value: number): Promise<number>;
|
|
355
404
|
}
|
|
356
405
|
//#endregion
|
|
357
|
-
export { DigitalInputConfiguration as a,
|
|
358
|
-
//# sourceMappingURL=gpio-
|
|
406
|
+
export { openDrainConfiguration as C, gpioConfiguration as S, analogOutputConfiguration as _, DigitalInputConfiguration as a, digitalOutputConfiguration as b, GpioConfiguration as c, PartialDigitalInputConfiguration as d, PartialDigitalOutputConfiguration as f, analogInputConfiguration as g, SyncState as h, DigitalIO as i, OpenDrainConfiguration as l, SyncConfiguration as m, AnalogInputConfiguration as n, DigitalOutputConfiguration as o, PartialOpenDrainConfiguration as p, AnalogOutputConfiguration as r, GpioApi as s, AnalogIO as t, PartialAnalogOutputConfiguration as u, analogState as v, syncState as w, digitalState as x, digitalInputConfiguration as y };
|
|
407
|
+
//# sourceMappingURL=gpio-BuvDysYa.d.cts.map
|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