⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 can_send.tcl

📁 can4linux-3.5.3.gz can4 linux
💻 TCL
字号:
#!/usr/bin/tclsh# Tcl CAN Layer 2 example# sending as fast as the process can#load ./canLtwo.soputs "....... swig wrapper loaded"# open the can interface /dev/can0# but before, set the baud rate if other than defaultexec /bin/echo 1000 > /proc/sys/Can/Baudputs "....... bit rate changed"set device 1set can_fd [can_open $device]puts "....... /dev/can$device opened"# now send messages# send 8 byte, message id 100## takes 1588祍 per message on my 1009.955 MHz AuthenticAMD#set n 2000puts "... send $n messages"set t [time {can_send $can_fd 8 417:1,2,3,4,5,6,7,8} $n]puts $t#while 1 {#    can_send $can_fd 8 100:1,2,3,4,5,6,7,8#}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -