当前位置:网站首页>零基础学习CANoe Panel(15)—— 文本输出(CAPL Output View )
零基础学习CANoe Panel(15)—— 文本输出(CAPL Output View )
2022-07-25 12:25:00 【蚂蚁小兵】
- 我是蚂蚁小兵,专注于车载诊断领域,尤其擅长于对CANoe工具的使用
- 寻找组织 ,答疑解惑,摸鱼聊天,博客源码,点击加入【相亲相爱一家人】
- 零基础学习CANoe Panel设计目录汇总,点击跳转
前言
前面已经讲解过
Hex/Text Editor可以用来输出文本到Panel上;如果你需要的只是LOG输出到Panel,不需要保存到相关Symbol,那么CAPL Output View可能是你更好的选择演示软硬件环境
Windows11 x64;CANoe 11 SP2 x64

文本输出(CAPL Output View )
- 1️⃣ 放置一个CAPL Output View 控件,背景色设置为黑色,字体设置为绿色,OutPut Mode 默认为Append

2️⃣ 操控控件的CAPL函数
- putValueToControl : 向控件中写入文本
- DeleteControlContent :清空控件文本


3️⃣ 代码演示
- 我们可能在CAPL中执行测试任务时,不断的向Panel中输出测试Log
/*@!Encoding:936*/
on key 'a'
{
char timeBuffer[64];
char tempText[256];
int i ;
getLocalTimeString(timeBuffer);
snprintf(tempText,elCount(tempText),"%s:开始执行测试。。。\n",timeBuffer);
putValueToControl("ToolBox_CAPLOutView","CAPLOutputView",tempText);
getLocalTimeString(timeBuffer);
snprintf(tempText,elCount(tempText),"%s:正在执行测试步骤(1)。。。\n",timeBuffer);
putValueToControl("ToolBox_CAPLOutView","CAPLOutputView",tempText);
getLocalTimeString(timeBuffer);
snprintf(tempText,elCount(tempText),"%s:测试结束,结果PASS\n",timeBuffer);
putValueToControl("ToolBox_CAPLOutView","CAPLOutputView",tempText);
}
3️⃣ 按下‘a’ 键,输出测试Log


总结


- 要有最朴素的生活,最遥远的梦想,即使明天天寒地冻,路遥马亡!
- 如果这篇博客对你有帮助,请 “点赞” “评论”“收藏”一键三连 哦!码字不易,大家的支持就是我坚持下去的动力。
边栏推荐
- 阿里云技术专家秦隆:可靠性保障必备——云上如何进行混沌工程?
- Crawler crawls dynamic website
- Azure Devops(十四) 使用Azure的私有Nuget仓库
- SSTI 模板注入漏洞总结之[BJDCTF2020]Cookie is so stable
- 2022.07.24 (lc_6126_design food scoring system)
- PyTorch可视化
- R language uses the ggarrange function of ggpubr package to combine multiple images, and uses the ggexport function to save the visual images in JPEG format (width parameter specifies width, height pa
- 【AI4Code】《CoSQA: 20,000+ Web Queries for Code Search and Question Answering》 ACL 2021
- 【十一】矢量、栅格数据图例制作以及调整
- cmake 学习使用笔记(二)库的生成与使用
猜你喜欢
![SSTI template injection vulnerability summary [bjdctf2020]cookie is so stable](/img/19/0b943019fe1c959c4b79035a814410.png)
SSTI template injection vulnerability summary [bjdctf2020]cookie is so stable

2.1.2 application of machine learning
What does the software testing process include? What are the test methods?

【Flutter -- 实例】案例一:基础组件 & 布局组件综合实例

Moving Chinese figure liushenglan

2022.07.24(LC_6126_设计食物评分系统)

What is ci/cd?

Kyligence 入选 Gartner 2022 数据管理技术成熟度曲线报告

MySQL exercise 2

阿里云技术专家秦隆:可靠性保障必备——云上如何进行混沌工程?
随机推荐
Moving Chinese figure liushenglan
Spirng @Conditional 条件注解的使用
基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现
【3】 DEM mountain shadow effect
阿里云技术专家秦隆:可靠性保障必备——云上如何进行混沌工程?
Pytorch environment configuration and basic knowledge
启牛开的证券账户安全吗?是怎么开账户的
Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
【Flutter -- 布局】层叠布局(Stack和Positioned)
请问一下,使用数据集成从postgreSQL导数据到Mysql数据库,有部分数据的字段中出现emoj
More accurate and efficient segmentation of organs-at-risk in radiotherapy with Convolutional Neural
PyTorch的生态简介
Crawler crawls dynamic website
Communication bus protocol I: UART
[rust] reference and borrowing, string slice type (& STR) - rust language foundation 12
Dr. water 2
Introduction to the scratch crawler framework
艰辛的旅程
R language uses LM function to build multiple linear regression model, step function to build forward stepwise regression model to screen the best subset of prediction variables, and scope parameter t
Cmake learning notes (II) generation and use of Library
