logo资料库

AUTOSAR_PRS_LogAndTraceProtocol.pdf

第1页 / 共70页
第2页 / 共70页
第3页 / 共70页
第4页 / 共70页
第5页 / 共70页
第6页 / 共70页
第7页 / 共70页
第8页 / 共70页
资料共70页,剩余部分请下载后查看
1 Introduction and overview
1.1 Purpose
1.2 Applicability of the protocol
1.2.1 Safety and security considerations
1.2.2 Constraints and assumptions
1.2.3 Limitations
1.3 Dependencies to other protocol layers
1.4 Dependencies to the Application Layer
2 Use Cases
2.1.1 Use Case general logging with Dlt
2.1.2 Use Case tracing of VFB
2.1.3 Use Case runtime configuration of Dlt
2.1.4 Use Case non-verbose mode
3 Requirements traceability
4 Acronyms and abbreviations
4.1 Term and definition
5 Protocol specification
5.1 Message format
5.1.1 Header format
5.1.1.1 Standard Header
5.1.1.1.1 Header Type
5.1.1.1.2 Message Counter
5.1.1.1.3 Length
5.1.1.1.4 The optional ECU ID
5.1.1.1.5 Session ID
5.1.1.1.6 Timestamp
5.1.1.2 Extended Header
5.1.1.2.1 Message Info
5.1.1.2.2 Number of Arguments
5.1.1.2.3 Application ID
5.1.1.2.4 Context ID
5.1.2 Body/Payload format
5.1.2.1 Non-Verbose Mode
5.1.2.1.1 Assembly of Non-Static Data
5.1.2.1.2 Description Format for transmitted Data
5.1.2.2 Verbose Mode
5.1.2.2.1 Dlt Message Format in General
5.1.2.2.2 Data Payload
5.1.2.2.3 Type Info
5.1.3 Data Types
5.1.3.1 Bits Type Length (TYLE)
5.1.3.2 Bit Variable Info (VARI)
5.1.3.3 Bit Fixed Point (FIXP)
5.1.3.4 Bits String Coding (SCOD)
5.1.3.5 Type Bool (BOOL)
5.1.3.6 Type Signed (SINT) and Type Unsigned (UINT)
5.1.3.7 Type Float (FLOA)
5.1.3.8 Type String (STRG)
5.1.3.9 Type Array (ARAY)
5.1.3.10 Type Struct (STRU)
5.1.3.11 Type Raw (RAWD)
5.1.3.12 Type Trace Info (TRAI)
5.1.3.13 Example of representation of natural data type argument
5.1.3.14 Recommended arguments
5.2 Message types
5.2.1 Data Messages
5.2.2 Control Messages
5.3 Services / Commands
5.3.1 Set Log Level
5.3.2 Set Trace Status
5.3.3 Get Log Info
5.3.4 Get Default Log Level
5.3.5 Store Configuration
5.3.6 Reset to Factory Default
5.3.7 SetMessageFiltering
5.3.8 Set Default LogLevel
5.3.9 Set Default Trace Status
5.3.10 Get ECU Software Version
5.3.11 Get Default Trace Status
5.3.12 Get LogChannel Names
5.3.13 Get Trace Status
5.3.14 Set LogChannel Assignment
5.3.15 Set LogChannel Threshold
5.3.16 Get LogChannel Threshold
5.3.17 BufferOverflowNotification
5.3.18 Call SWC Injection
5.3.19 DLT Commands (deprecated)
5.4 External Client / Tool
5.4.1 Extensions for storing in a database/file
5.5 Sequences (lower layer)
5.5.1 States
5.5.2 Control flow / Transitions
5.5.2.1 Transmission of Dlt Data Message
5.5.2.2 Set LogLevel Filter
5.5.2.3 Buffer Overflow
5.6 Error Handling
5.6.1 Error messages
5.6.1.1 Buffer Overflow
5.6.1.2 Answering a Command with “ERROR”
5.6.1.3 Answering a Command with “NOT SUPPORTED”
5.6.2 Error resolution
5.6.2.1 Transmission Retry
6 Protocol usage and guidelines
7 Configuration specification
7.1 Dlt Header
7.1.1 Header Type
7.2 Dlt Extended Header
7.2.1 Message Info
7.3 Published Information
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 Document Title Document Owner Document Responsibility Document Identification No Document Status Part of AUTOSAR Standard Part of Standard Release Log and Trace Protocol Specification AUTOSAR AUTOSAR 787 Final Foundation 1.2.0 Date 2017-10-27 Document Change History Release Changed by Description 1.2.0 AUTOSAR  Enhanced formal quality of Release Management requirements and requirements tracing 2017-03-31 1.1.0 AUTOSAR  Added requirement for the header Release Management format (Big-endian) 2016-11-30 1.0.0 AUTOSAR  Initial Release Release Management 1 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 Disclaimer This work (specification and/or software implementation) and the material contained in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the companies that have contributed to it shall not be liable for any use of the work. The material contained in this work is protected by copyright and other types of intellectual property rights. The commercial exploitation of the material contained in this work requires a license to such intellectual property rights. This work may be utilized or reproduced without any modification, in any form or by any means, for informational purposes only. For any other purpose, no part of the work may be utilized or reproduced, in any form or by any means, without permission in writing from the publisher. The work has been developed for automotive applications only. It has neither been developed, nor tested for non-automotive applications. The word AUTOSAR and the AUTOSAR logo are registered trademarks. 2 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 Table of Contents 1 Introduction and overview ...................................................................................... 5 1.1 1.2 Purpose ........................................................................................................... 5 Applicability of the protocol ............................................................................. 6 Safety and security considerations ......................................................... 6 Constraints and assumptions .................................................................. 6 Limitations ................................................................................................ 6 1.3 Dependencies to other protocol layers ........................................................... 6 1.4 Dependencies to the Application Layer .......................................................... 7 1.2.1 1.2.2 1.2.3 2 Use Cases .............................................................................................................. 8 2.1.1 2.1.2 2.1.3 2.1.4 Use Case general logging with Dlt .......................................................... 8 Use Case tracing of VFB ......................................................................... 9 Use Case runtime configuration of Dlt .................................................. 10 Use Case non-verbose mode ............................................................... 11 3 Requirements traceability .................................................................................... 12 4 Acronyms and abbreviations................................................................................ 16 4.1 Term and definition ....................................................................................... 17 5 Protocol specification ........................................................................................... 18 5.2.1 5.2.2 5.3 5.1.1 5.1.2 5.1.3 5.1 Message format ............................................................................................ 18 Header format ........................................................................................ 18 Body/Payload format ............................................................................. 25 Data Types ............................................................................................ 34 5.2 Message types .............................................................................................. 46 Data Messages ...................................................................................... 46 Control Messages .................................................................................. 46 Services / Commands ................................................................................... 46 Set Log Level ......................................................................................... 47 5.3.1 Set Trace Status .................................................................................... 48 5.3.2 Get Log Info ........................................................................................... 49 5.3.3 Get Default Log Level ............................................................................ 51 5.3.4 Store Configuration ................................................................................ 51 5.3.5 Reset to Factory Default ........................................................................ 52 5.3.6 SetMessageFiltering .............................................................................. 52 5.3.7 Set Default LogLevel ............................................................................. 52 5.3.8 5.3.9 Set Default Trace Status ....................................................................... 53 5.3.10 Get ECU Software Version .................................................................... 54 5.3.11 Get Default Trace Status ....................................................................... 55 5.3.12 Get LogChannel Names ........................................................................ 55 5.3.13 Get Trace Status ................................................................................... 56 5.3.14 Set LogChannel Assignment ................................................................. 56 5.3.15 Set LogChannel Threshold .................................................................... 57 5.3.16 Get LogChannel Threshold ................................................................... 57 5.3.17 BufferOverflowNotification ..................................................................... 58 5.3.18 Call SWC Injection ................................................................................. 59 3 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 5.4 5.5 5.6 5.4.1 5.3.19 DLT Commands (deprecated) ............................................................... 60 External Client / Tool .................................................................................... 61 Extensions for storing in a database/file ............................................... 61 Sequences (lower layer) ............................................................................... 62 States ..................................................................................................... 62 Control flow / Transitions ....................................................................... 63 Error Handling ............................................................................................... 66 Error messages ..................................................................................... 66 Error resolution ...................................................................................... 67 5.5.1 5.5.2 5.6.1 5.6.2 6 Protocol usage and guidelines ............................................................................. 68 7 Configuration specification ................................................................................... 69 7.1.1 7.1 Dlt Header ..................................................................................................... 69 Header Type .......................................................................................... 69 7.2 Dlt Extended Header .................................................................................... 69 7.2.1 Message Info ......................................................................................... 69 Published Information ................................................................................... 70 7.3 4 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 1 Introduction and overview This protocol specification specifies the format, message sequences and semantics of the AUTOSAR Protocol Dlt. The protocol allows sending Diagnostic, Log and Trace information onto the communications bus. Therefore, the Dlt module collects debug information from applications or other software modules, adds metadata to the debug information, and sends it to the communications bus. In addition, the Dlt Protocol allows filtering debug information depending on the severity level, e.g.: “fatal error” or “information”. This filter can be modified during runtime via Dlt Control Messages sent by an external Logging Tool. It is also possible to directly inform applications about the new filter level to only generate debug information especially for this selected severity level, assign messages to another communications bus at runtime, or to store the modified Dlt configuration nonvolatile (if supported by hardware). Figure 2 – Location of the Dlt Protocol 1.1 Purpose The Dlt protocol can be used at the ECU’ development phase to log and store debug information externally on a logging device. 5 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol ApplicationApplicationApplicationMiddlewareDlt moduleLogging InformationLogging InformationSW moduleCommunications BusCommunications Busfilter
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 1.2 Applicability of the protocol It is intended to use the Dlt Protocol at the development phase of an ECU. It is assumed to use an external logging- and tracing tool to store the debug information generated by the ECU. This logging- and tracing tool is also needed to modify the filter setting at runtime if wanted, or to store the current Dlt configuration of the ECU persistently. 1.2.1 Safety and security considerations It is highly recommended to deactivate the Dlt functionality after the development phase is over. In particular, the Injection-Feature should be deactivated in any case! The activation and deactivation of the Dlt functionality should be done using a security mechanism. 1.2.2 Constraints and assumptions The Dlt Protocol is designed to work “connectionless”. This means that no external communication or other stimulation is needed to use the Dlt protocol. Although there is no need to connect an external Logging tool, it makes sense having one, which stores and interprets the received debug messages. This device can also be used to generate Dlt Control Messages to influence the ECU, like modifying the filter setting (i.e. change the severity level of the debug information). 1.2.3 Limitations The available (free) bandwidth of the communications bus should be taken into consideration to not influence the regular communication too much. 1.3 Dependencies to other protocol layers [1] IEC 7498-1 The Basic Model, IEC Norm, 1994 [2] ASAM MCD-2 NET (FIBEX) 6 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 1.4 Dependencies to the Application Layer To transmit Dlt messages, the applications need to know whether to send the Dlt messages using the verbos- or non-verbose mode. In addition, the applications may offer the possibility to get informed about a filter setting change. For this purpose, the applications should register themselves at the Dlt module. 7 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol
Log and Trace Protocol Specification AUTOSAR FO Release 1.2.0 2 Use Cases This chapter describes the use cases which can be realized by an environment of an ECU which implements the Dlt Protocol. Although the Dlt protocol is bus agnostic, it is recommended to use communications busses with higher bandwidth like Ethernet. Nonetheless it is not limited to it. 2.1.1 Use Case general logging with Dlt Figure 3: General logging with Dlt (1) An application / SW-C is generating a Log Message. (2) The Log Message is sent to a Dlt module, which implements the Dlt Protocol (3) The Dlt module sends the log message to the communications bus (4) An external Dlt client records the log message 8 of 70 - AUTOSAR confidential - Document ID 787: AUTOSAR_PRS_LogAndTraceProtocol ApplicationApplicationApplicationRuntime EnvironmentDLTECULogMessage234Send LogMessage1Filter / Generate DLT MessageSend DLT LogMessageStore DLT Messages
分享到:
收藏