当前位置:网站首页>The only OpenCyphal/UAVCAN tutorial in the whole network (11) Write a Cyphal protocol parsing tool with candump and gawk tools
The only OpenCyphal/UAVCAN tutorial in the whole network (11) Write a Cyphal protocol parsing tool with candump and gawk tools
2022-08-08 04:30:00 【Wonderful Binary】
It is often necessary to debug the Cyphal protocol. The installation of yakut is troublesome, so a protocol analysis tool is implemented with candump and gawk.
The data exported by this candump is obviously a heartbeat broadcast, 7D55 is the id of the heartbeat broadcast, and it is also a single frame message.
can1 107D552A [8] 00 00 00 00 00 01 A1 E0can1 107D552A [8] 01 00 00 00 00 01 A1 E1can1 107D552A [8] 02 00 00 00 00 01 A1 E2can1 107D552A [8] 03 00 00 00 00 01 A1 E3Refer to this image for parsing:
PostOn our awk script:
#!/usr/bin/gawkBEGIN {id_name[7509] = "heart_beat";# add your id and name map herecan_id_index = 2;getline#line example: (001.000) can0 11111 [8] 55555if($1 ~/^\(/)can_id_index = 3;while (getline) {# have timestampif(can_id_index == 3) {timestamp = strtonum(substr($1, 2));}#line example: can0 1122233 [8] 5555555can_id = strtonum("0x"$can_id_index);source_id = and(can_id, 0x0000007F);# 0 message边栏推荐
猜你喜欢

NorFlash的存储原理

基于扰动观察法的光伏mppt最大功率控制matlab仿真

ES6剩余参数的使用

全网唯一OpenCyphal/UAVCAN教程(11)用candump和gawk工具写一个Cyphal协议解析小工具

由联合体union引出的大小端问题

KMP和EXKMP(Z函数)

leetcode-同构字符串判断

一文带你彻底了解synchronized 和 Lock

Awk syntax-03-awk expressions (if statements, while loops, for loops), execute shell commands in awk

Monitoring tool Prometheus and project summary, 220805,,
随机推荐
New ToDesk Enterprise Edition | Ten new features to make enterprise remote control safer, more convenient and smoother
OLTP和OLAP问题的个人总结
C语言-函数
cube-studio 部署过程
NetCore使用Dapper查询数据
一文带你彻底了解synchronized 和 Lock
This article will give you a thorough understanding of synchronized and Lock
QMI8658 - 6轴传感器学习笔记 - Ⅱ
MySQL——索引与事务
C语言-分值和循环语句
MySQL from entry to entry [20W word collection]
Cube - studio deployment process
强网杯 2019-随便注 (堆叠注入)
初出茅庐的小李第115篇博客项目笔记之国产GD32F103RCT6基础工程创建
Implementing Express middleware principles
KD树应用汇总
[Code Analysis] Graph small sample anomaly detection method: GDN: Few-shot Network Anomaly Detection via Cross-network Meta-learning
torch.view() function usage
Exercise equipment responsive pbootcms template class web site
力扣84 双周赛 t4 6144 和力扣305周赛t4 6138