【AutoSAR应用软件设计】

news2024/11/25 10:25:05

AutoSAR总体架构

 是本文讲解内容。

接口类型

AUTOSAR接口

  • –SWCs和/或BSW模块交换的信息
  • –独立于实施/网络/硬件
  • –端口+接口

标准化AUTOSAR接口

  • –AUTOSAR接口
  • –标准化的语法和语义
  • –标准化端口+接口

标准化接口

  • –标准化API
  • –通常为特定编程语言(“C”)定义
  • –通常由同一ECU上的S/W模块使用

 

设计元素

设计流程

 

AutoSar数据类型设计

 已经定义了三个级别的数据类型

  • –应用程序数据类型
  • –实现数据类型
  • –基本数据类型

 

过程

 Process Flow “DataType Creation”

应用程序数据类型

Type

Scene

Sample

Boolean

compu method data constraints

-

Value

a unit, compu method and data constraints

-

String

 compu method and to define the text properties of the string type. The text properties include the selection of the string’s base type, the definition of a fixed or variable size, and a filling character

-

Array

data type

-

Record

record elements

-

Axis

describes one of the input values of a characteristic table

-

Characteristic Table

define a number of input values (axis) and an output value (as Application Values Type).

-

 实施数据类型:

Type

Scene

Sample

Value

Define a datatype of base type, can add compu method data constraintinvalid value

typedef unsigned long uint32;

Type Reference

A type reference expresses a redirection to another data typenot need to choose base type

typedef MySimpleType MyTypeRef;

Data Reference

A data reference expresses a pointer type as defined by the C code statement

typedef MySimpleType * MyDataRef; or typedef void * MyDataRef;. 

Union

Only one of the union elements might hold data at a given time

typedef union{

  uint32 UnionElement0;

} MyUnitCode;

Array

The element type of the can be Value, Type Reference, Array or Record and a fixed or variable size

typedef uint64 MyArrayCode[5];

Record

define a struct type

typedef struct{

  uint16 RecordElement;

  CounterType RecordElement_1;

} MyRecordCode;

基本类型:

•使用本机声明定义基类型,例如uint8

–复用

•独立于平台

–无终止或对齐

•描述类型编码

–例如,"2C"

•描述本机声明

–例如:“typedef unsigned char“

平台类型是具有预定义缩写的实现数据类型。
它不必引用基本数据类型。
它们的原生声明来自Platform_types.h(BSW传递)。

 Unit

In the New Unit dialog you may define the display name and the factor and offset.

 计算方法:

计算方法(比例)定义内在价值和物理价值之间的转换规则

可以分配给数据类型、数据元素和操作参数

允许提供变量a

  • –物理(测试和测量)含义
  • –内部(校准)含义

也用于定义枚举

反向函数可由RTE导出

 Compu Methods Category

Type

Scene

Sample

Identical

Only the unit is relevant, no compu scales can be defined

-

Linear

Exacty one compu scale expressing a linear conversion can be defined

-

Scale-Linear

Any number of compu scales expressing a linear conversion can be defined. The ranges must not overlap.

-

TextTable

Enumeration

Any number of compu scales expressing a constant value can be defined.

-

Scale-LinearAndTextTable

Any number of compu scales expressing a linear conversion can be defined. The ranges must not overlap.

-

BitfieldTextTable

Bitfield

Only compu scales of type Int to Phys can be defined.

-

Compu Methods Compu Contents

Int To Phys: computing the physical value out of the internal value.

Phys To Int: compu scales used for reversely computing the internal values out of the physical value.

 Compu Methods Sample defining enumerations

Data Constraints

 

Scene

define a minimum and maximum range.

define a range related to the internal value and/or to the physical value.

 AutoSAR Interface Design --Summary

Interfaces are assigned to SWC Ports.

Interfaces define the communication-mechanism
between SWC-Ports

Sender/Receiver Interface

E.g. Data exchange between Application SWCs

Client/Server Interface

E.g. Data exchange between Application SWCs and BSW

Calibration Interface

Calibration

Additional Interfaces introduced with AUTOSAR 4.0

NvDataInterface (NvRAM)

ModeSwitchInterface (Mode Switch)

TriggerInterface (external triggering, e.g. from ComplexDevicerDriver)

Client Server Interface: The operations that are implemented by the server and invoked by the client are defined.

· Sender Receiver Interface: Defines the data elements that are exchanged.

· Parameter Interface: Constant, fixed or calibration data is accessed via the parameter interfaces.

· Non Volatile Data Interface: Provide access to the data at the element level.

· Trigger Interface: A signal of triggered event is passed to the component via the trigger interface.

· Mode Switch Interface: The information about the current mode is passed to the component via mode switch interface.

AutoSAR Interface Design --Flow

Process Flow “Interface Creation”

AutoSAR Interface Design --Relationship

Port/Interface Relationship

 

AutoSAR Interface Design –-S/R Interface

Sender/Receiver Communication

  • 1..m Multiplicity (Multicast)
  • n..1 Multiplicity
  • Transfer of Data element
  • of a certain Data type (e.g. Uint8)
  • Data Elements are VariablesBase Typerecord

