| Pattern | Dove vive | Scopo |
|---|---|---|
| Plugin | DltChatPlugin | Integrazione con DLT Viewer via QDLTPluginInterface |
| Strategy | DltAnalyzerInterface | Analisi intercambiabile rule-based o LLM |
| Observer | Qt Signals / Slots | Comunicazione UI ↔ analyzer |
| Circuit Breaker | DltLlmAnalyzerInterface | 5 fallimenti → 60s open; protegge da provider AI instabili |
| Token Bucket | DltLlmAnalyzerInterface | Rate limit: 10 token, 1 refill / secondo |
| LRU Cache | Plugin (10k) · LLM (1k) | Risposte e query riutilizzate in O(1) |
| Worker Thread | DltBulkAnalyzerWorker | Bulk analysis in QThread non-blocking |
| Factory | DltLlmAnalyzerFactory | Crea l'analyzer giusto per ogni provider |
"error" → {0, 1, 5, 12, 45}
"timeout" → {1, 67, 89}
"iap2" → {5, 12, 34}
# AND set-intersection
"error timeout" → {1}
| error | ERROR + FATAL |
| warn | WARN |
| info | INFO |
| debug | DEBUG |
| verbose | VERBOSE |
| carplay | APID com.apple.carplay · payload iap2 / AirPlay |
| androidauto | APID CarAppService / AOAP · payload USB_ACCESSORY / AOA |
| can | Bus CAN |
| security | Sicurezza |
| memory | Memoria |
| performance | Performance |
| diagnostic | Diagnostica |
| gps | GPS |
| help | Lista comandi disponibili |
| summary | Conteggi livello · top context · domini · range temporale |
| timeline | Lista cronologica completa |
| pattern | Raggruppa duplicati per payload simile |
| keywords | Elenca tutte le keyword di categoria |
| categories | Stesso di keywords |
| Provider | Endpoint default | Richiesta | Risposta |
|---|---|---|---|
| Ollama | localhost:11434/api/generate | {model, prompt, options} | {"response":"…"} |
| OpenAI | api.openai.com/v1/chat/completions | {model, messages[], …} | {"choices":[…]} |
| LocalAI | localhost:8080/v1/completions | stile Ollama | stile Ollama |
| Custom | (configurabile) | Ollama / OpenAI | Ollama / OpenAI |
# Esempio risposta bulk [0]|CONNECT|Connection established|connection,handshake [1]|AUDIO|Audio focus gained|audio,focus,carplay [2]|ERROR|Timeout on iAP2 handshake|timeout,carplay,error [3]|SENSOR|Gyro stream started|sensor,gyro,aoap [4]|SECURITY|TLS pairing complete|tls,auth,security # Query post-bulk tag:handshake category:SECURITY
| video_focus_lost | video · focus (CarPlay) |
| audio_ducking | ducking · audio duck |
| mdns_handshake | _apple-mobdev2 · mdns |
| hid_event | hid · keyboard · touch |
| auth_tls | tls · auth · certificate · pairing |
| sensor_data | sensor · gyro · gps · accelerometer |
| audio_focus | audio focus · audio manager |
| session_start | session start · link established |
| session_stop | session stop · disconnect · link down |
{
"version": "1.0",
"filters": [
{
"label": "iAP2 Connection Error",
"pattern": "iap2.*(error|fail|timeout)",
"color": "#FF4444",
"level": ["error", "fatal"]
},
{
"label": "mDNS Handshake",
"pattern": "mdns|bonjour|_apple-mobdev2",
"color": "#4488FF"
},
{
"label": "Video Focus Lost",
"pattern": "video.*focus",
"color": "#FF8800",
"domain": "carplay"
}
]
}
| label | nome descrittivo | obbligatorio |
| pattern | regex di match | obbligatorio |
| fields | payload · apid · ctid · ecu | opzionale |
| color | hex highlight | #FFE680 |
| level | livelli consentiti | opzionale |
| domain | carplay / androidauto | opzionale |
| enabled | attivo | default true |
[Analyzer] type=rule-based llmEndpoint=http://localhost:11434/api/generate llmApiKey= llmModel=llama3.2:1b bulkAnalysisEnabled=false [Behavior] maxResults=1000 llmTimeout=120000 highlightColor=#FFE680 userFiltersPath=
| Chiave | Default |
|---|---|
| type | rule-based |
| llmEndpoint | localhost:11434 |
| llmApiKey | (vuoto) |
| llmModel | llama3.2:1b |
| bulkAnalysisEnabled | false |
| maxResults | 1000 |
| llmTimeout | 120000 |
| highlightColor | #FFE680 |
| userFiltersPath | (vuoto) |
| test_rulebasedanalyzer | 17 test | comandi · filtri · simplifyPayload |
| test_automotivelogparser | 14 test | classificazione CarPlay / AA · eventi · preset |
| test_llmutils | 9 test | parsing risposta · build prompt · request body |
| test_contextualextractor | — | finestra contesto intorno ai match |
| test_conversationmanager | — | cronologia multi-turn AI |
| test_temporalcorrelator | — | correlazione finestra temporale |
| test_fibexenricher | — | arricchimento FIBEX XML |
| test_dltexport | 7 test | CSV escaping · sanitizzazione · export full |
| test_userfiltermanager | 8 test | load · match domain / level · enabled count |
# Esecuzione $ cd tests $ mkdir build && cd build $ cmake .. $ cmake --build . $ ctest # Output Test project /…/dlt-chat-plugin/tests/build Start 1: rule-based-analyzer Start 2: automotive-log-parser Start 3: contextual-extractor Start 4: conversation-manager Start 5: temporal-correlator Start 6: fibex-enricher Start 7: llm-utils Start 8: dlt-export Start 9: user-filter-manager 100% tests passed, 0 tests failed
| Domanda | Risposta |
|---|---|
| Serve obbligatoriamente un LLM? | No. L'analisi rule-based è completa e sempre disponibile; l'AI è opzionale. |
| Quali modelli LLM supporta? | Qualsiasi modello Ollama locale, GPT (OpenAI) o provider compatibile via Custom. |
| Come gestisce file di log grandi? | Entry limit 500k · display cap 1k · inverted index O(K) per le ricerche. |
| Funziona su Linux, Windows e macOS? | Sì. Qt è multipiattaforma; CI testato su Linux e Windows (MSVC); macOS supportato con build manuale via Homebrew. |
| Come si configura l'AI? | Dialog grafico con Test Connection, oppure file INI dlt_chat_plugin.ini. |
| Si possono aggiungere filtri custom? | Sì. File JSON con regex, campi, colori, vincoli per livello e dominio. |
| Come si estende il plugin? | Implementando DltAnalyzerInterface — pattern Strategy, nuovo backend, zero modifiche al core. |