Added WEB scripts

master
svk28 2017-08-21 15:10:41 +03:00
parent a6dc8d3836
commit e3bdf5e967
2 changed files with 20 additions and 15 deletions

View File

@ -9,7 +9,6 @@ package require mysqltcl
# параметры соединения с СУБД
#source config.tcl
#set db(host) "host"
#set db(user) "user"
#set db(pass) "password"
@ -72,12 +71,18 @@ proc ParceString {line} {
InsertData
}
proc Read {} {
global fh
if {[gets $fh line] >= 0} {
ParceString $line
}
}
proc PortDataRead {portName} {
global out_dir
global out_dir fh
set fh [open $portName RDONLY]
fconfigure $fh -blocking 0 -buffering none -mode 9600,n,8,1 -translation crlf -eofchar {}
fileevent $fh readable [list read $fh]
puts "Waiting for Capture data"
fconfigure $fh -blocking 0 -buffering line -mode 9600,n,8,1 -translation crlf -eofchar {}
fileevent $fh readable Read
vwait forever
}