python-can-hub 0.2.4__py3-none-win_amd64.whl → 0.2.6__py3-none-win_amd64.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.
- canhub/_native.py +2 -0
- canhub/bus.py +5 -2
- canhub/libcanhub.dll +0 -0
- {python_can_hub-0.2.4.dist-info → python_can_hub-0.2.6.dist-info}/METADATA +4 -1
- python_can_hub-0.2.6.dist-info/RECORD +11 -0
- python_can_hub-0.2.4.dist-info/RECORD +0 -11
- {python_can_hub-0.2.4.dist-info → python_can_hub-0.2.6.dist-info}/WHEEL +0 -0
- {python_can_hub-0.2.4.dist-info → python_can_hub-0.2.6.dist-info}/entry_points.txt +0 -0
- {python_can_hub-0.2.4.dist-info → python_can_hub-0.2.6.dist-info}/top_level.txt +0 -0
canhub/_native.py
CHANGED
|
@@ -24,6 +24,7 @@ FRAME_FLAG_BRS = 1 << 1
|
|
|
24
24
|
|
|
25
25
|
OPEN_FLAG_NO_ECHO = 1 << 0
|
|
26
26
|
OPEN_FLAG_WRITE = 1 << 1
|
|
27
|
+
OPEN_FLAG_RELIABLE = 1 << 2
|
|
27
28
|
|
|
28
29
|
OK = 0
|
|
29
30
|
RECEIVED = 1
|
|
@@ -37,6 +38,7 @@ ERR_ARGUMENT = -7
|
|
|
37
38
|
ERR_STATE = -8
|
|
38
39
|
ERR_TRANSPORT = -9
|
|
39
40
|
ERR_HUB = -10
|
|
41
|
+
ERR_RELIABLE_UNSUPPORTED = -11
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
class CanHubFrame(Structure):
|
canhub/bus.py
CHANGED
|
@@ -45,6 +45,7 @@ class CanHubBus(BusABC):
|
|
|
45
45
|
hub_fingerprint: Optional[str] = None,
|
|
46
46
|
state_dir: Optional[str] = None,
|
|
47
47
|
receive_own_messages: bool = False,
|
|
48
|
+
reliable: bool = False,
|
|
48
49
|
**kwargs,
|
|
49
50
|
):
|
|
50
51
|
self._session = None
|
|
@@ -58,7 +59,7 @@ class CanHubBus(BusABC):
|
|
|
58
59
|
if not self._session:
|
|
59
60
|
raise CanInitializationError(f"could not connect to {url or 'the local can-hub socket'}")
|
|
60
61
|
|
|
61
|
-
self._open(str(channel), receive_own_messages)
|
|
62
|
+
self._open(str(channel), receive_own_messages, reliable)
|
|
62
63
|
self.channel_info = f"canhub {channel} via {url or 'unix socket'}"
|
|
63
64
|
super().__init__(channel=channel, **kwargs)
|
|
64
65
|
|
|
@@ -178,10 +179,12 @@ class CanHubBus(BusABC):
|
|
|
178
179
|
result = native.lib.canhub_set_filters(self._session, native_filters, len(filters))
|
|
179
180
|
self._hardware_filtered = result == native.OK
|
|
180
181
|
|
|
181
|
-
def _open(self, channel: str, receive_own_messages: bool) -> None:
|
|
182
|
+
def _open(self, channel: str, receive_own_messages: bool, reliable: bool) -> None:
|
|
182
183
|
flags = native.OPEN_FLAG_WRITE
|
|
183
184
|
if not receive_own_messages:
|
|
184
185
|
flags |= native.OPEN_FLAG_NO_ECHO
|
|
186
|
+
if reliable:
|
|
187
|
+
flags |= native.OPEN_FLAG_RELIABLE
|
|
185
188
|
|
|
186
189
|
result = native.lib.canhub_open(self._session, channel.encode(), flags, DEFAULT_TIMEOUT_MS)
|
|
187
190
|
if result == native.ERR_WRITE_DENIED:
|
canhub/libcanhub.dll
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-can-hub
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: python-can backend for can-hub: remote CAN interfaces over unix/tcp/tls/quic
|
|
5
5
|
License: AGPL-3.0-only
|
|
6
6
|
Project-URL: Homepage, https://github.com/can-hub-io/can-hub
|
|
@@ -36,6 +36,9 @@ for message in bus:
|
|
|
36
36
|
- `url`: omit to connect to the local hub unix socket.
|
|
37
37
|
- `state_dir`: client TLS identity + pin store location (tls/quic).
|
|
38
38
|
- `receive_own_messages`: standard python-can echo semantics.
|
|
39
|
+
- `reliable`: carry the channel on a dedicated reliable QUIC stream (lossless,
|
|
40
|
+
ordered) instead of the lossy datagram plane. Needs a `quic://` url and a hub
|
|
41
|
+
that advertises the capability; otherwise the open fails.
|
|
39
42
|
|
|
40
43
|
Write access follows the hub client ACLs: if the ACL grants read-only, the
|
|
41
44
|
bus opens read-only and `send()` raises.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
canhub/__init__.py,sha256=yC7SFSz4vUDFgve7gehAaOSqZ1Iv1Kbv1A4c5nj_XcM,485
|
|
2
|
+
canhub/__main__.py,sha256=WM0VMTSjzySENh7zkbTT4WpLnqyS_gsZBgJ4f05qNHQ,366
|
|
3
|
+
canhub/_native.py,sha256=B7m4UVcZYGXJJOkODA6oWnVdJigErqh0wDBHA6Y5xto,3731
|
|
4
|
+
canhub/bus.py,sha256=uKVnS4Z5RPPDX3e1XApk3YLPwYEnO9b8Z9xgXJkZQZI,10211
|
|
5
|
+
canhub/fingerprint.py,sha256=N38dP3_odFYn6821XViWG6aQKUPhxJHDY8xE8uW8zNo,711
|
|
6
|
+
canhub/libcanhub.dll,sha256=OadWJ8XwxpbOJbgYus_atZyHDlkMwxzMT3woQZGimHE,6403584
|
|
7
|
+
python_can_hub-0.2.6.dist-info/METADATA,sha256=5x4xYXjJ3POFiHzlSkZM2y740Z63YTDnwS6uTPU_4Ks,3807
|
|
8
|
+
python_can_hub-0.2.6.dist-info/WHEEL,sha256=KTdQDMVZqs2eeRhOpF4kInPW2OgLgRWl7KhVZQueA2o,99
|
|
9
|
+
python_can_hub-0.2.6.dist-info/entry_points.txt,sha256=ZfPo9cCR4xH9BjYRCi_nOcw_48SN6vqboV0B2y8HcjU,46
|
|
10
|
+
python_can_hub-0.2.6.dist-info/top_level.txt,sha256=nPyUT2Mw-NsKrJhpH-4EUcBBqz7GOSwfxnGkFEILnKk,7
|
|
11
|
+
python_can_hub-0.2.6.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
canhub/__init__.py,sha256=yC7SFSz4vUDFgve7gehAaOSqZ1Iv1Kbv1A4c5nj_XcM,485
|
|
2
|
-
canhub/__main__.py,sha256=WM0VMTSjzySENh7zkbTT4WpLnqyS_gsZBgJ4f05qNHQ,366
|
|
3
|
-
canhub/_native.py,sha256=Dnk0z-fWQ3UkaoxXt4N6Ml7OHJQtXKSGtU-46CH56qo,3672
|
|
4
|
-
canhub/bus.py,sha256=6qv9tXgIA7hHIqnBJMewOyGyFxS-48Of9OaaJ9Abhrw,10085
|
|
5
|
-
canhub/fingerprint.py,sha256=N38dP3_odFYn6821XViWG6aQKUPhxJHDY8xE8uW8zNo,711
|
|
6
|
-
canhub/libcanhub.dll,sha256=xPTHIVUv-1ti0sMR6lA_8iePdFKK5dA9gzTKpd1CKgo,6398464
|
|
7
|
-
python_can_hub-0.2.4.dist-info/METADATA,sha256=t0735LhHCZw2lPs1EI_zNTg971bs8ymKQx05G8JZLZw,3588
|
|
8
|
-
python_can_hub-0.2.4.dist-info/WHEEL,sha256=KTdQDMVZqs2eeRhOpF4kInPW2OgLgRWl7KhVZQueA2o,99
|
|
9
|
-
python_can_hub-0.2.4.dist-info/entry_points.txt,sha256=ZfPo9cCR4xH9BjYRCi_nOcw_48SN6vqboV0B2y8HcjU,46
|
|
10
|
-
python_can_hub-0.2.4.dist-info/top_level.txt,sha256=nPyUT2Mw-NsKrJhpH-4EUcBBqz7GOSwfxnGkFEILnKk,7
|
|
11
|
-
python_can_hub-0.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|