diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-19 15:57:20 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-19 15:57:20 (GMT) |
commit | 39a20376dc46c9d2212b4e87d3e9711d7405dab7 (patch) | |
tree | 371ece0533a7a6778fd8039e27e731c7e8bb2b8f /ds9/library | |
parent | 1c1aa7532515c455508065839b03c3da2011f885 (diff) | |
download | blt-39a20376dc46c9d2212b4e87d3e9711d7405dab7.zip blt-39a20376dc46c9d2212b4e87d3e9711d7405dab7.tar.gz blt-39a20376dc46c9d2212b4e87d3e9711d7405dab7.tar.bz2 |
add ds9 vo send parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/source.tcl | 2 | ||||
-rw-r--r-- | ds9/library/vo.tcl | 45 |
2 files changed, 21 insertions, 26 deletions
diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index ffee7f2..f71b9e0 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -436,6 +436,8 @@ source $ds9(root)/library/vlsssendparser.tcl source $ds9(root)/library/vlsssendlex.tcl source $ds9(root)/library/voparser.tcl source $ds9(root)/library/volex.tcl +source $ds9(root)/library/vosendparser.tcl +source $ds9(root)/library/vosendlex.tcl source $ds9(root)/library/wcsparser.tcl source $ds9(root)/library/wcslex.tcl source $ds9(root)/library/wcssendparser.tcl diff --git a/ds9/library/vo.tcl b/ds9/library/vo.tcl index 3f52ac7..b5c1be4 100644 --- a/ds9/library/vo.tcl +++ b/ds9/library/vo.tcl @@ -501,35 +501,28 @@ proc VOCmdDisconnect {str} { } proc ProcessSendVOCmd {proc id param {sock {}} {fn {}}} { + global parse + set parse(proc) $proc + set parse(id) $id + + vosend::YY_FLUSH_BUFFER + vosend::yy_scan_string $param + vosend::yyparse +} + +proc VOSendCmdConnect {{all {0}}} { global ivo global pvo - switch -- [string tolower $param] { - method {$proc $id "$pvo(method)\n"} - server {$proc $id "$pvo(server)\n"} - internal {$proc $id [ToYesNo $pvo(hv)]} - delay {$proc $id "$pvo(delay)\n"} - connect { - # current connections - set len [llength $ivo(server,button)] - set rr {} - for {set ii 0} {$ii<$len} {incr ii} { - if {$ivo(b$ii)} { - append rr "[lindex $ivo(server,host) $ii] [lindex $ivo(server,title) $ii] [lindex $ivo(server,url) $ii] $ivo(b$ii)\n" - } - } - $proc $id $rr - } - default { - VODialog - # all possible connections - set len [llength $ivo(server,button)] - set rr {} - for {set ii 0} {$ii<$len} {incr ii} { - append rr "[lindex $ivo(server,host) $ii] [lindex $ivo(server,title) $ii] [lindex $ivo(server,url) $ii] $ivo(b$ii)\n" - } - $proc $id $rr + VODialog + + set len [llength $ivo(server,button)] + set rr {} + for {set ii 0} {$ii<$len} {incr ii} { + if {$all || $ivo(b$ii)} { + append rr "[lindex $ivo(server,host) $ii] [lindex $ivo(server,title) $ii] [lindex $ivo(server,url) $ii] $ivo(b$ii)\n" } } -} + ProcessSendCmdTxt $rr +} |