- Timestamp:
- Mar 14, 2015, 12:00:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/visviewer.tcl
r5126 r5127 28 28 set _servers(vtkvis) "localhost:2010" 29 29 30 protected variable _serverType "???";# Type of server.31 protected variable _sid "" ; # socket connection to server32 30 private common _done ; # Used to indicate status of send. 33 31 private variable _buffer ; # buffer for incoming/outgoing commands 32 private variable _blockOnWrite 0; # Should writes to socket block? 34 33 private variable _initialized 35 34 private variable _isOpen 0 36 35 private variable _afterId -1 37 36 private variable _icon 0 38 37 private variable _trace 0 ; # Protocol tracing for console 38 private variable _logging 0 ; # Command logging to file 39 39 # Number of milliseconds to wait before idle timeout. If greater than 0, 40 40 # automatically disconnect from the visualization server when idle timeout … … 44 44 #private variable _idleTimeout 0; # No timeout 45 45 46 protected variable _serverType "???";# Type of server. 47 protected variable _sid "" ; # socket connection to server 46 48 protected variable _maxConnects 100 47 49 protected variable _outbuf ; # buffer for outgoing commands 48 50 protected variable _buffering 0 49 51 protected variable _cmdSeq 0 ; # Command sequence number 50 51 private variable _trace 0 ; # Protocol tracing for console52 private variable _logging 0 ; # Command logging to file53 52 54 53 protected variable _dispatcher ""; # dispatcher for !events … … 71 70 } 72 71 # Used internally only. 73 private method Shuffle { servers } 72 private method BuildConsole {} 73 private method DebugConsole {} 74 private method HideConsole {} 74 75 private method ReceiveHelper {} 75 private method Se rverDown{}76 private method SendDebugCommand {} 76 77 private method SendHelper {} 77 78 private method SendHelper.old {} 79 private method ServerDown {} 80 private method Shuffle { servers } 81 private method TraceComm { channel {data {}} } 78 82 private method WaitDialog { state } 79 80 protected method ToggleConsole {} 81 private method DebugConsole {} 82 private method BuildConsole {} 83 private method HideConsole {} 84 private method TraceComm { channel {data {}} } 85 private method SendDebugCommand {} 83 private method Waiting { option widget } 86 84 87 85 protected method CheckConnection {} … … 89 87 protected method ColorsToColormap { colors } 90 88 protected method Connect { servers } 89 protected method DisableWaitDialog {} 91 90 protected method Disconnect {} 92 91 protected method EnableWaitDialog { timeout } … … 100 99 protected method ReceiveEcho { channel {data ""} } 101 100 protected method SendBytes { bytes } 102 protected method SendCmd {string} 101 protected method SendCmd { string } 102 protected method SendData { bytes } 103 103 protected method SendEcho { channel {data ""} } 104 104 protected method StartBufferingCommands {} … … 106 106 protected method StopBufferingCommands {} 107 107 protected method StopWaiting {} 108 109 private method Waiting { option widget } 108 protected method ToggleConsole {} 110 109 111 110 private proc CheckNameList { namelist } { … … 205 204 file delete /tmp/recording.log 206 205 } 206 } 207 if { [info exists env(VISTRACE)] } { 208 set _trace 1 207 209 } 208 210 eval itk_initialize $args … … 463 465 } 464 466 set _buffer(out) $bytes 465 if { 0} {467 if {_blockOnWrite} { 466 468 # Let's try this approach: allow a write to block so we don't 467 469 # re-enter SendBytes … … 510 512 itcl::body Rappture::VisViewer::EnableWaitDialog { value } { 511 513 set _waitTimeout $value 514 } 515 516 itcl::body Rappture::VisViewer::DisableWaitDialog {} { 517 set _waitTimeout 0 512 518 } 513 519 … … 1194 1200 # SendCmd 1195 1201 # 1196 # Send commands off to the rendering server. If we're currently 1197 # sending data objects to the server, buffer the commands to be 1198 # sent later. 1202 # Send command off to the rendering server. If we're currently 1203 # buffering, the command is queued to be sent later. 1199 1204 # 1200 1205 itcl::body Rappture::VisViewer::SendCmd {string} { … … 1209 1214 } 1210 1215 } 1216 1217 # 1218 # SendData 1219 # 1220 # Send data off to the rendering server. If we're currently 1221 # buffering, the data is queued to be sent later. 1222 # 1223 itcl::body Rappture::VisViewer::SendData {bytes} { 1224 if {$_trace} { 1225 puts stderr "$_cmdSeq>>data payload" 1226 } 1227 if { $_buffering } { 1228 append _outbuf $bytes 1229 } else { 1230 SendBytes $bytes 1231 } 1232 }
Note: See TracChangeset
for help on using the changeset viewer.