⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usrlib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/usrLib.html - generated by refgen from usrLib.c --> <title> usrLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>usrLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>usrLib</strong> - user interface subroutine library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./usrLib.html#help">help</a>(&nbsp;)</b>  -  print a synopsis of selected routines<br><b><a href="./usrLib.html#netHelp">netHelp</a>(&nbsp;)</b>  -  print a synopsis of network routines<br><b><a href="./usrLib.html#bootChange">bootChange</a>(&nbsp;)</b>  -  change the boot line<br><b><a href="./usrLib.html#periodRun">periodRun</a>(&nbsp;)</b>  -  call a function periodically<br><b><a href="./usrLib.html#period">period</a>(&nbsp;)</b>  -  spawn a task to call a function periodically<br><b><a href="./usrLib.html#repeatRun">repeatRun</a>(&nbsp;)</b>  -  call a function repeatedly<br><b><a href="./usrLib.html#repeat">repeat</a>(&nbsp;)</b>  -  spawn a task to call a function repeatedly<br><b><a href="./usrLib.html#sp">sp</a>(&nbsp;)</b>  -  spawn a task with default parameters<br><b><a href="./usrLib.html#checkStack">checkStack</a>(&nbsp;)</b>  -  print a summary of each task's stack usage<br><b><a href="./usrLib.html#i">i</a>(&nbsp;)</b>  -  print a summary of each task's TCB<br><b><a href="./usrLib.html#ti">ti</a>(&nbsp;)</b>  -  print complete information from a task's TCB<br><b><a href="./usrLib.html#show">show</a>(&nbsp;)</b>  -  print information on a specified object<br><b><a href="./usrLib.html#ts">ts</a>(&nbsp;)</b>  -  suspend a task<br><b><a href="./usrLib.html#tr">tr</a>(&nbsp;)</b>  -  resume a task<br><b><a href="./usrLib.html#td">td</a>(&nbsp;)</b>  -  delete a task<br><b><a href="./usrLib.html#version">version</a>(&nbsp;)</b>  -  print VxWorks version information<br><b><a href="./usrLib.html#m">m</a>(&nbsp;)</b>  -  modify memory<br><b><a href="./usrLib.html#d">d</a>(&nbsp;)</b>  -  display memory<br><b><a href="./usrLib.html#ld">ld</a>(&nbsp;)</b>  -  load an object module into memory<br><b><a href="./usrLib.html#devs">devs</a>(&nbsp;)</b>  -  list all system-known devices<br><b><a href="./usrLib.html#lkup">lkup</a>(&nbsp;)</b>  -  list symbols<br><b><a href="./usrLib.html#lkAddr">lkAddr</a>(&nbsp;)</b>  -  list symbols whose values are near a specified value<br><b><a href="./usrLib.html#mRegs">mRegs</a>(&nbsp;)</b>  -  modify registers<br><b><a href="./usrLib.html#pc">pc</a>(&nbsp;)</b>  -  return the contents of the program counter<br><b><a href="./usrLib.html#printErrno">printErrno</a>(&nbsp;)</b>  -  print the definition of a specified error status value<br><b><a href="./usrLib.html#printLogo">printLogo</a>(&nbsp;)</b>  -  print the VxWorks logo<br><b><a href="./usrLib.html#logout">logout</a>(&nbsp;)</b>  -  log out of the VxWorks system<br><b><a href="./usrLib.html#h">h</a>(&nbsp;)</b>  -  display or set the size of shell history<br><b><a href="./usrLib.html#spyReport">spyReport</a>(&nbsp;)</b>  -  display task activity data<br><b><a href="./usrLib.html#spyTask">spyTask</a>(&nbsp;)</b>  -  run periodic task activity reports<br><b><a href="./usrLib.html#spy">spy</a>(&nbsp;)</b>  -  begin periodic task activity reports<br><b><a href="./usrLib.html#spyClkStart">spyClkStart</a>(&nbsp;)</b>  -  start collecting task activity data<br><b><a href="./usrLib.html#spyClkStop">spyClkStop</a>(&nbsp;)</b>  -  stop collecting task activity data<br><b><a href="./usrLib.html#spyStop">spyStop</a>(&nbsp;)</b>  -  stop spying and reporting<br><b><a href="./usrLib.html#spyHelp">spyHelp</a>(&nbsp;)</b>  -  display task monitoring help menu<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library consists of routines meant to be executed from the VxWorksshell.  It provides useful utilities for task monitoring and execution,system information, symbol table management, etc.<p>Many of the routines here are simply command-oriented interfaces to moregeneral routines contained elsewhere in VxWorks.  Users should feel freeto modify or extend this library, and may find it preferable to customizecapabilities by creating a new private library, using this one as a model,and appropriately linking the new one into the system.<p>Some routines here have optional parameters.  If those parameters are zero,which is what the shell supplies if no argument is typed, defaultvalues are typically assumed.<p>A number of the routines in this module take an optional task name or IDas an argument.  If this argument is omitted or zero, the "current" taskis used.  The current task (or "default" task) is the last taskreferenced.  The <b><a href="./usrLib.html#top">usrLib</a></b> library uses <b><a href="./taskInfo.html#taskIdDefault">taskIdDefault</a>(&nbsp;)</b> to set and get thelast-referenced task ID, as do many other VxWorks routines.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>usrLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrFsLib.html#top">usrFsLib</a></b>, <b><a href="./tarLib.html#top">tarLib</a></b>, <b><a href="./spyLib.html#top">spyLib</a></b>,<i>VxWorks Programmer's Guide: Target Shell, </i>windsh,<i>Tornado User's Guide: Shell </i><hr><a name="help"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>help(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>help(&nbsp;)</strong> - print a synopsis of selected routines</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void help (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command prints the following list of the calling sequences forcommonly used routines, mostly contained in <b><a href="./usrLib.html#top">usrLib</a></b>.<pre>help                       Print this listioHelp                     Print I/O utilities help infodbgHelp                    Print debug help infonfsHelp                    Print nfs help infonetHelp                    Print network help infospyHelp                    Print task histogrammer help infotimexHelp                  Print execution timer help infoh         [n]              Print (or set) shell historyi         [task]           Summary of tasks' TCBsti        task             Complete info on TCB for tasksp        adr,args...      Spawn a task, pri=100, opt=0x19, stk=20000taskSpawn name,pri,opt,stk,adr,args... Spawn a tasktd        task             Delete a taskts        task             Suspend a tasktr        task             Resume a taskd         [adr[,nunits[,width]]]   Display memorym         adr[,width]      Modify memorymRegs     [reg[,task]]     Modify a task's registers interactivelypc        [task]           Return task's program counterversion                    Print VxWorks version info, and boot lineiam     "user"[,"passwd"]  Set user name and passwdwhoami                     Print user namedevs                       List devicesld        [syms[,noAbort][,"name"]] Load std in into memory                             (syms = add symbols to table:                              -1 = none, 0 = globals, 1 = all)lkup      ["substr"]       List symbols in system symbol tablelkAddr    address          List symbol table entries near addresscheckStack  [task]         List task stack sizes and usageprintErrno  value          Print the name of a status valueperiod    secs,adr,args... Spawn task to call function periodicallyrepeat    n,adr,args...    Spawn task to call function n times                             (0=forever)NOTE:  Arguments specifying &lt;task&gt; can be either task ID or name.</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>,  <i>Tornado User's Guide: Shell</i><hr><a name="netHelp"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netHelp(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netHelp(&nbsp;)</strong> - print a synopsis of network routines</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void netHelp (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command prints a brief synopsis of network facilities that aretypically called from the shell.<pre>hostAdd      "hostname","inetaddr" - add a host to remote host table;                                     "inetaddr" must be in standard                                     Internet address format e.g. "90.0.0.4"hostShow                           - print current remote host tablenetDevCreate "devname","hostname",protocol                                   - create an I/O device to access                                     files on the specified host                                     (protocol 0=rsh, 1=ftp)routeAdd     "destaddr","gateaddr" - add route to route tablerouteDelete  "destaddr","gateaddr" - delete route from route tablerouteShow                          - print current route tableiam          "usr"[,"passwd"]      - specify the user name by which                                     you will be known to remote                                     hosts (and optional password)whoami                             - print the current remote IDrlogin       "host"                - log in to a remote host;                                     "host" can be inet address or                                     host name in remote host tableifShow       ["ifname"]            - show info about network interfacesinetstatShow                       - show all Internet protocol socketstcpstatShow                        - show statistics for TCPudpstatShow                        - show statistics for UDPipstatShow                         - show statistics for IPicmpstatShow                       - show statistics for ICMParptabShow                         - show a list of known ARP entriesmbufShow                           - show mbuf statisticsEXAMPLE:  -&gt; hostAdd "wrs", "90.0.0.2"          -&gt; netDevCreate "wrs:", "wrs", 0          -&gt; iam "fred"          -&gt; copy &lt;wrs:/etc/passwd   /* copy file from host "wrs" */          -&gt; rlogin "wrs"            /* rlogin to host "wrs"      */</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="bootChange"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>bootChange(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>bootChange(&nbsp;)</strong> - change the boot line</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void bootChange (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command changes the boot line used in the boot ROMs.  This is usefulduring a remote login session.  After changing the boot parameters, youcan reboot the target with the <b><a href="./rebootLib.html#reboot">reboot</a>(&nbsp;)</b> command, and then terminate yourlogin ( ~. ) and remotely log in again.  As soon as the system hasrebooted, you will be logged in again.<p>This command stores the new boot line in non-volatile RAM, if the targethas it.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>,  <i>Tornado User's Guide: Shell</i><hr><a name="periodRun"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>periodRun(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>periodRun(&nbsp;)</strong> - call a function periodically</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void periodRun    (    int     secs,             /* no. of seconds to delay between calls */    FUNCPTR func,             /* function to call repeatedly */    int     arg1,             /* first of eight args to pass to func */    int     arg2,    int     arg3,    int     arg4,    int     arg5,    int     arg6,    int     arg7,    int     arg8    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command repeatedly calls a specified function, with up to eight of itsarguments, delaying the specified number of seconds between calls.<p>Normally, this routine is called only by <b><a href="./usrLib.html#period">period</a>(&nbsp;)</b>, which spawnsit as a task.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./usrLib.html#period">period</a>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="period"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>period(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>period(&nbsp;)</strong> - spawn a task to call a function periodically</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int period    (    int     secs,             /* period in seconds */    FUNCPTR func,             /* function to call repeatedly */    int     arg1,             /* first of eight args to pass to func */    int     arg2,    int     arg3,    int     arg4,    int     arg5,    int     arg6,    int     arg7,    int     arg8    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command spawns a task that repeatedly calls a specified function,with up to eight of its arguments, delaying the specified number ofseconds between calls.<p>For example, to have <b><a href="./usrLib.html#i">i</a>(&nbsp;)</b> display task information every 5 seconds,just type:<pre>    -&gt; period 5, i</pre></blockquote><h4>NOTE</h4><blockquote><p>The task is spawned using the <b><a href="./usrLib.html#sp">sp</a>(&nbsp;)</b> routine.  See the descriptionof <b><a href="./usrLib.html#sp">sp</a>(&nbsp;)</b> for details about priority, options, stack size, and task ID.<p></blockquote><h4>RETURNS</h4><blockquote><p>A task ID, or ERROR if the task cannot be spawned.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./usrLib.html#periodRun">periodRun</a>(&nbsp;)</b>, <b><a href="./usrLib.html#sp">sp</a>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell,  </i><b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>,  <i>Tornado User's Guide: Shell</i><hr><a name="repeatRun"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>repeatRun(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>repeatRun(&nbsp;)</strong> - call a function repeatedly</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void repeatRun    (    int     n,                /* no. of times to call func (0=forever) */    FUNCPTR func,             /* function to call repeatedly */    int     arg1,             /* first of eight args to pass to func */    int     arg2,    int     arg3,    int     arg4,    int     arg5,    int     arg6,    int     arg7,    int     arg8    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command calls a specified function <i>n</i> times, with up to eight of itsarguments.  If <i>n</i> is 0, the routine is called endlessly.<p>Normally, this routine is called only by <b><a href="./usrLib.html#repeat">repeat</a>(&nbsp;)</b>, which spawns it as atask.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./usrLib.html#repeat">repeat</a>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="repeat"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>repeat(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>repeat(&nbsp;)</strong> - spawn a task to call a function repeatedly</p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -