candle_driver
Python wrapper for the candle (gs_usb) windows driver which is published here.
Used to communicate with candleLight, CANable (with candleLight firmware) CAN-USB adapters.
Example usage
import candle_driver
# lists all available candle devices
devices = candle_driver.list_devices()
if not len(devices):
print('No candle devices found.')
exit()
print('Found {} candle devices.'.format(len(devices)))
# use first availabel device
device = devices[0]
print('Device path: {}'.format(device.path()))
print('Device name: {}'.format(device.name()))
print('Device channels: {}'.format(device.channel_count()))
# open device (blocks other processes from using it)
device.open()
print('Device timestamp: %d' % device.timestamp()) # in usec
# open first channel
ch = device.channel(0)
ch.set_bitrate(1000000)
# or
# ch.set_timings(prop_seg=1, phase_seg1=12, phase_seg2=2, sjw=1, brp=3)
# start receiving data
ch.start()
# normal frame
ch.write(10, b'abcdefgh')
# extended frame
ch.write(10235 | candle_driver.CANDLE_ID_EXTENDED, b'abcdefgh')
# wait 1000ms for data
try:
frame_type, can_id, can_data, extended, ts = ch.read(1000)
print('Received {} from ID {} at {}'.format(can_data, can_id, ts))
except TimeoutError:
print('CAN read timeout')
# close everything
ch.stop()
device.close()
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Windows C driver is licensed under the GPLv3 License - see the LICENSE file for details.
Acknowledgments
- Hubert Denkmair for the Windows C driver.
Metadata
Release files for candle-driver 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| candle_driver-0.1.5.tar.gz | 13.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| candle_driver-0.1.5-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
Total release size: 30.8 kB
Release files / candle_driver-0.1.5.tar.gz
| Download URL | candle_driver-0.1.5.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e7e11a851c21121536e1a2c3923c024f450c1b04d3b44470877afaa4f2faa4f
|
|
BLAKE2b-256 checksum How to use checksums |
081b6692e292543db0b6a379fc5f8b2ec29505bc953994c1f0996e74ee2bd734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / candle_driver-0.1.5-cp39-cp39-win_amd64.whl
| Download URL | candle_driver-0.1.5-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 17.4 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2baad6b635db8d05413e175804af066eba6567ba5749b37ccf373bf17a7fe866
|
|
BLAKE2b-256 checksum How to use checksums |
2001703824a779da4fd098f8ed0f52634b63592c8c2c0a2248d24401d2e8fef2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for candle-driver 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.