CAPL脚本中对Flexray事件的响应
FlexRay
- on frFrame *
on frFrame *
拓展形式:
- on frFrame name
- on frFrame (slot ID, base cycle,cycle repetition)
- 这个事件只能接收有效的Frames,如果需要接受空帧或者错误帧,用 frNullFrame 和on frFrameError
若果选择的是PDU,则用下面的方: - on frPDU name
同message一样,Frame 也有很多他自己的属性。如下列图。
CAPL脚本演示:
on frFrame As******Fr01
{write("************************************");write(",this.msgChannel:%d",this.msgChannel);write(",this.FR_ChannelMask:%d",this.fr_channelMask);write(",this.FR_SlotID:%d",this.fr_slotID);write(",this.FR_Cycle:%d",this.fr_cycle);write(",this.fr_cycleOffset:%d",this.fr_cycleOffset);write(",this.fr_cycleRepetition:%d",this.fr_cycleRepetition);write(",this.FR_PayloadLength:%d",this.FR_PayloadLength);write(",this.signal:%x",this.isAD******1Qf);write(",this.word():%x",this.word(0));write(",this.fr_flags:%x",this.fr_flags);write(",this.fr_segment:%d",this.fr_segment);write(",this.fr_status:%x",this.fr_status);write(",this.dir:%d",this.dir);write(",this.simulated:%x",this.simulated);{int i;for(i=0;i< this.FR_PayloadLength;i++){write(",this.fr_Payload[%d]:%x",i,this.fr_Payload[i]);} }
}
Trace 中的数据:
Canoe中Write的数据:
> ,this.msgChannel:1 //第几路flexray 通道,因为只有一路所以是1
,this.FR_ChannelMask:1 // flexray的A通道
,this.FR_SlotID:2 //
,this.FR_Cycle:5 //在cycle5的时候收到的这真数据,一般一个flexray循环周期是64,周而复始的从0-63
,this.fr_cycleOffset:0 //根据Trace,这个值应该 是1 ,不知为何打印的是0
,this.fr_cycleRepetition:0 //根据Trace,这个值应该 是1 ,不知为何打印的是4
,this.FR_PayloadLength:32 //报文长度是32字节
,this.signal:3 //选中信号的值
,this.word():3 //第一个双字节的值
,this.fr_flags:84802 //对照上面贴图中
,this.fr_segment:0 //0 说明这个frame来自于调度表的静态段,如果为1,则是动态段
,this.fr_status:20 //对着上面的截图,看出 0x0020 是有效帧的表示,this.dir:0 // 0 说明这个frame是TX
,this.simulated:1 //1 说明这个Frame是 模拟节点发出的,不是真实节点
,this.fr_Payload[0]:237 //后面的数据和Trace中是一致的
,this.fr_Payload[1]:63
,this.fr_Payload[2]:0
,this.fr_Payload[3]:1
,this.fr_Payload[4]:128
,this.fr_Payload[5]:0
,this.fr_Payload[6]:0
,this.fr_Payload[7]:1
,this.fr_Payload[8]:0
,this.fr_Payload[9]:0
,this.fr_Payload[10]:0
,this.fr_Payload[11]:0
,this.fr_Payload[12]:233
,this.fr_Payload[13]:63
,this.fr_Payload[14]:128
,this.fr_Payload[15]:0
,this.fr_Payload[16]:0
,this.fr_Payload[17]:146
,this.fr_Payload[18]:0
,this.fr_Payload[19]:3
,this.fr_Payload[20]:63
,this.fr_Payload[21]:0
,this.fr_Payload[22]:1
,this.fr_Payload[23]:0
,this.fr_Payload[24]:128
,this.fr_Payload[25]:0
,this.fr_Payload[26]:192
,this.fr_Payload[27]:0
,this.fr_Payload[28]:186
,this.fr_Payload[29]:48
,this.fr_Payload[30]:156
,this.fr_Payload[31]:166
CAPL脚本中对Flexray事件的响应相关推荐
- CAPL 脚本中对信号,系统变量,环境变量的 事件响应
Value Objects 信号(on signal) 环境变量(on envVar) 系统变量(on sysVar ) 在 CAPL General Event Procedures (一) 中讲解 ...
- CAPL脚本中的变量陷阱
局部变量 在CAPL中所有的局部变量都默认时静态局部变量,也就是想相当于C语言中被static 修饰了. 如下面一小段脚本 在一个函数中定义局部变量b ,虽然初始化赋值0了,但是每次调用这个函数不会自 ...
- capl保存trace_用于诊断服务的CAPL脚本
我正在编写CAPL脚本以自动化诊断服务 . 我已经阅读了一些大于8字节的DID . 直到8个字节,我可以正确捕获我的CAPL脚本中的数据,但是当数据大小超过8个字节时,我得到剩余字节的一些垃圾值00 ...
- iOS开发中didSelectRowAtIndexPath tap事件响应延迟
iOS开发中didSelectRowAtIndexPath tap事件响应延迟 为UITableViewCell添加tapped事件,代码如下: class VideoViewController: ...
- kafka 脚本发送_NWPC消息平台:在ecFlow系统中发送产品事件消息
本文属于介绍 NWPC 消息平台 系列文章. 本文介绍如何在基于 ecFlow 构建的数值预报业务系统中发送 NWPC 消息平台的 产品事件消息. 介绍 数值预报业务系统产品制作一般分为三个步骤: 监 ...
- python怎么让按钮透明_python – 如何创建一个响应Tkinter中的click事件的透明矩形...
我需要在tkinter.canvas中绘制一个矩形来响应click事件: click_area = self.canvas.create_rectangle(0,0,pa_width,pa_heigh ...
- java按钮添加事件_java中添加按钮并添加响应事件的方法(推荐)
关于java容器,面板等自行百度学一下吧 private button loginbtn = new button("登陆"); final static jframe buyer ...
- Postman进阶篇(十二)-在脚本中使用pm对象访问接口响应数据(pm.response.*)
在之前的文章中介绍过postman中的两个脚本--pre-request script或test script,在这两个脚本中都有使用到pm对象.(pre-request script详细介绍.Tes ...
- WPF: 在 MVVM 设计中实现对 ListViewItem 双击事件的响应
ListView 控件最常用的事件是 SelectionChanged:如果采用 MVVM 模式来设计 WPF 应用,通常,我们可以使用行为(如 InvokeCommandAction)并结合命令来实 ...
最新文章
- 书单 | 计算机视觉的修炼秘笈
- 矢量合成和分解的法则_高考复习整理力的合成和分解
- python查看数据类型nonetype_python 查询数据库数据 NoneType报错
- 删除c++程序中的注释
- shell脚本:lvs启动简易脚本
- 深度学习目标检测系列:一文弄懂YOLO算法|附Python源码
- 已知矩阵 matlab,在MATLAB中,已知矩阵A,那么A(:,2:end)表示
- C#、.Net经典面试题集锦(一)
- 数据采集标注、模型开发、部署落地,百度大脑全栈 AI 能力详解
- Java Spring AspectJ
- 基于node.js的express使用数据库时,解决异步调用的问题
- html5的文件操作系统,目录 - 基本操作 - DirectoryEntry《 HTML5:文件系统 》
- 正弦余弦算法的樽海鞘群算法
- IDEA 使用mybatis插件Free Mybatis plugin
- php ma,第十四届萌芽杯优秀作品展示第一期
- AutoIt 快速入门指南
- Linux手动安装JDK并配置多个版本JDK--JDK配置和Jenv的配置使用
- 劳务派遣人员是否有加班费
- (四)以太坊——运用truffle框架部署第一个DAPP ---- Pet-Shop
- matlab使用linprog()函数解决简单的线性规划问题