This commit is contained in:
deeaitch committed 2026-10-20 13:38:21 -04:00
1 parent 849ce31e2f
commit a55d1c58ed
272 files changed
+41866 -261

No files matched your search

+10 -8
View File
@@ -1,6 +1,6 @@
/**
* @file decode_database.h
* @brief
* @brief Runtime definitions and immutable indexed database.
*
* Created: 2026-03-13
* Author: Deeaitch (Dim. Himro)
@@ -42,7 +42,7 @@ enum class ValueType {
* @brief Runtime-ready signal definition.
*/
struct DecodeSignal {
Multiplexing multiplexing;
Multiplexing multiplexing; /**< Selector role and branch value. */
std::string name; /**< Signal name. */
std::uint32_t startBit = 0U; /**< DBC start bit. */
std::uint32_t length = 0U; /**< Signal length in bits. */
@@ -57,7 +57,7 @@ struct DecodeSignal {
ValueDescriptions valueDescriptions; /**< Raw integer state descriptions. */
std::string comment; /**< Comment. */
AttributeMap attributes;
AttributeMap attributes; /**< Effective attributes after defaults and overrides. */
DecodeSignal() = default;
};
@@ -76,12 +76,13 @@ struct DecodeFrame {
std::string comment; /**< Frame comment. */
std::vector<DecodeSignal> signals; /**< Signal definitions. */
AttributeMap attributes;
std::optional<std::string> frameFormat;
std::optional<std::uint32_t> cycleTimeMs;
AttributeMap attributes; /**< Effective attributes after defaults and overrides. */
std::optional<std::string> frameFormat; /**< VFrameFormat label, when declared. */
std::optional<std::uint32_t> cycleTimeMs; /**< GenMsgCycleTime in milliseconds, when declared. */
DecodeFrame() = default;
/** @brief Return the stable normalized frame identifier. */
FrameKey GetKey() const {
return FrameKey(canId, isExtended);
}
@@ -89,8 +90,8 @@ struct DecodeFrame {
/** A PGN lookup rejects multiple definitions rather than choosing by order. */
struct PgnLookupResult {
std::shared_ptr<const DecodeFrame> definition;
bool ambiguous = false;
std::shared_ptr<const DecodeFrame> definition; /**< Owning matched definition; empty if missing or ambiguous. */
bool ambiguous = false; /**< True when multiple definitions share the requested PGN. */
};
/**
@@ -113,6 +114,7 @@ public:
std::shared_ptr<const DecodeFrame> FindFrame(const FrameKey &key) const;
/** Only explicitly marked hasPgn frames participate; ambiguous results have no definition. */
PgnLookupResult FindFrameByPgn(std::uint32_t pgn) const;
/** @brief Return an owning signal handle, or an empty handle for a missing key. */
std::shared_ptr<const DecodeSignal> FindSignal(const SignalKey &key) const;
private: