当前位置:网站首页>[overview of AUTOSAR three RTE]
[overview of AUTOSAR three RTE]
2022-07-03 00:49:00 【Ke Yuqian】
AutoSAR 3、 ... and RTE summary
1 RTE summary
RTE Provides SWC Operating environment .
RTE Its function is a bit like an express transfer station or a telephone operator ( It's the kind in the last world that you have to call the operator first , Then transfer the telephone line to the destination through the operator ), Its function is to make a SWC Information through RTE Connect to other SWC perhaps BSW On . And RTE It has the function of managing this information , For example, received SWC Busy ( The subscriber you dialed is busy ), that RTE Responsible for sending messages SWC wait for , Or do something else ;RTE Also trigger SWC, It's like receiving at this time SWC Sleeping , Sent at this time SWC Send a message , that RTE It is necessary to put the received SWC Wake up .
2 RTE effect
• Provide cross ECU/ECU Internal communication management .
• Provide right runnable Management function of ( Trigger 、 Wake up, etc , In short, it is runnable Need to map to Task Run on , And this mapping is through RTE actualized ).
• We didn't mention before VFB( Virtual function bus ),RTE Namely VFB The concrete realization of .
• stay Vector In the tool chain ,RTE It's generated automatically .
2.1 RTE Yes Runnables Operation support of
- adopt RTE to runnable Provide departure events
- adopt RTE to runnable Provide the required resources
- take BSW and SWC Do isolation
2.1.1 runnable The trigger condition of
• Initialize event : Initialize auto trigger
• Timer event : Give a cycle timer , It's time to trigger
• Receive data event (S/R):Receiver Port Once the data is received , It triggers
• Receive data error event (S/R)
• Data sending completion event (S/R):Send Port Send complete , It triggers
• Operation call event (C/S): When the function is called
• The asynchronous service returns an event (C/S): I said before C/S It can run asynchronously , That is, when I call a Server function , But I call asynchronously .
Then the function to be dropped runs in parallel with the current running program as a thread ,
When the called function finishes running, it returns (Return) When , At this time, the asynchronous service return event is triggered
• Mode switching event
• Mode switching response event
2.2 RTE Yes Ports The support of
2.2.1 features
Play the role SWCs and BSW Communication channels
• As VFB The concrete realization of
• As S/R Communication implementation of interface
• As C/S Communication implementation of interface
• ECU Internal communication / Span ECU( adopt COM)
• Realization AR-COM The callback function of , The concrete realization is in SWC Done in ,RTE Responsible for completing this callback mechanism
Other characteristics
• Provides a mechanism to achieve data consistency
• Support simple and complex data types
• Yes SWC Instantiation of type
2.2.2 S/R Different ways of interface
- Call directly (Direct)
It is equivalent to having a global variable ,runnable You can read and write this variable directly
Std_ReturnType Rte_Read_<port>_<data> (<DataType> *data)
Std_ReturnType Rte_Write_<port>_<data> (<DataType> data)
- Cache call (Buffered)
It is equivalent to copying global variables to a runnable In local variables of , Then operate on this local variable , Finally, assign this local variable to the global variable . stay runnable During the operation of this local variable , Global variables will not change .
<DataType> Rte_IRead_<r>_<port>_<data> (void)
void Rte_IWrite_<r>_<port>_<data> (<DataType> data)
- Queue calls (Queued)
Because there is more than one data , Is a set of queue data , Just like our commonly used serial port FIFO. therefore , You can set cyclic reception or wait for reception , There is timeout management when waiting .
Std_ReturnType Rte_Receive_<port>_<data> (<DataType> *data)
Std_ReturnType Rte_Send_<port>_<data> (<DataType> data)
2.2.3 Span ECU The way
If it is cross ECU Data transmission of . that , I am here runnable Use in Rte_Write__() After such a function , Will need to go :
runnable(ECU1) ->RTE (ECU1) ->BSW (ECU1) -> External bus ->BSW (ECU2) ->RTE (ECU2)->runnable (ECU2)
Com_SendSignal()
Com_ReceiveSignal()
2.2.4 C/S Different ways of interface
A synchronous invocation
Synchronous call is actually the same function we usually call , It is equivalent to embedding the called function code into the currently called function code to run
// Suppose our called function is :
Std_ReturnType RunnableServer(int *param)
// The calling function that our customers should write is :
Std_ReturnType Rte_Call_<Port>_RunnableServer(int *param)
// This param Is the variable we want to be manipulated by the called function
Asynchronous call
An asynchronous call is equivalent to having two threads , A thread runs the contents of our original function , The other is to execute the content of the called function . Then you can read the return result of the called function after a period of time
How to know whether the called function is finished ? There are three ways :
- Cycle test , Just wait there , Wait until the value is returned , In this case, it is almost the same as synchronization , It doesn't make much sense
- Timeout detection , Set a time , When the time comes, read , Continue to run my program before it arrives
- Events trigger , When the service function is finished ,RTE Can trigger the original function , Tell it that the called function is finished , You can read the return value
// After executing the following function, you can return the parameters
Std_ReturnType Rte_Result_<Port>_RunnableServer(int *param)
2.3 RTE Management of data consistency
Data consistency , When multiple users try to access a database at the same time , When their transactions use the same data at the same time , There are four possible scenarios : Lost update 、 Undetermined correlation 、 Inconsistent analysis and fantasy reading .
Implementation mechanism of data consistency :
utilize RTE management
SWC Internal variables
• EAs(ExclusiveAreas, Dedicated area ): It is the following two sentences of code , Equivalent to an off interrupt , The statements that call variables are placed inside , The runtime cannot have more advanced Task Break the protected statement
......
Rte_Enter_<name>();
// Put protected statements here
Rte_Exit_<name>();
......
• IRVs(Inter-runnablevariables, Cross functional variables ): Or two sentences of code , above EAs The whole code segment is protected , The two sentences here are equivalent to being protected when changing variables , That is, when these two sentences are executed, they are protected .
Rte_IrvWrite_<re>_<name>()
Rte_IrvRead_<re>_<name>()
2.4 RTE Yes Interface Interface
2.4.1 AutoSAR Interface
As I said before S/R and C/S The interface is AutoSAR Interface
characteristic :
The interface function name is variable , For example, as I said before Std_ReturnType Rte_Read__ (
*data) In this form S/R function , Among them It is the name configured by the user , therefore , The function names of these interfaces can be changed , But the general form is unchanged .
Location :
SWC<>RTE、RTE<>CDD、RTE<>ECU AB
- ( Here's a word ,ECU AB I didn't talk about , In fact, many sensors 、 The actuators are all here , yes ECU The abstraction of , It can also be seen as SWC Of ,IoHwAb It's in here ). To be clear , As long as it can be regarded as SWC To deal with the , Namely AutoSAR Interface
2.4.2 Standard interface
AutoSAR Stipulated C Language API
characteristic :
The interface function name is fixed , yes AutoSAR Stipulated .
such as :Com_SendSignal() WaitEvent() These are API Function name , There can be upper layer calls ,
But it is usually generated by using tool configuration , Those who do upper level applications generally don't care about their specific implementation
Location :
The brown one in the figure is the standard interface , To put it bluntly, it's about functions API Call to .
One thing that needs special explanation is : The arrows in the two red circles in the figure below ,OS and COM It is the only two standard interfaces that allow direct and RTE Connected .
because RTE Many functions of the need to be based on these two modules to achieve ```
2.4.3 standard AutoSAR Interface
AutoSAR Interface , But the name is by AutoSAR Official regulations cannot be modified
characteristic :
Standard interfaces and AutoSAR The characteristics of the interface have some .
The first is and AutoSAR As the interface , What is offered is C/S、S/R Interface ; Then it is the same as the standard interface , The function name is immutable .
To put it bluntly, it is officially stipulated C/S、S/R Interface , Let's take it as AutoSAR Interface is fine , Never mind the function name
Location :
RTE<>Services, Just such a place
边栏推荐
- lex && yacc && bison && flex 配置的問題
- Vulkan is not a "panacea"“
- In the first half of 2022, there are 10 worth seeing, and each sentence can bring you strength!
- LeedCode1480. Dynamic sum of one-dimensional array
- 【AutoSAR 十一 通信相关机制】
- [pulsar document] concepts and architecture
- 1.12 - Instructions
- 利亚德:Micro LED 产品消费端首先针对 100 英寸以上电视,现阶段进入更小尺寸还有难度
- Gan model architecture in mm
- There is an unknown problem in inserting data into the database
猜你喜欢
2022中国3D视觉企业(引导定位、分拣场景)厂商名单
Baidu AI Cloud takes the lead in building a comprehensive and standardized platform for smart cloud
文件操作IO-Part2
RK3568开发板评测篇(二):开发环境搭建
【AutoSAR 二 AppL概述】
University of Oslo: Li Meng | deep reinforcement learning based on swing transformer
Hundreds of continuous innovation to create free low code office tools
1.11 - 总线
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
Rust所有权(非常重要)
随机推荐
为什么网站打开速度慢?
【AutoSAR 十二 模式管理】
Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径
Problèmes de configuration lex & yacc & Bison & Flex
leetcode-224:基本计算器
cordova-plugin-device获取设备信息插件导致华为审核不通过
数组与集合性能比较
How SQLSEVER removes data with duplicate IDS
Leetcode-241: designing priorities for operational expressions
One of the reasons why setinterval timer does not take effect in ie: the callback is the arrow function
Tensorflow 2. Chapter 15 of X (keras) source code explanation: migration learning and fine tuning
【AutoSAR 八 OS】
深度剖析数据在内存中的存储
AttributeError: ‘tuple‘ object has no attribute ‘layer‘问题解决
leetcode-934:最短的桥
瑞萨RZ/G2L ARM开发板存储读写速度与网络实测
Is there a free text to speech tool to help recommend?
Rust string slicing, structs, and enumeration classes
leetcode-2115:从给定原材料中找到所有可以做出的菜
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议