Changeset 1221 for trunk/gui


Ignore:
Timestamp:
Nov 17, 2008 2:31:30 PM (15 years ago)
Author:
gah
Message:

Improve data read speed of curve object with vectors; Add pan and scrollwheel features to 3d viewers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/visviewer.tcl

    r1220 r1221  
    2323
    2424    private common servers_         ;# array of visualization server lists
    25     set servers_(nanovis) "bilby.hubzero.org:2000"
    26     set servers_(pymol)   "bilby.hubzero.org:2020"
     25    set servers_(nanovis) ""
     26    set servers_(pymol)   ""
    2727
    2828    private variable sid_ ""        ;# socket connection to server
    2929    private common done_            ;# Used to indicate status of send.
    3030    private variable buffer_        ;# buffer for incoming/outgoing commands
     31
    3132    # Number of milliseconds to wait before idle timeout.
    32     #private variable idleTimeout_ 3600000
    33     #private variable idleTimeout_ 0
    34     private variable idleTimeout_ 5000
     33    # If greater than 0, automatically disconnect from the visualization
     34    # server when idle timeout is reached.
     35    #private variable idleTimeout_ 3600000; # 1 hour
     36    #private variable idleTimeout_ 5000;    # 5 seconds
     37    private variable idleTimeout_ 0;        # No timeout
    3538
    3639    protected variable _dispatcher ""   ;# dispatcher for !events
     
    193196# Connect --
    194197#
    195 #    Connect to the visualization server (e.g. nanovis, pymolproxy).  Send
    196 #    the server some estimate of the size of our job.  If it's too busy, that
    197 #    server may forward us to another.
     198#    Connect to the visualization server (e.g. nanovis, pymolproxy). 
     199#    Creates an event callback that is triggered when we are idle
     200#    (no I/O with the server) for some specified time. Sends the server
     201#    some estimate of the size of our job [soon to be deprecated]. 
     202#    If it's too busy, that server may forward us to another [this
     203#    was been turned off in nanoscale].
    198204#
    199205itcl::body Rappture::VisViewer::Connect { hostlist } {
     
    223229        fconfigure $sid_ -translation binary -encoding binary
    224230
    225         # send memory requirement to the load balancer
     231        # Send memory requirement to the load balancer
    226232        puts -nonewline $sid_ [binary format I $memorySize]
    227233        flush $sid_
    228234
    229         # read back a reconnection order
     235        # Read back a reconnection order
    230236        set data [read $sid_ 4]
    231237        if {[binary scan $data cccc b1 b2 b3 b4] != 4} {
     
    263269#
    264270#    Clients use this method to disconnect from the current rendering
    265 #    server.
     271#    server.  Cancel any pending idle timeout events.
    266272#
    267273itcl::body Rappture::VisViewer::Disconnect {} {
    268274    $_dispatcher cancel !timeout
    269275    if { [IsConnected] } {
    270         catch {close $sid_} err
     276        catch {close $sid_}
    271277        set sid_ ""
    272278    }
     
    286292# CheckConection --
    287293#
    288 #   Helper routine called from a file event to send data when the
    289 #   connection is writable (i.e. not blocked).  Sets a magic
    290 #   variable done_($this) when we're done.
     294#   This routine is called whenever we're about to send/recieve data on
     295#   the socket connection to the visualization server.  If we're connected,
     296#   then reset the timeout event.  Otherwise try to reconnect to the
     297#   visualization server.
    291298#
    292299itcl::body Rappture::VisViewer::_CheckConnection {} {
     
    514521# ReceiveEcho --
    515522#
    516 #     Echoes received data tzo clients interested in this widget.  If the
     523#     Echoes received data to clients interested in this widget.  If the
    517524#     -receivecommand option is set, then it is # invoked in the global
    518525#     scope with the <channel> and <data> values # as arguments.  Otherwise,
Note: See TracChangeset for help on using the changeset viewer.