AutoSAR Interface Design –-S/R Sample

S/R Interface Sample

 

AutoSAR Interface Design -- C/S Interface

Client/Server Communication

  • n..1 Multiplicity
  • Sync or async
  • Transfer of Arguments to/from an Operation
  • Arguments are Variables
  • Arguments have a direction in, out, inout
  • Return of ErrorCodes possible using ApplicationError

 

AutoSAR Interface Design –-C/S Sample

C/S Interface Sample

 

 AutoSAR Interface Design –-Trigger Interface

Trigger Interface Sample

AutoSAR Interface Design –-Calibration Interface

Calibration Interface

Type of calibration support can be defined in the ‘Calibration’ column for the dataelements of the different interfaces

This information can be used by the RTE generator to be able to support McSupportData generation (that maps symbol with the dataelement)

McSupportData is the bridge from Autosar to the A2L generation

Affects: ModeSwitch, ClientServer and SenderReceiver communication

AutoSAR Interface Design -- Service Interface

Service Interface

Communication between SWC and BSW

IsService = true

Can be Client/Server, Sender/Receiver, etc...

AutoSAR SWC Design –-SWC Component Type

Component Type :

AutoSAR SWC Design -- Atomic Component

Define Atomic Component Sample :

 

AutoSAR SWC Design -- Composition

Define Composition Component Sample:

1.Application component should be assigned to Composition component.

2.Application component instance will be added automatic after sync in Davinci Configurator.

3.In this project, DIMswarch will be used to export ECUExtract.

 AutoSAR SWC Design -- Ports

AutoSAR Runnable Design --Triggers

Triggers

Init

The runnable entity is triggered exactly once on start up of the component.

Runnables with init triggers are not allowed to have other triggers.

Periodic

The runnable entity is periodically triggered.

On Data Reception

The runnable entity is triggered upon an incoming data element.

Can select data elements of all receiver port of the component type.

Used for unqueued communication.

On Data Reception Error

The runnable entity is triggered upon an incoming data element.

Can select data elements of all receiver port of the component type.

On Data Send Completion

The runnable entity is triggered upon completion of sending an output data element (Tx Acknowledge).

Can select data elements of all sender port of the component type.

 AutoSAR Runnable Design  -- Access points

Access Points

Receive Data

The runnable entity may receive data from a receiver port prototype.

This kind of port access is only available for queued data element prototypes.

Read Data

The runnable entity may read data from a receiver port prototype.

This kind of port access is only available for unqueued data element prototypes

Send Data

The runnable entity may send data to a sender port prototype.

This kind of port access is only available for queued data element prototypes.

Write Data

The runnable entity may write data to a sender port prototype.

This kind of port access is only available for unqueued data element prototypes

Invoke Operations

The runnable entity may invoke operations of a client port prototype

AutoSAR Runnable Design -- Exclusive Area List

No Access
The runnable entity does not access the exclusive area.
Runs In
The runnable entity runs in the exclusive area during the complete execution.
Can Enter
The runnable entity can enter the exclusive area during its execution.

 

1.Solve the issue of the swc runnables run in different task.

AutoSAR Runnable Design --InterRunnableVariable

No Access
The runnable entity does not access the inter-runnable variable
.
Read
The runnable entity only reads the inter-runnable variable .
Write
The runnable entity only writes the inter-runnable variable
.
Read|Write

 The runnable entity reads and writes the inter-runnable variable.

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/782655.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

火狐浏览器鼠标点击页面区域文字时,出现光标的问题

点击一些资源卡片和查看别的页面时,发现点击非输入框的地方,出现了光标,误以为光标处可以填写东西,就试着敲了几次键盘,发现没有任何反应;然后就叫开发那个页面的同事过去看看;那个同事按F12各种…

如何监控Linux和Oracle数据库运行状态

背景: 在生产环境中,一般可能会发生服务器宕机或者数据库宕机的情况,如何准确的把握找准”生产事故“的具体发生时间,其实有很多方法,可以借助第三方的监控软件或者其他收费软件。 但是本人就是穷逼一个,不可能买或者使用盗版的三方软件。所有设计了以下流程检测Linux和…

16_LinuxINPUT子系统

目录 input子系统简 input驱动编写流程 注册input_dev 上报输入事件 input_event结构体 按键input驱动程序编写 编写测试APP 运行测试 input子系统简 按键、鼠标、键盘、触摸屏等都属于输入(input)设备,Linux内核为此专门做了一个叫做input子系统的框架来处理输入事件。…

node中间件-express框架

文章目录 前置 Express安装1. 基本使用2. 中间件2.1 中间件应用 3. 中间件的注册方式3.1 普通中间件的注册3.2 path匹配中间件3.3 method与路径匹配3.4 案列中间件匹配与执行方法 4. 中间件request数据解析4.1 解析request body中间件4.2 urlencoded解析 5. 第三方中间件5.1 mo…

CHI协议保序之Comp保序

