当前位置:网站首页>Zero basic learning canoe panel (8) -- hex/text editor
Zero basic learning canoe panel (8) -- hex/text editor
2022-07-24 10:47:00 【Ant soldier】
- I am a Ant soldier , Focus on the field of on-board diagnosis , Especially good at CANoe Tool use
- Looking for organizations , Answer questions and solve doubts , Fishing and chatting , Blog source code , Click to add 【 Love each other and family 】
- Zero base learning CANoe Panel Summary of design catalogue , Click the jump
Preface
- comparison
Input/Output Box,Hex/Text EditorCan be used to display more data , Mainly used to showbyte/intAn array type , It can also be used to displaystring - Demonstrate hardware and software environment
Windows11 x64;CANoe 11 SP2 x64
Catalog

data / Text editing control (Hex/Text Editor )
- Hex/Text Editor The data types supported by the control are string And an array .


Control display layout (Editor Layout )
symbol The type is Data(byte arrary)
1️⃣ If Editor The binding of symbol The type is Data, be Editor Layout Properties we can only choose only Hex Field
- And when it's set up , We should also set it according to the number of bytes we want to display in each line (
Columns/Letter per Line), Like standards CAN message We can set it to 8, Just a whole message can be displayed - Automatically pass between two bytes
Space interval

2️⃣ Let's simply simulate Real time refresh A message
/*@!Encoding:936*/
variables
{
byte ByteData[16];
int i ;
msTimer timer_demo;
}
on key 'a'
{
setTimer(timer_demo,1000);
}
on timer timer_demo
{
for(i=0;i<elcount(ByteData);i++)
ByteData[i]= random(0xFF);
sysSetVariableData (sysvar::Panel::Editor_ByteArrary,ByteData,elcount(ByteData));
setTimer(timer_demo,1000);
}
3️⃣ function CANoe , Press the button ‘a’,panel Refresh data periodically .

symbol The type is Int arrary
1️⃣ If bound symbol The data type of is Int Arrary
- be Editor Control can only display one per line Plastic number ( Occupy 4 Bytes , And separated by spaces ), And is 16 The system shows .
Columns/Letter per LineProperty cannot be set at this time , Fixed dead

2️⃣ The following code is the system variable Editor_IntArrary assignment ,
- a key , Temporary defined in code
Variable IntArraryThe size of the array must be the same asSystem variables Editor_IntArraryThe defined array size is consistent , Otherwise, the setting is unsuccessful .
/*@!Encoding:936*/
on key 'b'
{
IntArrary[0]= 0x11111111;
IntArrary[1]= 0x22222222;
IntArrary[2]= 0x33333333;
IntArrary[3]= 0x44444444;
sysSetVariableLongArray (sysvar::Panel::Editor_IntArrary,IntArrary,elcount(IntArrary));
}
3️⃣ function CANoe Press the button ‘b’, The results are as follows :

symbol The type is string
1️⃣ If bound symbol The data type of is string, be Editor Layout Properties can only be selected Only Text Filed
- We can use Editor Control to display our test process in real time log Information , Next we read DTC The information is displayed in Panel in .
- Note that this control only supports English output , It doesn't wrap automatically , You need to specify how many bytes per line (
Columns/Letter per Line)
2️⃣ A small code demonstration symbol The type is string,editor Control display effect
- It needs to be strictly followed (
Columns/Letter per Line ) Set the number of bytes per line to output in format . Otherwise, it cannot be formatted like the one in the figure
/*@!Encoding:936*/
on key 'c'
{
char tempText[0x500];
int i;
dword DTC[3] = {
0xD08998,0xD01123,0xD05695};
char Descriable[3][20]={
"Power High","Power Lower","Crc Error"};
byte Status[3] = {
0x09,0x2B,0x2F};
// Similar to table header
snprintf(tempText,elCount(tempText),"%8s%16s%12s","DTC","Descriable","Status");
for(i=0;i<3;i++)
{
snprintf(tempText,elCount(tempText),"%s%8X%16s%12X",tempText,DTC[i],Descriable[i],Status[i]);
}
sysSetVariableString (sysvar::Panel::Editor_String,tempText);
}
3️⃣ function CANoe Press the button ‘b’, The results are as follows :


summary


- Have the most simple life , The furthest dream , Even if it's freezing tomorrow , Lu Yao's horse died !
- If this blog is helpful to you , please “ give the thumbs-up ” “ Comment on ”“ Collection ” One key, three links Oh ! It's not easy to code words , Everyone's support is my driving force to stick to it .
边栏推荐
- Why should we "go up and down" when testing left shift and right shift?
- 1184. 公交站间的距离 : 简单模拟题
- Cross platform audio playback Library
- Rtklib source code, RTK difference calculation, rtkpos and replos function process sorting
- [FPGA]: IP core -- rapid IO
- JS function call download file link
- 【微服务】Eureka+Ribbon实现注册中心与负载均衡
- 5个最佳WordPress广告插件
- Google cooperates with colleges and universities to develop a general model, proteogan, which can design and generate proteins with new functions
- IEPE vibration sensor synchronous signal acquisition card /icp synchronous data network acquisition module
猜你喜欢

MySQL - 唯一索引

N-tree, page_ Size, database strict mode modification, and the difference between delete and drop in the database

38. REM adaptive layout

Sentinel three flow control modes

Sentinel three flow control effects

【微服务】Eureka+Ribbon实现注册中心与负载均衡

UVM——双向通信

UVM - two way communication

Web Security Foundation - file upload (file upload bypass)

Constant pointer, pointer constant
随机推荐
Sentinel implements the persistence of pull pattern rules
Hash, bitmap and bloom filter for mass data De duplication
JSON tutorial [easy to understand]
机器学习小试(10)使用Qt与Tensorflow创建CNN/FNN测试环境
用 Signal Processing Toolbox 软件对数据进行滤波
MySQL - 普通索引
MySQL - 唯一索引
Protocol Bible - talk about ports and quads
基于NoCode构建简历编辑器
【微服务】Eureka+Ribbon实现注册中心与负载均衡
Windows virtual machine security reinforcement process steps, detailed description of windows setting security policy, detailed description of win7 setting IP security policy, windows setting firewall
pom文件dependency中的 scope用法
Arduino + AD9833 波形发生器
Pytorch common tricks summary
[AHK] AutoHotKey tutorial ①
[FPGA]: IP core - multiplier
Detailed explanation of Flink operation architecture
MySQL - lock
MySQL - 更新表中的数据记录
DSP CCS software simulation
