24 #ifndef LELY_IO2_CAN_MSG_HPP_
25 #define LELY_IO2_CAN_MSG_HPP_
68 operator~(CanFlag rhs) {
69 return static_cast<CanFlag
>(~static_cast<int>(rhs));
72 constexpr CanFlag operator&(CanFlag lhs, CanFlag rhs) {
73 return static_cast<CanFlag
>(
static_cast<int>(lhs) &
static_cast<int>(rhs));
77 operator^(CanFlag lhs, CanFlag rhs) {
78 return static_cast<CanFlag>(
static_cast<int>(lhs) ^
static_cast<int>(rhs));
82 operator|(CanFlag lhs, CanFlag rhs) {
83 return static_cast<CanFlag>(
static_cast<int>(lhs) |
static_cast<int>(rhs));
87 operator&=(CanFlag& lhs, CanFlag rhs) {
88 return lhs = lhs & rhs;
92 operator^=(CanFlag& lhs, CanFlag rhs) {
93 return lhs = lhs ^ rhs;
97 operator|=(CanFlag& lhs, CanFlag rhs) {
98 return lhs = lhs | rhs;
@ CAN_FLAG_IDE
The Identifier Extension (IDE) flag.
@ CAN_FLAG_RTR
The Remote Transmission Request (RTR) flag (unavailable in CAN FD format frames).
@ CAN_FLAG_FDF
The FD Format (FDF) flag, formerly known as Extended Data Length (EDL).
@ CAN_FLAG_BRS
The Bit Rate Switch (BRS) flag (only available in CAN FD format frames).
@ CAN_FLAG_ESI
The Error State Indicator (ESI) flag (only available in CAN FD format frames).
This header file is part of the I/O library; it contains the CAN frame declarations.
CanFlag
The error flags of a CAN bus, which are not mutually exclusive.
@ BRS
The Bit Rate Switch (BRS) flag (only available in CAN FD format frames).
@ RTR
The Remote Transmission Request (RTR) flag (unavailable in CAN FD format frames).
@ IDE
The Identifier Extension (IDE) flag.
@ FDF
The FD Format (FDF) flag, formerly known as Extended Data Length (EDL).
@ ESI
The Error State Indicator (ESI) flag (only available in CAN FD format frames).