Libsockcanpp
A complete C++ wrapper around socketcan.
Public Member Functions | Static Public Member Functions | Private Attributes
sockcanpp::CanId Struct Reference

Represents a CAN ID in a simple and easy-to-use manner. More...

#include <CanId.hpp>

Public Member Functions

 CanId (const CanId &orig)
 
 CanId (const uint32_t identifier)
 
 CanId ()
 
 operator int16_t () const
 
 operator uint16_t () const
 
 operator int32_t () const
 
 operator uint32_t () const
 
CanId operator& (CanId &x) const
 
CanId operator& (const CanId x) const
 
CanId operator& (const int16_t x) const
 
CanId operator& (const uint16_t x) const
 
CanId operator& (const int32_t x) const
 
CanId operator& (const uint32_t x) const
 
CanId operator& (const int64_t x) const
 
CanId operator& (const uint64_t x) const
 
CanId operator| (CanId &x) const
 
CanId operator| (const CanId x) const
 
CanId operator| (const int16_t x) const
 
CanId operator| (const uint16_t x) const
 
CanId operator| (const int32_t x) const
 
CanId operator| (const uint32_t x) const
 
CanId operator| (const int64_t x) const
 
CanId operator| (const uint64_t x) const
 
bool operator== (CanId &x) const
 
bool operator== (const CanId &x) const
 
bool operator== (const int16_t x) const
 
bool operator== (const uint16_t x) const
 
bool operator== (const int32_t x) const
 
bool operator== (const uint32_t x) const
 
bool operator== (const int64_t x) const
 
bool operator== (const uint64_t x) const
 
bool operator!= (CanId &x) const
 
bool operator!= (const CanId &x) const
 
bool operator!= (const int16_t x) const
 
bool operator!= (const uint16_t x) const
 
bool operator!= (const int32_t x) const
 
bool operator!= (const uint32_t x) const
 
bool operator!= (const int64_t x) const
 
bool operator!= (const uint64_t x) const
 
bool operator< (CanId &x) const
 
bool operator< (int32_t x) const
 
bool operator< (uint32_t x) const
 
bool operator< (int16_t x) const
 
bool operator< (uint16_t x) const
 
bool operator<= (CanId &x) const
 
bool operator> (CanId &x) const
 
bool operator> (int32_t x) const
 
bool operator> (uint32_t x) const
 
bool operator> (int16_t x) const
 
bool operator> (uint16_t x) const
 
bool operator>= (CanId &x) const
 
bool operator< (const CanId &x) const
 
bool operator<= (const CanId &x) const
 
bool operator> (const CanId &x) const
 
bool operator>= (const CanId &x) const
 
CanId operator= (const int32_t val)
 
CanId operator= (const uint32_t val)
 
CanId operator= (const int64_t val)
 
CanId operator+ (CanId &x) const
 
CanId operator+ (const CanId &x) const
 
CanId operator+ (const int16_t x) const
 
CanId operator+ (const uint16_t x) const
 
CanId operator+ (const int32_t x) const
 
CanId operator+ (const uint32_t x) const
 
CanId operator+ (const int64_t x) const
 
CanId operator+ (const uint64_t x) const
 
CanId operator- (CanId &x) const
 
CanId operator- (const CanId &x) const
 
CanId operator- (const int16_t x) const
 
CanId operator- (const uint16_t x) const
 
CanId operator- (const int32_t x) const
 
CanId operator- (const uint32_t x) const
 
CanId operator- (const int64_t x) const
 
CanId operator- (const uint64_t x) const
 
bool hasErrorFrameFlag () const
 
bool hasRtrFrameFlag () const
 
bool isStandardFrameId () const
 
bool isExtendedFrameId () const
 
bool equals (CanId otherId) const
 

Static Public Member Functions

static bool isValidIdentifier (uint32_t value)
 Indicates whether or not a given integer is a valid CAN identifier. More...
 
static bool isErrorFrame (uint32_t value)
 Indicates whether or not a given integer contains the error frame flag or not. More...
 
