From 196ff117165b3b4c9c67b35c198adaf8177e2837 Mon Sep 17 00:00:00 2001 From: koennecke Date: Mon, 9 Mar 2009 08:31:03 +0000 Subject: [PATCH] - Extended hdbutil.tcl --- tcl/hdbutil.tcl | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tcl/hdbutil.tcl b/tcl/hdbutil.tcl index 88d2e9c3..7c85a093 100644 --- a/tcl/hdbutil.tcl +++ b/tcl/hdbutil.tcl @@ -35,6 +35,7 @@ if { [info exists hdbinit] == 0 } { Publish hdbbatchpath User Publish cscan User Publish sscan User + Publish scan Spy # Publish hmake Mugger # Publish hmakescript Mugger # Publish hlink Mugger @@ -889,4 +890,31 @@ proc scaninfo {} { append result "," sicstime append result "," [SplitReply [lastscancommand]] return $result -} \ No newline at end of file +} +#------------------------------------------------------------- +proc scan argv { + if {[llength $argv] < 1} { + error "Need keyword for scan" + } + set key [string trim [lindex $argv 0]] + switch $key { + uuinterest { return [xxxscan uuinterest] } + pinterest {} + getcounts { set cts [SplitReply [xxxscan getcounts]] + return "scan.Counts = $cts" + } + mode { + if {[llength $argv] > 1} { + return [counter setmode [lindex $argv 1]] + } else { + return [counter getmode] + } + } + clear { + return [xxxscan clear] + } + default { + error "scan does not support keyword $key" + } + } +}