[comp.sources.misc] v16i024: ECU async comm package rev 3.0 manual, Part03/03

wht@n4hgf (Warren Tucker) (01/05/91)

Submitted-by: Warren Tucker <wht@n4hgf>
Posting-number: Volume 16, Issue 24
Archive-name: ecuman3/part03

---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is ecuman3.03 (part 3 of ecuman3)
# do not concatenate these parts, unpack them in order with /bin/sh
# file doc/ecu.man continued
#
if touch 2>&1 | fgrep 'amc' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 3; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
echo 'x - continuing file doc/ecu.man'
sed 's/^X//' << 'SHAR_EOF' >> 'doc/ecu.man' &&
X    0030  61 63	6B					  | ack		     |
X
X	hexdump	%left($s0,9)
X    0000  54 68	65 20 71 75 69 63 6B			  | The	quick	     |
X
X	hexdump	-ts 'Example hex dump' %left($s0,9)
X    Example hex	dump
X    0000  54 68	65 20 71 75 69 63 6B | The quick |
X
X	hexdump	-s %left($s0,9)
X    0000  54 68	65 20 71 75 69 63 6B | The quick |
X
X
X
X    5.2.36  home
X
X    usage: home
X
X    This command homes the video cursor.
X
X
X    5.2.37  icolor
X
X    usage: icolor <int-colors>
X
X    This command sets the normal and reverse foreground	and background
X    colors according to	<int-colors>, an integer value in the format as	that
X    returned by	the %colors integer function.
X
X    This command is provided primarily to be able to save the color state,
X    modify it temporarily and then restore it.
X
X    Example:
X
X	mkvar $icolor_save; $icolor_save = %colors
X	color red; echo	'Connection seems to be	dead'
X	icolor $icolor_save # restore previous colors
X
X
X
X    5.2.38  ifi
X
X
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      65
X
X
X
X    usage: ifi <int> <rel-op> <int> <statement>
X	   ifi <int> <rel-op> <int>
X	       <statement>
X	   ifi <int> <rel-op> <int>
X	   {
X	       any kind	or number of statements
X	   }
X
X
X    This command selectively executes one or more statements based on a	test
X    of two integer quantities.	See the	description of the break, continue,
X    and	else commmands for examples of how the command is used.
X
X
X    5.2.39  ifs
X
X    usage: ifs <str> <rel-op> <str> <statement>
X	   ifs <int> <rel-op> <int>
X	       <statement>
X	   ifs <int> <rel-op> <int>
X	   {
X	       any kind	or number of statements
X	   }
X
X
X    This command selectively executes one or more statements based on a	test
X    of two string values.  See the description of the break, continue, and
X    else commmands and many other examples throughout the document, for
X    examples of	how the	command	is used.
X
X
X    5.2.40  lbreak
X
X    usage: lbreak
X
X    This command transmits a break to the remote system.
X
X
X    5.2.41  lgets
X
X
X    usage: lgets [-er] <strvar>	<t1-int> <t2-int> [<stop-str>]
X
X    -e echo received characters	to screen
X    -r raw read	(retain	carriage returns)
X
X
X    This command reads a string	from the attached communications line.
X    <t1-int> is	the number of tenths of	seconds	before timing out waiting
X    for	the first character to be received.  <t2-int> is the number of
X    tenths of seconds before timing out	on later characters.  <stop-str> is
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      66
X
X
X
X    an optional	argument, which	if received, immediately terminates the
X    read.  Integer variable $i0	is set to the count of characters received.
X
X    If the specified string variable is	filled with characters before the
X    <stop-str> has been	encountered or before a	timeout	occurs,	then the
X    command returns with $i0 set to the	maximum	size of	the variable.  Refer
X    to the section on string variables above and the section describing	the
X    mkvar command below	for information	on the size of string variables.
X
X
X    5.2.42  insline
X
X    usage: insline
X
X    This command inserts a line	onto the video screen at the current line.
X
X
X    5.2.43  logevent
X
X    usage: logevent <str>
X
X
X    This command writes	a log item to ~/.ecu/log.
X
X
X    Example:
X
X	$s0='/tmp/alm.log'
X	log 'appending alarm info to '+$s0
X
X    writes:
X    10-02-1989-17:39-01261-PROC	appending alarm	info to	/tmp/alm.log
X
X    assuming the transmitter process pid is 1261 and you are living in 1989.
X
X    5.2.44  lookfor
X
X    lookfor [-e] [quiet	| <str>] [<timeout-int>]
X
X    -e echo to screen while "looking"
X
X    This command is used to read from the attached commuications line until
X    one	of two user-specified conditions occurs.
X
X    The	'quiet'	option waits for the line to become quiet for the number of
X    tenths of seconds specified	 by <timeout-int>.
X
X    The	other option reads the line until <str>	is read	from the line or
X    until <timeout-int>	tenths of seconds elapses.  With this option,
X    integer variable $i0 is set	to 1 if	<str> is found within the timeout
X    period or 0	if not.
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      67
X
X
X
X    Examples:
X
X	lookfor	-e quiet 20   wait for quiet line for 2	secs
X	lookfor	'word:'	50    wait for 'word:' for up to 5 secs
X
X    5.2.45  mkvar
X
X    usage: mkvar [$]i<name>
X	   mkvar [$]s<name>(<size>)
X
X
X    This command creates one or	more named (temporary) integer or string
X    variables.	The variable type is determines	by the first character of
X    the	variable, which	must be	'i' or 's'.  The size of a string variable
X    must be specified via the <size> argument.	An optional '$'	may be
X    supplies for neatness, but may be omitted if desired.
X
X
X    5.2.45.1  Variable Names
X
X    The	names for created (named, temporary) variables consist of a dollar
X    sign ('$'),	an 'i' for integer or 's' for string and up to fifteen
X    characters from the	set [A-Za-z0-9_].
X
X    The	first character	after the 'i' or 's' in	<name> must be non-numeric.
X    '$sxyz' and	'$s_3xyz' are legal, but '$s3xyz' is not (it would be
X    interpreted	as '$s3' followed by the illegal command sequence 'xyz').
X
X    The	<name> space for integer and string variables are separate.  It	is
X    possible to	have an	integer	variable named '$ixyz' and a string variable
X    named '$sxyz'.
X
X
X    5.2.45.2  Variable Life and	Scope
X
X    The	life and scope of created variables is for the duration	of the
X    execution of the creating procedure.  Procedures called by the creating
X    procedure (by 'do')	can reference temporary	variables declared by a
X    previous procedure.	 When created, integer variables are set to zero and
X    string variables are set to	zero length.  These features differ from
X    numbered variables which retain their scope	and values at all times,
X    even when procedure	execution terminates and ECU returns to	interactive
X    mode.
X
X    Variables may be created by	the same name more than	once.  The latest
X    mkvar execution specifies the variable referenced.	Thus if	proc1
X    declares '$ixx' and	calls proc2 which also declares	'$ixx',	proc2's
X    variable is	distinct from proc1's and disappears when proc2	terminates,
X    thus making	proc1's	available to it	again, containing the same value as
X    it had at the time proc2 was called.
X
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      68
X
X
X
X    5.2.45.3  String Variable Size
X
X    The	maximum	value for <size> is 5120.  Regardless of the size specified
X    in the creation of a string	variable, ECU will expand it's size as
X    necessary up to the	5120 character maximum.
X
X
X    Examples:
X
X	mkvar i_count
X	mkvar $i_count
X	mkvar s20(20),s80(80),i_timeout,$i_colors
X
X
X
X    5.2.46  nap
X    usage: nap <int>
X	   nap -m <int>
X
X    This command suspends procedure execution for <int>	tenths of seconds if
X    -m is not specified.  If -m	is used, execution is suspended	for <int>
X    milliseconds.  Note: the actual period execution is	suspended depends,
X    as usual, on the scheduling	load of	the system.  For small -m values, be
X    aware that the granularity of the nap duration is set by the system, 20
X    milliseconds for XENIX 286 and 386,	10 milliseconds	for UNIX.
X
X    If you need	to know	the frequency of the system clock, something like
X
X	  $i0 =	%stoi(%getenv("HZ"))
X
X    will obatin	the value for you (provided HZ is in the process'
X    environment).
X
X
X
X    Examples:
X
X	nap 30
X	nap $i0*$i2
X	    nap	-m 50
X
X
X
X    5.2.47  parity
X
X    usage: parity [even	| odd |	none]
X	   parity <str>
X
X
X    This command sets the parity for the attached communications line.	If
X    <str> is supplied, the first character must	be 'e',	'o' or 'n'.
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      69
X
X
X
X    Uppercase equivalents are also accepted.
X
X
X    Examples:
X
X	parity even
X	parity 'e'
X	parity 'Even now as we speak'
X
X
X
X    5.2.48  pclose
X    usage: pclose <filenum>
X
X    This command should	be issued when a command started by the	interactive
X    popen commandf completes.
X
X
X    5.2.49  plog
X
X    usage: plog
X	   plog	<str>
X	   plog	off
X
X
X    This command controls logging to a file of the screen output during
X    procedure execution.  With no argument, the	command	displays the status
X    of logging.	 <str> specifies a log file pathname, while the	'off'
X    argument turns logging off.
X
X    If procedure execution terminates due to an	error, procedure logging is
X    turned off.	 However, if procedure execution terminates normally while
X    logging is active, erratic and unpredictable portions of interactive
X    mode screen	output will continue to	be logged to the current log file.
X
X    The	interactive mode command plog may also be used to control procedure
X    logging.
X
X    Example:
X
X	mkvar s_logname(128)
X	$s_logname = %dir+'logname'
X	plog $s_logname
X	echo 'Test'
X	plog off;cd 'somewhere_else';plog $s_logname
X	echo 'Test'
X
X
X
X
X
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      70
X
X
X
X    5.2.50  popen
X    usage: popen [-switches] <filenum> <command>
X
X    This command executes a shell command defined by the string	argument
X    <command> and associates it	with the user-chosen file number <filenum>
X    (which must	be an integer value between 0 and 4, inclusive).
X
X    The	argument switches govern whether the command is	to receive input
X    from ECU or	output to ECU and must be chosen from this list:
X
X	-r	   The command will output to ECU.
X
X	-w	   The command will receive input from ECU.
X
X    The	switches parameter may be omitted; in such cases, the file is opened
X    as though '-r' had been supplied.  However,	if procedure tracing is
X    enabled (see the description of the	interactive and	procedure command
X    ptrace), a warning message will be issued.
X
X    The	command	sets $i0 = 0 if	successful, else to the	errno from the
X    associated system call (refer to the %errstr string	function and/or
X    /usr/include/sys/errno.h).
X
X    Example:
X
X	popen 0	-r 'ls -l *.log'
X	popen 1	-w 'cat	| sort > /tmp/sorted'
X
X
X
X
X    5.2.51  prompt
X    usage: prompt <str>
X
X    This command allows	selection of an	alternate prompt to the	interactive
X    mode HOME command trigger.	Refer to the section titled "ECUPROMPT"	for
X    more information on	the interactive	mode prompt.
X
X    Note: the interactive and procedure	hangup commands	both cause the
X    default prompt to be reestablished.
X
X
X    Example:
X
X	 prompt	%rname+' >'    use remote name in prompt
X
X
X
X    5.2.52  ptrace
X
X
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      71
X
X
X
X    usage: ptrace [ <str> | off	]
X
X
X    This command controls procedure execution tracing.	Trace output is
X    written to the screen and varys in its nature depending upon the command
X    being traced.  Specifically, any change to a string	or integer variable
X    is noted.  If tracing is enabled, the output will also be written to any
X    active procedure log file (see the plog interactive	and procedure
X    commands).
X
X
X    5.2.53  putf
X
X    Not	yet implemented.
X
X
X    5.2.54  return
X    usage: return [<int>]
X
X    This command serves	two functions: to return from a	gosub to or return
X    from a procedure execution.
X
X    If no gosub	is active, return causes the currently executing procedure
X    to terminate, returning either to a	calling	procedure or to	the
X    interactive	mode.  If <int>	is supplied and	it's value is nonzero, then
X    all	procedure execution is terminated and the integer status is printed
X    on the screen along	with the name of the executing procedure.
X
X    If a gosub is active, return or return 0 causes control to return to the
X    statement immediately following the	gosub which invoked the	subroutine.
X    If <int> is	supplied and it's value	is nonzero, then all procedure
X    execution is terminated and	the integer status is printed on the screen
X    along with the name	of the executing procedure.
X
X    It is not possible to terminate a procedure	with normal status from
X    within a subroutine.
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      72
X
X
X
X    Example:
X
X    #---------------------
X    # gosub.ep
X    #---------------------
X	echo 'main'; gosub SUB;	echo 'back to main'
X	return
X
X    SUB
X	echo 'sub'
X	gosub SUB2
X	echo 'back to sub'
X	return
X
X
X    SUB2
X	echo 'sub2'
X	return
X
X
X
X
X    5.2.55  rk
X    usage: rk [-a]
X
X    This command invokes the Kermit file receive protocol.  If switch '-a'
X    is omitted,	the received files are stored as received; otherwise
X    carriage return/linefeed pairs are converted to newlines.  The remote
X    sender must	have been started prior	the the	execution of this command.
X
X
X    5.2.56  rname
X    usage: rname <str>
X
X    Normally, the %rname string	function returns the same string as the
X    logical dialing directory entry.  This command allows the default value
X    to be overridden with a user-selected value	(63-character maximum).
X
X    This feature is useful in situations where one system is initially
X    dialed, but	a connection is	made to	yet another system from	the dialed
X    system via networking.
X
X
X    5.2.57  rs
X    usage: rs
X
X    This command invokes the SEAlink file receive protocol.  There is no
X    provision in the SEAlink protocol to convert carriage return/linefeed
X    pairs to newlines, so the received files are stored	as received.  The
X    remote sender must have been started prior the the execution of this
X    command.
X
X
X
X    Public Domain by wht@n4hgf				12/26/90
X
X
X
X
X
X
X
X    ECU	Technical Description				      73
X
X
X
X    5.2.58  rtscts
X    usage: rtscts [ off| on | no | yes | 0 | 1 | 2 | 3 ]
X
X    This command control RTS/CTS hardware flow control,	which may or may not
X    work with your serial driver.  What	the command does is to manipulate
X    the	RTSFLOW	and CTSFLOW bits of the	termio c_cflag word (see termio(S)).
X
X	 ********************
X	 ERROR:(0)input	line 3773:DS:missing DE
X	 ********************
X********************
XERROR:(0)input line 3773:DS:missing DE
X********************
XProcessing has been terminated.
SHAR_EOF
echo 'File doc/ecu.man is complete' &&
$TOUCH -am 1226042690 'doc/ecu.man' &&
chmod 0644 doc/ecu.man ||
echo 'restore of doc/ecu.man failed'
Wc_c="`wc -c < 'doc/ecu.man'`"
test 119841 -eq "$Wc_c" ||
	echo 'doc/ecu.man: original size 119841, current size' "$Wc_c"
rm -f _shar_seq_.tmp
echo You have unpacked the last part
exit 0
--------------------------------------------------------------------
Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
Hacker Extraordinaire  d' async PADs,  pods,  proteins and protocols

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.