static bool isRemoteTransmissionRequest (uint32_t value)
 Indicates whether the received frame is a remote transmission request. More...
 

Private Attributes

bool _isErrorFrame = false
 
bool _isRemoteTransmissionRequest = false
 
bool _isStandardFrameId = false
 
bool _isExtendedFrameId = false
 
uint32_t _identifier = 0
 

Detailed Description

Represents a CAN ID in a simple and easy-to-use manner.

Definition at line 48 of file CanId.hpp.

Constructor & Destructor Documentation

◆ CanId() [1/3]

sockcanpp::CanId::CanId ( const CanId orig)
inline

Definition at line 50 of file CanId.hpp.

50 : _identifier(orig._identifier), _isErrorFrame(orig._isErrorFrame),
51 _isRemoteTransmissionRequest(orig._isRemoteTransmissionRequest), _isStandardFrameId(orig._isStandardFrameId),
52 _isExtendedFrameId(orig._isExtendedFrameId) { /* copy */ }
bool _isExtendedFrameId
Definition: CanId.hpp:230
bool _isRemoteTransmissionRequest
Definition: CanId.hpp:228
uint32_t _identifier
Definition: CanId.hpp:232
bool _isErrorFrame
Definition: CanId.hpp:227
bool _isStandardFrameId
Definition: CanId.hpp:229

References _identifier, _isErrorFrame, _isExtendedFrameId, _isRemoteTransmissionRequest, and _isStandardFrameId.

Referenced by sockcanpp::CanDriver::CanDriver(), and sockcanpp::CanMessage::CanMessage().

◆ CanId() [2/3]

sockcanpp::CanId::CanId ( const uint32_t  identifier)
inline

Definition at line 54 of file CanId.hpp.

54 : _identifier(identifier) {
55 // TODO: Switch to using bitmasks!
56
57 if (isValidIdentifier(identifier)) {
58 if (((int32_t)log2(identifier) + 1) < 11) {
59 _isStandardFrameId = true;
60 } else { _isExtendedFrameId = true; }
61 } else if (isErrorFrame(identifier)) {
62 _isErrorFrame = true;
63 } else if (isRemoteTransmissionRequest(identifier)) {
65 }
66 }
static bool isRemoteTransmissionRequest(uint32_t value)
Indicates whether the received frame is a remote transmission request.
Definition: CanId.hpp:212
static bool isErrorFrame(uint32_t value)
Indicates whether or not a given integer contains the error frame flag or not.
Definition: CanId.hpp:199
static bool isValidIdentifier(uint32_t value)
Indicates whether or not a given integer is a valid CAN identifier.
Definition: CanId.hpp:179

References _identifier, _isErrorFrame, _isExtendedFrameId, _isRemoteTransmissionRequest, _isStandardFrameId, isErrorFrame(), isRemoteTransmissionRequest(), and isValidIdentifier().

Referenced by sockcanpp::CanMessage::CanMessage(), and operator=().

◆ CanId() [3/3]

sockcanpp::CanId::CanId ( )
inline

Definition at line 68 of file CanId.hpp.

68: _identifier(0), _isStandardFrameId(true) { }

References _identifier, and _isStandardFrameId.

Member Function Documentation

◆ equals()

bool sockcanpp::CanId::equals ( CanId  otherId) const
inline

Definition at line 224 of file CanId.hpp.

224{ return *this == otherId; }

References operator==().

◆ hasErrorFrameFlag()

bool sockcanpp::CanId::hasErrorFrameFlag ( ) const
inline

Definition at line 218 of file CanId.hpp.

218{ return _isErrorFrame; }

References _isErrorFrame.

◆ hasRtrFrameFlag()

bool sockcanpp::CanId::hasRtrFrameFlag ( ) const
inline

Definition at line 219 of file CanId.hpp.

References _isRemoteTransmissionRequest.

◆ isErrorFrame()

