1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
"""
Ctypes wrapper module for IXXAT Virtual CAN Interface V4 on win32 systems
Copyright (C) 2016 Giuseppe Corbelli <giuseppe.corbelli@weightpack.com>
Copyright (C) 2019 Marcel Kanter <marcel.kanter@googlemail.com>
"""
from can import (
CanInitializationError,
CanOperationError,
CanTimeoutError,
)
__all__ = [
"VCITimeout",
"VCIError",
"VCIRxQueueEmptyError",
"VCIBusOffError",
"VCIDeviceNotFoundError",
]
class VCITimeout(CanTimeoutError):
"""Wraps the VCI_E_TIMEOUT error"""
class VCIError(CanOperationError):
"""Try to display errors that occur within the wrapped C library nicely."""
class VCIRxQueueEmptyError(VCIError):
"""Wraps the VCI_E_RXQUEUE_EMPTY error"""
def __init__(self):
super().__init__("Receive queue is empty")
class VCIBusOffError(VCIError):
def __init__(self):
super().__init__("Controller is in BUSOFF state")
class VCIDeviceNotFoundError(CanInitializationError):
pass
|