一致性系统中,需要 memroy model 使用 multi-copy atomicity; 一致性系统中,使用三种保序方式; Completion response □ Comp 响应 表示当前的请求,己经达到了 POC/POS, POC/POS 将保证其命令的执行顺序和接收的顺序是一致的&…

Python(三十三)分支结构——嵌套if的使用

❤️ 专栏简介:本专栏记录了我个人从零开始学习Python编程的过程。在这个专栏中,我将分享我在学习Python的过程中的学习笔记、学习路线以及各个知识点。 ☀️ 专栏适用人群 :本专栏适用于希望学习Python编程的初学者和有一定编程基础的人。无…

Android Studio下载

目录 确定版本下载地址 确定版本 如果是入职工作,先和同事确定好版本。因为每个项目使用的gradle插件版本,是在根目录的build.gralde文件中统一定义的,这个文件在添加第三方库(例如GreenDao,Arouter等)或者…

SpringBoot项目的创建

等待maven下载完成 删除无用文件 此时我们就创建成功了

Shiro权限绕过漏洞(CVE-2020-1957,CVE-2020-11989、CVE-2020-13933)

一、Apache Shiro Apache Shiro 是一个强大且易用的Java安全框架,能够用于身份验证、授权、加密和会话管理。 二、Shiro漏洞指纹(部分) 1、在请求包的cookie中有remember字段赋任意值 2、返回包中存在set-Cookie:remeberMedeleteMe 三、受…

通过宝塔面板将vue项目放到阿里云服务器(两个vue项目)

前提条件: 端口提前开放所需环境安装好(Nginx node…)以及打包好的vue文件(dist) 第一步:上传文件到自定义目录 第二步:在首页找到Nginx软件并配置 第三步:配置具体的配置 这里说…

「雕爷学编程」Arduino动手做(39)——DS18B20温度传感器3

37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的&#x…

厦门枫叶时代看电视的新趋势

随着“5G电视”技术的不断普及和城市数字化转型的加速,电视行业也在发生着翻天覆地的变化。在这个背景下,第28届上海电视节推出了高端论坛板块——“白玉兰对话”,共同探讨电视行业的未来发展。其中备受瞩目的中国电视剧发展论坛,…

荔枝派Zero(全志V3S)驱动开发之USB摄像头

文章目录 前言一、内核配置 UVC二、编译内核并烧录到 SD 卡三、上电测试四、mjpeg-streamer 视频流服务器测试1、jpeg 库的移植2、移植 mjpeg-streamer①、前置软件②、下载 mjpg-streamer 源码③、修改 mjpg-streamer 源码④、编译 mjpg-streamer 源码 3、搬移文件到 nfs 目录…

2023/07/23

1. 必须等待所有请求结束后才能执行后续操作的处理方式 方式一: async func () {const p1 await api1();const p2 await api2();const p3 await api3();Promise.all([p1, p2, p3]).then(res > {后续操作...}) }方式二:待补充 2. flex 弹性盒子布…

300M的联通宽带,电脑直接连接光猫只有100M;电脑连接路由器,然后路由器连接光猫却有300M???

1. 现象 300M的联通宽带,用了小半年之后发现网络比以前满,通过https://www.speedtest.cn网站测试发现只有100M 2. 猜测 难道是联通这帮人,偷偷把我网速降到了100M??? 3. 排查过程 打电话让联通师傅上门排查…

使用 Qt designer

使用 Qt designer 1、配置Qt designer外部工具2、Qt designer(Qt 设计师)使用2.1 创建保存文件ui2.2 pyuic5.exe 工具 转化成为py文件2.3 直接导入UI文件 2、qrc资源管理器 1、配置Qt designer外部工具 实质就是 Qt\bin 工具中 designer.exe 请查看 PyQ…

Docker 核心概念深度解析:探索容器、镜像和仓库在Docker生态系统中的重要作用和 应用

🌷🍁 博主 libin9iOak带您 Go to New World.✨🍁 🦄 个人主页——libin9iOak的博客🎐 🐳 《面试题大全》 文章图文并茂🦕生动形象🦖简单易学!欢迎大家来踩踩~&#x1f33…

Redis应用(3)——Redis的项目应用(二):抢购图书 ---> Redis高并发的问题 分布式锁Redission的使用

目录 引出Redis的高并发问题redis的高并发问题Redisson中间件引入RedissonRedisson配置Redisson应用报错:java.lang.NoClassDefFoundErro Redis的项目应用(二):抢购图书1.0版本,Java代码:数据不安全测试方法…

Python+Selenium做自动化测试

一.项目介绍 目的 测试某官方网站登录功能模块可以正常使用 用例 1.输入格式正确的用户名和正确的密码,验证是否登录成功; 2.输入格式正确的用户名和不正确的密码,验证是否登录失败,并且提示信息正确; 3.输入格式正…

H 欢乐颂+J 睡美人

H 欢乐颂 登录—专业IT笔试面试备考平台_牛客网 思路:这个题就是题意比较难懂,思路还挺好想的,其实就是每个点都有几个状态,然后只有存在相同状态的点之间才可以连边,假设点i的状态和为a,点j的状态和为b&a…