static bool sockcanpp::CanId::isErrorFrame ( uint32_t  value)
inlinestatic

Indicates whether or not a given integer contains the error frame flag or not.

Parameters
valueThe integer to check.
Returns
true If value has the error frame flag (bit) set to 1.
false Otherwise.

Definition at line 199 of file CanId.hpp.

199 {
200 try { return bitset<sizeof(int32_t)>(value).test(29); }
201 catch (...) { return false; /* Brute-force, but works. */ }
202 }

Referenced by CanId().

◆ isExtendedFrameId()

bool sockcanpp::CanId::isExtendedFrameId ( ) const
inline

Definition at line 221 of file CanId.hpp.

221{ return _isExtendedFrameId; }

References _isExtendedFrameId.

◆ isRemoteTransmissionRequest()

static bool sockcanpp::CanId::isRemoteTransmissionRequest ( uint32_t  value)
inlinestatic

Indicates whether the received frame is a remote transmission request.

Parameters
valueThe integer to check.
Returns
true If the frame is a remote transmission request.
false Otherwise.

Definition at line 212 of file CanId.hpp.

212 {
213 try { return bitset<sizeof(int32_t)>(value).test(30); }
214 catch (...) { return false; /* Brute-force, but works. */ }
215 }

Referenced by CanId().

◆ isStandardFrameId()

bool sockcanpp::CanId::isStandardFrameId ( ) const
inline

Definition at line 220 of file CanId.hpp.

220{ return _isStandardFrameId; }

References _isStandardFrameId.

Referenced by operator int16_t(), and operator uint16_t().

◆ isValidIdentifier()

static bool sockcanpp::CanId::isValidIdentifier ( uint32_t  value)
inlinestatic

Indicates whether or not a given integer is a valid CAN identifier.

Parameters
valueThe integer to check.
Returns
true If value is a valid CAN identifier.
false Otherwise.

Definition at line 179 of file CanId.hpp.

179 {
180 int32_t tmpValue = ((int32_t)log2(value) + 2); // Get bit count
181
182 // Check for extended frame flag
183 if (tmpValue >= 29) {
184 value = (value & CAN_EFF_FLAG) ? (value & CAN_EFF_MASK) : (value & CAN_SFF_MASK);
185 tmpValue = ((int32_t)log2(value) + 1); // Get bit count again
186 }
187
188 return (value == 0) /* Default value, also valid ID */ || ((tmpValue <= 29 && tmpValue > 0));
189 }

Referenced by CanId(), and operator=().

◆ operator int16_t()

sockcanpp::CanId::operator int16_t ( ) const
inline

Definition at line 73 of file CanId.hpp.

73{ return isStandardFrameId() ? (int16_t)_identifier : throw system_error(error_code(0xbad1d, generic_category()), "INVALID CAST: ID is extended or invalid!"); }
bool isStandardFrameId() const
Definition: CanId.hpp:220

References _identifier, and isStandardFrameId().

◆ operator int32_t()

sockcanpp::CanId::operator int32_t ( ) const
inline

Definition at line 75 of file CanId.hpp.

75{ return _identifier; }

References _identifier.

◆ operator uint16_t()

sockcanpp::CanId::operator uint16_t ( ) const
inline

Definition at line 74 of file CanId.hpp.

74{ return isStandardFrameId() ? (uint16_t)_identifier : throw system_error(error_code(0xbad1d, generic_category()), "INVALID CAST: ID is extended or invalid!"); }

References _identifier, and isStandardFrameId().

◆ operator uint32_t()

sockcanpp::CanId::operator uint32_t ( ) const
inline

Definition at line 76 of file CanId.hpp.

76{ return _identifier; }

References _identifier.

◆ operator!=() [1/8]

bool sockcanpp::CanId::operator!= ( CanId x) const
inline

Definition at line 108 of file CanId.hpp.

108{ return _identifier != x._identifier; }

References _identifier.

◆ operator!=() [2/8]

bool sockcanpp::CanId::operator!= ( const CanId x) const
inline

