CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
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 uint8_t data[64]; //!< Data bytes
25 uint32_t flags; //!< CAN flags, such as FD and BRS
26 uint8_t len; //!< Number of bytes in payload
27 };
28
29} //namespace can
30} //namespace platform
31} //namespace phoenix
32} //namespace ctre
Definition StatusCodes.h:18
"plain old data" container for holding a CAN Frame Event.
Definition canframe.hpp:20
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:26
uint32_t flags
CAN flags, such as FD and BRS.
Definition canframe.hpp:25