📄 can_read.tcl
字号:
#!/usr/bin/tclsh# Tcl CAN Layer 2 example# simple CAN Analyzer#load ./canLtwo.soputs "....... swig wrapper loaded"# open the can interface /dev/can0# but before, set the baud rate if other than defaultexec /bin/echo 125 > /proc/sys/Can/Baudputs "....... bit rate changed"set device 0set can_fd [can_open $device]puts "....... /dev/can$device opened, got descriptor $can_fd"puts "... wait for messages"# now go into receive loop#while 1 { puts [can_read2 $can_fd 0]}can_close $can_fdputs "....... /dev/can$device closed"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -