Struct flagged_address_t

Inheritance Relationships

Base Type

Struct Documentation

struct flagged_address_t : public hi_can::addressing::structured_address_t

Inheritance diagram for hi_can::addressing::flagged_address_t:

Collaboration diagram for hi_can::addressing::flagged_address_t:

A CAN address with flags for RTR, error, and extended (29-bit) addressing.

Public Functions

constexpr flagged_address_t() = default

Default constructor - zero address, not RTR or error, extended.

inline constexpr flagged_address_t(raw_address_t _address, bool _is_rtr = false, bool _is_error = false, bool _is_extended = true)

Construct a flagged address from a raw address and flags.

inline virtual explicit constexpr operator raw_address_t() const override

Convert a flagged address to a raw address.

inline auto operator<=>(const flagged_address_t &other) const

Compare two flagged addresses (for sorting).

Sorts first by address, then is_rtr flag, then is_error flag, then is_extended flag

Parameters:
const flagged_address_t &other

Address to compare against

Returns:

The result of the comparison

inline auto operator==(const flagged_address_t &other) const

Check if two addresses are equal. Checks address and all flags.

Parameters:
const flagged_address_t &other

Address to compare against

Returns:

Whether the addresses are equal

inline auto operator!=(const flagged_address_t &other) const

Check if two addresses are not equal.

Parameters:
const flagged_address_t &other

Address to compare against

Returns:

Whether the addresses differ

Public Members

raw_address_t address = 0

The base raw address.

bool is_rtr = false

Whether the address is an RTR frame.

bool is_error = false

Whether the address is an error frame.

bool is_extended = true

Whether the address is an extended (29-bit) address.