Definition at line 109 of file CanId.hpp.

109{ return _identifier != x._identifier; }

References _identifier.

◆ operator!=() [3/8]

bool sockcanpp::CanId::operator!= ( const int16_t  x) const
inline

Definition at line 110 of file CanId.hpp.

110{ return _identifier != x; }

References _identifier.

◆ operator!=() [4/8]

bool sockcanpp::CanId::operator!= ( const int32_t  x) const
inline

Definition at line 112 of file CanId.hpp.

112{ return _identifier != x; }

References _identifier.

◆ operator!=() [5/8]

bool sockcanpp::CanId::operator!= ( const int64_t  x) const
inline

Definition at line 114 of file CanId.hpp.

114{ return (x > UINT32_MAX || x < INT32_MIN) ? false : x != _identifier; }

References _identifier.

◆ operator!=() [6/8]

bool sockcanpp::CanId::operator!= ( const uint16_t  x) const
inline

Definition at line 111 of file CanId.hpp.

111{ return _identifier != x; }

References _identifier.

◆ operator!=() [7/8]

bool sockcanpp::CanId::operator!= ( const uint32_t  x) const
inline

Definition at line 113 of file CanId.hpp.

113{ return _identifier != x; }

References _identifier.

◆ operator!=() [8/8]

bool sockcanpp::CanId::operator!= ( const uint64_t  x) const
inline

Definition at line 115 of file CanId.hpp.

115{ return x > UINT32_MAX ? false : x != _identifier; }

References _identifier.

◆ operator&() [1/8]

CanId sockcanpp::CanId::operator& ( CanId x) const
inline

Definition at line 80 of file CanId.hpp.

80{ return _identifier & x._identifier; }

References _identifier.

◆ operator&() [2/8]

CanId sockcanpp::CanId::operator& ( const CanId  x) const
inline

Definition at line 81 of file CanId.hpp.

81{ return _identifier & x._identifier; }

References _identifier.

◆ operator&() [3/8]

CanId sockcanpp::CanId::operator& ( const int16_t  x) const
inline

Definition at line 82 of file CanId.hpp.

82{ return _identifier & x; }

References _identifier.

◆ operator&() [4/8]

CanId sockcanpp::CanId::operator& ( const int32_t  x) const
inline

Definition at line 84 of file CanId.hpp.

84{ return _identifier & x; }

References _identifier.

◆ operator&() [5/8]

CanId sockcanpp::CanId::operator& ( const int64_t  x) const
inline

Definition at line 86 of file CanId.hpp.

86{ return _identifier & x; }

References _identifier.

◆ operator&() [6/8]

CanId sockcanpp::CanId::operator& ( const uint16_t  x) const
inline

Definition at line 83 of file CanId.hpp.

83{ return _identifier & x; }

References _identifier.

◆ operator&() [7/8]

CanId sockcanpp::CanId::operator& ( const uint32_t  x) const
inline

Definition at line 85 of file CanId.hpp.

85{ return _identifier & x; }

References _identifier.

◆ operator&() [8/8]

CanId sockcanpp::CanId::operator& ( const uint64_t  x) const
inline

Definition at line 87 of file CanId.hpp.

87{ return _identifier & x; }

References _identifier.

◆ operator+() [1/8]

CanId sockcanpp::CanId::operator+ ( CanId x) const
inline

Definition at line 151 of file CanId.hpp.

151{ return _identifier + x._identifier; }

References _identifier.

◆ operator+() [2/8]

CanId sockcanpp::CanId::operator+ ( const CanId x) const
inline

Definition at line 152 of file CanId.hpp.

152{ return _identifier + x._identifier; }

References _identifier.

◆ operator+() [3/8]

CanId sockcanpp::CanId::operator+ ( const int16_t  x) const
inline

Definition at line 153 of file CanId.hpp.

153{ return _identifier + x; }

References _identifier.

◆ operator+() [4/8]

