This commit is contained in:
deeaitch committed 2026-10-11 06:30:18 -04:00
1 parent 51fcdb88ac
commit 0708316a37
155 files changed
+5190 -2691

No files matched your search

+16 -14
View File
@@ -22,9 +22,9 @@
* @brief Raw CAN frame used for runtime or trace decoding.
*/
struct RawCanFrame {
std::uint32_t canId = 0U; /**< Normalized CAN ID. */
bool isExtended = false; /**< true for extended frame. */
std::vector<std::uint8_t> data; /**< Payload bytes. */
std::uint32_t canId = 0U; /**< Normalized CAN ID. */
bool isExtended = false; /**< true for extended frame. */
std::vector<std::uint8_t> data; /**< Payload bytes. */
RawCanFrame() = default;
};
@@ -41,10 +41,11 @@ enum class SignalDecodeStatus {
* @brief One decoded signal value.
*/
struct DecodedSignalValue {
const DecodeSignal *definition = nullptr; /**< Signal definition. */
RawSignalValue rawValue = std::uint64_t(0U); /**< Exact signed or unsigned raw value. */
double physicalValue = 0.0; /**< Converted physical value. */
bool valid = false; /**< true if decoding succeeded. */
std::shared_ptr<const DecodeSignal> definition; /**< Owning immutable definition. */
SignalKey key; /**< Stable application identifier. */
RawSignalValue rawValue = std::uint64_t(0U); /**< Exact signed or unsigned raw value. */
double physicalValue = 0.0; /**< Converted physical value. */
bool valid = false; /**< true if decoding succeeded. */
SignalDecodeStatus status = SignalDecodeStatus::InvalidDefinition;
/** Lookup using the raw integer; nullptr for invalid or unmapped values. */
@@ -59,9 +60,10 @@ struct DecodedSignalValue {
* @brief Fully decoded frame.
*/
struct DecodedFrameValue {
const DecodeFrame *definition = nullptr; /**< Frame definition. */
std::vector<DecodedSignalValue> signals; /**< Decoded signal values. */
bool valid = false; /**< true if frame was matched. */
std::shared_ptr<const DecodeFrame> definition; /**< Owning immutable definition. */
FrameKey key; /**< Stable application identifier. */
std::vector<DecodedSignalValue> signals; /**< Decoded signal values. */
bool valid = false; /**< true if frame was matched. */
DecodedFrameValue() = default;
};
@@ -76,11 +78,11 @@ public:
* @param database Runtime decode database.
* @param canId Normalized CAN ID.
* @param isExtended true for extended frame.
* @return Pointer to frame definition or nullptr.
* @return Owning immutable frame handle or nullptr. Safe across reload.
*/
const DecodeFrame *FindFrame(const DecodeDatabase &database,
std::uint32_t canId,
bool isExtended) const;
std::shared_ptr<const DecodeFrame> FindFrame(const DecodeDatabase &database,
std::uint32_t canId,
bool isExtended) const;
/**
* @brief Decode one raw CAN frame.