QCanBusFrame Class
QCanBusFrame is a container class representing a single CAN frame. More...
| Header: | #include <QCanBusFrame> |
| qmake: | QT += serialbus |
| Since: | Qt 5.8 |
This class was introduced in Qt 5.8.
Public Types
| class | TimeStamp |
| enum | FrameError { NoError, TransmissionTimeoutError, LostArbitrationError, ControllerError, ProtocolViolationError, …, AnyError } |
| enum | FrameType { UnknownFrame, DataFrame, ErrorFrame, RemoteRequestFrame, InvalidFrame } |
Detailed Description
QCanBusDevice can use QCanBusFrame for read and write operations. It contains the frame identifier and the data payload. QCanBusFrame contains the timestamp of the moment it was read.
See also QCanBusFrame::TimeStamp.
Member Type Documentation
enum QCanBusFrame::FrameError
This enum describes the possible error types.
| Constant | Value | Description |
|---|---|---|
QCanBusFrame::NoError | 0 | No error has occurred. |
QCanBusFrame::TransmissionTimeoutError | (1 << 0) | The transmission has timed out. |
QCanBusFrame::LostArbitrationError | (1 << 1) | The frame could not be sent due to lost arbitration on the bus. |
QCanBusFrame::ControllerError | (1 << 2) | The controller encountered an error. |
QCanBusFrame::ProtocolViolationError | (1 << 3) | A protocol violation has occurred. |
QCanBusFrame::TransceiverError | (1 << 4) | A transceiver error occurred |
QCanBusFrame::MissingAcknowledgmentError | (1 << 5) | The transmission received no acknowledgment. |
QCanBusFrame::BusOffError | (1 << 6) | The CAN bus is offline. |
QCanBusFrame::BusError | (1 << 7) | A CAN bus error occurred. |
QCanBusFrame::ControllerRestartError | (1 << 8) | The controller restarted. |
QCanBusFrame::UnknownError | (1 << 9) | An unknown error has occurred. |
QCanBusFrame::AnyError | 0x1FFFFFFFU | Matches every other error type. |
enum QCanBusFrame::FrameType
This enum describes the type of the CAN frame.
| Constant | Value | Description |
|---|---|---|
QCanBusFrame::UnknownFrame | 0x0 | The frame type is unknown. |
QCanBusFrame::DataFrame | 0x1 | This value represents a data frame. |
QCanBusFrame::ErrorFrame | 0x2 | This value represents an error frame. |
QCanBusFrame::RemoteRequestFrame | 0x3 | This value represents a remote request. |
QCanBusFrame::InvalidFrame | 0x4 | This value represents an invalid frame. This type is used for error reporting. |
See also setFrameType().