mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 16:55:58 +00:00
49 lines
953 B
C++
49 lines
953 B
C++
/**
|
|
* @file
|
|
* @brief CAN frame headers.
|
|
*/
|
|
#ifndef STA_CORE_CAN_HEADERS_HPP
|
|
#define STA_CORE_CAN_HEADERS_HPP
|
|
|
|
#include <sta/can/id.hpp>
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
namespace sta
|
|
{
|
|
/**
|
|
* @defgroup sta_core_can_headers Frame headers
|
|
* @ingroup sta_core_can
|
|
* @brief CAN header types for transmitted / received frames.
|
|
* @{
|
|
*/
|
|
|
|
|
|
/**
|
|
* @brief CAN TX frame header.
|
|
*/
|
|
struct CanTxHeader
|
|
{
|
|
CanFrameId id; /**< Frame ID */
|
|
uint8_t payloadLength; /**< Size of data to send */
|
|
};
|
|
|
|
/**
|
|
* @brief CAN RX frame header.
|
|
*/
|
|
struct CanRxHeader
|
|
{
|
|
CanFrameId id; /**< Frame ID */
|
|
uint8_t payloadLength; /**< Size of received data */
|
|
uint32_t timestamp; /**< RX timestamp */
|
|
uint8_t filter; /**< RX filter match */
|
|
};
|
|
|
|
|
|
/** @} */
|
|
} // namespace sta
|
|
|
|
|
|
#endif // STA_CORE_CAN_HEADERS_HPP
|