没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Specification of Bus Mirroring
AUTOSAR CP R21-11
Document Title Specification of Bus Mirror ing
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 873
Document Status published
Part of AUTOSAR Standard Classic Platform
Part of Standard Release R21-11
Document Change History
Date Release Changed by
Description
2021-11-25 R21-11
AUTOSAR
Release
Management
• Added detailed change history
2020-11-30 R20-11
AUTOSAR
Release
Management
• Improved structure of error sections
• Replaced error descriptions with
generated tables
• Multi-partition support finalized
• Replaced Mirror_CanIdType and
Mirror_FlexRayChannelType by
native types
2019-11-28 R19-11
AUTOSAR
Release
Management
• Added multi-partition support
{DRAFT}
• Fixed configurable number of PDUs
• Reworked requirements to avoid
references to sections
• Changed Document Status from
Final to published
2018-10-31 4.4.0
AUTOSAR
Release
Management
• Initial release
1 of 121 Document ID 873: AUTOSAR_SWS_BusMirroring
Specification of Bus Mirroring
AUTOSAR CP R21-11
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 intel-
lectual 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 121 Document ID 873: AUTOSAR_SWS_BusMirroring
Specification of Bus Mirroring
AUTOSAR CP R21-11
Table of Contents
1 Introduction and Functional Overview 9
2 Acronyms and Abbreviations 10
3 Related Documentation 11
3.1 Input Documents & Related Standards and Norms . . . . . . . . . . . 11
3.2 Related Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Constraints and Assumptions 12
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Applicability to Car Domains . . . . . . . . . . . . . . . . . . . . . . . . 13
5 Dependencies to Other Modules 14
5.1 File Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.1 Code File Structure . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.2 Header File Structure . . . . . . . . . . . . . . . . . . . . . . 14
6 Requirements Tracing 15
7 Functional Specification 20
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.2 Module Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.2.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.2.2 Timing Related Functionality . . . . . . . . . . . . . . . . . . 22
7.2.3 Selection of Active Source Buses . . . . . . . . . . . . . . . 22
7.2.4 Switching the Destination Bus . . . . . . . . . . . . . . . . . 22
7.2.5 Controlling Frame Filters . . . . . . . . . . . . . . . . . . . . 23
7.3 Access to Source Buses . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.3.1 Access to CAN . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3.1.1 CAN Source Bus Activation . . . . . . . . . . . . . . 24
7.3.1.2 CAN Frame Acquisition . . . . . . . . . . . . . . . . 24
7.3.1.3 CAN Frame Filters . . . . . . . . . . . . . . . . . . . 25
7.3.1.4 CAN Status Acquisition . . . . . . . . . . . . . . . . 25
7.3.2 Access to LIN . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.3.2.1 LIN Source Bus Activation . . . . . . . . . . . . . . . 26
7.3.2.2 LIN Frame Acquisition . . . . . . . . . . . . . . . . . 26
7.3.2.3 LIN Frame Filters . . . . . . . . . . . . . . . . . . . . 27
7.3.2.4 LIN Status Acquisition . . . . . . . . . . . . . . . . . 27
7.3.3 Access to FlexRay . . . . . . . . . . . . . . . . . . . . . . . . 28
7.3.3.1 FlexRay Source Bus Activation . . . . . . . . . . . . 28
7.3.3.2 FlexRay Frame Acquisition . . . . . . . . . . . . . . 28
7.3.3.3 FlexRay Frame Filters . . . . . . . . . . . . . . . . . 29
7.3.3.4 FlexRay Status Acquisition . . . . . . . . . . . . . . 29
7.4 Mirroring to FlexRay, IP, and CDD . . . . . . . . . . . . . . . . . . . . . 30
7.4.1 Handling of Destination Frames . . . . . . . . . . . . . . . . 31
3 of 121 Document ID 873: AUTOSAR_SWS_BusMirroring
Specification of Bus Mirroring
AUTOSAR CP R21-11
7.4.1.1 Creation . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.4.1.2 Queueing . . . . . . . . . . . . . . . . . . . . . . . . 32
7.4.1.3 Transmission . . . . . . . . . . . . . . . . . . . . . . 33
7.4.2 Mirroring Protocol . . . . . . . . . . . . . . . . . . . . . . . . 34
7.4.2.1 Header Layout . . . . . . . . . . . . . . . . . . . . . 35
7.4.2.1.1 ProtocolVersion . . . . . . . . . . . . . . . . . 35
7.4.2.1.2 SequenceNumber . . . . . . . . . . . . . . . . 36
7.4.2.1.3 HeaderTimestamp . . . . . . . . . . . . . . . . 36
7.4.2.1.4 DataLength . . . . . . . . . . . . . . . . . . . . 36
7.4.2.2 Data Item Layout . . . . . . . . . . . . . . . . . . . . 37
7.4.2.2.1 Timestamp . . . . . . . . . . . . . . . . . . . . 37
7.4.2.2.2 NetworkStateAvailable . . . . . . . . . . . . . 38
7.4.2.2.3 FrameIDAvailable . . . . . . . . . . . . . . . . 38
7.4.2.2.4 PayloadAvailable . . . . . . . . . . . . . . . . . 38
7.4.2.2.5 NetworkType . . . . . . . . . . . . . . . . . . . 38
7.4.2.2.6 NetworkID . . . . . . . . . . . . . . . . . . . . 39
7.4.2.2.7 NetworkState . . . . . . . . . . . . . . . . . . 39
7.4.2.2.7.1 NetworkStateCAN . . . . . . . . . . . . 40
7.4.2.2.7.2 NetworkStateLIN . . . . . . . . . . . . . 40
7.4.2.2.7.3 NetworkStateFlexRay . . . . . . . . . . 41
7.4.2.2.8 FrameID . . . . . . . . . . . . . . . . . . . . . 43
7.4.2.2.8.1 FrameIDCAN . . . . . . . . . . . . . . . 43
7.4.2.2.8.2 FrameIDLIN . . . . . . . . . . . . . . . 43
7.4.2.2.8.3 FrameIDFlexRay . . . . . . . . . . . . . 44
7.4.2.2.9 PayloadLength . . . . . . . . . . . . . . . . . . 45
7.4.2.2.10 Payload . . . . . . . . . . . . . . . . . . . . . . 45
7.5 Mirroring to CAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.5.1 Handling of Source Frames . . . . . . . . . . . . . . . . . . . 46
7.5.1.1 ID Mapping . . . . . . . . . . . . . . . . . . . . . . . 46
7.5.1.1.1 ID Mapping on CAN . . . . . . . . . . . . . . . 46
7.5.1.1.2 ID Mapping on LIN . . . . . . . . . . . . . . . . 46
7.5.1.2 Queuing . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.5.1.3 Transmission . . . . . . . . . . . . . . . . . . . . . . 47
7.5.2 Creation of Status Frames . . . . . . . . . . . . . . . . . . . 48
7.5.3 Status Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.5.3.1 Status Header Layout . . . . . . . . . . . . . . . . . 49
7.5.3.1.1 SHProtocolVersion . . . . . . . . . . . . . . . 50
7.5.3.2 Status Item Layout . . . . . . . . . . . . . . . . . . . 50
7.5.3.2.1 SINetworkStateAvailable . . . . . . . . . . . . 51
7.5.3.2.2 SIFrameIDAvailable . . . . . . . . . . . . . . . 51
7.5.3.2.3 SINetworkType . . . . . . . . . . . . . . . . . . 51
7.5.3.2.4 SINetworkID . . . . . . . . . . . . . . . . . . . 51
7.5.3.2.5 SINetworkState . . . . . . . . . . . . . . . . . 51
7.5.3.2.6 SIFrameID . . . . . . . . . . . . . . . . . . . . 52
7.6 Error Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.6.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 52
4 of 121 Document ID 873: AUTOSAR_SWS_BusMirroring
Specification of Bus Mirroring
AUTOSAR CP R21-11
7.6.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.6.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.6.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 53
7.6.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 53
8 API Specification 54
8.1 API Parameter Checking . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.2 Imported Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.3 Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.3.1 Mirror_ConfigType . . . . . . . . . . . . . . . . . . . . . . . . 55
8.3.2 MIRROR_INVALID_NETWORK . . . . . . . . . . . . . . . . 55
8.4 Function Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.4.1 Generic Functions . . . . . . . . . . . . . . . . . . . . . . . . 56
8.4.1.1 Mirror_Init . . . . . . . . . . . . . . . . . . . . . . . . 56
8.4.1.2 Mirror_DeInit . . . . . . . . . . . . . . . . . . . . . . 56
8.4.1.3 Mirror_GetVersionInfo . . . . . . . . . . . . . . . . . 57
8.4.2 Filter Handling . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8.4.2.1 Mirror_GetStaticFilterState . . . . . . . . . . . . . . 57
8.4.2.2 Mirror_SetStaticFilterState . . . . . . . . . . . . . . . 58
8.4.2.3 Mirror_AddCanRangeFilter . . . . . . . . . . . . . . 59
8.4.2.4 Mirror_AddCanMaskFilter . . . . . . . . . . . . . . . 59
8.4.2.5 Mirror_AddLinRangeFilter . . . . . . . . . . . . . . . 60
8.4.2.6 Mirror_AddLinMaskFilter . . . . . . . . . . . . . . . . 60
8.4.2.7 Mirror_AddFlexRayFilter . . . . . . . . . . . . . . . . 61
8.4.2.8 Mirror_RemoveFilter . . . . . . . . . . . . . . . . . . 62
8.4.3 State Handling . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.4.3.1 Mirror_IsMirrorActive . . . . . . . . . . . . . . . . . . 62
8.4.3.2 Mirror_Offline . . . . . . . . . . . . . . . . . . . . . . 63
8.4.3.3 Mirror_GetDestNetwork . . . . . . . . . . . . . . . . 63
8.4.3.4 Mirror_SwitchDestNetwork . . . . . . . . . . . . . . 64
8.4.3.5 Mirror_IsSourceNetworkStarted . . . . . . . . . . . . 64
8.4.3.6 Mirror_StartSourceNetwork . . . . . . . . . . . . . . 65
8.4.3.7 Mirror_StopSourceNetwork . . . . . . . . . . . . . . 65
8.4.4 Support Functions . . . . . . . . . . . . . . . . . . . . . . . . 66
8.4.4.1 Mirror_GetNetworkType . . . . . . . . . . . . . . . . 66
8.4.4.2 Mirror_GetNetworkId . . . . . . . . . . . . . . . . . . 66
8.4.4.3 Mirror_GetNetworkHandle . . . . . . . . . . . . . . . 67
8.5 Callback Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.5.1 Mirror_ReportCanFrame . . . . . . . . . . . . . . . . . . . . 68
8.5.2 Mirror_ReportLinFrame . . . . . . . . . . . . . . . . . . . . . 68
8.5.3 Mirror_ReportFlexRayFrame . . . . . . . . . . . . . . . . . . 69
8.5.4 Mirror_ReportFlexRayChannelStatus . . . . . . . . . . . . . 70
8.5.5 Mirror_TxConfirmation . . . . . . . . . . . . . . . . . . . . . . 70
8.5.6 Mirror_TriggerTransmit . . . . . . . . . . . . . . . . . . . . . 71
8.6 Scheduled Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
8.6.1 Mirror_MainFunction . . . . . . . . . . . . . . . . . . . . . . . 71
5 of 121 Document ID 873: AUTOSAR_SWS_BusMirroring
剩余120页未读,继续阅读
资源评论
嵌入式知行
- 粉丝: 3346
- 资源: 35
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功