This commit is contained in:
deeaitch committed 2026-10-07 18:50:11 -04:00
1 parent a0938cb29c
commit 3dd9230fca
21 files changed
+491 -450

No files matched your search

+27 -33
View File
@@ -40,54 +40,48 @@ enum class ValueType {
*/
struct DecodeSignal {
Multiplexing multiplexing;
std::string name; /**< Signal name. */
std::uint32_t startBit; /**< DBC start bit. */
std::uint32_t length; /**< Signal length in bits. */
ByteOrder byteOrder; /**< Intel or Motorola. */
ValueType valueType; /**< Signed or unsigned. */
double factor; /**< Scaling factor. */
double offset; /**< Physical offset. */
double minimum; /**< Minimum physical value. */
double maximum; /**< Maximum physical value. */
std::string unit; /**< Physical unit. */
std::vector<std::string> receivers; /**< Receivers. */
ValueDescriptions valueDescriptions; /**< Raw integer state descriptions. */
std::string comment; /**< Comment. */
std::string name; /**< Signal name. */
std::uint32_t startBit = 0U; /**< DBC start bit. */
std::uint32_t length = 0U; /**< Signal length in bits. */
ByteOrder byteOrder = ByteOrder::Intel; /**< Intel or Motorola. */
ValueType valueType = ValueType::Unsigned; /**< Signed or unsigned. */
double factor = 1.0; /**< Scaling factor. */
double offset = 0.0; /**< Physical offset. */
double minimum = 0.0; /**< Minimum physical value. */
double maximum = 0.0; /**< Maximum physical value. */
std::string unit; /**< Physical unit. */
std::vector<std::string> receivers; /**< Receivers. */
ValueDescriptions valueDescriptions; /**< Raw integer state descriptions. */
std::string comment; /**< Comment. */
DecodeSignal()
: name(), startBit(0U), length(0U), byteOrder(ByteOrder::Intel), valueType(ValueType::Unsigned), factor(1.0), offset(0.0), minimum(0.0), maximum(0.0), unit(), receivers(), comment() {
}
DecodeSignal() = default;
};
/**
* @brief Runtime-ready frame definition.
*/
struct DecodeFrame {
std::string name; /**< Frame name. */
std::uint32_t canId; /**< Normalized CAN ID. */
bool isExtended; /**< true for extended frame. */
std::uint8_t dlc; /**< Payload length. */
std::uint32_t pgn; /**< PGN if available. */
bool hasPgn; /**< true if PGN is valid. */
std::string transmitter; /**< Transmitter ECU. */
std::string comment; /**< Frame comment. */
std::vector<DecodeSignal> signals; /**< Signal definitions. */
std::string name; /**< Frame name. */
std::uint32_t canId = 0U; /**< Normalized CAN ID. */
bool isExtended = false; /**< true for extended frame. */
std::uint8_t dlc = 0U; /**< Payload length. */
std::uint32_t pgn = 0U; /**< PGN if available. */
bool hasPgn = false; /**< true if PGN is valid. */
std::string transmitter; /**< Transmitter ECU. */
std::string comment; /**< Frame comment. */
std::vector<DecodeSignal> signals; /**< Signal definitions. */
DecodeFrame()
: name(), canId(0U), isExtended(false), dlc(0U), pgn(0U), hasPgn(false), transmitter(), comment(), signals() {
}
DecodeFrame() = default;
};
/**
* @brief Key for fast frame lookup.
*/
struct FrameKey {
std::uint32_t canId;
bool isExtended;
std::uint32_t canId = 0U;
bool isExtended = false;
FrameKey()
: canId(0U), isExtended(false) {
}
FrameKey() = default;
FrameKey(std::uint32_t id, bool extended)
: canId(id), isExtended(extended) {