r3728 | jgn | 2012-08-30 09:21:58 +1000 (Thu, 30 Aug 2012) | 1 line
This commit is contained in:
committed by
Douglas Clowes
parent
2ea516d84b
commit
acf91f494d
@@ -299,57 +299,72 @@ proc ::scobj::hv::mkHV {argList} {
|
||||
}
|
||||
}
|
||||
|
||||
proc hvGetStatus {} {
|
||||
proc hv_status {} {
|
||||
set cmd "get status\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
|
||||
proc hvGetConfig {} {
|
||||
proc hv_config {} {
|
||||
set cmd "get config\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
|
||||
proc hvClearError {} {
|
||||
proc hv_clear_error {} {
|
||||
set cmd "clear error\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
|
||||
proc hvSetHV {vol} {
|
||||
set cmd "set hv=$vol\r\n"
|
||||
sct_hv send $cmd
|
||||
proc hv_vol {{vol ""} args} {
|
||||
if {$vol == ""} {
|
||||
hget /sics/hv/config/hv
|
||||
} else {
|
||||
set cmd "set hv=$vol\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
}
|
||||
|
||||
proc hvSetPressure {pressure} {
|
||||
set cmd "set pressure=$pressure\r\n"
|
||||
sct_hv send $cmd
|
||||
proc hv_pressure {{pressure ""} args} {
|
||||
if {$pressure == ""} {
|
||||
hget /sics/hv/config/pressure_threshold
|
||||
} else {
|
||||
set cmd "set pressure=$pressure\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
}
|
||||
|
||||
proc hvSetMode {mode} {
|
||||
set cmd "set mode=$mode\r\n"
|
||||
sct_hv send $cmd
|
||||
proc hv_mode {{mode ""} args} {
|
||||
if {$mode == ""} {
|
||||
hget /sics/hv/config/mode
|
||||
} else {
|
||||
set cmd "set mode=$mode\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
}
|
||||
|
||||
proc hvSetDate {date} {
|
||||
set cmd "set date=$date\r\n"
|
||||
sct_hv send $cmd
|
||||
proc hv_date {{date ""} args} {
|
||||
if {$date == ""} {
|
||||
} else {
|
||||
set cmd "set date=$date\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
}
|
||||
|
||||
proc hvPowerUp {} {
|
||||
proc hv_powerup {} {
|
||||
set cmd "power up\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
|
||||
proc hvPowerDown {} {
|
||||
proc hv_powerdown {} {
|
||||
set cmd "power down\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
|
||||
proc hvHelp {} {
|
||||
proc hv_help {} {
|
||||
set cmd "help\r\n"
|
||||
sct_hv send $cmd
|
||||
}
|
||||
|
||||
proc setDataRecord {args} {
|
||||
proc set_data_record {args} {
|
||||
switch $args {
|
||||
"ON" {hset /sics/hv/dataRecording "ON"}
|
||||
"on" {hset /sics/hv/dataRecording "ON"}
|
||||
@@ -359,17 +374,17 @@ proc setDataRecord {args} {
|
||||
}
|
||||
}
|
||||
|
||||
publish hvGetStatus user
|
||||
publish hvGetConfig user
|
||||
publish hvClearError user
|
||||
publish hvSetHV user
|
||||
publish hvSetPressure user
|
||||
publish hvSetMode user
|
||||
publish hvSetDate user
|
||||
publish hvPowerUp user
|
||||
publish hvPowerDown user
|
||||
publish hvHelp user
|
||||
publish setDataRecord user
|
||||
publish hv_status user
|
||||
publish hv_config user
|
||||
publish hv_clear_error user
|
||||
publish hv_vol user
|
||||
publish hv_pressure user
|
||||
publish hv_mode user
|
||||
publish hv_date user
|
||||
publish hv_powerup user
|
||||
publish hv_powerdown user
|
||||
publish hv_help user
|
||||
publish set_data_record user
|
||||
|
||||
# Main process call
|
||||
::scobj::hv::mkHV {
|
||||
|
||||
Reference in New Issue
Block a user