* @brief Describes a single data source (device + connection settings) within a project. Each * source owns its own frame detection configuration and opaque connection settings. */
| 484 | * source owns its own frame detection configuration and opaque connection settings. |
| 485 | */ |
| 486 | struct alignas(8) Source { |
| 487 | int sourceId = 0; ///< Unique source identifier (0 = default/backward-compat) |
| 488 | int busType = 0; ///< SerialStudio::BusType cast to int |
| 489 | QString title; ///< Human-readable source name |
| 490 | QString frameStart; ///< Frame start delimiter sequence |
| 491 | QString frameEnd; ///< Frame end delimiter sequence |
| 492 | QString checksumAlgorithm; ///< Checksum algorithm name |
| 493 | int frameDetection = 0; ///< SerialStudio::FrameDetection cast to int |
| 494 | int decoderMethod = 0; ///< SerialStudio::DecoderMethod cast to int |
| 495 | bool hexadecimalDelimiters = false; ///< True if delimiters are hex-encoded |
| 496 | int frameParserLanguage = 0; ///< Frame parser language/runtime identifier |
| 497 | QJsonObject connectionSettings; ///< Opaque bus-specific connection params |
| 498 | QString frameParserCode; ///< Per-source parser code |
| 499 | QString frameParserTemplate; ///< Native parser template id (Native language only) |
| 500 | QJsonObject frameParserParams; ///< Native parser template params (Native language only) |
| 501 | }; |
| 502 | |
| 503 | static_assert(sizeof(Source) % alignof(Source) == 0, "Unaligned Source struct"); |
| 504 |