can_read.tcl
来自「can4linux-3.5.3.gz can4 linux」· TCL 代码 · 共 27 行
TCL
27 行
#!/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 + =
减小字号Ctrl + -
显示快捷键?