dglab-kit-python 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,106 @@
1
+ from __future__ import annotations
2
+
3
+ from enum import Enum, IntEnum
4
+ from typing import Any, Literal, NotRequired, TypedDict
5
+
6
+
7
+ class DglabSocketVersion(str, Enum):
8
+ V3 = "v3"
9
+ V4 = "v4"
10
+
11
+
12
+ class DglabSocketState(str, Enum):
13
+ Idle = "idle"
14
+ Connecting = "connecting"
15
+ WaitingForPeer = "waiting_for_peer"
16
+ Paired = "paired"
17
+ Disconnected = "disconnected"
18
+
19
+ IDLE = "idle"
20
+ CONNECTING = "connecting"
21
+ WAITING_FOR_PEER = "waiting_for_peer"
22
+ PAIRED = "paired"
23
+ DISCONNECTED = "disconnected"
24
+
25
+
26
+ class DglabSocketDeviceType(str, Enum):
27
+ COYOTE_020 = "COYOTE_020"
28
+ COYOTE_030 = "COYOTE_030"
29
+ BMTR_1 = "BMTR_1"
30
+ OVC_1 = "OVC_1"
31
+
32
+
33
+ class DglabSocketConnectResult(TypedDict):
34
+ targetId: str
35
+
36
+
37
+ class DglabSocketCloseEvent(TypedDict):
38
+ code: int
39
+ reason: str
40
+ wasClean: bool
41
+ event: Any
42
+
43
+
44
+ class V4ActionType(IntEnum):
45
+ AppendPulseData = 0
46
+ AddIntensity = 3
47
+ SetTempIntensity = 4
48
+ SetIntensity = 7
49
+
50
+ APPEND_PULSE_DATA = 0
51
+ ADD_INTENSITY = 3
52
+ SET_TEMP_INTENSITY = 4
53
+ SET_INTENSITY = 7
54
+
55
+
56
+ class V4Channel(IntEnum):
57
+ A = 0
58
+ B = 1
59
+
60
+
61
+ class V3Channel(IntEnum):
62
+ A = 1
63
+ B = 2
64
+
65
+
66
+ class V4DeviceDescriptor(TypedDict):
67
+ slotId: str
68
+ name: str
69
+ type: DglabSocketDeviceType
70
+
71
+
72
+ class V4DeviceInfo(V4DeviceDescriptor, total=False):
73
+ props: dict[str, Any]
74
+ slotState: dict[str, Any]
75
+
76
+
77
+ class V4DevicesGetResult(TypedDict):
78
+ devices: list[V4DeviceDescriptor]
79
+
80
+
81
+ class V4OperateOptions(TypedDict, total=False):
82
+ timeout: int
83
+ priority: Literal[0, 1, 2]
84
+ immediate: bool
85
+
86
+
87
+ class V4AppendPulseDataOptions(V4OperateOptions, total=False):
88
+ version: int
89
+ seq: int
90
+
91
+
92
+ class V4ClearOperateOptions(TypedDict, total=False):
93
+ slot_id: str
94
+ slotId: str
95
+ channel: NotRequired[V4Channel | int]
96
+
97
+
98
+ class V3WaveOptions(TypedDict):
99
+ channel: Literal["A", "B"]
100
+ time: int | float
101
+ data: str | list[str]
102
+
103
+
104
+ DGLAB_SOCKET_VERSION = DglabSocketVersion
105
+ DGLAB_SOCKET_STATE = DglabSocketState
106
+ DGLAB_SOCKET_DEVICE_TYPE = DglabSocketDeviceType
@@ -0,0 +1,11 @@
1
+ from .coyote import COYOTE_WAVEFORM, COYOTE_WAVEFORMS, CoyoteWaveform
2
+ from .ovc import OVC_WAVEFORM, OVC_WAVEFORMS, OvcWaveform
3
+
4
+ __all__ = [
5
+ "COYOTE_WAVEFORM",
6
+ "COYOTE_WAVEFORMS",
7
+ "CoyoteWaveform",
8
+ "OVC_WAVEFORM",
9
+ "OVC_WAVEFORMS",
10
+ "OvcWaveform",
11
+ ]