initial commit
This commit is contained in:
35
tcl/drivers/paa33x.tcl
Normal file
35
tcl/drivers/paa33x.tcl
Normal file
@ -0,0 +1,35 @@
|
||||
namespace eval paa33x {} {
|
||||
}
|
||||
|
||||
proc stdConfig::paa33x {} {
|
||||
controller bin keller-crc 2
|
||||
# pollperiod 15 15
|
||||
prop startcmd "int 250 48 crc / skip code int int int int int skip crc"
|
||||
prop commerror paa33x::errorscript
|
||||
obj BIN rd
|
||||
prop readcmd "int 250 73 1 crc / skip code float int crc"
|
||||
prop readfmt "%g"
|
||||
prop read paa33x::read
|
||||
kids "pressure" {
|
||||
node temperature rd
|
||||
prop readcmd "int 250 73 4 crc / skip code float int crc"
|
||||
prop readfmt "%g"
|
||||
prop read paa33x::read
|
||||
}
|
||||
}
|
||||
|
||||
proc paa33x::read {} {
|
||||
sct trycnt 0
|
||||
return [stdSct::read]
|
||||
}
|
||||
|
||||
proc paa33x::errorscript {} {
|
||||
set trycnt [silent 0 sct trycnt]
|
||||
incr trycnt
|
||||
sct trycnt $trycnt
|
||||
if {$trycnt > 10} {
|
||||
stdSct::errorScript
|
||||
}
|
||||
sct send [sct send]
|
||||
return [sct state]
|
||||
}
|
Reference in New Issue
Block a user