CanId sockcanpp::CanId::operator+ ( const int32_t  x) const
inline

Definition at line 155 of file CanId.hpp.

155{ return _identifier + x; }

References _identifier.

◆ operator+() [5/8]

CanId sockcanpp::CanId::operator+ ( const int64_t  x) const
inline

Definition at line 157 of file CanId.hpp.

157{ return _identifier + x; }

References _identifier.

◆ operator+() [6/8]

CanId sockcanpp::CanId::operator+ ( const uint16_t  x) const
inline

Definition at line 154 of file CanId.hpp.

154{ return _identifier + x; }

References _identifier.

◆ operator+() [7/8]

CanId sockcanpp::CanId::operator+ ( const uint32_t  x) const
inline

Definition at line 156 of file CanId.hpp.

156{ return _identifier + x; }

References _identifier.

◆ operator+() [8/8]

CanId sockcanpp::CanId::operator+ ( const uint64_t  x) const
inline

Definition at line 158 of file CanId.hpp.

158{ return _identifier + x; }

References _identifier.

◆ operator-() [1/8]

CanId sockcanpp::CanId::operator- ( CanId x) const
inline

Definition at line 160 of file CanId.hpp.

160{ return _identifier - x._identifier; }

References _identifier.

◆ operator-() [2/8]

CanId sockcanpp::CanId::operator- ( const CanId x) const
inline

Definition at line 161 of file CanId.hpp.

161{ return _identifier - x._identifier; }

References _identifier.

◆ operator-() [3/8]

CanId sockcanpp::CanId::operator- ( const int16_t  x) const
inline

Definition at line 162 of file CanId.hpp.

162{ return _identifier - x; }

References _identifier.

◆ operator-() [4/8]

CanId sockcanpp::CanId::operator- ( const int32_t  x) const
inline

Definition at line 164 of file CanId.hpp.

164{ return _identifier - x; }

References _identifier.

◆ operator-() [5/8]

CanId sockcanpp::CanId::operator- ( const int64_t  x) const
inline

Definition at line 166 of file CanId.hpp.

166{ return _identifier - x; }

References _identifier.

◆ operator-() [6/8]

CanId sockcanpp::CanId::operator- ( const uint16_t  x) const
inline

Definition at line 163 of file CanId.hpp.

163{ return _identifier - x; }

References _identifier.

◆ operator-() [7/8]

CanId sockcanpp::CanId::operator- ( const uint32_t  x) const
inline

Definition at line 165 of file CanId.hpp.

165{ return _identifier - x; }

References _identifier.

◆ operator-() [8/8]

CanId sockcanpp::CanId::operator- ( const uint64_t  x) const
inline

Definition at line 167 of file CanId.hpp.

167{ return _identifier - x; }

References _identifier.

◆ operator<() [1/6]

bool sockcanpp::CanId::operator< ( CanId x) const
inline

Definition at line 117 of file CanId.hpp.

117{ return x._identifier < _identifier; }

References _identifier.

◆ operator<() [2/6]

bool sockcanpp::CanId::operator< ( const CanId x) const
inline

Definition at line 129 of file CanId.hpp.

129{ return x._identifier < _identifier; }

References _identifier.

◆ operator<() [3/6]

bool sockcanpp::CanId::operator< ( int16_t  x) const
inline

Definition at line 120 of file CanId.hpp.

120{ return x < _identifier; }

References _identifier.

◆ operator<() [4/6]

bool sockcanpp::CanId::operator< ( int32_t  x) const
inline

Definition at line 118 of file CanId.hpp.

118{ return x < _identifier; }

References _identifier.

◆ operator<() [5/6]

bool sockcanpp::CanId::operator< ( uint16_t  x) const
inline

Definition at line 121 of file CanId.hpp.

121{ return x < _identifier; }

References _identifier.

◆ operator<() [6/6]

bool sockcanpp::CanId::operator< ( uint32_t  x) const
inline

Definition at line 119 of file CanId.hpp.

119{ return x < _identifier; }

