CTRE Phoenix Pro C++ 23.0.12
canframe.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
9#include <stdint.h>
10
11namespace ctre {
12namespace phoenix {
13namespace platform {
14namespace can {
15
16 /**
17 * "plain old data" container for holding a CAN Frame Event.
18 * Assignment of this type resolves to a copy-by-value.
19 */
20 struct canframe_t {
21 uint32_t arbID; //!< ArbID of the CAN frame.
22 uint64_t hwTimestampUs; //!< Hardware timestamp if receive event. Zero otherwise.
23 uint64_t swTimestampUs; //!< Software timestamp if receive event. Zero otherwise.
24 uint64_t ecuTimestampUs; //!< ECU timestamp if receive event. Zero otherwise.
25 uint8_t data[64]; //!< Data bytes
26 uint32_t flags; //!< CAN flags, such as FD and BRS
27 uint8_t len; //!< Number of bytes in payload
28 };
29
30} //namespace can
31} //namespace platform
32} //namespace phoenix
33} //namespace ctre
Definition: string_util.hpp:14
"plain old data" container for holding a CAN Frame Event.
Definition: canframe.hpp:20
uint64_t ecuTimestampUs
ECU timestamp if receive event. Zero otherwise.
Definition: canframe.hpp:24
uint64_t hwTimestampUs
Hardware timestamp if receive event. Zero otherwise.
Definition: canframe.hpp:22
uint32_t arbID
ArbID of the CAN frame.
Definition: canframe.hpp:21
uint64_t swTimestampUs
Software timestamp if receive event. Zero otherwise.
Definition: canframe.hpp:23
uint8_t len
Number of bytes in payload.
Definition: canframe.hpp:27
uint8_t data[64]
Data bytes.
Definition: canframe.hpp:25
uint32_t flags
CAN flags, such as FD and BRS.
Definition: canframe.hpp:26