plin-linux 0.0.3__tar.gz → 0.0.4__tar.gz
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.
- {plin_linux-0.0.3 → plin_linux-0.0.4}/PKG-INFO +4 -3
- {plin_linux-0.0.3 → plin_linux-0.0.4}/README.md +1 -1
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin/device.py +16 -10
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin_linux.egg-info/PKG-INFO +4 -3
- {plin_linux-0.0.3 → plin_linux-0.0.4}/pyproject.toml +1 -1
- {plin_linux-0.0.3 → plin_linux-0.0.4}/LICENSE +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin/__init__.py +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin/enums.py +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin/structs.py +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin_linux.egg-info/SOURCES.txt +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin_linux.egg-info/dependency_links.txt +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin_linux.egg-info/requires.txt +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/plin_linux.egg-info/top_level.txt +0 -0
- {plin_linux-0.0.3 → plin_linux-0.0.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: plin-linux
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: The python-plin package is a Python wrapper for the chardev API provided by the PEAK LIN Linux Beta.
|
|
5
5
|
Author-email: William Zhang <williamzhang@rivian.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/rivian/python-plin
|
|
@@ -12,9 +12,10 @@ Requires-Python: >=3.7
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: ioctl_opt
|
|
15
|
+
Dynamic: license-file
|
|
15
16
|
|
|
16
17
|
# Python PLIN library
|
|
17
|
-
This library provides a Python interface for interacting with PEAK devices such as the PCAN-USB Pro and PLIN-USB on Linux using the chardev API provided by the PEAK LIN Linux
|
|
18
|
+
This library provides a Python interface for interacting with PEAK devices such as the PCAN-USB Pro and PLIN-USB on Linux using the chardev API provided by the PEAK LIN Linux Driver. The PEAK LIN Linux driver is required to use this library and is available [here](https://www.peak-system.com/fileadmin/media/linux/lin.php).
|
|
18
19
|
|
|
19
20
|
## Installation
|
|
20
21
|
The `plin-linux` package is available on [PyPI](https://pypi.org/project/plin-linux/) and can be directly installed with `pip install plin-linux`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Python PLIN library
|
|
2
|
-
This library provides a Python interface for interacting with PEAK devices such as the PCAN-USB Pro and PLIN-USB on Linux using the chardev API provided by the PEAK LIN Linux
|
|
2
|
+
This library provides a Python interface for interacting with PEAK devices such as the PCAN-USB Pro and PLIN-USB on Linux using the chardev API provided by the PEAK LIN Linux Driver. The PEAK LIN Linux driver is required to use this library and is available [here](https://www.peak-system.com/fileadmin/media/linux/lin.php).
|
|
3
3
|
|
|
4
4
|
## Installation
|
|
5
5
|
The `plin-linux` package is available on [PyPI](https://pypi.org/project/plin-linux/) and can be directly installed with `pip install plin-linux`.
|
|
@@ -514,23 +514,29 @@ class PLIN:
|
|
|
514
514
|
|
|
515
515
|
def read(self, block=True) -> Union[PLINMessage, None]:
|
|
516
516
|
'''
|
|
517
|
-
Reads
|
|
517
|
+
Reads the next PLINMessage the driver has queued.
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
Every record is returned as the device reported it, including frames whose data is all 0xFF:
|
|
520
|
+
that is what an unanswered header looks like (flags carry SLV_NOT_RSP / TIMEOUT), and it is
|
|
521
|
+
indistinguishable from a slave that answered with recessive bytes, so the caller must decide
|
|
522
|
+
from the flags, not the data. Non-FRAME records (SLEEP, WAKEUP, OVERRUN, ...) are returned
|
|
523
|
+
too; check message.type.
|
|
524
|
+
|
|
525
|
+
Returns None when a non-blocking read finds nothing queued.
|
|
520
526
|
'''
|
|
521
527
|
if self.fd:
|
|
522
528
|
blocking = os.get_blocking(self.fd)
|
|
523
529
|
os.set_blocking(self.fd, block)
|
|
524
530
|
try:
|
|
525
531
|
result = os.read(self.fd, PLINMessage.buffer_length)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
return
|
|
532
|
+
except BlockingIOError:
|
|
533
|
+
return None
|
|
534
|
+
finally:
|
|
535
|
+
os.set_blocking(self.fd, blocking)
|
|
536
|
+
|
|
537
|
+
if len(result) < PLINMessage.buffer_length:
|
|
538
|
+
return None
|
|
539
|
+
return PLINMessage.from_buffer_copy(result)
|
|
534
540
|
else:
|
|
535
541
|
raise Exception("PLIN not connected!")
|
|
536
542
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: plin-linux
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: The python-plin package is a Python wrapper for the chardev API provided by the PEAK LIN Linux Beta.
|
|
5
5
|
Author-email: William Zhang <williamzhang@rivian.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/rivian/python-plin
|
|
@@ -12,9 +12,10 @@ Requires-Python: >=3.7
|
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: ioctl_opt
|
|
15
|
+
Dynamic: license-file
|
|
15
16
|
|
|
16
17
|
# Python PLIN library
|
|
17
|
-
This library provides a Python interface for interacting with PEAK devices such as the PCAN-USB Pro and PLIN-USB on Linux using the chardev API provided by the PEAK LIN Linux
|
|
18
|
+
This library provides a Python interface for interacting with PEAK devices such as the PCAN-USB Pro and PLIN-USB on Linux using the chardev API provided by the PEAK LIN Linux Driver. The PEAK LIN Linux driver is required to use this library and is available [here](https://www.peak-system.com/fileadmin/media/linux/lin.php).
|
|
18
19
|
|
|
19
20
|
## Installation
|
|
20
21
|
The `plin-linux` package is available on [PyPI](https://pypi.org/project/plin-linux/) and can be directly installed with `pip install plin-linux`.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|