Skip to content

File can_frame.h

File List > espos_n2k > include > espos_n2k > can_frame.h

Go to the documentation of this file

/* SPDX-FileCopyrightText: 2026 Dirk Wahrheit */
/* SPDX-License-Identifier: Apache-2.0 */
#ifndef ESPOS_N2K_CAN_FRAME_H_
#define ESPOS_N2K_CAN_FRAME_H_

#include <cstddef>
#include <cstdint>

namespace espos_n2k {

inline constexpr size_t kCanMaxData = 8;

struct CanFrame {
  uint32_t id = 0;       
  bool extended = true;  
  bool remote = false;   
  uint8_t dlc = 0;       
  uint8_t data[kCanMaxData] = {};
};

struct CanMessage {
  CanFrame frame;
  int64_t timestamp_us = 0;  
};

}  // namespace espos_n2k

#endif  // ESPOS_N2K_CAN_FRAME_H_