hardbyte / hardbyte/python-can

Meaning of can.BusABC.state

Đang mở
#736 13 bình luận 3 reaction 0 người được giao Xem trên GitHub
api
Ngôn ngữ chính
Python
Star
1.6k
Fork
697
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,
please help me understand the meaning of `class BusState(Enum):`. I would like to show status of the interface (Kvaser Leaf and Vector VN1610 are on my desk) as specified by CAN specification (error active, error passive and bus-off state).
But the @property `def state(self):` of the classes `class KvaserBus(BusABC):` and `class VectorBus(BusABC):` are not implemented.

I would like to implement them but I am not sure what it shall returns
- state of the CAN bus as defined by standard (active, passive, error=busoff)
- state of the Python class BusABC (active, passive=silent_mode, error=some_driver)

The documentation says that it returns ["current state of the hardware"](https://python-can.readthedocs.io/en/master/bus.html#can.BusABC.state). Does it mean state of driver connection with HW interface or state of CAN bus controller (active->passive->busoff)?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.