Overview | Index by: file name | procedure name | procedure call | annotation

shell.tcl Annotations

Created from source/shell.tcl
A shell to start a session with a local MikroConf Server. This should be started, just like bash, from an external program like login, telnetd, sshd. Note: We don't recognize any espace sequense, because shell is normally called from another interface like telnet or ssh, that have their own escape sequences.

Procedure Summary
curpos { }
          Returns the current cursor
debuglog { msg }
          
debuglog { msg }
          
fifoout2stdout { fifo }
          Callback proc to monitor fifoout and pass data on to stdout fifoin is the stdout of the server for this
lineInput { }
          Configure stdin & stdout for line buffering, stdin for cooked input, and show entered
quit { {msg {}} }
          Called instead of 'exit' to restore proper terminal settings.
rawInput { }
          Configure stdin & stdout for no buffering, stdin for raw input, and hide entered
reset { }
          Called when SIGUSR1 arrives.
resize { }
          Called either explicitly, or when SIGUSR2 arrives.
restore_stdin { args }
          Execution trace to restore redirection of stdin to FIFO, and other stdin
send_command { args }
          Send a command to MikroConf server and receive the responce.
send_command { args }
          Send a command to MikroConf server and receive the responce.
sigwinch { }
          Send a resize command to the server to update the window size for this session.
stdin2fifoin { fifo }
          Callback proc to monitor stdin and pass data on to fifoin fifoin is the stdin of the server for this
welcome { }
          Print welcome
winsize { }
          Find the current window dimentions of the remote terminal screen.

Procedure Detail

curpos

proc curpos {  }
Returns the current cursor position.
Returns:
The current cursor position @error
Defined in:
shell.tcl, line 151

debuglog

proc debuglog { msg }
Defined in:
shell.tcl, line 345

debuglog

proc debuglog { msg }
Defined in:
shell.tcl, line 345

fifoout2stdout

proc fifoout2stdout { fifo }
Callback proc to monitor fifoout and pass data on to stdout fifoin is the stdout of the server for this session.
Parameters:
fifo - The output fifo
Defined in:
shell.tcl, line 213

lineInput

proc lineInput {  }
Configure stdin & stdout for line buffering, stdin for cooked input, and show entered characters
Defined in:
shell.tcl, line 138

quit

proc quit { {msg {}} }
Called instead of 'exit' to restore proper terminal settings. When 'msg' param is set, we assume we have an erroneous exit condition.
Defined in:
shell.tcl, line 285

rawInput

proc rawInput {  }
Configure stdin & stdout for no buffering, stdin for raw input, and hide entered characters
Defined in:
shell.tcl, line 128

reset

proc reset {  }
Called when SIGUSR1 arrives. It resets the terminal screen without breaking the connection with the server.
Defined in:
shell.tcl, line 81

resize

proc resize {  }
Called either explicitly, or when SIGUSR2 arrives. Sends a resize command to the server to update the window size for this session. It is invoked either by the Server after an explicit user request, by the reception of SIGUSR2 signal, or by the reception of the SIGWINCH signal which is generated whenever a change happens in the window dimention of the remote terminal. Note: We cannot implement this in MikroConf server, because the server is attached to its own terminal. For the same reason stty and other similar tools cannot be executed on the Server either.
Defined in:
shell.tcl, line 98

restore_stdin

proc restore_stdin { args }
Execution trace to restore redirection of stdin to FIFO, and other stdin settings.
Defined in:
shell.tcl, line 179

send_command

proc send_command { args }
Send a command to MikroConf server and receive the responce. Handle the situation where the server doesn't responce.
Parameters:
args - The command to send.
Returns:
The responce message from the server. @error
Defined in:
shell.tcl, line 263

send_command

proc send_command { args }
Send a command to MikroConf server and receive the responce. Handle the situation where the server doesn't responce.
Parameters:
args - The command to send.
Returns:
The responce message from the server. @error
Defined in:
shell.tcl, line 263

sigwinch

proc sigwinch {  }
Send a resize command to the server to update the window size for this session. When using a terminal emulator and resize its window, multiple consequtive SIGWINCH signals are generated with very little time difference. This can overload the server. Thus we rate limit the commands for window resize sent by this procedure.
Defined in:
shell.tcl, line 116

stdin2fifoin

proc stdin2fifoin { fifo }
Callback proc to monitor stdin and pass data on to fifoin fifoin is the stdin of the server for this session.
Parameters:
fifo - The input fifo
Defined in:
shell.tcl, line 188

welcome

proc welcome {  }
Print welcome message
Defined in:
shell.tcl, line 304

winsize

proc winsize {  }
Find the current window dimentions of the remote terminal screen. @assume Dependency on the output of the 'resize' busybox applet. @error
Defined in:
shell.tcl, line 54

Overview | Index by: file name | procedure name | procedure call | annotation
File generated 2010-03-13 at 22:28.