@ikalogic/at1000 0.1.11 → 0.1.12
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/build/{at1000-KFLhlwg0.d.cts → at1000-BaWovEOC.d.cts} +3 -3
- package/build/{at1000-KFLhlwg0.d.cts.map → at1000-BaWovEOC.d.cts.map} +1 -1
- package/build/{at1000-Cv2e0hBi.cjs → at1000-DCIix1Bo.cjs} +2 -2
- package/build/{at1000-Cv2e0hBi.cjs.map → at1000-DCIix1Bo.cjs.map} +1 -1
- package/build/{at1000-q2I1Kzsu.d.mts → at1000-DavCp3Hf.d.mts} +3 -3
- package/build/{at1000-q2I1Kzsu.d.mts.map → at1000-DavCp3Hf.d.mts.map} +1 -1
- package/build/{at1000-Dt6BT6DI.mjs → at1000-jR3lVIU4.mjs} +2 -2
- package/build/{at1000-Dt6BT6DI.mjs.map → at1000-jR3lVIU4.mjs.map} +1 -1
- package/build/browser.cjs +1 -1
- package/build/browser.d.cts +1 -1
- package/build/browser.d.mts +3 -3
- package/build/browser.mjs +1 -1
- package/build/{com-lprUo9DI.d.mts → com-BjVa30sO.d.cts} +18 -18
- package/build/com-BjVa30sO.d.cts.map +1 -0
- package/build/{com-n6AxqpLd.d.cts → com-rx4xUAUU.d.mts} +18 -18
- package/build/com-rx4xUAUU.d.mts.map +1 -0
- package/build/com.d.cts +1 -1
- package/build/com.d.mts +1 -1
- package/build/gpio-BWNwiLs7.cjs +2 -0
- package/build/gpio-BWNwiLs7.cjs.map +1 -0
- package/build/{gpio-woQ2fDYl.d.cts → gpio-CCSrHpsa.d.cts} +59 -2
- package/build/gpio-CCSrHpsa.d.cts.map +1 -0
- package/build/{gpio-1DhXwkzs.d.mts → gpio-D6PJIYH7.d.mts} +59 -2
- package/build/gpio-D6PJIYH7.d.mts.map +1 -0
- package/build/gpio-lBesVV2E.mjs +2 -0
- package/build/gpio-lBesVV2E.mjs.map +1 -0
- package/build/gpio.cjs +1 -1
- package/build/gpio.d.cts +2 -2
- package/build/gpio.d.mts +2 -2
- package/build/gpio.mjs +1 -1
- package/build/hmi-CG5IhN4l.d.cts.map +1 -1
- package/build/node.cjs +1 -1
- package/build/node.d.cts +1 -1
- package/build/node.d.mts +3 -3
- package/build/node.mjs +1 -1
- package/package.json +1 -1
- package/build/com-lprUo9DI.d.mts.map +0 -1
- package/build/com-n6AxqpLd.d.cts.map +0 -1
- package/build/gpio-1DhXwkzs.d.mts.map +0 -1
- package/build/gpio-DkbxnZ_k.mjs +0 -2
- package/build/gpio-DkbxnZ_k.mjs.map +0 -1
- package/build/gpio-apZVqZ8a.cjs +0 -2
- package/build/gpio-apZVqZ8a.cjs.map +0 -1
- package/build/gpio-woQ2fDYl.d.cts.map +0 -1
|
@@ -28,10 +28,18 @@ declare const digitalOutputConfiguration: v.ObjectSchema<{
|
|
|
28
28
|
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
29
29
|
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
30
30
|
}, undefined>;
|
|
31
|
+
declare const openDrainConfiguration: v.ObjectSchema<{
|
|
32
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
33
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
34
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
35
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
36
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
37
|
+
}, undefined>;
|
|
31
38
|
type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;
|
|
32
39
|
type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;
|
|
33
40
|
type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;
|
|
34
41
|
type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;
|
|
42
|
+
type OpenDrainConfiguration = v.InferOutput<typeof openDrainConfiguration>;
|
|
35
43
|
declare const partialAnalogOutputConfiguration: Omit<v.ObjectSchema<{
|
|
36
44
|
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
37
45
|
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
@@ -199,6 +207,49 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
199
207
|
} | undefined;
|
|
200
208
|
};
|
|
201
209
|
type PartialDigitalOutputConfiguration = v.InferInput<typeof partialDigitalOutputConfiguration>;
|
|
210
|
+
declare const partialOpenDrainConfiguration: Omit<v.ObjectSchema<{
|
|
211
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
212
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
213
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
214
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
215
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
216
|
+
}, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
|
|
217
|
+
readonly entries: Omit<{
|
|
218
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
219
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
220
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
221
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
222
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
223
|
+
}, "mode" | "direction">;
|
|
224
|
+
readonly "~standard": v.StandardProps<{
|
|
225
|
+
value: number | boolean;
|
|
226
|
+
vil: number;
|
|
227
|
+
vih: number;
|
|
228
|
+
}, {
|
|
229
|
+
value: boolean;
|
|
230
|
+
vil: number;
|
|
231
|
+
vih: number;
|
|
232
|
+
}>;
|
|
233
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
234
|
+
value: boolean;
|
|
235
|
+
vil: number;
|
|
236
|
+
vih: number;
|
|
237
|
+
}, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.UnionIssue<v.NumberIssue | v.BooleanIssue>>;
|
|
238
|
+
readonly "~types"?: {
|
|
239
|
+
readonly input: {
|
|
240
|
+
value: number | boolean;
|
|
241
|
+
vil: number;
|
|
242
|
+
vih: number;
|
|
243
|
+
};
|
|
244
|
+
readonly output: {
|
|
245
|
+
value: boolean;
|
|
246
|
+
vil: number;
|
|
247
|
+
vih: number;
|
|
248
|
+
};
|
|
249
|
+
readonly issue: v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.UnionIssue<v.NumberIssue | v.BooleanIssue>;
|
|
250
|
+
} | undefined;
|
|
251
|
+
};
|
|
252
|
+
type PartialOpenDrainConfiguration = v.InferOutput<typeof partialOpenDrainConfiguration>;
|
|
202
253
|
declare const syncConfiguration: v.ObjectSchema<{
|
|
203
254
|
readonly action: v.PicklistSchema<["release", "hold"], "Invalid sync action">;
|
|
204
255
|
}, undefined>;
|
|
@@ -266,6 +317,12 @@ declare class DigitalIO {
|
|
|
266
317
|
* @returns The written value.
|
|
267
318
|
*/
|
|
268
319
|
write(value: boolean | number): Promise<boolean>;
|
|
320
|
+
/**
|
|
321
|
+
* Configure the pin as an open drain output.
|
|
322
|
+
* @param config The open drain configuration.
|
|
323
|
+
* @returns The applied configuration.
|
|
324
|
+
*/
|
|
325
|
+
configure_open_drain(config: PartialOpenDrainConfiguration): Promise<OpenDrainConfiguration>;
|
|
269
326
|
}
|
|
270
327
|
/** @hideconstructor */
|
|
271
328
|
declare class AnalogIO {
|
|
@@ -297,5 +354,5 @@ declare class AnalogIO {
|
|
|
297
354
|
write(value: number): Promise<number>;
|
|
298
355
|
}
|
|
299
356
|
//#endregion
|
|
300
|
-
export { DigitalInputConfiguration as a,
|
|
301
|
-
//# sourceMappingURL=gpio-
|
|
357
|
+
export { DigitalInputConfiguration as a, OpenDrainConfiguration as c, PartialDigitalOutputConfiguration as d, PartialOpenDrainConfiguration as f, DigitalIO as i, PartialAnalogOutputConfiguration as l, AnalogInputConfiguration as n, DigitalOutputConfiguration as o, SyncConfiguration as p, AnalogOutputConfiguration as r, GpioApi as s, AnalogIO as t, PartialDigitalInputConfiguration as u };
|
|
358
|
+
//# sourceMappingURL=gpio-CCSrHpsa.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpio-CCSrHpsa.d.cts","names":[],"sources":["../src/api/gpio.ts"],"sourcesContent":[],"mappings":";;;;;;cASM,0BAAwB,CAAA,CAAA;EAAxB,SAAA,IAAA,iBAGJ,CAAA,QAAA,EAAA,SAAA,CAAA;;;cACI,yBAJwB,EAIC,CAAA,CAAA,YAJD,CAAA;EAAA,SAAA,IAAA,iBAAA,CAAA,QAAA,EAAA,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AA;;;;;;;;;;;;;;;;;;;;;;;;;;;KAI3B,iCAAA,GAAoC,CAAA,CAAE,kBACzC;cAEH,+BAA6B,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;EAPI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;KAQ3B,6BAAA,GAAgC,CAAA,CAAE,mBAAmB;cAK3D,mBAAiB,CAAA,CAAA;mBAAmC,CAAA,CAAA;;KAC9C,iBAAA,GAAoB,CAAA,CAAE,mBAAmB;;cAGxC,OAAA;;;qBAGyB,eAAe;;;;WAO1C;;;;;;uBASY;;;;;;sBAiBD;;;;;EAjDV,IAAA,CAAA,CAAA,EAiEF,OAjEE,CAiEM,iBAjEN,CAAA;EAGN;;;;;;;aA6EO,QAAQ;;;cAUR,SAAA;;;qBACyB;;;;;;0BAOZ,mCAAmC,QAAQ;;;;;;2BAgB1C,oCAAoC,QAAQ;;;;;UAwBvD;;;;;;kCASwB;;;;;;+BAcT,gCAAgC,QAAQ;;;cAa1D,QAAA;;;qBACyB;;;;;;qBAOjB,QAAQ;;AAlL7B;AAAgG;AAMhG;AAGA;EAGsC,gBAAA,CAAA,KAAA,EAmLZ,iBAnLY,CAAA,EAmLQ,OAnLR,CAmLgB,yBAnLhB,CAAA;EAAe;;;;EAiDnC,IAAA,CAAA,CAAA,EAiJF,OAjJE,CAAA,MAAA,CAAA;EAAR;;;;AAyBV;EACsC,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA,EAgIR,OAhIQ,CAAA,MAAA,CAAA"}
|
|
@@ -28,10 +28,18 @@ declare const digitalOutputConfiguration: v.ObjectSchema<{
|
|
|
28
28
|
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
29
29
|
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
30
30
|
}, undefined>;
|
|
31
|
+
declare const openDrainConfiguration: v.ObjectSchema<{
|
|
32
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
33
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
34
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
35
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
36
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
37
|
+
}, undefined>;
|
|
31
38
|
type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;
|
|
32
39
|
type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;
|
|
33
40
|
type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;
|
|
34
41
|
type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;
|
|
42
|
+
type OpenDrainConfiguration = v.InferOutput<typeof openDrainConfiguration>;
|
|
35
43
|
declare const partialAnalogOutputConfiguration: Omit<v.ObjectSchema<{
|
|
36
44
|
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
37
45
|
readonly direction: v.LiteralSchema<"output", undefined>;
|
|
@@ -199,6 +207,49 @@ declare const partialDigitalOutputConfiguration: Omit<Omit<v.ObjectSchema<{
|
|
|
199
207
|
} | undefined;
|
|
200
208
|
};
|
|
201
209
|
type PartialDigitalOutputConfiguration = v.InferInput<typeof partialDigitalOutputConfiguration>;
|
|
210
|
+
declare const partialOpenDrainConfiguration: Omit<v.ObjectSchema<{
|
|
211
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
212
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
213
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
214
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
215
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
216
|
+
}, undefined>, "~standard" | "~run" | "~types" | "entries"> & {
|
|
217
|
+
readonly entries: Omit<{
|
|
218
|
+
readonly mode: v.LiteralSchema<"digital", undefined>;
|
|
219
|
+
readonly direction: v.LiteralSchema<"open_drain", undefined>;
|
|
220
|
+
readonly value: v.SchemaWithPipe<readonly [v.UnionSchema<[v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.ToBooleanAction<number | boolean>]>;
|
|
221
|
+
readonly vil: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
222
|
+
readonly vih: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -25, undefined>, v.MaxValueAction<number, 25, undefined>]>;
|
|
223
|
+
}, "mode" | "direction">;
|
|
224
|
+
readonly "~standard": v.StandardProps<{
|
|
225
|
+
value: number | boolean;
|
|
226
|
+
vil: number;
|
|
227
|
+
vih: number;
|
|
228
|
+
}, {
|
|
229
|
+
value: boolean;
|
|
230
|
+
vil: number;
|
|
231
|
+
vih: number;
|
|
232
|
+
}>;
|
|
233
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
234
|
+
value: boolean;
|
|
235
|
+
vil: number;
|
|
236
|
+
vih: number;
|
|
237
|
+
}, v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.UnionIssue<v.NumberIssue | v.BooleanIssue>>;
|
|
238
|
+
readonly "~types"?: {
|
|
239
|
+
readonly input: {
|
|
240
|
+
value: number | boolean;
|
|
241
|
+
vil: number;
|
|
242
|
+
vih: number;
|
|
243
|
+
};
|
|
244
|
+
readonly output: {
|
|
245
|
+
value: boolean;
|
|
246
|
+
vil: number;
|
|
247
|
+
vih: number;
|
|
248
|
+
};
|
|
249
|
+
readonly issue: v.NumberIssue | v.BooleanIssue | v.ObjectIssue | v.MinValueIssue<number, -25> | v.MaxValueIssue<number, 25> | v.UnionIssue<v.NumberIssue | v.BooleanIssue>;
|
|
250
|
+
} | undefined;
|
|
251
|
+
};
|
|
252
|
+
type PartialOpenDrainConfiguration = v.InferOutput<typeof partialOpenDrainConfiguration>;
|
|
202
253
|
declare const syncConfiguration: v.ObjectSchema<{
|
|
203
254
|
readonly action: v.PicklistSchema<["release", "hold"], "Invalid sync action">;
|
|
204
255
|
}, undefined>;
|
|
@@ -266,6 +317,12 @@ declare class DigitalIO {
|
|
|
266
317
|
* @returns The written value.
|
|
267
318
|
*/
|
|
268
319
|
write(value: boolean | number): Promise<boolean>;
|
|
320
|
+
/**
|
|
321
|
+
* Configure the pin as an open drain output.
|
|
322
|
+
* @param config The open drain configuration.
|
|
323
|
+
* @returns The applied configuration.
|
|
324
|
+
*/
|
|
325
|
+
configure_open_drain(config: PartialOpenDrainConfiguration): Promise<OpenDrainConfiguration>;
|
|
269
326
|
}
|
|
270
327
|
/** @hideconstructor */
|
|
271
328
|
declare class AnalogIO {
|
|
@@ -297,5 +354,5 @@ declare class AnalogIO {
|
|
|
297
354
|
write(value: number): Promise<number>;
|
|
298
355
|
}
|
|
299
356
|
//#endregion
|
|
300
|
-
export { DigitalInputConfiguration as a,
|
|
301
|
-
//# sourceMappingURL=gpio-
|
|
357
|
+
export { DigitalInputConfiguration as a, OpenDrainConfiguration as c, PartialDigitalOutputConfiguration as d, PartialOpenDrainConfiguration as f, DigitalIO as i, PartialAnalogOutputConfiguration as l, AnalogInputConfiguration as n, DigitalOutputConfiguration as o, SyncConfiguration as p, AnalogOutputConfiguration as r, GpioApi as s, AnalogIO as t, PartialDigitalInputConfiguration as u };
|
|
358
|
+
//# sourceMappingURL=gpio-D6PJIYH7.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpio-D6PJIYH7.d.mts","names":[],"sources":["../src/api/gpio.ts"],"sourcesContent":[],"mappings":";;;;;;cASM,0BAAwB,CAAA,CAAA;EAAxB,SAAA,IAAA,iBAGJ,CAAA,QAAA,EAAA,SAAA,CAAA;;;cACI,yBAJwB,EAIC,CAAA,CAAA,YAJD,CAAA;EAAA,SAAA,IAAA,iBAAA,CAAA,QAAA,EAAA,SAAA,CAAA;EAIxB,SAAA,SAAA,iBAIJ,CAAA,QAAA,EAAA,SAAA,CAAA;;;cACI,2BAAyB,CAAA,CAAA;;;;;CALA,EAAA,SAAA,CAAA;cAWzB,0BAXyB,EAWC,CAAA,CAAA,YAXD,CAAA;EAKzB,SAAA,IAAA,iBAKJ,CAAA,SAAA,EAAA,SAAA,CAAA;;;;;;;;cAUI,wBAAsB,CAAA,CAAA;;;EAfG,SAAA,KAAA,kBAAA,CAAA,SAAA,cAAA,CAAA,gBAAA,CAAA,SAAA,CAAA,gBAAA,CAAA,SAAA,CAAA,CAAA,EAAA,SAAA,CAAA,mBAAA,CAAA,MAAA,GAAA,OAAA,CAAA,CAAA,CAAA;EAAA,SAAA,GAAA,kBAAA,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,EAAA,EAAA,SAAA,CAAA,CAAA,CAAA;EAMzB,SAAA,GAAA,kBAQJ,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,EAAA,SAAA,CAAA,kBAAA,CAAA,MAAA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CAmLgB,yBAnLhB,CAAA;EAAe;;;;EAiDnC,IAAA,CAAA,CAAA,EAiJF,OAjJE,CAAA,MAAA,CAAA;EAAR;;;;AAyBV;EACsC,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA,EAgIR,OAhIQ,CAAA,MAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./common-B_zag9Mq.mjs";import*as r from"valibot";const i=r.picklist([`release`,`hold`],`Invalid sync action`),a=r.object({mode:r.literal(`analog`),direction:r.literal(`input`)}),o=r.object({mode:r.literal(`analog`),direction:r.literal(`output`),value:r.optional(e)}),s=r.object({mode:r.literal(`digital`),direction:r.literal(`input`),vil:n,vih:n}),c=r.object({mode:r.literal(`digital`),direction:r.literal(`output`),value:t,vol:e,voh:e,vil:n,vih:n}),l=r.object({mode:r.literal(`digital`),direction:r.literal(`open_drain`),value:t,vil:n,vih:n});r.omit(o,[`direction`,`mode`]),r.omit(s,[`direction`,`mode`]);const u=r.partial(r.omit(c,[`direction`,`mode`]),[`vih`,`vil`]);r.omit(l,[`direction`,`mode`]);const d=r.object({value:t}),f=r.object({value:n}),p=r.object({action:i});var m=class{count;constructor(e,t){this.fetch=e,this.count=t.capabilities.io.count}reset(){return this.fetch(`/gpio/reset`,{method:`POST`,parseResponse:()=>{}})}digital(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new h(this.fetch,e)}analog(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new g(this.fetch,e)}hold(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`hold`},schema:p})}release(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`release`},schema:p})}},h=class{constructor(e,t){this.fetch=e,this.id=t}configure_input(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(s,{...e,mode:`digital`,direction:`input`}),schema:s})}configure_output(e){e=r.parse(u,e);let t={mode:`digital`,direction:`output`,value:e.value,vol:e.vol,voh:e.voh,vil:e.vil??e.vol+(e.voh-e.vol)/4,vih:e.vih??e.voh-(e.voh-e.vol)/4};return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(c,t),schema:c})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:d})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:d})).value}configure_open_drain(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(l,{...e,mode:`digital`,direction:`open_drain`}),schema:l})}},g=class{constructor(e,t){this.fetch=e,this.id=t}configure_input(){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:{mode:`analog`,direction:`input`},schema:a})}configure_output(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(o,{value:e,mode:`analog`,direction:`output`}),schema:o})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:f})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:f})).value}};export{h as n,m as r,g as t};
|
|
2
|
+
//# sourceMappingURL=gpio-lBesVV2E.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpio-lBesVV2E.mjs","names":[],"sources":["../src/api/gpio.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel, analogOutputLevel, digitalLevel } from './common';\nimport type { Information } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst syncAction = v.picklist(['release', 'hold'], 'Invalid sync action');\nconst analogInputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('input'),\n});\nconst analogOutputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('output'),\n value: v.optional(analogOutputLevel),\n});\nconst digitalInputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('input'),\n vil: analogLevel,\n vih: analogLevel,\n});\nconst digitalOutputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('output'),\n value: digitalLevel,\n vol: analogOutputLevel,\n voh: analogOutputLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nconst openDrainConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('open_drain'),\n value: digitalLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;\nexport type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;\nexport type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;\nexport type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;\nexport type OpenDrainConfiguration = v.InferOutput<typeof openDrainConfiguration>;\n\nconst partialAnalogOutputConfiguration = v.omit(analogOutputConfiguration, ['direction', 'mode']);\nexport type PartialAnalogOutputConfiguration = v.InferOutput<\n typeof partialAnalogOutputConfiguration\n>;\nconst partialDigitalInputConfiguration = v.omit(digitalInputConfiguration, ['direction', 'mode']);\nexport type PartialDigitalInputConfiguration = v.InferOutput<\n typeof partialDigitalInputConfiguration\n>;\nconst partialDigitalOutputConfiguration = v.partial(\n v.omit(digitalOutputConfiguration, ['direction', 'mode']),\n ['vih', 'vil'],\n);\nexport type PartialDigitalOutputConfiguration = v.InferInput<\n typeof partialDigitalOutputConfiguration\n>;\nconst partialOpenDrainConfiguration = v.omit(openDrainConfiguration, ['direction', 'mode']);\nexport type PartialOpenDrainConfiguration = v.InferOutput<typeof partialOpenDrainConfiguration>;\n\nconst digitalState = v.object({ value: digitalLevel });\nconst analogState = v.object({ value: analogLevel });\n\nconst syncConfiguration = v.object({ action: syncAction });\nexport type SyncConfiguration = v.InferOutput<typeof syncConfiguration>;\n\n/** @hideconstructor */\nexport class GpioApi {\n private count: number;\n\n constructor(private readonly fetch: UpFetch, info: Information) {\n this.count = info.capabilities.io.count;\n }\n\n /**\n * Resets all IO configurations to default.\n */\n reset(): Promise<void> {\n return this.fetch('/gpio/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific digital IO pin by id.\n * @param io The IO pin id.\n * @returns The digital IO instance.\n */\n digital(io: number): DigitalIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new DigitalIO(this.fetch, io);\n }\n\n /**\n * Access a specific analog IO pin by id.\n * @param io The IO pin id.\n * @returns The analog IO instance.\n */\n analog(io: number): AnalogIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new AnalogIO(this.fetch, io);\n }\n\n /**\n * Holds the current state of all GPIO pins.\n * @returns The applied sync state.\n */\n hold(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'hold' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Releases control of the IO pins, allowing external control.\n *\n * This also sets the device as a slave.\n *\n * @returns The applied sync state.\n */\n release(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'release' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class DigitalIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configure the pin as a digital input.\n * @param config The digital input configuration.\n * @returns The applied configuration.\n */\n configure_input(config: PartialDigitalInputConfiguration): Promise<DigitalInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n digitalInputConfiguration,\n { ...config, mode: 'digital', direction: 'input' } satisfies DigitalInputConfiguration,\n ),\n schema: digitalInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as a digital output.\n * @param config The digital output configuration.\n * @returns The applied configuration.\n */\n configure_output(config: PartialDigitalOutputConfiguration): Promise<DigitalOutputConfiguration> {\n config = v.parse(partialDigitalOutputConfiguration, config);\n\n const fullConfig = {\n mode: 'digital' as const,\n direction: 'output' as const,\n value: config.value,\n vol: config.vol,\n voh: config.voh,\n vil: config.vil ?? config.vol + (config.voh - config.vol) / 4,\n vih: config.vih ?? config.voh - (config.voh - config.vol) / 4,\n };\n\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(digitalOutputConfiguration, fullConfig),\n schema: digitalOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: digitalState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: boolean | number): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: digitalState,\n }))\n .value;\n }\n\n /**\n * Configure the pin as an open drain output.\n * @param config The open drain configuration.\n * @returns The applied configuration.\n */\n configure_open_drain(config: PartialOpenDrainConfiguration): Promise<OpenDrainConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n openDrainConfiguration,\n { ...config, mode: 'digital', direction: 'open_drain' } satisfies OpenDrainConfiguration,\n ),\n schema: openDrainConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class AnalogIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configures the pin as an analog input.\n * @returns The applied configuration.\n * @returns The applied configuration.\n */\n configure_input(): Promise<AnalogInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: { mode: 'analog', direction: 'input' } satisfies AnalogInputConfiguration,\n schema: analogInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as an analog output.\n * @param config The analog output configuration.\n * @returns The applied configuration.\n */\n configure_output(value: AnalogOutputLevel): Promise<AnalogOutputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n analogOutputConfiguration,\n { value, mode: 'analog', direction: 'output' } satisfies AnalogOutputConfiguration,\n ),\n schema: analogOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: analogState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: number): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: analogState,\n }))\n .value;\n }\n}\n"],"mappings":"kFAQA,MAAM,EAAa,EAAE,SAAS,CAAC,UAAW,OAAO,CAAE,sBAAsB,CACnE,EAA2B,EAAE,OAAO,CACxC,KAAM,EAAE,QAAQ,SAAS,CACzB,UAAW,EAAE,QAAQ,QAAQ,CAC9B,CAAC,CACI,EAA4B,EAAE,OAAO,CACzC,KAAM,EAAE,QAAQ,SAAS,CACzB,UAAW,EAAE,QAAQ,SAAS,CAC9B,MAAO,EAAE,SAAS,EAAkB,CACrC,CAAC,CACI,EAA4B,EAAE,OAAO,CACzC,KAAM,EAAE,QAAQ,UAAU,CAC1B,UAAW,EAAE,QAAQ,QAAQ,CAC7B,IAAK,EACL,IAAK,EACN,CAAC,CACI,EAA6B,EAAE,OAAO,CAC1C,KAAM,EAAE,QAAQ,UAAU,CAC1B,UAAW,EAAE,QAAQ,SAAS,CAC9B,MAAO,EACP,IAAK,EACL,IAAK,EACL,IAAK,EACL,IAAK,EACN,CAAC,CACI,EAAyB,EAAE,OAAO,C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A,MAAA,EAAgC,KAAA,GAAA,EAO7D,iBAAqD,CACnD,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAM,CAAE,KAAM,SAAU,UAAW,QAAS,CAC5C,OAAQ,EACT,CAAC,CAQJ,iBAAiB,EAA8D,CAC7E,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAM,EAAE,MACN,EACA,CAAE,QAAO,KAAM,SAAU,UAAW,SAAU,CAC/C,CACD,OAAQ,EACT,CAAC,CAOJ,MAAM,MAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CAAE,OAAQ,EAAa,CAAC,EAAE,MAQ/E,MAAM,MAAM,EAAgC,CAC1C,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CACjD,OAAQ,MACR,KAAM,CAAE,QAAO,CACf,OAAQ,EACT,CAAC,EACC"}
|
package/build/gpio.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./common-SFHWBeL2.cjs`);const e=require(`./gpio-
|
|
1
|
+
require(`./common-SFHWBeL2.cjs`);const e=require(`./gpio-BWNwiLs7.cjs`);exports.AnalogIO=e.t,exports.DigitalIO=e.n,exports.GpioApi=e.r;
|
package/build/gpio.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as AnalogOutputLevel } from "./common-DAOxX-Zx.cjs";
|
|
2
|
-
import { a as DigitalInputConfiguration, c as
|
|
3
|
-
export { AnalogIO, AnalogInputConfiguration, AnalogOutputConfiguration, AnalogOutputLevel, DigitalIO, DigitalInputConfiguration, DigitalOutputConfiguration, GpioApi, PartialAnalogOutputConfiguration, PartialDigitalInputConfiguration, PartialDigitalOutputConfiguration, SyncConfiguration };
|
|
2
|
+
import { a as DigitalInputConfiguration, c as OpenDrainConfiguration, d as PartialDigitalOutputConfiguration, f as PartialOpenDrainConfiguration, i as DigitalIO, l as PartialAnalogOutputConfiguration, n as AnalogInputConfiguration, o as DigitalOutputConfiguration, p as SyncConfiguration, r as AnalogOutputConfiguration, s as GpioApi, t as AnalogIO, u as PartialDigitalInputConfiguration } from "./gpio-CCSrHpsa.cjs";
|
|
3
|
+
export { AnalogIO, AnalogInputConfiguration, AnalogOutputConfiguration, AnalogOutputLevel, DigitalIO, DigitalInputConfiguration, DigitalOutputConfiguration, GpioApi, OpenDrainConfiguration, PartialAnalogOutputConfiguration, PartialDigitalInputConfiguration, PartialDigitalOutputConfiguration, PartialOpenDrainConfiguration, SyncConfiguration };
|
package/build/gpio.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as AnalogOutputLevel } from "./common-SiysH9tt.mjs";
|
|
2
2
|
import "./management-Cw05hjbG.mjs";
|
|
3
|
-
import { a as DigitalInputConfiguration, c as
|
|
4
|
-
export { AnalogIO, AnalogInputConfiguration, AnalogOutputConfiguration, AnalogOutputLevel, DigitalIO, DigitalInputConfiguration, DigitalOutputConfiguration, GpioApi, PartialAnalogOutputConfiguration, PartialDigitalInputConfiguration, PartialDigitalOutputConfiguration, SyncConfiguration };
|
|
3
|
+
import { a as DigitalInputConfiguration, c as OpenDrainConfiguration, d as PartialDigitalOutputConfiguration, f as PartialOpenDrainConfiguration, i as DigitalIO, l as PartialAnalogOutputConfiguration, n as AnalogInputConfiguration, o as DigitalOutputConfiguration, p as SyncConfiguration, r as AnalogOutputConfiguration, s as GpioApi, t as AnalogIO, u as PartialDigitalInputConfiguration } from "./gpio-D6PJIYH7.mjs";
|
|
4
|
+
export { AnalogIO, AnalogInputConfiguration, AnalogOutputConfiguration, AnalogOutputLevel, DigitalIO, DigitalInputConfiguration, DigitalOutputConfiguration, GpioApi, OpenDrainConfiguration, PartialAnalogOutputConfiguration, PartialDigitalInputConfiguration, PartialDigitalOutputConfiguration, PartialOpenDrainConfiguration, SyncConfiguration };
|
package/build/gpio.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./common-B_zag9Mq.mjs";import{n as e,r as t,t as n}from"./gpio-
|
|
1
|
+
import"./common-B_zag9Mq.mjs";import{n as e,r as t,t as n}from"./gpio-lBesVV2E.mjs";export{n as AnalogIO,e as DigitalIO,t as GpioApi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmi-CG5IhN4l.d.cts","names":[],"sources":["../src/api/hmi.ts"],"sourcesContent":[],"mappings":";;;;cAGM,YAAU,CAAA,CAAA,yBAAA,CAAA,CAAA,yBAAA,CAAA,CAAA;KACJ,UAAA,GAAa,CAAA,CAAE,mBAAmB;AAHjB,cASvB,KAPkD,EAO7C,CAAA,CAAA,YAP6C,CAAA;EAAxC,SAAA,IAAA,kBAAA,iBAAA,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,gBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA;EAAA,SAAA,QAAA,kBAAA,iBAAA,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,gBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA;EAAA,SAAA,UAAA,kBAAA,iBAAA,CAAA,SAAA,eAAA,CAAA,SAAA,CAAA,gBAAA,CAAA,MAAA,EAAA,CAAA,EAAA,SAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA;CAAA,EAAA,SAAA,CAAA;AACJ,KAWA,KAAA,GAAQ,CAAA,CAAE,WAXwB,CAAA,OAWL,KAXd,CAAA;AAA+B,cAapD,aAHJ,EAGiB,CAAA,CAAA,cAHjB,CAAA,SAAA,CAGiB,CAAA,CAAA,YAHjB,CAAA,SAAA,CAAA,EAGiB,CAAA,CAAA,cAHjB,CAAA,M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;;WAUJ;;;;;YAQC;;;;;WAQD;;;AAzBX;AAGA;EACsC,IAAA,CAAA,CAAA,EA6B5B,IA7B4B;;;AAqB3B,cAcE,MAAA,CAdF;EAQD,iBAAA,KAAA;EAAI,WAAA,CAAA,KAAA,EAOwB,OAPxB;EAMD;;;;;EAsBoB,KAAA,CAAA,IAAA,EAdb,UAca,CAAA,EAdA,OAcA,CAAA,MAAA,CAAA;EAAR;;;;;EA+BP,MAAA,CAAA,MAAA,EA/BD,KA+BC,CAAA,EA/BO,OA+BP,CA/Be,KA+Bf,CAAA;EAML;;;;;EAQuC,QAAA,CAAA,IAAA,EAhC7B,aAgC6B,CAAA,EAhCb,OAgCa,CAhCL,QAgCK,CAAA;EAUvC;;;EAamC,KAAA,CAAA,CAAA,EArCrC,OAqCqC,CAAA,IAAA,CAAA;;;cA/BnC,KAAA;;qBACyB;;;;;;eAOjB,wBAAwB,QAAQ;;;cAUxC,IAAA;;qBACyB;;2BAKnB;;;;;;kCAOqB,QAAQ"}
|
package/build/node.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./at1000-Cv2e0hBi.cjs`);require(`./com-C7d5yOIK.cjs`),require(`./common-SFHWBeL2.cjs`),require(`./gpio-apZVqZ8a.cjs`),require(`./hmi-CnTa8kMx.cjs`),require(`./management-Lna6AzGK.cjs`),require(`./power-C7KM2zvR.cjs`),require(`./relays-BK2uL5i_.cjs`);let n=require(`dns-packet`);n=e.t(n);let r=require(`node:events`),i=require(`node:util`);i=e.t(i);let a=require(`ip-address`);a=e.t(a);let o=require(`node:os`);o=e.t(o);let s=require(`node:dgram`);s=e.t(s);const c=`224.0.0.251`,l=`FF02::FB`,u=5353,d=`IPv4`,f=4,p=`IPv6`,m=6,h=[d,4,p,6];var g=class e{static getInterfaces(t){return t?e.getInterfacesFromStrings(t):e.getAllInterfaces()}static getAllInterfaces(){let e=[],t=[],n=o.default.networkInterfaces();for(let[r,i]of Object.entries(n))t.includes(r)||(t.push(r),i?.forEach(t=>{t.internal||!h.includes(t.family)||/^(2002|2001):/gi.exec(t.address)||e.push({name:r,address:t.address,family:t.family,scopeid:t.scopeid})}));if(!e.length)throw Error(`No usable network interfaces returned by OS.`);return e}static getInterfacesFromStrings(t){let n=Array.isArray(t)?t:[t],r=this.getAllInterfaces().filter(t=>n.reduce((n,r)=>n||!!(e.stringMatchesAddress(r,t.address)||t.name===r),!1));if(!r||!r.length)throw Error(`No usable network interfaces returned by OS.`);return r}static stringMatchesAddress(e,t){let n,r;try{n=new a.default.Address4(e),r=new a.default.Address4(t)}catch{try{n=new a.default.Address6(e),r=new a.default.Address6(t)}catch{return!1}}return n.bigInt()===r.bigInt()}},_=g;const v={interfaces:[],reuseAddr:!0,ttl:255,loopback:!0,onMessage:(e,t)=>{console.log(`Message `+e.toString())},socketError:e=>{console.log(`Socket error `+e.message)}};var y=class e{static validateSettings(e){if(!e.multicastAddress)throw Error(`Socket settings require multicastAddress`);if(!e.multicastPort)throw Error(`Socket settings require multicastPort`)}static createMulticastSocket(t){return new Promise((n,r)=>{let i=Object.assign({},v,t);e.validateSettings(i);let o=s.default.createSocket({type:a.default.Address4.isValid(i.multicastAddress)?`udp4`:`udp6`,reuseAddr:i.reuseAddr}),c=!1;o.on(`error`,e=>{c?i.socketError(e):(o.close(),n({success:!1,error:e}))}).on(`listening`,()=>{c=!0,o.setMulticastTTL(i.ttl??255),o.setMulticastLoopback(i.loopback??!0);let t=e.addMulticastMemberships(o,i);if(!t.memberships.length){c=!1,o.close(),n({success:!1,error:Error(`No interface memberships for multicast address `+i.multicastAddress)});return}n(Object.assign({success:!0},t,{socket:o}))}).on(`message`,(e,t)=>{i.onMessage(e,t)}),o.bind({port:i.multicastPort,exclusive:!1})})}static addMulticastMemberships(t,n){let r=[],i=[],o=a.default.Address4.isValid(n.multicastAddress)?[d,4]:[p,6];return n.interfaces.forEach(a=>{if(o.includes(a.family))try{t.addMembership(n.multicastAddress,e.interfaceAddress(a)),r.push(a)}catch{i.push(a)}}),{memberships:r,failedMemberships:i}}static async createSendSocket(t,n,r,i){return new Promise((a,o)=>{let c=s.default.createSocket({type:[d,4].includes(t.family)?`udp4`:`udp6`,reuseAddr:!!n.reuseAddr});c.once(`error`,e=>{c.close(),a({success:!1,error:Error(e.message)})}).on(`error`,i).on(`listening`,()=>{a({success:!0,iface:t,socket:c,send:c.send.bind(c)})}).on(`message`,(e,n)=>{n.interface=t.name,r(e,n)}).bind(n.srcPort||0,e.interfaceAddress(t))})}static interfaceAddress(e){return[d,4].includes(e.family)?e.address:e.scopeid?`${e.address}%${e.scopeid}`:e.address}},b=y;const x={reuseAddr:!0,srcPort:0,interfaces:null,ttl:255,loopback:!0,debug:!1};var S=class extends r.EventEmitter{Config;ready;receiveSockets;sendSockets;interfaces;destroyed;constructor(e){super(),this.Config=Object.assign({},x,e),this.ready=!1,this.receiveSockets=[],this.sendSockets=[]}async init(){try{this.interfaces=_.getInterfaces(this.Config.interfaces||void 0)}catch(e){throw this.emitError(e),e}return this.emitDebug(`Scanner interfaces: ${i.default.inspect(this.interfaces)}`),await this.createReceiveSockets(),await this.createSendSockets(),this.receiveSockets.length&&this.sendSockets.length&&(this.ready=!0),this.ready}async createReceiveSockets(){if(!this.interfaces)return[];let e=this.interfaces.filter(e=>[d,4].includes(e.family)),t=this.interfaces.filter(e=>[p,6].includes(e.family));if(this.emitDebug(`Create receive sockets for${e.length?` `+d:``}${e.length&&t.length?` and`:``}${t.length?` `+p:``}`),e.length){let t=await b.createMulticastSocket({multicastAddress:c,multicastPort:u,interfaces:e,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});t.success?this.receiveSockets.push(t):t.error&&this.emitError(t.error.message)}if(t.length){let e=await b.createMulticastSocket({multicastAddress:l,multicastPort:u,interfaces:t,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});e.success?this.receiveSockets.push(e):e.error&&this.emitError(e.error.message)}return this.receiveSockets}async createSendSockets(){if(this.interfaces){this.emitDebug(`Create send sockets on ${this.interfaces.length} interfaces/addresses.`);for(let e=0;e<this.interfaces.length;e++){let t=await b.createSendSocket(this.interfaces[e],this.Config,this.onMessage.bind(this),this.socketError.bind(this));t.success?this.sendSockets.push(t):t.error&&this.emitError(t.error.message)}}}onMessage(e,t){let r;try{r=n.default.decode(e)}catch(e){return this.emitWarn(e)}this.emit(`packet`,r,t)}socketError(e){e.code===`EACCES`||e.code===`EADDRINUSE`||e.code===`EADDRNOTAVAIL`?this.emitError(e):this.emitWarn(e)}query(e,t){let n;if(typeof e==`string`)n=[{name:e,type:t||`ANY`}];else if(Array.isArray(e))n=e;else throw Error(`Query questions must be an array of mDNS query questions.`);let r={type:`query`,questions:n};this.emitDebug(`Send mDNS query: ${i.default.inspect(r)}`),this.send(r)}send(e){if(this.destroyed)return;let t=n.default.encode(e);for(let e=0;e<this.sendSockets.length;e++){let n=this.sendSockets[e];n.send&&n.iface&&(n.send(t,0,t.length,u,[d,4].includes(n.iface.family)?c:l+`%`+n.iface.name),this.emitDebug(`Send packet on ${n.iface.address}`))}}destroy(){this.ready=!1,this.sendSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.sendSockets=[],this.receiveSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.receiveSockets=[]}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}},C=S;const w={debug:!1};var T=class extends r.EventEmitter{Config;scanner;types;namedServices;packetListener;constructor(e,t){super(),this.packetListener=this.onPacket.bind(this),this.scanner=e,this.Config=Object.assign({},w,t),this.types=[],this.namedServices={},this.forwardEvents(this.scanner),this.reset()}reset(){this.removeMDNSListener(this.scanner),this.types=[],this.namedServices={},this.listenMDNSEvents(this.scanner)}forwardEvents(e){e.on(`error`,e=>{this.emitError(e)}).on(`warn`,e=>{this.emitWarn(e)}).on(`debug`,e=>{this.emitDebug(e)})}listenMDNSEvents(e){e.on(`packet`,this.packetListener)}removeMDNSListener(e){e.removeListener(`packet`,this.packetListener)}onPacket(e,t){switch(this.emitDebug(`Received packet type ${e.type} from ${t.address}.`),e.type){case`query`:this.emit(`query`,e,t);break;case`response`:this.emitDebug(`Received response packet from ${t.address} with ${e.answers?e.answers.length:0} answers and ${e.additionals?e.additionals.length:0} additionals.`),e.answers&&this.processAnswers(e.answers,t),e.additionals&&this.processAnswers(e.additionals,t);break}}processAnswers(e,t){this.emitDebug(`Processing answers or additionals...`);let n=this.processSRVAnswers(e);this.processTXTAnswers(e),this.processAAnswers(e),this.processAAAAAnswers(e),this.processPTRAnswers(e,t),n.forEach(e=>{this.emit(`discovered`,{type:`service`,data:this.namedServices[e]})})}processSRVAnswers(e){let t=[];return e.forEach(e=>{if(e.type!==`SRV`)return;this.emitDebug(`Processing SRV answer.`);let n=e.name.toString();t.includes(n)||t.push(n),this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].service=e,this.namedServices[n].host=e.data.target.toString(),this.namedServices[n].port=e.data.port}),t}processTXTAnswers(e){e.forEach(e=>{if(e.type!==`TXT`)return;this.emitDebug(`Processing TXT answer.`);let t=e.data;if(Array.isArray(t)&&t.length>1){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(Buffer.concat(t))}else if(Buffer.isBuffer(t)){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(t)}})}processAAnswers(e){e.forEach(e=>{if(e.type!==`A`)return;this.emitDebug(`Processing A answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:d,address:n}))})}processAAAAAnswers(e){e.forEach(e=>{if(e.type!==`AAAA`)return;this.emitDebug(`Processing AAAA answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:p,address:n}))})}processPTRAnswers(e,t){e.forEach(e=>{if(e.type!==`PTR`)return;this.emitDebug(`Processing PTR answer.`);let n=this.serviceTypeFromPTR(e),r=e.data.toString();n!==r&&(this.namedServices[r]=this.namedServices[r]||{},this.namedServices[r].name=r.replace(`.`+n,``),this.namedServices[r].rinfo=t)})}serviceTypeFromPTR(e){let t=e.data,n=/(?:^|^.+?(?:\.))(_.*)$/gm.exec(t.toString()),r=n?n[1]:t.toString();return this.types.includes(r)||(this.types.push(r),this.emit(`discovered`,{type:`type`,data:r}),this.emitDebug(`Scanning service type ${r}.`),this.scanner.query(r,`ANY`)),r}answerDataToKeyValues(e){let t=[],n={},r=0,i=e[r];for(;i;){let a=e.slice(r+1,r+1+i);t.push(a.toString());let o=/^([^=]+)=([^=]*)$/.exec(a.toString());o&&(n[o[1]]=o[2]),r=r+1+i,i=e[r]}return{strings:t,keyValuePairs:n}}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}},E=T;const D=async(e=500)=>{e<10&&(e=10);let n=new C({debug:!0}),r=new E(n);if(r.on(`error`,e=>{if(!e.includes(`bind ENOENT`))throw Error(e)}),!await n.init())throw Error(`Failed to initialize mDNS scanner`);n.query(`_at1000_server._tcp.local`),await new Promise(t=>setTimeout(t,e));let i=[...new Set(Object.values(r.namedServices).filter(e=>e!==void 0&&e.service!==void 0).filter(e=>e.service.name.endsWith(`_at1000_server._tcp.local`)).map(e=>e.addresses.filter(e=>e.family==`IPv4`).pop()?.address).filter(e=>e!==void 0))].map(e=>t.t.create(e));return n.destroy(),await Promise.all(i)};var O=class extends t.t{static apiVersion=t.n;static findDevices(e=500){return D(e)}};exports.AT1000=O;
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./at1000-DCIix1Bo.cjs`);require(`./com-C7d5yOIK.cjs`),require(`./common-SFHWBeL2.cjs`),require(`./gpio-BWNwiLs7.cjs`),require(`./hmi-CnTa8kMx.cjs`),require(`./management-Lna6AzGK.cjs`),require(`./power-C7KM2zvR.cjs`),require(`./relays-BK2uL5i_.cjs`);let n=require(`dns-packet`);n=e.t(n);let r=require(`node:events`),i=require(`node:util`);i=e.t(i);let a=require(`ip-address`);a=e.t(a);let o=require(`node:os`);o=e.t(o);let s=require(`node:dgram`);s=e.t(s);const c=`224.0.0.251`,l=`FF02::FB`,u=5353,d=`IPv4`,f=4,p=`IPv6`,m=6,h=[d,4,p,6];var g=class e{static getInterfaces(t){return t?e.getInterfacesFromStrings(t):e.getAllInterfaces()}static getAllInterfaces(){let e=[],t=[],n=o.default.networkInterfaces();for(let[r,i]of Object.entries(n))t.includes(r)||(t.push(r),i?.forEach(t=>{t.internal||!h.includes(t.family)||/^(2002|2001):/gi.exec(t.address)||e.push({name:r,address:t.address,family:t.family,scopeid:t.scopeid})}));if(!e.length)throw Error(`No usable network interfaces returned by OS.`);return e}static getInterfacesFromStrings(t){let n=Array.isArray(t)?t:[t],r=this.getAllInterfaces().filter(t=>n.reduce((n,r)=>n||!!(e.stringMatchesAddress(r,t.address)||t.name===r),!1));if(!r||!r.length)throw Error(`No usable network interfaces returned by OS.`);return r}static stringMatchesAddress(e,t){let n,r;try{n=new a.default.Address4(e),r=new a.default.Address4(t)}catch{try{n=new a.default.Address6(e),r=new a.default.Address6(t)}catch{return!1}}return n.bigInt()===r.bigInt()}},_=g;const v={interfaces:[],reuseAddr:!0,ttl:255,loopback:!0,onMessage:(e,t)=>{console.log(`Message `+e.toString())},socketError:e=>{console.log(`Socket error `+e.message)}};var y=class e{static validateSettings(e){if(!e.multicastAddress)throw Error(`Socket settings require multicastAddress`);if(!e.multicastPort)throw Error(`Socket settings require multicastPort`)}static createMulticastSocket(t){return new Promise((n,r)=>{let i=Object.assign({},v,t);e.validateSettings(i);let o=s.default.createSocket({type:a.default.Address4.isValid(i.multicastAddress)?`udp4`:`udp6`,reuseAddr:i.reuseAddr}),c=!1;o.on(`error`,e=>{c?i.socketError(e):(o.close(),n({success:!1,error:e}))}).on(`listening`,()=>{c=!0,o.setMulticastTTL(i.ttl??255),o.setMulticastLoopback(i.loopback??!0);let t=e.addMulticastMemberships(o,i);if(!t.memberships.length){c=!1,o.close(),n({success:!1,error:Error(`No interface memberships for multicast address `+i.multicastAddress)});return}n(Object.assign({success:!0},t,{socket:o}))}).on(`message`,(e,t)=>{i.onMessage(e,t)}),o.bind({port:i.multicastPort,exclusive:!1})})}static addMulticastMemberships(t,n){let r=[],i=[],o=a.default.Address4.isValid(n.multicastAddress)?[d,4]:[p,6];return n.interfaces.forEach(a=>{if(o.includes(a.family))try{t.addMembership(n.multicastAddress,e.interfaceAddress(a)),r.push(a)}catch{i.push(a)}}),{memberships:r,failedMemberships:i}}static async createSendSocket(t,n,r,i){return new Promise((a,o)=>{let c=s.default.createSocket({type:[d,4].includes(t.family)?`udp4`:`udp6`,reuseAddr:!!n.reuseAddr});c.once(`error`,e=>{c.close(),a({success:!1,error:Error(e.message)})}).on(`error`,i).on(`listening`,()=>{a({success:!0,iface:t,socket:c,send:c.send.bind(c)})}).on(`message`,(e,n)=>{n.interface=t.name,r(e,n)}).bind(n.srcPort||0,e.interfaceAddress(t))})}static interfaceAddress(e){return[d,4].includes(e.family)?e.address:e.scopeid?`${e.address}%${e.scopeid}`:e.address}},b=y;const x={reuseAddr:!0,srcPort:0,interfaces:null,ttl:255,loopback:!0,debug:!1};var S=class extends r.EventEmitter{Config;ready;receiveSockets;sendSockets;interfaces;destroyed;constructor(e){super(),this.Config=Object.assign({},x,e),this.ready=!1,this.receiveSockets=[],this.sendSockets=[]}async init(){try{this.interfaces=_.getInterfaces(this.Config.interfaces||void 0)}catch(e){throw this.emitError(e),e}return this.emitDebug(`Scanner interfaces: ${i.default.inspect(this.interfaces)}`),await this.createReceiveSockets(),await this.createSendSockets(),this.receiveSockets.length&&this.sendSockets.length&&(this.ready=!0),this.ready}async createReceiveSockets(){if(!this.interfaces)return[];let e=this.interfaces.filter(e=>[d,4].includes(e.family)),t=this.interfaces.filter(e=>[p,6].includes(e.family));if(this.emitDebug(`Create receive sockets for${e.length?` `+d:``}${e.length&&t.length?` and`:``}${t.length?` `+p:``}`),e.length){let t=await b.createMulticastSocket({multicastAddress:c,multicastPort:u,interfaces:e,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});t.success?this.receiveSockets.push(t):t.error&&this.emitError(t.error.message)}if(t.length){let e=await b.createMulticastSocket({multicastAddress:l,multicastPort:u,interfaces:t,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});e.success?this.receiveSockets.push(e):e.error&&this.emitError(e.error.message)}return this.receiveSockets}async createSendSockets(){if(this.interfaces){this.emitDebug(`Create send sockets on ${this.interfaces.length} interfaces/addresses.`);for(let e=0;e<this.interfaces.length;e++){let t=await b.createSendSocket(this.interfaces[e],this.Config,this.onMessage.bind(this),this.socketError.bind(this));t.success?this.sendSockets.push(t):t.error&&this.emitError(t.error.message)}}}onMessage(e,t){let r;try{r=n.default.decode(e)}catch(e){return this.emitWarn(e)}this.emit(`packet`,r,t)}socketError(e){e.code===`EACCES`||e.code===`EADDRINUSE`||e.code===`EADDRNOTAVAIL`?this.emitError(e):this.emitWarn(e)}query(e,t){let n;if(typeof e==`string`)n=[{name:e,type:t||`ANY`}];else if(Array.isArray(e))n=e;else throw Error(`Query questions must be an array of mDNS query questions.`);let r={type:`query`,questions:n};this.emitDebug(`Send mDNS query: ${i.default.inspect(r)}`),this.send(r)}send(e){if(this.destroyed)return;let t=n.default.encode(e);for(let e=0;e<this.sendSockets.length;e++){let n=this.sendSockets[e];n.send&&n.iface&&(n.send(t,0,t.length,u,[d,4].includes(n.iface.family)?c:l+`%`+n.iface.name),this.emitDebug(`Send packet on ${n.iface.address}`))}}destroy(){this.ready=!1,this.sendSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.sendSockets=[],this.receiveSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.receiveSockets=[]}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}},C=S;const w={debug:!1};var T=class extends r.EventEmitter{Config;scanner;types;namedServices;packetListener;constructor(e,t){super(),this.packetListener=this.onPacket.bind(this),this.scanner=e,this.Config=Object.assign({},w,t),this.types=[],this.namedServices={},this.forwardEvents(this.scanner),this.reset()}reset(){this.removeMDNSListener(this.scanner),this.types=[],this.namedServices={},this.listenMDNSEvents(this.scanner)}forwardEvents(e){e.on(`error`,e=>{this.emitError(e)}).on(`warn`,e=>{this.emitWarn(e)}).on(`debug`,e=>{this.emitDebug(e)})}listenMDNSEvents(e){e.on(`packet`,this.packetListener)}removeMDNSListener(e){e.removeListener(`packet`,this.packetListener)}onPacket(e,t){switch(this.emitDebug(`Received packet type ${e.type} from ${t.address}.`),e.type){case`query`:this.emit(`query`,e,t);break;case`response`:this.emitDebug(`Received response packet from ${t.address} with ${e.answers?e.answers.length:0} answers and ${e.additionals?e.additionals.length:0} additionals.`),e.answers&&this.processAnswers(e.answers,t),e.additionals&&this.processAnswers(e.additionals,t);break}}processAnswers(e,t){this.emitDebug(`Processing answers or additionals...`);let n=this.processSRVAnswers(e);this.processTXTAnswers(e),this.processAAnswers(e),this.processAAAAAnswers(e),this.processPTRAnswers(e,t),n.forEach(e=>{this.emit(`discovered`,{type:`service`,data:this.namedServices[e]})})}processSRVAnswers(e){let t=[];return e.forEach(e=>{if(e.type!==`SRV`)return;this.emitDebug(`Processing SRV answer.`);let n=e.name.toString();t.includes(n)||t.push(n),this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].service=e,this.namedServices[n].host=e.data.target.toString(),this.namedServices[n].port=e.data.port}),t}processTXTAnswers(e){e.forEach(e=>{if(e.type!==`TXT`)return;this.emitDebug(`Processing TXT answer.`);let t=e.data;if(Array.isArray(t)&&t.length>1){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(Buffer.concat(t))}else if(Buffer.isBuffer(t)){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(t)}})}processAAnswers(e){e.forEach(e=>{if(e.type!==`A`)return;this.emitDebug(`Processing A answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:d,address:n}))})}processAAAAAnswers(e){e.forEach(e=>{if(e.type!==`AAAA`)return;this.emitDebug(`Processing AAAA answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:p,address:n}))})}processPTRAnswers(e,t){e.forEach(e=>{if(e.type!==`PTR`)return;this.emitDebug(`Processing PTR answer.`);let n=this.serviceTypeFromPTR(e),r=e.data.toString();n!==r&&(this.namedServices[r]=this.namedServices[r]||{},this.namedServices[r].name=r.replace(`.`+n,``),this.namedServices[r].rinfo=t)})}serviceTypeFromPTR(e){let t=e.data,n=/(?:^|^.+?(?:\.))(_.*)$/gm.exec(t.toString()),r=n?n[1]:t.toString();return this.types.includes(r)||(this.types.push(r),this.emit(`discovered`,{type:`type`,data:r}),this.emitDebug(`Scanning service type ${r}.`),this.scanner.query(r,`ANY`)),r}answerDataToKeyValues(e){let t=[],n={},r=0,i=e[r];for(;i;){let a=e.slice(r+1,r+1+i);t.push(a.toString());let o=/^([^=]+)=([^=]*)$/.exec(a.toString());o&&(n[o[1]]=o[2]),r=r+1+i,i=e[r]}return{strings:t,keyValuePairs:n}}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}},E=T;const D=async(e=500)=>{e<10&&(e=10);let n=new C({debug:!0}),r=new E(n);if(r.on(`error`,e=>{if(!e.includes(`bind ENOENT`))throw Error(e)}),!await n.init())throw Error(`Failed to initialize mDNS scanner`);n.query(`_at1000_server._tcp.local`),await new Promise(t=>setTimeout(t,e));let i=[...new Set(Object.values(r.namedServices).filter(e=>e!==void 0&&e.service!==void 0).filter(e=>e.service.name.endsWith(`_at1000_server._tcp.local`)).map(e=>e.addresses.filter(e=>e.family==`IPv4`).pop()?.address).filter(e=>e!==void 0))].map(e=>t.t.create(e));return n.destroy(),await Promise.all(i)};var O=class extends t.t{static apiVersion=t.n;static findDevices(e=500){return D(e)}};exports.AT1000=O;
|
|
2
2
|
//# sourceMappingURL=node.cjs.map
|
package/build/node.d.cts
CHANGED
package/build/node.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./com-
|
|
1
|
+
import "./com-rx4xUAUU.mjs";
|
|
2
2
|
import "./common-SiysH9tt.mjs";
|
|
3
3
|
import "./management-Cw05hjbG.mjs";
|
|
4
|
-
import "./gpio-
|
|
4
|
+
import "./gpio-D6PJIYH7.mjs";
|
|
5
5
|
import "./hmi-BqgMEVWu.mjs";
|
|
6
6
|
import "./power-FnX69kqK.mjs";
|
|
7
7
|
import "./relays-CkBk7SOg.mjs";
|
|
8
|
-
import { t as AT1000Base } from "./at1000-
|
|
8
|
+
import { t as AT1000Base } from "./at1000-DavCp3Hf.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/node.d.ts
|
|
11
11
|
/** @hideconstructor */
|
package/build/node.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,t}from"./at1000-Dt6BT6DI.mjs";import"./com-9S4BYQCi.mjs";import"./common-B_zag9Mq.mjs";import"./gpio-DkbxnZ_k.mjs";import"./hmi-CTx2jfxU.mjs";import"./management-BMEMu2Kx.mjs";import"./power-Bz5S5GGr.mjs";import"./relays-CqglfFwF.mjs";import n from"dns-packet";import{EventEmitter as r}from"node:events";import i from"node:util";import a from"ip-address";import o from"node:os";import s from"node:dgram";const c=`224.0.0.251`,l=`FF02::FB`,u=5353,d=`IPv4`,f=`IPv6`,p=[d,4,f,6];var m=class e{static getInterfaces(t){return t?e.getInterfacesFromStrings(t):e.getAllInterfaces()}static getAllInterfaces(){let e=[],t=[],n=o.networkInterfaces();for(let[r,i]of Object.entries(n))t.includes(r)||(t.push(r),i?.forEach(t=>{t.internal||!p.includes(t.family)||/^(2002|2001):/gi.exec(t.address)||e.push({name:r,address:t.address,family:t.family,scopeid:t.scopeid})}));if(!e.length)throw Error(`No usable network interfaces returned by OS.`);return e}static getInterfacesFromStrings(t){let n=Array.isArray(t)?t:[t],r=this.getAllInterfaces().filter(t=>n.reduce((n,r)=>n||!!(e.stringMatchesAddress(r,t.address)||t.name===r),!1));if(!r||!r.length)throw Error(`No usable network interfaces returned by OS.`);return r}static stringMatchesAddress(e,t){let n,r;try{n=new a.Address4(e),r=new a.Address4(t)}catch{try{n=new a.Address6(e),r=new a.Address6(t)}catch{return!1}}return n.bigInt()===r.bigInt()}};const h={interfaces:[],reuseAddr:!0,ttl:255,loopback:!0,onMessage:(e,t)=>{console.log(`Message `+e.toString())},socketError:e=>{console.log(`Socket error `+e.message)}};var g=class e{static validateSettings(e){if(!e.multicastAddress)throw Error(`Socket settings require multicastAddress`);if(!e.multicastPort)throw Error(`Socket settings require multicastPort`)}static createMulticastSocket(t){return new Promise((n,r)=>{let i=Object.assign({},h,t);e.validateSettings(i);let o=s.createSocket({type:a.Address4.isValid(i.multicastAddress)?`udp4`:`udp6`,reuseAddr:i.reuseAddr}),c=!1;o.on(`error`,e=>{c?i.socketError(e):(o.close(),n({success:!1,error:e}))}).on(`listening`,()=>{c=!0,o.setMulticastTTL(i.ttl??255),o.setMulticastLoopback(i.loopback??!0);let t=e.addMulticastMemberships(o,i);if(!t.memberships.length){c=!1,o.close(),n({success:!1,error:Error(`No interface memberships for multicast address `+i.multicastAddress)});return}n(Object.assign({success:!0},t,{socket:o}))}).on(`message`,(e,t)=>{i.onMessage(e,t)}),o.bind({port:i.multicastPort,exclusive:!1})})}static addMulticastMemberships(t,n){let r=[],i=[],o=a.Address4.isValid(n.multicastAddress)?[d,4]:[f,6];return n.interfaces.forEach(a=>{if(o.includes(a.family))try{t.addMembership(n.multicastAddress,e.interfaceAddress(a)),r.push(a)}catch{i.push(a)}}),{memberships:r,failedMemberships:i}}static async createSendSocket(t,n,r,i){return new Promise((a,o)=>{let c=s.createSocket({type:[d,4].includes(t.family)?`udp4`:`udp6`,reuseAddr:!!n.reuseAddr});c.once(`error`,e=>{c.close(),a({success:!1,error:Error(e.message)})}).on(`error`,i).on(`listening`,()=>{a({success:!0,iface:t,socket:c,send:c.send.bind(c)})}).on(`message`,(e,n)=>{n.interface=t.name,r(e,n)}).bind(n.srcPort||0,e.interfaceAddress(t))})}static interfaceAddress(e){return[d,4].includes(e.family)?e.address:e.scopeid?`${e.address}%${e.scopeid}`:e.address}};const _={reuseAddr:!0,srcPort:0,interfaces:null,ttl:255,loopback:!0,debug:!1};var v=class extends r{Config;ready;receiveSockets;sendSockets;interfaces;destroyed;constructor(e){super(),this.Config=Object.assign({},_,e),this.ready=!1,this.receiveSockets=[],this.sendSockets=[]}async init(){try{this.interfaces=m.getInterfaces(this.Config.interfaces||void 0)}catch(e){throw this.emitError(e),e}return this.emitDebug(`Scanner interfaces: ${i.inspect(this.interfaces)}`),await this.createReceiveSockets(),await this.createSendSockets(),this.receiveSockets.length&&this.sendSockets.length&&(this.ready=!0),this.ready}async createReceiveSockets(){if(!this.interfaces)return[];let e=this.interfaces.filter(e=>[d,4].includes(e.family)),t=this.interfaces.filter(e=>[f,6].includes(e.family));if(this.emitDebug(`Create receive sockets for${e.length?` `+d:``}${e.length&&t.length?` and`:``}${t.length?` `+f:``}`),e.length){let t=await g.createMulticastSocket({multicastAddress:c,multicastPort:u,interfaces:e,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});t.success?this.receiveSockets.push(t):t.error&&this.emitError(t.error.message)}if(t.length){let e=await g.createMulticastSocket({multicastAddress:l,multicastPort:u,interfaces:t,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});e.success?this.receiveSockets.push(e):e.error&&this.emitError(e.error.message)}return this.receiveSockets}async createSendSockets(){if(this.interfaces){this.emitDebug(`Create send sockets on ${this.interfaces.length} interfaces/addresses.`);for(let e=0;e<this.interfaces.length;e++){let t=await g.createSendSocket(this.interfaces[e],this.Config,this.onMessage.bind(this),this.socketError.bind(this));t.success?this.sendSockets.push(t):t.error&&this.emitError(t.error.message)}}}onMessage(e,t){let r;try{r=n.decode(e)}catch(e){return this.emitWarn(e)}this.emit(`packet`,r,t)}socketError(e){e.code===`EACCES`||e.code===`EADDRINUSE`||e.code===`EADDRNOTAVAIL`?this.emitError(e):this.emitWarn(e)}query(e,t){let n;if(typeof e==`string`)n=[{name:e,type:t||`ANY`}];else if(Array.isArray(e))n=e;else throw Error(`Query questions must be an array of mDNS query questions.`);let r={type:`query`,questions:n};this.emitDebug(`Send mDNS query: ${i.inspect(r)}`),this.send(r)}send(e){if(this.destroyed)return;let t=n.encode(e);for(let e=0;e<this.sendSockets.length;e++){let n=this.sendSockets[e];n.send&&n.iface&&(n.send(t,0,t.length,u,[d,4].includes(n.iface.family)?c:l+`%`+n.iface.name),this.emitDebug(`Send packet on ${n.iface.address}`))}}destroy(){this.ready=!1,this.sendSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.sendSockets=[],this.receiveSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.receiveSockets=[]}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}};const y={debug:!1};var b=class extends r{Config;scanner;types;namedServices;packetListener;constructor(e,t){super(),this.packetListener=this.onPacket.bind(this),this.scanner=e,this.Config=Object.assign({},y,t),this.types=[],this.namedServices={},this.forwardEvents(this.scanner),this.reset()}reset(){this.removeMDNSListener(this.scanner),this.types=[],this.namedServices={},this.listenMDNSEvents(this.scanner)}forwardEvents(e){e.on(`error`,e=>{this.emitError(e)}).on(`warn`,e=>{this.emitWarn(e)}).on(`debug`,e=>{this.emitDebug(e)})}listenMDNSEvents(e){e.on(`packet`,this.packetListener)}removeMDNSListener(e){e.removeListener(`packet`,this.packetListener)}onPacket(e,t){switch(this.emitDebug(`Received packet type ${e.type} from ${t.address}.`),e.type){case`query`:this.emit(`query`,e,t);break;case`response`:this.emitDebug(`Received response packet from ${t.address} with ${e.answers?e.answers.length:0} answers and ${e.additionals?e.additionals.length:0} additionals.`),e.answers&&this.processAnswers(e.answers,t),e.additionals&&this.processAnswers(e.additionals,t);break}}processAnswers(e,t){this.emitDebug(`Processing answers or additionals...`);let n=this.processSRVAnswers(e);this.processTXTAnswers(e),this.processAAnswers(e),this.processAAAAAnswers(e),this.processPTRAnswers(e,t),n.forEach(e=>{this.emit(`discovered`,{type:`service`,data:this.namedServices[e]})})}processSRVAnswers(e){let t=[];return e.forEach(e=>{if(e.type!==`SRV`)return;this.emitDebug(`Processing SRV answer.`);let n=e.name.toString();t.includes(n)||t.push(n),this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].service=e,this.namedServices[n].host=e.data.target.toString(),this.namedServices[n].port=e.data.port}),t}processTXTAnswers(e){e.forEach(e=>{if(e.type!==`TXT`)return;this.emitDebug(`Processing TXT answer.`);let t=e.data;if(Array.isArray(t)&&t.length>1){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(Buffer.concat(t))}else if(Buffer.isBuffer(t)){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(t)}})}processAAnswers(e){e.forEach(e=>{if(e.type!==`A`)return;this.emitDebug(`Processing A answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:d,address:n}))})}processAAAAAnswers(e){e.forEach(e=>{if(e.type!==`AAAA`)return;this.emitDebug(`Processing AAAA answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:f,address:n}))})}processPTRAnswers(e,t){e.forEach(e=>{if(e.type!==`PTR`)return;this.emitDebug(`Processing PTR answer.`);let n=this.serviceTypeFromPTR(e),r=e.data.toString();n!==r&&(this.namedServices[r]=this.namedServices[r]||{},this.namedServices[r].name=r.replace(`.`+n,``),this.namedServices[r].rinfo=t)})}serviceTypeFromPTR(e){let t=e.data,n=/(?:^|^.+?(?:\.))(_.*)$/gm.exec(t.toString()),r=n?n[1]:t.toString();return this.types.includes(r)||(this.types.push(r),this.emit(`discovered`,{type:`type`,data:r}),this.emitDebug(`Scanning service type ${r}.`),this.scanner.query(r,`ANY`)),r}answerDataToKeyValues(e){let t=[],n={},r=0,i=e[r];for(;i;){let a=e.slice(r+1,r+1+i);t.push(a.toString());let o=/^([^=]+)=([^=]*)$/.exec(a.toString());o&&(n[o[1]]=o[2]),r=r+1+i,i=e[r]}return{strings:t,keyValuePairs:n}}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}};const x=async(e=500)=>{e<10&&(e=10);let n=new v({debug:!0}),r=new b(n);if(r.on(`error`,e=>{if(!e.includes(`bind ENOENT`))throw Error(e)}),!await n.init())throw Error(`Failed to initialize mDNS scanner`);n.query(`_at1000_server._tcp.local`),await new Promise(t=>setTimeout(t,e));let i=[...new Set(Object.values(r.namedServices).filter(e=>e!==void 0&&e.service!==void 0).filter(e=>e.service.name.endsWith(`_at1000_server._tcp.local`)).map(e=>e.addresses.filter(e=>e.family==`IPv4`).pop()?.address).filter(e=>e!==void 0))].map(e=>t.create(e));return n.destroy(),await Promise.all(i)};var S=class extends t{static apiVersion=e;static findDevices(e=500){return x(e)}};export{S as AT1000};
|
|
1
|
+
import{n as e,t}from"./at1000-jR3lVIU4.mjs";import"./com-9S4BYQCi.mjs";import"./common-B_zag9Mq.mjs";import"./gpio-lBesVV2E.mjs";import"./hmi-CTx2jfxU.mjs";import"./management-BMEMu2Kx.mjs";import"./power-Bz5S5GGr.mjs";import"./relays-CqglfFwF.mjs";import n from"dns-packet";import{EventEmitter as r}from"node:events";import i from"node:util";import a from"ip-address";import o from"node:os";import s from"node:dgram";const c=`224.0.0.251`,l=`FF02::FB`,u=5353,d=`IPv4`,f=`IPv6`,p=[d,4,f,6];var m=class e{static getInterfaces(t){return t?e.getInterfacesFromStrings(t):e.getAllInterfaces()}static getAllInterfaces(){let e=[],t=[],n=o.networkInterfaces();for(let[r,i]of Object.entries(n))t.includes(r)||(t.push(r),i?.forEach(t=>{t.internal||!p.includes(t.family)||/^(2002|2001):/gi.exec(t.address)||e.push({name:r,address:t.address,family:t.family,scopeid:t.scopeid})}));if(!e.length)throw Error(`No usable network interfaces returned by OS.`);return e}static getInterfacesFromStrings(t){let n=Array.isArray(t)?t:[t],r=this.getAllInterfaces().filter(t=>n.reduce((n,r)=>n||!!(e.stringMatchesAddress(r,t.address)||t.name===r),!1));if(!r||!r.length)throw Error(`No usable network interfaces returned by OS.`);return r}static stringMatchesAddress(e,t){let n,r;try{n=new a.Address4(e),r=new a.Address4(t)}catch{try{n=new a.Address6(e),r=new a.Address6(t)}catch{return!1}}return n.bigInt()===r.bigInt()}};const h={interfaces:[],reuseAddr:!0,ttl:255,loopback:!0,onMessage:(e,t)=>{console.log(`Message `+e.toString())},socketError:e=>{console.log(`Socket error `+e.message)}};var g=class e{static validateSettings(e){if(!e.multicastAddress)throw Error(`Socket settings require multicastAddress`);if(!e.multicastPort)throw Error(`Socket settings require multicastPort`)}static createMulticastSocket(t){return new Promise((n,r)=>{let i=Object.assign({},h,t);e.validateSettings(i);let o=s.createSocket({type:a.Address4.isValid(i.multicastAddress)?`udp4`:`udp6`,reuseAddr:i.reuseAddr}),c=!1;o.on(`error`,e=>{c?i.socketError(e):(o.close(),n({success:!1,error:e}))}).on(`listening`,()=>{c=!0,o.setMulticastTTL(i.ttl??255),o.setMulticastLoopback(i.loopback??!0);let t=e.addMulticastMemberships(o,i);if(!t.memberships.length){c=!1,o.close(),n({success:!1,error:Error(`No interface memberships for multicast address `+i.multicastAddress)});return}n(Object.assign({success:!0},t,{socket:o}))}).on(`message`,(e,t)=>{i.onMessage(e,t)}),o.bind({port:i.multicastPort,exclusive:!1})})}static addMulticastMemberships(t,n){let r=[],i=[],o=a.Address4.isValid(n.multicastAddress)?[d,4]:[f,6];return n.interfaces.forEach(a=>{if(o.includes(a.family))try{t.addMembership(n.multicastAddress,e.interfaceAddress(a)),r.push(a)}catch{i.push(a)}}),{memberships:r,failedMemberships:i}}static async createSendSocket(t,n,r,i){return new Promise((a,o)=>{let c=s.createSocket({type:[d,4].includes(t.family)?`udp4`:`udp6`,reuseAddr:!!n.reuseAddr});c.once(`error`,e=>{c.close(),a({success:!1,error:Error(e.message)})}).on(`error`,i).on(`listening`,()=>{a({success:!0,iface:t,socket:c,send:c.send.bind(c)})}).on(`message`,(e,n)=>{n.interface=t.name,r(e,n)}).bind(n.srcPort||0,e.interfaceAddress(t))})}static interfaceAddress(e){return[d,4].includes(e.family)?e.address:e.scopeid?`${e.address}%${e.scopeid}`:e.address}};const _={reuseAddr:!0,srcPort:0,interfaces:null,ttl:255,loopback:!0,debug:!1};var v=class extends r{Config;ready;receiveSockets;sendSockets;interfaces;destroyed;constructor(e){super(),this.Config=Object.assign({},_,e),this.ready=!1,this.receiveSockets=[],this.sendSockets=[]}async init(){try{this.interfaces=m.getInterfaces(this.Config.interfaces||void 0)}catch(e){throw this.emitError(e),e}return this.emitDebug(`Scanner interfaces: ${i.inspect(this.interfaces)}`),await this.createReceiveSockets(),await this.createSendSockets(),this.receiveSockets.length&&this.sendSockets.length&&(this.ready=!0),this.ready}async createReceiveSockets(){if(!this.interfaces)return[];let e=this.interfaces.filter(e=>[d,4].includes(e.family)),t=this.interfaces.filter(e=>[f,6].includes(e.family));if(this.emitDebug(`Create receive sockets for${e.length?` `+d:``}${e.length&&t.length?` and`:``}${t.length?` `+f:``}`),e.length){let t=await g.createMulticastSocket({multicastAddress:c,multicastPort:u,interfaces:e,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});t.success?this.receiveSockets.push(t):t.error&&this.emitError(t.error.message)}if(t.length){let e=await g.createMulticastSocket({multicastAddress:l,multicastPort:u,interfaces:t,onMessage:this.onMessage.bind(this),socketError:this.socketError.bind(this)});e.success?this.receiveSockets.push(e):e.error&&this.emitError(e.error.message)}return this.receiveSockets}async createSendSockets(){if(this.interfaces){this.emitDebug(`Create send sockets on ${this.interfaces.length} interfaces/addresses.`);for(let e=0;e<this.interfaces.length;e++){let t=await g.createSendSocket(this.interfaces[e],this.Config,this.onMessage.bind(this),this.socketError.bind(this));t.success?this.sendSockets.push(t):t.error&&this.emitError(t.error.message)}}}onMessage(e,t){let r;try{r=n.decode(e)}catch(e){return this.emitWarn(e)}this.emit(`packet`,r,t)}socketError(e){e.code===`EACCES`||e.code===`EADDRINUSE`||e.code===`EADDRNOTAVAIL`?this.emitError(e):this.emitWarn(e)}query(e,t){let n;if(typeof e==`string`)n=[{name:e,type:t||`ANY`}];else if(Array.isArray(e))n=e;else throw Error(`Query questions must be an array of mDNS query questions.`);let r={type:`query`,questions:n};this.emitDebug(`Send mDNS query: ${i.inspect(r)}`),this.send(r)}send(e){if(this.destroyed)return;let t=n.encode(e);for(let e=0;e<this.sendSockets.length;e++){let n=this.sendSockets[e];n.send&&n.iface&&(n.send(t,0,t.length,u,[d,4].includes(n.iface.family)?c:l+`%`+n.iface.name),this.emitDebug(`Send packet on ${n.iface.address}`))}}destroy(){this.ready=!1,this.sendSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.sendSockets=[],this.receiveSockets.forEach(e=>{try{e.socket?.close()}catch{}}),this.receiveSockets=[]}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}};const y={debug:!1};var b=class extends r{Config;scanner;types;namedServices;packetListener;constructor(e,t){super(),this.packetListener=this.onPacket.bind(this),this.scanner=e,this.Config=Object.assign({},y,t),this.types=[],this.namedServices={},this.forwardEvents(this.scanner),this.reset()}reset(){this.removeMDNSListener(this.scanner),this.types=[],this.namedServices={},this.listenMDNSEvents(this.scanner)}forwardEvents(e){e.on(`error`,e=>{this.emitError(e)}).on(`warn`,e=>{this.emitWarn(e)}).on(`debug`,e=>{this.emitDebug(e)})}listenMDNSEvents(e){e.on(`packet`,this.packetListener)}removeMDNSListener(e){e.removeListener(`packet`,this.packetListener)}onPacket(e,t){switch(this.emitDebug(`Received packet type ${e.type} from ${t.address}.`),e.type){case`query`:this.emit(`query`,e,t);break;case`response`:this.emitDebug(`Received response packet from ${t.address} with ${e.answers?e.answers.length:0} answers and ${e.additionals?e.additionals.length:0} additionals.`),e.answers&&this.processAnswers(e.answers,t),e.additionals&&this.processAnswers(e.additionals,t);break}}processAnswers(e,t){this.emitDebug(`Processing answers or additionals...`);let n=this.processSRVAnswers(e);this.processTXTAnswers(e),this.processAAnswers(e),this.processAAAAAnswers(e),this.processPTRAnswers(e,t),n.forEach(e=>{this.emit(`discovered`,{type:`service`,data:this.namedServices[e]})})}processSRVAnswers(e){let t=[];return e.forEach(e=>{if(e.type!==`SRV`)return;this.emitDebug(`Processing SRV answer.`);let n=e.name.toString();t.includes(n)||t.push(n),this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].service=e,this.namedServices[n].host=e.data.target.toString(),this.namedServices[n].port=e.data.port}),t}processTXTAnswers(e){e.forEach(e=>{if(e.type!==`TXT`)return;this.emitDebug(`Processing TXT answer.`);let t=e.data;if(Array.isArray(t)&&t.length>1){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(Buffer.concat(t))}else if(Buffer.isBuffer(t)){let n=e.name.toString();this.namedServices[n]=this.namedServices[n]||{},this.namedServices[n].txt=this.answerDataToKeyValues(t)}})}processAAnswers(e){e.forEach(e=>{if(e.type!==`A`)return;this.emitDebug(`Processing A answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:d,address:n}))})}processAAAAAnswers(e){e.forEach(e=>{if(e.type!==`AAAA`)return;this.emitDebug(`Processing AAAA answer.`);let t=e.name.toString(),n=e.data.toString();for(let e in this.namedServices)this.namedServices[e].host===t&&(this.namedServices[e].addresses=this.namedServices[e].addresses||[],this.namedServices[e].addresses.reduce((e,t)=>e||t.address===n,!1)||this.namedServices[e].addresses.push({family:f,address:n}))})}processPTRAnswers(e,t){e.forEach(e=>{if(e.type!==`PTR`)return;this.emitDebug(`Processing PTR answer.`);let n=this.serviceTypeFromPTR(e),r=e.data.toString();n!==r&&(this.namedServices[r]=this.namedServices[r]||{},this.namedServices[r].name=r.replace(`.`+n,``),this.namedServices[r].rinfo=t)})}serviceTypeFromPTR(e){let t=e.data,n=/(?:^|^.+?(?:\.))(_.*)$/gm.exec(t.toString()),r=n?n[1]:t.toString();return this.types.includes(r)||(this.types.push(r),this.emit(`discovered`,{type:`type`,data:r}),this.emitDebug(`Scanning service type ${r}.`),this.scanner.query(r,`ANY`)),r}answerDataToKeyValues(e){let t=[],n={},r=0,i=e[r];for(;i;){let a=e.slice(r+1,r+1+i);t.push(a.toString());let o=/^([^=]+)=([^=]*)$/.exec(a.toString());o&&(n[o[1]]=o[2]),r=r+1+i,i=e[r]}return{strings:t,keyValuePairs:n}}emitError(e){this.emit(`error`,e)}emitWarn(e){this.emit(`warn`,e)}emitDebug(e){this.Config.debug&&this.emit(`debug`,e)}};const x=async(e=500)=>{e<10&&(e=10);let n=new v({debug:!0}),r=new b(n);if(r.on(`error`,e=>{if(!e.includes(`bind ENOENT`))throw Error(e)}),!await n.init())throw Error(`Failed to initialize mDNS scanner`);n.query(`_at1000_server._tcp.local`),await new Promise(t=>setTimeout(t,e));let i=[...new Set(Object.values(r.namedServices).filter(e=>e!==void 0&&e.service!==void 0).filter(e=>e.service.name.endsWith(`_at1000_server._tcp.local`)).map(e=>e.addresses.filter(e=>e.family==`IPv4`).pop()?.address).filter(e=>e!==void 0))].map(e=>t.create(e));return n.destroy(),await Promise.all(i)};var S=class extends t{static apiVersion=e;static findDevices(e=500){return x(e)}};export{S as AT1000};
|
|
2
2
|
//# sourceMappingURL=node.mjs.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"com-lprUo9DI.d.mts","names":[],"sources":["../src/api/com.ts"],"sourcesContent":[],"mappings":";;;;cAGM,UAAQ,CAAA,CAAA;;EAAR,SAAA,IAGJ,kBAAA,CAAA,SAAA,cAAA,eAAA,CAAA,SAAA,CAAA,EAAA,SAAA,CAAA,mBAAA,CAAA,MAAA,EAAA,EAAA,CAAA,EAAA,SAAA,CAAA,mBAAA,CAAA,MAAA,EAAA,EAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA;;KACU,QAAA,GAAW,CAAA,CAAE,mBAAmB;cAEtC,YAAU,CAAA,CAAA,yBAAA,CAAA,CAAA,aAAA,CAAA,CAAA,yBAAA,CAAA,CAAA,yBAAA,CAAA,CAAA,4CAAA,CAAA,CAAA,yBAAA,CAAA,CAAA,YAAA,CAAA,CAAA,yBAAA,CAAA,CAAA,yBAAA,CAAA,CAAA,sCAAA,CAAA,CAAA,sDAAA,CAAA,CAAA,2DAAA,CAAA,CAAA;KAkBJ,UAAA,G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c,CAAA,EAgCM,OAhCN,CAgCc,yBAhCd,CAAA;EAAO;AAW/C;;;EAQqB,IAAA,CAAA,CAAA,EA4BL,OA5BK,CAAA,MAAA,CAAA;EAaK;;;;;EAwBW,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA,EAAP,OAAO,CAAA,MAAA,CAAA"}
|
package/build/gpio-DkbxnZ_k.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./common-B_zag9Mq.mjs";import*as r from"valibot";const i=r.picklist([`release`,`hold`],`Invalid sync action`),a=r.object({mode:r.literal(`analog`),direction:r.literal(`input`)}),o=r.object({mode:r.literal(`analog`),direction:r.literal(`output`),value:r.optional(e)}),s=r.object({mode:r.literal(`digital`),direction:r.literal(`input`),vil:n,vih:n}),c=r.object({mode:r.literal(`digital`),direction:r.literal(`output`),value:t,vol:e,voh:e,vil:n,vih:n});r.omit(o,[`direction`,`mode`]),r.omit(s,[`direction`,`mode`]);const l=r.partial(r.omit(c,[`direction`,`mode`]),[`vih`,`vil`]),u=r.object({value:t}),d=r.object({value:n}),f=r.object({action:i});var p=class{count;constructor(e,t){this.fetch=e,this.count=t.capabilities.io.count}reset(){return this.fetch(`/gpio/reset`,{method:`POST`,parseResponse:()=>{}})}digital(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new m(this.fetch,e)}analog(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new h(this.fetch,e)}hold(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`hold`},schema:f})}release(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`release`},schema:f})}},m=class{constructor(e,t){this.fetch=e,this.id=t}configure_input(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(s,{...e,mode:`digital`,direction:`input`}),schema:s})}configure_output(e){e=r.parse(l,e);let t={mode:`digital`,direction:`output`,value:e.value,vol:e.vol,voh:e.voh,vil:e.vil??e.vol+(e.voh-e.vol)/4,vih:e.vih??e.voh-(e.voh-e.vol)/4};return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(c,t),schema:c})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:u})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:u})).value}},h=class{constructor(e,t){this.fetch=e,this.id=t}configure_input(){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:{mode:`analog`,direction:`input`},schema:a})}configure_output(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:r.parse(o,{value:e,mode:`analog`,direction:`output`}),schema:o})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:d})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:d})).value}};export{m as n,p as r,h as t};
|
|
2
|
-
//# sourceMappingURL=gpio-DkbxnZ_k.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gpio-DkbxnZ_k.mjs","names":[],"sources":["../src/api/gpio.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel, analogOutputLevel, digitalLevel } from './common';\nimport type { Information } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst syncAction = v.picklist(['release', 'hold'], 'Invalid sync action');\nconst analogInputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('input'),\n});\nconst analogOutputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('output'),\n value: v.optional(analogOutputLevel),\n});\nconst digitalInputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('input'),\n vil: analogLevel,\n vih: analogLevel,\n});\nconst digitalOutputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('output'),\n value: digitalLevel,\n vol: analogOutputLevel,\n voh: analogOutputLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;\nexport type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;\nexport type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;\nexport type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;\n\nconst partialAnalogOutputConfiguration = v.omit(analogOutputConfiguration, ['direction', 'mode']);\nexport type PartialAnalogOutputConfiguration = v.InferOutput<\n typeof partialAnalogOutputConfiguration\n>;\nconst partialDigitalInputConfiguration = v.omit(digitalInputConfiguration, ['direction', 'mode']);\nexport type PartialDigitalInputConfiguration = v.InferOutput<\n typeof partialDigitalInputConfiguration\n>;\nconst partialDigitalOutputConfiguration = v.partial(\n v.omit(digitalOutputConfiguration, ['direction', 'mode']),\n ['vih', 'vil'],\n);\nexport type PartialDigitalOutputConfiguration = v.InferInput<\n typeof partialDigitalOutputConfiguration\n>;\n\nconst digitalState = v.object({ value: digitalLevel });\nconst analogState = v.object({ value: analogLevel });\n\nconst syncConfiguration = v.object({ action: syncAction });\nexport type SyncConfiguration = v.InferOutput<typeof syncConfiguration>;\n\n/** @hideconstructor */\nexport class GpioApi {\n private count: number;\n\n constructor(private readonly fetch: UpFetch, info: Information) {\n this.count = info.capabilities.io.count;\n }\n\n /**\n * Resets all IO configurations to default.\n */\n reset(): Promise<void> {\n return this.fetch('/gpio/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific digital IO pin by id.\n * @param io The IO pin id.\n * @returns The digital IO instance.\n */\n digital(io: number): DigitalIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new DigitalIO(this.fetch, io);\n }\n\n /**\n * Access a specific analog IO pin by id.\n * @param io The IO pin id.\n * @returns The analog IO instance.\n */\n analog(io: number): AnalogIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new AnalogIO(this.fetch, io);\n }\n\n /**\n * Holds the current state of all GPIO pins.\n * @returns The applied sync state.\n */\n hold(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'hold' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Releases control of the IO pins, allowing external control.\n *\n * This also sets the device as a slave.\n *\n * @returns The applied sync state.\n */\n release(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'release' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class DigitalIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configure the pin as a digital input.\n * @param config The digital input configuration.\n * @returns The applied configuration.\n */\n configure_input(config: PartialDigitalInputConfiguration): Promise<DigitalInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n digitalInputConfiguration,\n { ...config, mode: 'digital', direction: 'input' } satisfies DigitalInputConfiguration,\n ),\n schema: digitalInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as a digital output.\n * @param config The digital output configuration.\n * @returns The applied configuration.\n */\n configure_output(config: PartialDigitalOutputConfiguration): Promise<DigitalOutputConfiguration> {\n config = v.parse(partialDigitalOutputConfiguration, config);\n\n const fullConfig = {\n mode: 'digital' as const,\n direction: 'output' as const,\n value: config.value,\n vol: config.vol,\n voh: config.voh,\n vil: config.vil ?? config.vol + (config.voh - config.vol) / 4,\n vih: config.vih ?? config.voh - (config.voh - config.vol) / 4,\n };\n\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(digitalOutputConfiguration, fullConfig),\n schema: digitalOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: digitalState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: boolean | number): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: digitalState,\n }))\n .value;\n }\n}\n\n/** @hideconstructor */\nexport class AnalogIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configures the pin as an analog input.\n * @returns The applied configuration.\n * @returns The applied configuration.\n */\n configure_input(): Promise<AnalogInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: { mode: 'analog', direction: 'input' } satisfies AnalogInputConfiguration,\n schema: analogInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as an analog output.\n * @param config The analog output configuration.\n * @returns The applied configuration.\n */\n configure_output(value: AnalogOutputLevel): Promise<AnalogOutputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n analogOutputConfiguration,\n { value, mode: 'analog', direction: 'output' } satisfies AnalogOutputConfiguration,\n ),\n schema: analogOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: analogState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: number): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: analogState,\n }))\n .value;\n }\n}\n"],"mappings":"kFAQA,MAAM,EAA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AC,EAAE,MAQhF,MAAM,MAAM,EAA2C,CACrD,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CACjD,OAAQ,MACR,KAAM,CAAE,QAAO,CACf,OAAQ,EACT,CAAC,EACC,QAKM,EAAb,KAAsB,CACpB,YAAY,EAAiC,EAA4B,CAA5C,KAAA,MAAA,EAAgC,KAAA,GAAA,EAO7D,iBAAqD,CACnD,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAM,CAAE,KAAM,SAAU,UAAW,QAAS,CAC5C,OAAQ,EACT,CAAC,CAQJ,iBAAiB,EAA8D,CAC7E,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAM,EAAE,MACN,EACA,CAAE,QAAO,KAAM,SAAU,UAAW,SAAU,CAC/C,CACD,OAAQ,EACT,CAAC,CAOJ,MAAM,MAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CAAE,OAAQ,EAAa,CAAC,EAAE,MAQ/E,MAAM,MAAM,EAAgC,CAC1C,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CACjD,OAAQ,MACR,KAAM,CAAE,QAAO,CACf,OAAQ,EACT,CAAC,EACC"}
|
package/build/gpio-apZVqZ8a.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./common-SFHWBeL2.cjs`);let n=require(`valibot`);n=e.t(n);const r=n.picklist([`release`,`hold`],`Invalid sync action`),i=n.object({mode:n.literal(`analog`),direction:n.literal(`input`)}),a=n.object({mode:n.literal(`analog`),direction:n.literal(`output`),value:n.optional(t.n)}),o=n.object({mode:n.literal(`digital`),direction:n.literal(`input`),vil:t.t,vih:t.t}),s=n.object({mode:n.literal(`digital`),direction:n.literal(`output`),value:t.r,vol:t.n,voh:t.n,vil:t.t,vih:t.t});n.omit(a,[`direction`,`mode`]),n.omit(o,[`direction`,`mode`]);const c=n.partial(n.omit(s,[`direction`,`mode`]),[`vih`,`vil`]),l=n.object({value:t.r}),u=n.object({value:t.t}),d=n.object({action:r});var f=class{count;constructor(e,t){this.fetch=e,this.count=t.capabilities.io.count}reset(){return this.fetch(`/gpio/reset`,{method:`POST`,parseResponse:()=>{}})}digital(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new p(this.fetch,e)}analog(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new m(this.fetch,e)}hold(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`hold`},schema:d})}release(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`release`},schema:d})}},p=class{constructor(e,t){this.fetch=e,this.id=t}configure_input(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(o,{...e,mode:`digital`,direction:`input`}),schema:o})}configure_output(e){e=n.parse(c,e);let t={mode:`digital`,direction:`output`,value:e.value,vol:e.vol,voh:e.voh,vil:e.vil??e.vol+(e.voh-e.vol)/4,vih:e.vih??e.voh-(e.voh-e.vol)/4};return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(s,t),schema:s})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:l})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:l})).value}},m=class{constructor(e,t){this.fetch=e,this.id=t}configure_input(){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:{mode:`analog`,direction:`input`},schema:i})}configure_output(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(a,{value:e,mode:`analog`,direction:`output`}),schema:a})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:u})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:u})).value}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return m}});
|
|
2
|
-
//# sourceMappingURL=gpio-apZVqZ8a.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gpio-apZVqZ8a.cjs","names":["v","analogOutputLevel","analogLevel","digitalLevel"],"sources":["../src/api/gpio.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel, analogOutputLevel, digitalLevel } from './common';\nimport type { Information } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst syncAction = v.picklist(['release', 'hold'], 'Invalid sync action');\nconst analogInputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('input'),\n});\nconst analogOutputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('output'),\n value: v.optional(analogOutputLevel),\n});\nconst digitalInputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('input'),\n vil: analogLevel,\n vih: analogLevel,\n});\nconst digitalOutputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('output'),\n value: digitalLevel,\n vol: analogOutputLevel,\n voh: analogOutputLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;\nexport type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;\nexport type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;\nexport type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;\n\nconst partialAnalogOutputConfiguration = v.omit(analogOutputConfiguration, ['direction', 'mode']);\nexport type PartialAnalogOutputConfiguration = v.InferOutput<\n typeof partialAnalogOutputConfiguration\n>;\nconst partialDigitalInputConfiguration = v.omit(digitalInputConfiguration, ['direction', 'mode']);\nexport type PartialDigitalInputConfiguration = v.InferOutput<\n typeof partialDigitalInputConfiguration\n>;\nconst partialDigitalOutputConfiguration = v.partial(\n v.omit(digitalOutputConfiguration, ['direction', 'mode']),\n ['vih', 'vil'],\n);\nexport type PartialDigitalOutputConfiguration = v.InferInput<\n typeof partialDigitalOutputConfiguration\n>;\n\nconst digitalState = v.object({ value: digitalLevel });\nconst analogState = v.object({ value: analogLevel });\n\nconst syncConfiguration = v.object({ action: syncAction });\nexport type SyncConfiguration = v.InferOutput<typeof syncConfiguration>;\n\n/** @hideconstructor */\nexport class GpioApi {\n private count: number;\n\n constructor(private readonly fetch: UpFetch, info: Information) {\n this.count = info.capabilities.io.count;\n }\n\n /**\n * Resets all IO configurations to default.\n */\n reset(): Promise<void> {\n return this.fetch('/gpio/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific digital IO pin by id.\n * @param io The IO pin id.\n * @returns The digital IO instance.\n */\n digital(io: number): DigitalIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new DigitalIO(this.fetch, io);\n }\n\n /**\n * Access a specific analog IO pin by id.\n * @param io The IO pin id.\n * @returns The analog IO instance.\n */\n analog(io: number): AnalogIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new AnalogIO(this.fetch, io);\n }\n\n /**\n * Holds the current state of all GPIO pins.\n * @returns The applied sync state.\n */\n hold(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'hold' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Releases control of the IO pins, allowing external control.\n *\n * This also sets the device as a slave.\n *\n * @returns The applied sync state.\n */\n release(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'release' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class DigitalIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configure the pin as a digital input.\n * @param config The digital input configuration.\n * @returns The applied configuration.\n */\n configure_input(config: PartialDigitalInputConfiguration): Promise<DigitalInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n digitalInputConfiguration,\n { ...config, mode: 'digital', direction: 'input' } satisfies DigitalInputConfiguration,\n ),\n schema: digitalInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as a digital output.\n * @param config The digital output configuration.\n * @returns The applied configuration.\n */\n configure_output(config: PartialDigitalOutputConfiguration): Promise<DigitalOutputConfiguration> {\n config = v.parse(partialDigitalOutputConfiguration, config);\n\n const fullConfig = {\n mode: 'digital' as const,\n direction: 'output' as const,\n value: config.value,\n vol: config.vol,\n voh: config.voh,\n vil: config.vil ?? config.vol + (config.voh - config.vol) / 4,\n vih: config.vih ?? config.voh - (config.voh - config.vol) / 4,\n };\n\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(digitalOutputConfiguration, fullConfig),\n schema: digitalOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: digitalState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: boolean | number): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: digitalState,\n }))\n .value;\n }\n}\n\n/** @hideconstructor */\nexport class AnalogIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configures the pin as an analog input.\n * @returns The applied configuration.\n * @returns The applied configuration.\n */\n configure_input(): Promise<AnalogInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: { mode: 'analog', direction: 'input' } satisfies AnalogInputConfiguration,\n schema: analogInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as an analog output.\n * @param config The analog output configuration.\n * @returns The applied configuration.\n */\n configure_output(value: AnalogOutputLevel): Promise<AnalogOutputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n analogOutputConfiguration,\n { value, mode: 'analog', direction: 'output' } satisfies AnalogOutputConfiguration,\n ),\n schema: analogOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: analogState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: number): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: analogState,\n }))\n .value;\n }\n}\n"],"mappings":"6GAQA,MAAM,EAAaA,EAAE,SAAS,CAAC,UAAW,OAAO,CAAE,sBAAsB,CACnE,EAA2BA,EAAE,OAAO,CACxC,KAAMA,EAAE,QAAQ,SAAS,CACzB,UAAWA,EAAE,QAAQ,QAAQ,CAC9B,CAAC,CACI,EAA4BA,EAAE,OAAO,CACzC,KAAMA,EAAE,QAAQ,SAAS,CACzB,UAAWA,EAAE,QAAQ,SAAS,CAC9B,MAAOA,EAAE,SAASC,EAAAA,EAAkB,CACrC,CAAC,CACI,EAA4BD,EAAE,OAAO,CACzC,KAAMA,EAAE,QAAQ,UAAU,CAC1B,UAAWA,EAAE,QAAQ,QAAQ,CAC7B,IAAKE,EAAAA,EACL,IAAKA,EAA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