home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume16 / ecuman3 / part03 < prev    next >
Internet Message Format  |  1991-01-05  |  17KB

  1. From: wht@n4hgf (Warren Tucker)
  2. Newsgroups: comp.sources.misc
  3. Subject: v16i024:  ECU async comm package rev 3.0 manual, Part03/03
  4. Message-ID: <1991Jan5.062536.3978@sparky.IMD.Sterling.COM>
  5. Date: 5 Jan 91 06:25:36 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: b52d3155 3f20e92e 1c45718d 88d74d25
  8.  
  9. Submitted-by: Warren Tucker <wht@n4hgf>
  10. Posting-number: Volume 16, Issue 24
  11. Archive-name: ecuman3/part03
  12.  
  13. ---- Cut Here and feed the following to sh ----
  14. #!/bin/sh
  15. # this is ecuman3.03 (part 3 of ecuman3)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file doc/ecu.man continued
  18. #
  19. if touch 2>&1 | fgrep 'amc' > /dev/null
  20.  then TOUCH=touch
  21.  else TOUCH=true
  22. fi
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 3; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. echo 'x - continuing file doc/ecu.man'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'doc/ecu.man' &&
  37. X    0030  61 63    6B                      | ack             |
  38. X
  39. X    hexdump    %left($s0,9)
  40. X    0000  54 68    65 20 71 75 69 63 6B              | The    quick         |
  41. X
  42. X    hexdump    -ts 'Example hex dump' %left($s0,9)
  43. X    Example hex    dump
  44. X    0000  54 68    65 20 71 75 69 63 6B | The quick |
  45. X
  46. X    hexdump    -s %left($s0,9)
  47. X    0000  54 68    65 20 71 75 69 63 6B | The quick |
  48. X
  49. X
  50. X
  51. X    5.2.36  home
  52. X
  53. X    usage: home
  54. X
  55. X    This command homes the video cursor.
  56. X
  57. X
  58. X    5.2.37  icolor
  59. X
  60. X    usage: icolor <int-colors>
  61. X
  62. X    This command sets the normal and reverse foreground    and background
  63. X    colors according to    <int-colors>, an integer value in the format as    that
  64. X    returned by    the %colors integer function.
  65. X
  66. X    This command is provided primarily to be able to save the color state,
  67. X    modify it temporarily and then restore it.
  68. X
  69. X    Example:
  70. X
  71. X    mkvar $icolor_save; $icolor_save = %colors
  72. X    color red; echo    'Connection seems to be    dead'
  73. X    icolor $icolor_save # restore previous colors
  74. X
  75. X
  76. X
  77. X    5.2.38  ifi
  78. X
  79. X
  80. X
  81. X
  82. X
  83. X    Public Domain by wht@n4hgf                12/26/90
  84. X
  85. X
  86. X
  87. X
  88. X
  89. X
  90. X
  91. X    ECU    Technical Description                      65
  92. X
  93. X
  94. X
  95. X    usage: ifi <int> <rel-op> <int> <statement>
  96. X       ifi <int> <rel-op> <int>
  97. X           <statement>
  98. X       ifi <int> <rel-op> <int>
  99. X       {
  100. X           any kind    or number of statements
  101. X       }
  102. X
  103. X
  104. X    This command selectively executes one or more statements based on a    test
  105. X    of two integer quantities.    See the    description of the break, continue,
  106. X    and    else commmands for examples of how the command is used.
  107. X
  108. X
  109. X    5.2.39  ifs
  110. X
  111. X    usage: ifs <str> <rel-op> <str> <statement>
  112. X       ifs <int> <rel-op> <int>
  113. X           <statement>
  114. X       ifs <int> <rel-op> <int>
  115. X       {
  116. X           any kind    or number of statements
  117. X       }
  118. X
  119. X
  120. X    This command selectively executes one or more statements based on a    test
  121. X    of two string values.  See the description of the break, continue, and
  122. X    else commmands and many other examples throughout the document, for
  123. X    examples of    how the    command    is used.
  124. X
  125. X
  126. X    5.2.40  lbreak
  127. X
  128. X    usage: lbreak
  129. X
  130. X    This command transmits a break to the remote system.
  131. X
  132. X
  133. X    5.2.41  lgets
  134. X
  135. X
  136. X    usage: lgets [-er] <strvar>    <t1-int> <t2-int> [<stop-str>]
  137. X
  138. X    -e echo received characters    to screen
  139. X    -r raw read    (retain    carriage returns)
  140. X
  141. X
  142. X    This command reads a string    from the attached communications line.
  143. X    <t1-int> is    the number of tenths of    seconds    before timing out waiting
  144. X    for    the first character to be received.  <t2-int> is the number of
  145. X    tenths of seconds before timing out    on later characters.  <stop-str> is
  146. X
  147. X
  148. X
  149. X    Public Domain by wht@n4hgf                12/26/90
  150. X
  151. X
  152. X
  153. X
  154. X
  155. X
  156. X
  157. X    ECU    Technical Description                      66
  158. X
  159. X
  160. X
  161. X    an optional    argument, which    if received, immediately terminates the
  162. X    read.  Integer variable $i0    is set to the count of characters received.
  163. X
  164. X    If the specified string variable is    filled with characters before the
  165. X    <stop-str> has been    encountered or before a    timeout    occurs,    then the
  166. X    command returns with $i0 set to the    maximum    size of    the variable.  Refer
  167. X    to the section on string variables above and the section describing    the
  168. X    mkvar command below    for information    on the size of string variables.
  169. X
  170. X
  171. X    5.2.42  insline
  172. X
  173. X    usage: insline
  174. X
  175. X    This command inserts a line    onto the video screen at the current line.
  176. X
  177. X
  178. X    5.2.43  logevent
  179. X
  180. X    usage: logevent <str>
  181. X
  182. X
  183. X    This command writes    a log item to ~/.ecu/log.
  184. X
  185. X
  186. X    Example:
  187. X
  188. X    $s0='/tmp/alm.log'
  189. X    log 'appending alarm info to '+$s0
  190. X
  191. X    writes:
  192. X    10-02-1989-17:39-01261-PROC    appending alarm    info to    /tmp/alm.log
  193. X
  194. X    assuming the transmitter process pid is 1261 and you are living in 1989.
  195. X
  196. X    5.2.44  lookfor
  197. X
  198. X    lookfor [-e] [quiet    | <str>] [<timeout-int>]
  199. X
  200. X    -e echo to screen while "looking"
  201. X
  202. X    This command is used to read from the attached commuications line until
  203. X    one    of two user-specified conditions occurs.
  204. X
  205. X    The    'quiet'    option waits for the line to become quiet for the number of
  206. X    tenths of seconds specified     by <timeout-int>.
  207. X
  208. X    The    other option reads the line until <str>    is read    from the line or
  209. X    until <timeout-int>    tenths of seconds elapses.  With this option,
  210. X    integer variable $i0 is set    to 1 if    <str> is found within the timeout
  211. X    period or 0    if not.
  212. X
  213. X
  214. X
  215. X    Public Domain by wht@n4hgf                12/26/90
  216. X
  217. X
  218. X
  219. X
  220. X
  221. X
  222. X
  223. X    ECU    Technical Description                      67
  224. X
  225. X
  226. X
  227. X    Examples:
  228. X
  229. X    lookfor    -e quiet 20   wait for quiet line for 2    secs
  230. X    lookfor    'word:'    50    wait for 'word:' for up to 5 secs
  231. X
  232. X    5.2.45  mkvar
  233. X
  234. X    usage: mkvar [$]i<name>
  235. X       mkvar [$]s<name>(<size>)
  236. X
  237. X
  238. X    This command creates one or    more named (temporary) integer or string
  239. X    variables.    The variable type is determines    by the first character of
  240. X    the    variable, which    must be    'i' or 's'.  The size of a string variable
  241. X    must be specified via the <size> argument.    An optional '$'    may be
  242. X    supplies for neatness, but may be omitted if desired.
  243. X
  244. X
  245. X    5.2.45.1  Variable Names
  246. X
  247. X    The    names for created (named, temporary) variables consist of a dollar
  248. X    sign ('$'),    an 'i' for integer or 's' for string and up to fifteen
  249. X    characters from the    set [A-Za-z0-9_].
  250. X
  251. X    The    first character    after the 'i' or 's' in    <name> must be non-numeric.
  252. X    '$sxyz' and    '$s_3xyz' are legal, but '$s3xyz' is not (it would be
  253. X    interpreted    as '$s3' followed by the illegal command sequence 'xyz').
  254. X
  255. X    The    <name> space for integer and string variables are separate.  It    is
  256. X    possible to    have an    integer    variable named '$ixyz' and a string variable
  257. X    named '$sxyz'.
  258. X
  259. X
  260. X    5.2.45.2  Variable Life and    Scope
  261. X
  262. X    The    life and scope of created variables is for the duration    of the
  263. X    execution of the creating procedure.  Procedures called by the creating
  264. X    procedure (by 'do')    can reference temporary    variables declared by a
  265. X    previous procedure.     When created, integer variables are set to zero and
  266. X    string variables are set to    zero length.  These features differ from
  267. X    numbered variables which retain their scope    and values at all times,
  268. X    even when procedure    execution terminates and ECU returns to    interactive
  269. X    mode.
  270. X
  271. X    Variables may be created by    the same name more than    once.  The latest
  272. X    mkvar execution specifies the variable referenced.    Thus if    proc1
  273. X    declares '$ixx' and    calls proc2 which also declares    '$ixx',    proc2's
  274. X    variable is    distinct from proc1's and disappears when proc2    terminates,
  275. X    thus making    proc1's    available to it    again, containing the same value as
  276. X    it had at the time proc2 was called.
  277. X
  278. X
  279. X
  280. X
  281. X    Public Domain by wht@n4hgf                12/26/90
  282. X
  283. X
  284. X
  285. X
  286. X
  287. X
  288. X
  289. X    ECU    Technical Description                      68
  290. X
  291. X
  292. X
  293. X    5.2.45.3  String Variable Size
  294. X
  295. X    The    maximum    value for <size> is 5120.  Regardless of the size specified
  296. X    in the creation of a string    variable, ECU will expand it's size as
  297. X    necessary up to the    5120 character maximum.
  298. X
  299. X
  300. X    Examples:
  301. X
  302. X    mkvar i_count
  303. X    mkvar $i_count
  304. X    mkvar s20(20),s80(80),i_timeout,$i_colors
  305. X
  306. X
  307. X
  308. X    5.2.46  nap
  309. X    usage: nap <int>
  310. X       nap -m <int>
  311. X
  312. X    This command suspends procedure execution for <int>    tenths of seconds if
  313. X    -m is not specified.  If -m    is used, execution is suspended    for <int>
  314. X    milliseconds.  Note: the actual period execution is    suspended depends,
  315. X    as usual, on the scheduling    load of    the system.  For small -m values, be
  316. X    aware that the granularity of the nap duration is set by the system, 20
  317. X    milliseconds for XENIX 286 and 386,    10 milliseconds    for UNIX.
  318. X
  319. X    If you need    to know    the frequency of the system clock, something like
  320. X
  321. X      $i0 =    %stoi(%getenv("HZ"))
  322. X
  323. X    will obatin    the value for you (provided HZ is in the process'
  324. X    environment).
  325. X
  326. X
  327. X
  328. X    Examples:
  329. X
  330. X    nap 30
  331. X    nap $i0*$i2
  332. X        nap    -m 50
  333. X
  334. X
  335. X
  336. X    5.2.47  parity
  337. X
  338. X    usage: parity [even    | odd |    none]
  339. X       parity <str>
  340. X
  341. X
  342. X    This command sets the parity for the attached communications line.    If
  343. X    <str> is supplied, the first character must    be 'e',    'o' or 'n'.
  344. X
  345. X
  346. X
  347. X    Public Domain by wht@n4hgf                12/26/90
  348. X
  349. X
  350. X
  351. X
  352. X
  353. X
  354. X
  355. X    ECU    Technical Description                      69
  356. X
  357. X
  358. X
  359. X    Uppercase equivalents are also accepted.
  360. X
  361. X
  362. X    Examples:
  363. X
  364. X    parity even
  365. X    parity 'e'
  366. X    parity 'Even now as we speak'
  367. X
  368. X
  369. X
  370. X    5.2.48  pclose
  371. X    usage: pclose <filenum>
  372. X
  373. X    This command should    be issued when a command started by the    interactive
  374. X    popen commandf completes.
  375. X
  376. X
  377. X    5.2.49  plog
  378. X
  379. X    usage: plog
  380. X       plog    <str>
  381. X       plog    off
  382. X
  383. X
  384. X    This command controls logging to a file of the screen output during
  385. X    procedure execution.  With no argument, the    command    displays the status
  386. X    of logging.     <str> specifies a log file pathname, while the    'off'
  387. X    argument turns logging off.
  388. X
  389. X    If procedure execution terminates due to an    error, procedure logging is
  390. X    turned off.     However, if procedure execution terminates normally while
  391. X    logging is active, erratic and unpredictable portions of interactive
  392. X    mode screen    output will continue to    be logged to the current log file.
  393. X
  394. X    The    interactive mode command plog may also be used to control procedure
  395. X    logging.
  396. X
  397. X    Example:
  398. X
  399. X    mkvar s_logname(128)
  400. X    $s_logname = %dir+'logname'
  401. X    plog $s_logname
  402. X    echo 'Test'
  403. X    plog off;cd 'somewhere_else';plog $s_logname
  404. X    echo 'Test'
  405. X
  406. X
  407. X
  408. X
  409. X
  410. X
  411. X
  412. X
  413. X    Public Domain by wht@n4hgf                12/26/90
  414. X
  415. X
  416. X
  417. X
  418. X
  419. X
  420. X
  421. X    ECU    Technical Description                      70
  422. X
  423. X
  424. X
  425. X    5.2.50  popen
  426. X    usage: popen [-switches] <filenum> <command>
  427. X
  428. X    This command executes a shell command defined by the string    argument
  429. X    <command> and associates it    with the user-chosen file number <filenum>
  430. X    (which must    be an integer value between 0 and 4, inclusive).
  431. X
  432. X    The    argument switches govern whether the command is    to receive input
  433. X    from ECU or    output to ECU and must be chosen from this list:
  434. X
  435. X    -r       The command will output to ECU.
  436. X
  437. X    -w       The command will receive input from ECU.
  438. X
  439. X    The    switches parameter may be omitted; in such cases, the file is opened
  440. X    as though '-r' had been supplied.  However,    if procedure tracing is
  441. X    enabled (see the description of the    interactive and    procedure command
  442. X    ptrace), a warning message will be issued.
  443. X
  444. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  445. X    associated system call (refer to the %errstr string    function and/or
  446. X    /usr/include/sys/errno.h).
  447. X
  448. X    Example:
  449. X
  450. X    popen 0    -r 'ls -l *.log'
  451. X    popen 1    -w 'cat    | sort > /tmp/sorted'
  452. X
  453. X
  454. X
  455. X
  456. X    5.2.51  prompt
  457. X    usage: prompt <str>
  458. X
  459. X    This command allows    selection of an    alternate prompt to the    interactive
  460. X    mode HOME command trigger.    Refer to the section titled "ECUPROMPT"    for
  461. X    more information on    the interactive    mode prompt.
  462. X
  463. X    Note: the interactive and procedure    hangup commands    both cause the
  464. X    default prompt to be reestablished.
  465. X
  466. X
  467. X    Example:
  468. X
  469. X     prompt    %rname+' >'    use remote name in prompt
  470. X
  471. X
  472. X
  473. X    5.2.52  ptrace
  474. X
  475. X
  476. X
  477. X
  478. X
  479. X    Public Domain by wht@n4hgf                12/26/90
  480. X
  481. X
  482. X
  483. X
  484. X
  485. X
  486. X
  487. X    ECU    Technical Description                      71
  488. X
  489. X
  490. X
  491. X    usage: ptrace [ <str> | off    ]
  492. X
  493. X
  494. X    This command controls procedure execution tracing.    Trace output is
  495. X    written to the screen and varys in its nature depending upon the command
  496. X    being traced.  Specifically, any change to a string    or integer variable
  497. X    is noted.  If tracing is enabled, the output will also be written to any
  498. X    active procedure log file (see the plog interactive    and procedure
  499. X    commands).
  500. X
  501. X
  502. X    5.2.53  putf
  503. X
  504. X    Not    yet implemented.
  505. X
  506. X
  507. X    5.2.54  return
  508. X    usage: return [<int>]
  509. X
  510. X    This command serves    two functions: to return from a    gosub to or return
  511. X    from a procedure execution.
  512. X
  513. X    If no gosub    is active, return causes the currently executing procedure
  514. X    to terminate, returning either to a    calling    procedure or to    the
  515. X    interactive    mode.  If <int>    is supplied and    it's value is nonzero, then
  516. X    all    procedure execution is terminated and the integer status is printed
  517. X    on the screen along    with the name of the executing procedure.
  518. X
  519. X    If a gosub is active, return or return 0 causes control to return to the
  520. X    statement immediately following the    gosub which invoked the    subroutine.
  521. X    If <int> is    supplied and it's value    is nonzero, then all procedure
  522. X    execution is terminated and    the integer status is printed on the screen
  523. X    along with the name    of the executing procedure.
  524. X
  525. X    It is not possible to terminate a procedure    with normal status from
  526. X    within a subroutine.
  527. X
  528. X
  529. X
  530. X
  531. X
  532. X
  533. X
  534. X
  535. X
  536. X
  537. X
  538. X
  539. X
  540. X
  541. X
  542. X
  543. X
  544. X
  545. X    Public Domain by wht@n4hgf                12/26/90
  546. X
  547. X
  548. X
  549. X
  550. X
  551. X
  552. X
  553. X    ECU    Technical Description                      72
  554. X
  555. X
  556. X
  557. X    Example:
  558. X
  559. X    #---------------------
  560. X    # gosub.ep
  561. X    #---------------------
  562. X    echo 'main'; gosub SUB;    echo 'back to main'
  563. X    return
  564. X
  565. X    SUB
  566. X    echo 'sub'
  567. X    gosub SUB2
  568. X    echo 'back to sub'
  569. X    return
  570. X
  571. X
  572. X    SUB2
  573. X    echo 'sub2'
  574. X    return
  575. X
  576. X
  577. X
  578. X
  579. X    5.2.55  rk
  580. X    usage: rk [-a]
  581. X
  582. X    This command invokes the Kermit file receive protocol.  If switch '-a'
  583. X    is omitted,    the received files are stored as received; otherwise
  584. X    carriage return/linefeed pairs are converted to newlines.  The remote
  585. X    sender must    have been started prior    the the    execution of this command.
  586. X
  587. X
  588. X    5.2.56  rname
  589. X    usage: rname <str>
  590. X
  591. X    Normally, the %rname string    function returns the same string as the
  592. X    logical dialing directory entry.  This command allows the default value
  593. X    to be overridden with a user-selected value    (63-character maximum).
  594. X
  595. X    This feature is useful in situations where one system is initially
  596. X    dialed, but    a connection is    made to    yet another system from    the dialed
  597. X    system via networking.
  598. X
  599. X
  600. X    5.2.57  rs
  601. X    usage: rs
  602. X
  603. X    This command invokes the SEAlink file receive protocol.  There is no
  604. X    provision in the SEAlink protocol to convert carriage return/linefeed
  605. X    pairs to newlines, so the received files are stored    as received.  The
  606. X    remote sender must have been started prior the the execution of this
  607. X    command.
  608. X
  609. X
  610. X
  611. X    Public Domain by wht@n4hgf                12/26/90
  612. X
  613. X
  614. X
  615. X
  616. X
  617. X
  618. X
  619. X    ECU    Technical Description                      73
  620. X
  621. X
  622. X
  623. X    5.2.58  rtscts
  624. X    usage: rtscts [ off| on | no | yes | 0 | 1 | 2 | 3 ]
  625. X
  626. X    This command control RTS/CTS hardware flow control,    which may or may not
  627. X    work with your serial driver.  What    the command does is to manipulate
  628. X    the    RTSFLOW    and CTSFLOW bits of the    termio c_cflag word (see termio(S)).
  629. X
  630. X     ********************
  631. X     ERROR:(0)input    line 3773:DS:missing DE
  632. X     ********************
  633. X********************
  634. XERROR:(0)input line 3773:DS:missing DE
  635. X********************
  636. XProcessing has been terminated.
  637. SHAR_EOF
  638. echo 'File doc/ecu.man is complete' &&
  639. $TOUCH -am 1226042690 'doc/ecu.man' &&
  640. chmod 0644 doc/ecu.man ||
  641. echo 'restore of doc/ecu.man failed'
  642. Wc_c="`wc -c < 'doc/ecu.man'`"
  643. test 119841 -eq "$Wc_c" ||
  644.     echo 'doc/ecu.man: original size 119841, current size' "$Wc_c"
  645. rm -f _shar_seq_.tmp
  646. echo You have unpacked the last part
  647. exit 0
  648. --------------------------------------------------------------------
  649. Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
  650. Hacker Extraordinaire  d' async PADs,  pods,  proteins and protocols
  651.  
  652. exit 0 # Just in case...
  653. -- 
  654. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  655. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  656. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  657. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  658.