|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Platform-agnostic CAN message structure. More...
#include <BaseCan.h>
Public Member Functions | |
| hf_can_message_t () noexcept | |
| constexpr hf_u8_t | GetMaxDataLength () const noexcept |
| Get maximum data length for current frame type. | |
| bool | IsValidDLC (hf_u8_t dlc) const noexcept |
| Validate DLC for current frame type. | |
| hf_u8_t | GetEffectiveDLC () const noexcept |
| Get effective DLC for the current frame type. | |
| bool | SetDLC (hf_u8_t dlc) noexcept |
| Set data length code for current frame type. | |
| void | SetStandardFrame () noexcept |
| Set standard frame format (11-bit ID) | |
| void | SetExtendedFrame () noexcept |
| Set extended frame format (29-bit ID) | |
| void | SetDataFrame () noexcept |
| Set data frame (not remote) | |
| void | SetRemoteFrame () noexcept |
| Set remote frame. | |
| void | SetSingleShot () noexcept |
| Set single shot transmission. | |
| void | SetSelfReception () noexcept |
| Set self reception request. | |
| bool | IsValidId () const noexcept |
| Validate message ID for current frame format. | |
Public Attributes | |
| hf_u32_t | id |
| Message ID (11 or 29-bit) | |
| hf_u8_t | dlc |
| Data length code (0-8 for classic CAN) | |
| hf_u8_t | data [8] |
| Message data (max 8 bytes for classic CAN) | |
| bool | is_extended |
| Extended ID flag (29-bit vs 11-bit) | |
| bool | is_rtr |
| Remote transmission request flag. | |
| bool | is_ss |
| Single shot flag (no retransmission) | |
| bool | is_self |
| Self reception request flag. | |
| bool | dlc_non_comp |
| DLC is non-compliant (> 8 for classic CAN) | |
| hf_u64_t | timestamp_us |
| Precise timestamp in microseconds. | |
| hf_u32_t | sequence_number |
| Message sequence number. | |
| hf_u8_t | controller_id |
| Originating controller ID. | |
| hf_u8_t | retry_count |
| Number of transmission retries. | |
| hf_u8_t | error_count |
| Associated error count. | |
| bool | is_canfd |
| CAN-FD frame flag. | |
| bool | is_brs |
| Bit Rate Switching flag (CAN-FD) | |
| bool | is_esi |
| Error State Indicator flag (CAN-FD) | |
| hf_u8_t | canfd_dlc |
| CAN-FD DLC (can be > 8) | |
Platform-agnostic CAN message structure.
Comprehensive CAN message format with standard flags and metadata. Supports both standard (11-bit) and extended (29-bit) identifiers, with complete transmission control and diagnostic information.
|
inlinenoexcept |
|
inlinenoexcept |
Get effective DLC for the current frame type.
|
inlineconstexprnoexcept |
Get maximum data length for current frame type.
|
inlinenoexcept |
Validate DLC for current frame type.
| dlc | Data length code to validate |
|
inlinenoexcept |
Validate message ID for current frame format.
|
inlinenoexcept |
Set data frame (not remote)
|
inlinenoexcept |
Set data length code for current frame type.
| dlc | Data length code to set |
|
inlinenoexcept |
Set extended frame format (29-bit ID)
|
inlinenoexcept |
Set remote frame.
|
inlinenoexcept |
Set self reception request.
|
inlinenoexcept |
Set single shot transmission.
|
inlinenoexcept |
Set standard frame format (11-bit ID)
| hf_u8_t hf_can_message_t::canfd_dlc |
CAN-FD DLC (can be > 8)
| hf_u8_t hf_can_message_t::controller_id |
Originating controller ID.
| hf_u8_t hf_can_message_t::data[8] |
Message data (max 8 bytes for classic CAN)
| hf_u8_t hf_can_message_t::dlc |
Data length code (0-8 for classic CAN)
| bool hf_can_message_t::dlc_non_comp |
DLC is non-compliant (> 8 for classic CAN)
| hf_u8_t hf_can_message_t::error_count |
Associated error count.
| hf_u32_t hf_can_message_t::id |
Message ID (11 or 29-bit)
| bool hf_can_message_t::is_brs |
Bit Rate Switching flag (CAN-FD)
| bool hf_can_message_t::is_canfd |
CAN-FD frame flag.
| bool hf_can_message_t::is_esi |
Error State Indicator flag (CAN-FD)
| bool hf_can_message_t::is_extended |
Extended ID flag (29-bit vs 11-bit)
| bool hf_can_message_t::is_rtr |
Remote transmission request flag.
| bool hf_can_message_t::is_self |
Self reception request flag.
| bool hf_can_message_t::is_ss |
Single shot flag (no retransmission)
| hf_u8_t hf_can_message_t::retry_count |
Number of transmission retries.
| hf_u32_t hf_can_message_t::sequence_number |
Message sequence number.
| hf_u64_t hf_can_message_t::timestamp_us |
Precise timestamp in microseconds.