|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Parses Vector CANalyzer ASC log files (.asc). More...
#include <AscParser.hpp>


Public Member Functions | |
| AscParser (std::filesystem::path dbcPath={}) | |
| ~AscParser () override=default | |
| void | ParseData (const std::filesystem::path &filepath) override |
| Parses data from a file path. | |
| void | ParseData (std::istream &input) override |
| Parses data from an input stream. | |
| uint32_t | GetCurrentProgress () const override |
| Gets the current parsing progress. | |
| uint32_t | GetTotalProgress () const override |
| Gets the total expected progress value. | |
| virtual std::vector< std::pair< std::string, std::string > > | GetFileMetadata () const |
Ordered key → value pairs read from the file header during the last ParseData() call (see db::EventsContainer::SetFileMetadata). | |
| void | RegisterObserver (IDataParserObserver *observer) |
| Registers an observer to receive parsing notifications. | |
| void | UnregisterObserver (IDataParserObserver *observer) |
| void | NotifyNewEvent (db::LogEvent &&event) |
| void | NotifyProgressUpdated () |
| void | NotifyNewEventBatch (std::vector< std::pair< int, db::LogEvent::EventItems > > &&eventBatch) |
Private Member Functions | |
| util::Result< std::monostate, error::Error > | LoadDbc () |
| Loads the DBC database from m_dbcPath. | |
| void | ParseStream (std::istream &input) |
Private Attributes | |
| std::filesystem::path | m_dbcPath |
| dbc::DbcDatabase | m_dbc |
| bool | m_dbcLoaded {false} |
| uint32_t | m_currentProgress {0} |
| uint32_t | m_totalProgress {0} |
| int | m_eventId {0} |
| std::vector< IDataParserObserver * > | observers |
Parses Vector CANalyzer ASC log files (.asc).
Supports standard CAN frames (11-bit) and extended CAN frames (29-bit, 'X' suffix). An optional DBC database path may be supplied at construction time; when present, signal values decoded from the DBC are appended as "SIG:<name>" fields.
Parsed LogEvent fields: timestamp — float seconds from start of trace type — "Rx", "Tx", "TxRq", or "ErrorFrame" CAN_Channel — integer channel number CAN_ID — upper-case hex frame ID (e.g. "0B3") CAN_IDE — "Standard" or "Extended" CAN_DLC — data length code (0-8) CAN_Data — space-separated hex bytes (e.g. "F0 00 00 00 00 00 00 00") CAN_MsgName — message name from DBC (omitted when no DBC or unknown ID) SIG:<name> — decoded signal value with unit (omitted when no DBC) info — human-readable one-line summary
|
explicit |
| dbcPath | Optional path to a DBC file for signal decoding. Leave empty (default) to skip DBC decoding. |
|
overridedefault |
|
inlineoverridevirtual |
Gets the current parsing progress.
Implements parser::IDataParser.
|
inlinevirtualinherited |
Ordered key → value pairs read from the file header during the last ParseData() call (see db::EventsContainer::SetFileMetadata).
Reimplemented in parser::SapiLogParser.
|
inlineoverridevirtual |
Gets the total expected progress value.
Implements parser::IDataParser.
|
private |
Loads the DBC database from m_dbcPath.
Returns Ok(monostate) if no DBC path is configured or the DBC loaded successfully. Returns Err with FileNotFound/ParseError if the path is set but the file cannot be opened or parsed.


|
inlineinherited |
|
inlineinherited |

|
inlineinherited |

|
overridevirtual |
Parses data from a file path.
| filepath | The path to the file to parse |
| std::runtime_error | if the file cannot be opened or parsed |
Implements parser::IDataParser.

|
overridevirtual |
Parses data from an input stream.
| input | The input stream to read data from |
| std::runtime_error | if the stream cannot be read or parsed |
Implements parser::IDataParser.

|
private |


|
inlineinherited |
Registers an observer to receive parsing notifications.
| observer | Pointer to the observer object |
|
inlineinherited |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
privateinherited |