References _identifier.

◆ operator<=() [1/2]

bool sockcanpp::CanId::operator<= ( CanId x) const
inline

Definition at line 122 of file CanId.hpp.

122{ return x._identifier <= _identifier; }

References _identifier.

◆ operator<=() [2/2]

bool sockcanpp::CanId::operator<= ( const CanId x) const
inline

Definition at line 130 of file CanId.hpp.

130{ return x._identifier <= _identifier; }

References _identifier.

◆ operator=() [1/3]

CanId sockcanpp::CanId::operator= ( const int32_t  val)
inline

Definition at line 136 of file CanId.hpp.

136 {
137 uint32_t tmpVal = val;
138 auto tmp = (isValidIdentifier(tmpVal) ? CanId(val) : throw system_error(error_code(0x5421, generic_category()), "INVALID CAST: ID is extended or invalid!"));
139 return tmp;
140 }

References CanId(), and isValidIdentifier().

Referenced by operator=().

◆ operator=() [2/3]

CanId sockcanpp::CanId::operator= ( const int64_t  val)
inline

Definition at line 147 of file CanId.hpp.

147{ return operator =((int32_t)val); }
CanId operator=(const int32_t val)
Definition: CanId.hpp:136

References operator=().

◆ operator=() [3/3]

CanId sockcanpp::CanId::operator= ( const uint32_t  val)
inline

Definition at line 142 of file CanId.hpp.

142 {
143 uint32_t tmp = val;
144 return (isValidIdentifier(tmp) ? CanId(val) : throw system_error(error_code(0x5421, generic_category()), "INVALID CAST: ID is extended or invalid!"));
145 }

References CanId(), and isValidIdentifier().

◆ operator==() [1/8]

bool sockcanpp::CanId::operator== ( CanId x) const
inline

Definition at line 100 of file CanId.hpp.

100{ return _identifier == x._identifier; }

References _identifier.

Referenced by equals().

◆ operator==() [2/8]

bool sockcanpp::CanId::operator== ( const CanId x) const
inline

Definition at line 101 of file CanId.hpp.

101{ return _identifier == x._identifier; }

References _identifier.

◆ operator==() [3/8]

bool sockcanpp::CanId::operator== ( const int16_t  x) const
inline

Definition at line 102 of file CanId.hpp.

102{ return _identifier == x; }

References _identifier.

◆ operator==() [4/8]

bool sockcanpp::CanId::operator== ( const int32_t  x) const
inline

Definition at line 104 of file CanId.hpp.

104{ return _identifier == x; }

References _identifier.

◆ operator==() [5/8]

bool sockcanpp::CanId::operator== ( const int64_t  x) const
inline

Definition at line 106 of file CanId.hpp.

106{ return (x > UINT32_MAX || x < INT32_MIN) ? false : x == _identifier; }

References _identifier.

◆ operator==() [6/8]

bool sockcanpp::CanId::operator== ( const uint16_t  x) const
inline

Definition at line 103 of file CanId.hpp.

103{ return _identifier == x; }

References _identifier.

◆ operator==() [7/8]

bool sockcanpp::CanId::operator== ( const uint32_t  x) const
inline

Definition at line 105 of file CanId.hpp.

105{ return _identifier == x; }

References _identifier.

◆ operator==() [8/8]

bool sockcanpp::CanId::operator== ( const uint64_t  x) const
inline

Definition at line 107 of file CanId.hpp.

107{ return x > UINT32_MAX ? false : x == _identifier; }

References _identifier.

◆ operator>() [1/6]

bool sockcanpp::CanId::operator> ( CanId x) const
inline

Definition at line 123 of file CanId.hpp.

123{ return x._identifier > _identifier; }

References _identifier.

◆ operator>() [2/6]

bool sockcanpp::CanId::operator> ( const CanId x) const
inline

Definition at line 131 of file CanId.hpp.

131{ return x._identifier > _identifier; }

References _identifier.

◆ operator>() [3/6]

