Changeset 4097


Ignore:
Timestamp:
Dec 27, 2013 1:34:49 PM (7 years ago)
Author:
gah
Message:

added vmd render server. fixed visviewer.tcl to look for something that looks like the servername and version. vmd polutes stdout with lots of text. I think the ultimate solution is to dup file descriptors 3 and 4 (instead of 0, 1, and 2) to the opened socket.

Location:
trunk
Files:
5 added
2 edited

Legend:

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

    r4042 r4097  
    3636    private variable _afterId -1
    3737    private variable _icon 0
    38     # Number of milliseconds to wait before idle timeout.  If greater than 0,
    39     # automatically disconnect from the visualization server when idle timeout
    40     # is reached.
     38
     39    # Number of milliseconds to wait before idle timeout.  If greater than
     40    # 0, automatically disconnect from the visualization server when idle
     41    # timeout is reached.
    4142    private variable _idleTimeout 43200000; # 12 hours
    4243    #private variable _idleTimeout 5000;    # 5 seconds
    4344    #private variable _idleTimeout 0;       # No timeout
     45
    4446    protected variable _maxConnects 100
    4547    protected variable _outbuf       ;    # buffer for outgoing commands
     
    285287            continue
    286288        }
    287         puts stderr "render server is $data"
     289        # The response should be in the form "serverName major.minor ...".
     290        set pattern {^[A-Za-z]+ [0-9].[0-9].*}
     291
     292        while { ![regexp $pattern $data match] } {
     293            puts stderr "$data"
     294            if { [gets $_sid data] <= 0 } {
     295                exit -1
     296            }
     297        }
     298        puts stderr "Render server is $data"
    288299        # We're connected. Cancel any pending serverDown events and
    289300        # release the busy window over the hull.
     
    388399#
    389400#   Helper routine called from a file event to send data when the
    390 #   connection is writable (i.e. not blocked).  Sets a magic
    391 #   variable _done($this) when we're done.
     401#   connection is writable (i.e. not blocked).  Sets a magic variable
     402#   _done($this) when we're done.
    392403#
    393404itcl::body Rappture::VisViewer::SendHelper {} {
     
    404415#
    405416#   Helper routine called from a file event to send data when the
    406 #   connection is writable (i.e. not blocked).  Sends data in chunks
    407 #   of 8k (or less).  Sets magic variable _done($this) to indicate
    408 #   that we're either finished (success) or could not send bytes to
    409 #   the server (failure).
     417#   connection is writable (i.e. not blocked).  Sends data in chunks of 8k
     418#   (or less).  Sets magic variable _done($this) to indicate that we're
     419#   either finished (success) or could not send bytes to the server
     420#   (failure).
    410421#
    411422itcl::body Rappture::VisViewer::SendHelper.old {} {
     
    455466    set _buffer(out) ""
    456467    if { [IsConnected] } {
    457         # The connection may have closed while we were writing to the server.
    458         # This can happen if what we sent the server caused it to barf.
     468        # The connection may have closed while we were writing to the
     469        # server.  This can happen if what we sent the server caused it to
     470        # barf.
    459471        fileevent $_sid writable ""
    460472        flush $_sid
     
    504516# ReceiveHelper --
    505517#
    506 #   Helper routine called from a file event when the connection is
    507 #   readable (i.e. a command response has been sent by the rendering
    508 #   server.  Reads the incoming command and executes it in a safe
    509 #   interpreter to handle the action.
     518#   Helper routine called from a file event when the connection is readable
     519#   (i.e. a command response has been sent by the rendering server.  Reads
     520#   the incoming command and executes it in a safe interpreter to handle
     521#   the action.
    510522#
    511523#       Note: This routine currently only handles command responses from
     
    561573# Color2RGB --
    562574#
    563 #   Converts a color name to a list of r,g,b values needed for the
    564 #   engine.  Each r/g/b component is scaled in the # range 0-1.
     575#   Converts a color name to a list of r,g,b values needed for the engine.
     576#   Each r/g/b component is scaled in the # range 0-1.
    565577#
    566578itcl::body Rappture::VisViewer::Color2RGB {color} {
     
    589601# SendEcho --
    590602#
    591 #     Used internally to echo sent data to clients interested in this widget.
    592 #     If the -sendcommand option is set, then it is invoked in the global scope
    593 #     with the <channel> and <data> values as arguments.  Otherwise, this does
    594 #     nothing.
     603#     Used internally to echo sent data to clients interested in this
     604#     widget.  If the -sendcommand opti on is set, then it is invoked in
     605#     the global scope with the <channel> and <data> values as arguments.
     606#     Otherwise, this does nothing.
    595607#
    596608itcl::body Rappture::VisViewer::SendEcho {channel {data ""}} {
     
    610622#
    611623#     Echoes received data to clients interested in this widget.  If the
    612 #     -receivecommand option is set, then it is invoked in the global
    613 #     scope with the <channel> and <data> values as arguments.  Otherwise,
    614 #     this does nothing.
     624#     -receivecommand option is set, then it is invoked in the global scope
     625#     with the <channel> and <data> values as arguments.  Otherwise, this
     626#     does nothing.
    615627#
    616628itcl::body Rappture::VisViewer::ReceiveEcho {channel {data ""}} {
  • trunk/packages/vizservers/nanoscale/renderservers.tcl.in

    r4064 r4097  
    8181#
    8282register_server vmdshow 2018 {
    83     /usr/bin/vmd -startup ${libdir}/vmd/vmdserver.tcl -args -stdio
     83    ${libdir}/vmd/vmd_LINUXAMD64 -startup ${libdir}/vmd/vmdserver.tcl -args -stdio
    8484} {
     85    VMDDIR ${libdir}/vmd
     86    SURF_BIN ${libdir}/vmd/surf
    8587    LD_LIBRARY_PATH ${libdir}
    8688}
     89
Note: See TracChangeset for help on using the changeset viewer.