Struct SocketCanReceiver::CanFilterList
Defined in File socket_can_receiver.hpp
Nested Relationships
This struct is a nested type of Class SocketCanReceiver.
Struct Documentation
-
struct CanFilterList
Structure containing possible CAN filter options.
Public Functions
-
CanFilterList() = default
Default constructor.
-
explicit CanFilterList(const char *str)
Parse CAN filters string:
Filters:
Comma separated filters can be specified for each given CAN interface.
<can_id>:<can_mask>
(matches when <received_can_id> & mask == can_id & mask)
<can_id>~<can_mask>
(matches when <received_can_id> & mask != can_id & mask)
#<error_mask>
(set error frame filter, see include/linux/can/error.h)
[j|J]
(join the given CAN filters - logical AND semantic)
CAN IDs, masks and data content are given and expected in hexadecimal values. When can_id and can_mask are both 8 digits, they are assumed to be 29 bit EFF.
- Parameters:
str – [in] Input to be parsed.
- Throws:
std::runtime_error – if string couldn’t be parsed.
- Returns:
Populated CanFilterList structure.
-
explicit CanFilterList(const std::string &str)
Parse CAN filters string:
Filters:
Comma separated filters can be specified for each given CAN interface.
<can_id>:<can_mask>
(matches when <received_can_id> & mask == can_id & mask)
<can_id>~<can_mask>
(matches when <received_can_id> & mask != can_id & mask)
#<error_mask>
(set error frame filter, see include/linux/can/error.h)
[j|J]
(join the given CAN filters - logical AND semantic)
CAN IDs, masks and data content are given and expected in hexadecimal values. When can_id and can_mask are both 8 digits, they are assumed to be 29 bit EFF.
- Parameters:
str – [in] Input to be parsed.
- Throws:
std::runtime_error – if string couldn’t be parsed.
- Returns:
Populated CanFilterList structure.
Public Members
-
std::vector<struct can_filter> filters
-
can_err_mask_t error_mask = 0
-
bool join_filters = false
Public Static Functions
-
static CanFilterList ParseFilters(const std::string &str)
Parse CAN filters string:
Filters:
Comma separated filters can be specified for each given CAN interface.
<can_id>:<can_mask>
(matches when <received_can_id> & mask == can_id & mask)
<can_id>~<can_mask>
(matches when <received_can_id> & mask != can_id & mask)
#<error_mask>
(set error frame filter, see include/linux/can/error.h)
[j|J]
(join the given CAN filters - logical AND semantic)
CAN IDs, masks and data content are given and expected in hexadecimal values. When can_id and can_mask are both 8 digits, they are assumed to be 29 bit EFF.
- Parameters:
str – [in] Input to be parsed.
- Throws:
std::runtime_error – if string couldn’t be parsed.
- Returns:
Populated CanFilterList structure.
-
CanFilterList() = default