bool sockcanpp::CanId::operator> ( int16_t  x) const
inline

Definition at line 126 of file CanId.hpp.

126{ return x > _identifier; }

References _identifier.

◆ operator>() [4/6]

bool sockcanpp::CanId::operator> ( int32_t  x) const
inline

Definition at line 124 of file CanId.hpp.

124{ return x > _identifier; }

References _identifier.

◆ operator>() [5/6]

bool sockcanpp::CanId::operator> ( uint16_t  x) const
inline

Definition at line 127 of file CanId.hpp.

127{ return x > _identifier; }

References _identifier.

◆ operator>() [6/6]

bool sockcanpp::CanId::operator> ( uint32_t  x) const
inline

Definition at line 125 of file CanId.hpp.

125{ return x > _identifier; }

References _identifier.

◆ operator>=() [1/2]

bool sockcanpp::CanId::operator>= ( CanId x) const
inline

Definition at line 128 of file CanId.hpp.

128{ return x._identifier >= _identifier; }

References _identifier.

◆ operator>=() [2/2]

bool sockcanpp::CanId::operator>= ( const CanId x) const
inline

Definition at line 132 of file CanId.hpp.

132{ return x._identifier >= _identifier; }

References _identifier.

◆ operator|() [1/8]

CanId sockcanpp::CanId::operator| ( CanId x) const
inline

Definition at line 89 of file CanId.hpp.

89{ return _identifier | x._identifier; }

References _identifier.

◆ operator|() [2/8]

CanId sockcanpp::CanId::operator| ( const CanId  x) const
inline

Definition at line 90 of file CanId.hpp.

90{ return _identifier | x._identifier; }

References _identifier.

◆ operator|() [3/8]

CanId sockcanpp::CanId::operator| ( const int16_t  x) const
inline

Definition at line 91 of file CanId.hpp.

91{ return _identifier | x; }

References _identifier.

◆ operator|() [4/8]

CanId sockcanpp::CanId::operator| ( const int32_t  x) const
inline

Definition at line 93 of file CanId.hpp.

93{ return _identifier | x; }

References _identifier.

◆ operator|() [5/8]

CanId sockcanpp::CanId::operator| ( const int64_t  x) const
inline

Definition at line 95 of file CanId.hpp.

95{ return _identifier | x; }

References _identifier.

◆ operator|() [6/8]

CanId sockcanpp::CanId::operator| ( const uint16_t  x) const
inline

Definition at line 92 of file CanId.hpp.

92{ return _identifier | x; }

References _identifier.

◆ operator|() [7/8]

CanId sockcanpp::CanId::operator| ( const uint32_t  x) const
inline

Definition at line 94 of file CanId.hpp.

94{ return _identifier | x; }

References _identifier.

◆ operator|() [8/8]

CanId sockcanpp::CanId::operator| ( const uint64_t  x) const
inline

Definition at line 96 of file CanId.hpp.

96{ return _identifier | x; }

References _identifier.

Field Documentation

◆ _identifier

uint32_t sockcanpp::CanId::_identifier = 0
private

◆ _isErrorFrame

bool sockcanpp::CanId::_isErrorFrame = false
private

Definition at line 227 of file CanId.hpp.

Referenced by CanId(), and hasErrorFrameFlag().

◆ _isExtendedFrameId

bool sockcanpp::CanId::_isExtendedFrameId = false
private

Definition at line 230 of file CanId.hpp.

Referenced by CanId(), and isExtendedFrameId().

◆ _isRemoteTransmissionRequest

bool sockcanpp::CanId::_isRemoteTransmissionRequest = false
private

Definition at line 228 of file CanId.hpp.

Referenced by CanId(), and hasRtrFrameFlag().

◆ _isStandardFrameId

bool sockcanpp::CanId::_isStandardFrameId = false
private

Definition at line 229 of file CanId.hpp.

Referenced by CanId(), and isStandardFrameId().


The documentation for this struct was generated from the following file: