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

📄 wtx.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<html><head><!-- /vobs/wpwr/docs/tornado-api/wtxc/wtx.html - generated by refgen from wtx.c --> <title> wtx </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado API Reference :  WTX C Library</i></a></p></blockquote><h1>wtx</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>wtx</strong> - WTX C library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./wtx.html#wtxToolAttach">wtxToolAttach</a></i>(&nbsp;)</b>  -  connect a WTX client to the target server<br><b><i><a href="./wtx.html#wtxToolConnected">wtxToolConnected</a></i>(&nbsp;)</b>  -  check to see if a tool is connected to a target server<br><b><i><a href="./wtx.html#wtxToolDetach">wtxToolDetach</a></i>(&nbsp;)</b>  -  detach from the target server<br><b><i><a href="./wtx.html#wtxInitialize">wtxInitialize</a></i>(&nbsp;)</b>  -  initialization routine to be called by the WTX client<br><b><i><a href="./wtx.html#wtxTerminate">wtxTerminate</a></i>(&nbsp;)</b>  -  terminate the use of a WTX client handle<br><b><i><a href="./wtx.html#wtxErrSet">wtxErrSet</a></i>(&nbsp;)</b>  -  set the error code for the handle<br><b><i><a href="./wtx.html#wtxErrGet">wtxErrGet</a></i>(&nbsp;)</b>  -  return the last error for a handle<br><b><i><a href="./wtx.html#wtxErrHandlerAdd">wtxErrHandlerAdd</a></i>(&nbsp;)</b>  -  add an error handler for the WTX handle<br><b><i><a href="./wtx.html#wtxErrHandlerRemove">wtxErrHandlerRemove</a></i>(&nbsp;)</b>  -  remove an error handler from the WTX handle<br><b><i><a href="./wtx.html#wtxErrDispatch">wtxErrDispatch</a></i>(&nbsp;)</b>  -  dispatch an error with supplied code for the given handle<br><b><i><a href="./wtx.html#wtxErrMsgGet">wtxErrMsgGet</a></i>(&nbsp;)</b>  -  fetch the last network WTX API error string<br><b><i><a href="./wtx.html#wtxErrToMsg">wtxErrToMsg</a></i>(&nbsp;)</b>  -  convert an WTX error code to a descriptive string<br><b><i><a href="./wtx.html#wtxErrClear">wtxErrClear</a></i>(&nbsp;)</b>  -  explicitly clear any error status for the tool<br><b><i><a href="./wtx.html#wtxErrExceptionFunc">wtxErrExceptionFunc</a></i>(&nbsp;)</b>  -  a function to handle an error using <b><i><a href="../../vxworks/ref/ansiSetjmp.html#longjmp" >longjmp</a></i>(&nbsp;)</b><br><b><i><a href="./wtx.html#wtxClientDataGet">wtxClientDataGet</a></i>(&nbsp;)</b>  -  get the client data associated with the WTX handle<br><b><i><a href="./wtx.html#wtxClientDataSet">wtxClientDataSet</a></i>(&nbsp;)</b>  -  set the client data associated with the WTX handle<br><b><i><a href="./wtx.html#wtxAgentModeGet">wtxAgentModeGet</a></i>(&nbsp;)</b>  -  get the mode of the target agent<br><b><i><a href="./wtx.html#wtxAgentModeSet">wtxAgentModeSet</a></i>(&nbsp;)</b>  -  set the mode of the target agent<br><b><i><a href="./wtx.html#wtxAsyncNotifyEnable">wtxAsyncNotifyEnable</a></i>(&nbsp;)</b>  -  start the asynchronous event notification<br><b><i><a href="./wtx.html#wtxAsyncNotifyDisable">wtxAsyncNotifyDisable</a></i>(&nbsp;)</b>  -  stop the asynchronous event notification<br><b><i><a href="./wtx.html#wtxBreakpointAdd">wtxBreakpointAdd</a></i>(&nbsp;)</b>  -  create a new WTX eventpoint of type breakpoint<br><b><i><a href="./wtx.html#wtxCacheTextUpdate">wtxCacheTextUpdate</a></i>(&nbsp;)</b>  -  synchronize the instruction and data caches.<br><b><i><a href="./wtx.html#wtxCommandSend">wtxCommandSend</a></i>(&nbsp;)</b>  -  Pass a string to be interpreted by the target server<br><b><i><a href="./wtx.html#wtxTargetIpAddressGet">wtxTargetIpAddressGet</a></i>(&nbsp;)</b>  -  gets target IP address.<br><b><i><a href="./wtx.html#wtxCpuInfoGet">wtxCpuInfoGet</a></i>(&nbsp;)</b>  -  gets cpu related information from architecturedb file<br><b><i><a href="./wtx.html#wtxEventpointAdd">wtxEventpointAdd</a></i>(&nbsp;)</b>  -  create a new WTX eventpoint<br><b><i><a href="./wtx.html#wtxEventpointDelete">wtxEventpointDelete</a></i>(&nbsp;)</b>  -  delete an eventpoint from the target<br><b><i><a href="./wtx.html#wtxConsoleCreate">wtxConsoleCreate</a></i>(&nbsp;)</b>  -  create a console window (UNIX only)<br><b><i><a href="./wtx.html#wtxConsoleKill">wtxConsoleKill</a></i>(&nbsp;)</b>  -  destroy a console (UNIX only)<br><b><i><a href="./wtx.html#wtxContextCont">wtxContextCont</a></i>(&nbsp;)</b>  -  continue execution of a target context<br><b><i><a href="./wtx.html#wtxContextCreate">wtxContextCreate</a></i>(&nbsp;)</b>  -  create a new context on the target<br><b><i><a href="./wtx.html#wtxContextResume">wtxContextResume</a></i>(&nbsp;)</b>  -  resume execution of a target context<br><b><i><a href="./wtx.html#wtxContextStatusGet">wtxContextStatusGet</a></i>(&nbsp;)</b>  -  get the status of a context on the target<br><b><i><a href="./wtx.html#wtxContextExitNotifyAdd">wtxContextExitNotifyAdd</a></i>(&nbsp;)</b>  -  add a context exit notification eventpoint<br><b><i><a href="./wtx.html#wtxContextKill">wtxContextKill</a></i>(&nbsp;)</b>  -  kill a target context<br><b><i><a href="./wtx.html#wtxContextStep">wtxContextStep</a></i>(&nbsp;)</b>  -  single step execution of a target context<br><b><i><a href="./wtx.html#wtxContextSuspend">wtxContextSuspend</a></i>(&nbsp;)</b>  -  suspend a target context<br><b><i><a href="./wtx.html#wtxEventAdd">wtxEventAdd</a></i>(&nbsp;)</b>  -  send an event to the target server<br><b><i><a href="./wtx.html#wtxEventGet">wtxEventGet</a></i>(&nbsp;)</b>  -  get an event from the target<br><b><i><a href="./wtx.html#wtxEventListGet">wtxEventListGet</a></i>(&nbsp;)</b>  -  get all the events in one call.<br><b><i><a href="./wtx.html#wtxEventpointList">wtxEventpointList</a></i>(&nbsp;)</b>  -  list eventpoints on the target server<br><b><i><a href="./wtx.html#wtxEventpointListGet">wtxEventpointListGet</a></i>(&nbsp;)</b>  -  list eventpoints on the target server<br><b><i><a href="./wtx.html#wtxFileClose">wtxFileClose</a></i>(&nbsp;)</b>  -  close a file on the target server<br><b><i><a href="./wtx.html#wtxFileOpen">wtxFileOpen</a></i>(&nbsp;)</b>  -  open a file on the target server<br><b><i><a href="./wtx.html#wtxHwBreakpointAdd">wtxHwBreakpointAdd</a></i>(&nbsp;)</b>  -  create a new WTX eventpoint of type hardware breakpoint<br><b><i><a href="./wtx.html#wtxSymListFree">wtxSymListFree</a></i>(&nbsp;)</b>  -  free memory used to store symbols in a list<br><b><i><a href="./wtx.html#wtxResultFree">wtxResultFree</a></i>(&nbsp;)</b>  -  free the memory used by a WTX API call result<br><b><i><a href="./wtx.html#wtxGopherEval">wtxGopherEval</a></i>(&nbsp;)</b>  -  evaluate a Gopher string on the target <br><b><i><a href="./wtx.html#wtxLogging">wtxLogging</a></i>(&nbsp;)</b>  -  WDB / WTX requests logging controls<br><b><i><a href="./wtx.html#wtxMemInfoGet">wtxMemInfoGet</a></i>(&nbsp;)</b>  -  get information about the target-server-managed memory pool<br><b><i><a href="./wtx.html#wtxMemAlloc">wtxMemAlloc</a></i>(&nbsp;)</b>  -  allocate a block of memory to the TS-managed target memory pool<br><b><i><a href="./wtx.html#wtxMemChecksum">wtxMemChecksum</a></i>(&nbsp;)</b>  -  perform a checksum on target memory<br><b><i><a href="./wtx.html#wtxMemMove">wtxMemMove</a></i>(&nbsp;)</b>  -  move a block of target memory<br><b><i><a href="./wtx.html#wtxMemFree">wtxMemFree</a></i>(&nbsp;)</b>  -  free a block of target memory<br><b><i><a href="./wtx.html#wtxMemRead">wtxMemRead</a></i>(&nbsp;)</b>  -  read memory from the target<br><b><i><a href="./wtx.html#wtxMemWidthRead">wtxMemWidthRead</a></i>(&nbsp;)</b>  -  read memory from the target<br><b><i><a href="./wtx.html#wtxMemWrite">wtxMemWrite</a></i>(&nbsp;)</b>  -  write memory on the target<br><b><i><a href="./wtx.html#wtxMemWidthWrite">wtxMemWidthWrite</a></i>(&nbsp;)</b>  -  write memory on the target<br><b><i><a href="./wtx.html#wtxMemSet">wtxMemSet</a></i>(&nbsp;)</b>  -  set target memory to a given value<br><b><i><a href="./wtx.html#wtxMemAddToPool">wtxMemAddToPool</a></i>(&nbsp;)</b>  -  add memory to the agent pool<br><b><i><a href="./wtx.html#wtxMemRealloc">wtxMemRealloc</a></i>(&nbsp;)</b>  -  reallocate a block of target memory<br><b><i><a href="./wtx.html#wtxMemAlign">wtxMemAlign</a></i>(&nbsp;)</b>  -  allocate aligned target memory<br><b><i><a href="./wtx.html#wtxMemScan">wtxMemScan</a></i>(&nbsp;)</b>  -  scan target memory for the presence or absence of a pattern<br><b><i><a href="./wtx.html#wtxObjModuleChecksum">wtxObjModuleChecksum</a></i>(&nbsp;)</b>  -  checks validity of target memory.<br><b><i><a href="./wtx.html#wtxObjModuleFindId">wtxObjModuleFindId</a></i>(&nbsp;)</b>  -  find the ID of an object module given its name<br><b><i><a href="./wtx.html#wtxObjModuleFindName">wtxObjModuleFindName</a></i>(&nbsp;)</b>  -  find object module name given its ID<br><b><i><a href="./wtx.html#wtxObjModuleInfoGet">wtxObjModuleInfoGet</a></i>(&nbsp;)</b>  -  return information on a module given its module ID<br><b><i><a href="./wtx.html#wtxObjModuleInfoAndPathGet">wtxObjModuleInfoAndPathGet</a></i>(&nbsp;)</b>  -  return information on a module given its ID<br><b><i><a href="./wtx.html#wtxObjModuleList">wtxObjModuleList</a></i>(&nbsp;)</b>  -  fetch a list of loaded object modules from the target<br><b><i><a href="./wtx.html#wtxObjModuleLoad">wtxObjModuleLoad</a></i>(&nbsp;)</b>  -  Load a multiple section object file<br><b><i><a href="./wtx.html#wtxObjModuleLoadStart">wtxObjModuleLoadStart</a></i>(&nbsp;)</b>  -  Load a multiple section object file asynchronously<br><b><i><a href="./wtx.html#wtxObjModuleLoadProgressReport">wtxObjModuleLoadProgressReport</a></i>(&nbsp;)</b>  -  get the asynchronous load status<br><b><i><a href="./wtx.html#wtxObjModuleLoadCancel">wtxObjModuleLoadCancel</a></i>(&nbsp;)</b>  -  Stop an asynchronous load request<br><b><i><a href="./wtx.html#wtxObjModuleUnload">wtxObjModuleUnload</a></i>(&nbsp;)</b>  -  unload an object module from the target<br><b><i><a href="./wtx.html#wtxObjModuleByNameUnload">wtxObjModuleByNameUnload</a></i>(&nbsp;)</b>  -  unload an object module from the target<br><b><i><a href="./wtx.html#wtxRegisterForEvent">wtxRegisterForEvent</a></i>(&nbsp;)</b>  -  ask the WTX server to send events matching a regexp<br><b><i><a href="./wtx.html#wtxRegsGet">wtxRegsGet</a></i>(&nbsp;)</b>  -  read register data from the target<br><b><i><a href="./wtx.html#wtxRegsSet">wtxRegsSet</a></i>(&nbsp;)</b>  -  write to registers on the target<br><b><i><a href="./wtx.html#wtxStrToTgtAddr">wtxStrToTgtAddr</a></i>(&nbsp;)</b>  -  convert a string argument to a <b>TGT_ADDR_T</b> value<br><b><i><a href="./wtx.html#wtxStrToContextId">wtxStrToContextId</a></i>(&nbsp;)</b>  -  convert a string argument to a <b>WTX_CONTEXT_ID_T</b><br><b><i><a href="./wtx.html#wtxStrToContextType">wtxStrToContextType</a></i>(&nbsp;)</b>  -  convert a string argument to a <b>WTX_CONTEXT_TYPE</b> value<br><b><i><a href="./wtx.html#wtxStrToInt32">wtxStrToInt32</a></i>(&nbsp;)</b>  -  convert a string argument to an INT32 value<br><b><i><a href="./wtx.html#wtxStrToEventType">wtxStrToEventType</a></i>(&nbsp;)</b>  -  convert a string to a WTX event enumeration type<br><b><i><a href="./wtx.html#wtxEventToStrType">wtxEventToStrType</a></i>(&nbsp;)</b>  -  convert a WTX event enumeration type to a string<br><b><i><a href="./wtx.html#wtxServiceAdd">wtxServiceAdd</a></i>(&nbsp;)</b>  -  add a new service to the agent<br><b><i><a href="./wtx.html#wtxSymAdd">wtxSymAdd</a></i>(&nbsp;)</b>  -  add a symbol with the given name, value, and type<br><b><i><a href="./wtx.html#wtxSymAddWithGroup">wtxSymAddWithGroup</a></i>(&nbsp;)</b>  -  add a symbol with the given name, value, type and group<br><b><i><a href="./wtx.html#wtxSymFind">wtxSymFind</a></i>(&nbsp;)</b>  -  find information on a symbol given its name or value<br><b><i><a href="./wtx.html#wtxSymListGet">wtxSymListGet</a></i>(&nbsp;)</b>  -  get a list of symbols matching the given search criteria<br><b><i><a href="./wtx.html#wtxSymListByModuleIdGet">wtxSymListByModuleIdGet</a></i>(&nbsp;)</b>  -  get a list of symbols given a module Id<br><b><i><a href="./wtx.html#wtxSymListByModuleNameGet">wtxSymListByModuleNameGet</a></i>(&nbsp;)</b>  -  get a list of symbols given a module name<br><b><i><a href="./wtx.html#wtxSymRemove">wtxSymRemove</a></i>(&nbsp;)</b>  -  remove a symbol from the default target server symbol table<br><b><i><a href="./wtx.html#wtxSymTblInfoGet">wtxSymTblInfoGet</a></i>(&nbsp;)</b>  -  return information about the target server symbol table<br><b><i><a href="./wtx.html#wtxTargetReset">wtxTargetReset</a></i>(&nbsp;)</b>  -  reset the target <br><b><i><a href="./wtx.html#wtxTsNameGet">wtxTsNameGet</a></i>(&nbsp;)</b>  -  get the full name of the currently attached target server<br><b><i><a href="./wtx.html#wtxTargetRtTypeGet">wtxTargetRtTypeGet</a></i>(&nbsp;)</b>  -  get the target-runtime-type information<br><b><i><a href="./wtx.html#wtxTargetRtVersionGet">wtxTargetRtVersionGet</a></i>(&nbsp;)</b>  -  get the target-runtime-version information<br><b><i><a href="./wtx.html#wtxTargetCpuTypeGet">wtxTargetCpuTypeGet</a></i>(&nbsp;)</b>  -  get the target CPU type code<br><b><i><a href="./wtx.html#wtxTargetHasFppGet">wtxTargetHasFppGet</a></i>(&nbsp;)</b>  -  check if the target has a floating point processor<br><b><i><a href="./wtx.html#wtxTargetEndianGet">wtxTargetEndianGet</a></i>(&nbsp;)</b>  -  get the endianness of the target CPU<br><b><i><a href="./wtx.html#wtxTargetBootlineGet">wtxTargetBootlineGet</a></i>(&nbsp;)</b>  -  get the target bootline information string<br><b><i><a href="./wtx.html#wtxTargetBspNameGet">wtxTargetBspNameGet</a></i>(&nbsp;)</b>  -  get the target board-support-package name string<br><b><i><a href="./wtx.html#wtxToolNameGet">wtxToolNameGet</a></i>(&nbsp;)</b>  -  return the name of the current tool<br><b><i><a href="./wtx.html#wtxTsVersionGet">wtxTsVersionGet</a></i>(&nbsp;)</b>  -  return the Tornado version<br><b><i><a href="./wtx.html#wtxTsKill">wtxTsKill</a></i>(&nbsp;)</b>  -  kill the target server<br><b><i><a href="./wtx.html#wtxTsRestart">wtxTsRestart</a></i>(&nbsp;)</b>  -  restart the target server<br><b><i><a href="./wtx.html#wtxUnregisterForEvent">wtxUnregisterForEvent</a></i>(&nbsp;)</b>  -  ask the target server to not send events matching<br><b><i><a href="./wtx.html#wtxFuncCall">wtxFuncCall</a></i>(&nbsp;)</b>  -  call a function on the target<br><b><i><a href="./wtx.html#wtxDirectCall">wtxDirectCall</a></i>(&nbsp;)</b>  -  call a function on the target within the agent<br><b><i><a href="./wtx.html#wtxTsInfoGet">wtxTsInfoGet</a></i>(&nbsp;)</b>  -  get information about the target server, the target, and the link to the target<br><b><i><a href="./wtx.html#wtxTsLock">wtxTsLock</a></i>(&nbsp;)</b>  -  lock the connected target server for exclusive access<br><b><i><a href="./wtx.html#wtxTsTimedLock">wtxTsTimedLock</a></i>(&nbsp;)</b>  -  lock the connected target server a limited time<br><b><i><a href="./wtx.html#wtxTsUnlock">wtxTsUnlock</a></i>(&nbsp;)</b>  -  unlock the connected target server<br><b><i><a href="./wtx.html#wtxVerify">wtxVerify</a></i>(&nbsp;)</b>  -  verify that a WTX handle is valid for use<br><b><i><a href="./wtx.html#wtxVioChanGet">wtxVioChanGet</a></i>(&nbsp;)</b>  -  get a virtual I/O channel number<br><b><i><a href="./wtx.html#wtxVioChanRelease">wtxVioChanRelease</a></i>(&nbsp;)</b>  -  release a virtual I/O channel<br><b><i><a href="./wtx.html#wtxVioCtl">wtxVioCtl</a></i>(&nbsp;)</b>  -  perform a control operation on a virtual I/O channel<br><b><i><a href="./wtx.html#wtxVioFileList">wtxVioFileList</a></i>(&nbsp;)</b>  -  list the files managed by the target server<br><b><i><a href="./wtx.html#wtxVioWrite">wtxVioWrite</a></i>(&nbsp;)</b>  -  write data to a VIO channel<br><b><i><a href="./wtx.html#wtxTargetAttach">wtxTargetAttach</a></i>(&nbsp;)</b>  -  reattach to the target<br><b><i><a href="./wtx.html#wtxProbe">wtxProbe</a></i>(&nbsp;)</b>  -  probe to see if the registry service is running<br><b><i><a href="./wtx.html#wtxRegister">wtxRegister</a></i>(&nbsp;)</b>  -  register the target server with the Tornado registry service<br><b><i><a href="./wtx.html#wtxUnregister">wtxUnregister</a></i>(&nbsp;)</b>  -  unregister the server with the Tornado registry<br><b><i><a href="./wtx.html#wtxInfo">wtxInfo</a></i>(&nbsp;)</b>  -  allocate and return a descriptor for the named service<br><b><i><a href="./wtx.html#wtxInfoQ">wtxInfoQ</a></i>(&nbsp;)</b>  -  return a list of all services registered with the Tornado registry<br><b><i><a href="./wtx.html#wtxEach">wtxEach</a></i>(&nbsp;)</b>  -  call a routine to examine each WTX-registered service<br><b><i><a href="./wtx.html#wtxTimeoutSet">wtxTimeoutSet</a></i>(&nbsp;)</b>  -  set the timeout for completion of WTX calls<br><b><i><a href="./wtx.html#wtxTimeoutGet">wtxTimeoutGet</a></i>(&nbsp;)</b>  -  get the current timeout for completion of WTX calls<br><b><i><a href="./wtx.html#wtxToolIdGet">wtxToolIdGet</a></i>(&nbsp;)</b>  -  return the tool identifier of the current tool<br><b><i><a href="./wtx.html#wtxMemDisassemble">wtxMemDisassemble</a></i>(&nbsp;)</b>  -  get disassembled instructions matching the given address<br><b><i><a href="./wtx.html#wtxAsyncEventGet">wtxAsyncEventGet</a></i>(&nbsp;)</b>  -  get an event from the asynchronous event list<br><b><i><a href="./wtx.html#wtxAsyncResultFree">wtxAsyncResultFree</a></i>(&nbsp;)</b>  -  free memory used by a <b><i><a href="./wtx.html#wtxAsyncEventGet">wtxAsyncEventGet</a></i>(&nbsp;)</b> call result<br><p></blockquote><h4>DESCRIPTION </h4><blockquote><p><p> This module implements a C-language transport-neutral interface to the WTX messaging protocol. <p>A tool must always call <b><i><a href="./wtx.html#wtxInitialize">wtxInitialize</a></i>(&nbsp;)</b> to initialize a handle that isused in all further WTX calls. The tool can then attach to a targetserver using a call to <b><i><a href="./wtx.html#wtxToolAttach">wtxToolAttach</a></i>(&nbsp;)</b>. Each WTX handle can only beconnected to one server at a time.  After a successful call of<b><i><a href="./wtx.html#wtxToolAttach">wtxToolAttach</a></i>(&nbsp;)</b>, the handle is considered bound to the specified targetserver until a call of <b><i><a href="./wtx.html#wtxToolDetach">wtxToolDetach</a></i>(&nbsp;)</b> is made; then the handle can be attached to a new target server.  When thehandle is no longer required, call <b><i><a href="./wtx.html#wtxTerminate">wtxTerminate</a></i>(&nbsp;)</b> to release anyinternal storage used by the handle. The handle must not be used after<b><i><a href="./wtx.html#wtxTerminate">wtxTerminate</a></i>(&nbsp;)</b> has been called.<p><pre>#include "wtx.h"    HWTX hWtx;    /* initialize WTX session handle */    if (wtxInitialize (&amp;hWtx) != WTX_OK)        return (WTX_ERROR);    /* attach to Target Server named "soubirou" */    if (wtxToolAttach (hWtx, "soubirou", "wtxApp") != WTX_OK)        return (WTX_ERROR);    /* register for events we want to hear about (all events here) */    if (wtxRegisterForEvent (hWtx, ".*") != WTX_OK)        {        wtxToolDetach (hWtx);        return (WTX_ERROR);        }    /* core of the WTX application */                   .                   .                   .                   .    /* detach form the Target Server */    wtxToolDetach (hWtx);    /* terminate WTX session */    wtxTerminate (hWtx);</pre>Most WTX calls return either a pointer value which is NULL on error or aSTATUS value which is <b>WTX_ERROR</b> if an error occurs.  A descriptive stringcan be obtained for the last error that occurred by calling<b><i><a href="./wtx.html#wtxErrMsgGet">wtxErrMsgGet</a></i>(&nbsp;)</b>.<p>Note that virtually all WTX calls can fail due to an error in the messagetransport layer used to carry out WTX requests.  Transport errors thatare non-recoverable result in the tool being detached from the serverand an error code of <b>WTX_ERR_API_TOOL_DISCONNECTED</b>. If a non-fatalerror occurs, <b>WTX_ERR_API_REQUEST_FAILED</b> is set, except in the case ofa timeout. In that case the error is <b>WTX_ERR_API_REQUEST_TIMED_OUT</b>. Inthe non-fatal cases, the call may be retried. In the fatal case, retrying thecall results in the error <b>WTX_ERR_API_NOT_CONNECTED</b>.<p>All API calls attempt to check the validity of the API handle provided.The error <b>WTX_ERR_API_INVALID_HANDLE</b> indicates a bad handle. Otherpointer arguments are checked and <b>WTX_ERR_API_INVALID_ARG</b> indicates abad argument value such as a NULL pointer.  API calls that require thehandle to be connected to a target server generate the<b>WTX_ERR_API_NOT_CONNECTED</b> error if the handle is not connected.<p>In addition to simple error return values, the C API allows errorhandlers to be installed on a per handle basis using<b><i><a href="./wtx.html#wtxErrHandlerAdd">wtxErrHandlerAdd</a></i>(&nbsp;)</b>.  If an error occurs, the last installedhandler is called first. If it returns a TRUE value, then anypreviously installed handlers are called in reverse order, in other words,last installed, first called.  The C API includes macros that use thepredefined error handler <b><i><a href="./wtx.html#wtxErrExceptionFunc">wtxErrExceptionFunc</a></i>(&nbsp;)</b> to support C++ styleexception catching.  Once an API handle has been initialized using<b><i>wtxInitiliaze</i>(&nbsp;)</b>, it can be used in the <b>WTX_TRY</b> macro to cause APIerrors to be treated like exceptions. When this is done, an API callthat would normally return an error code actually causes a jumpstraight to the nearest <b>catch</b> handler as specified using a <b>WTX_CATCH</b>or <b>WTX_CATCH_ALL</b> macro.  The previous example is shown below using thisstyle of error handling.<p><pre>#include "wtx.h"    HWTX hWtx;    /* initialize WTX session handle */    if (wtxInitialize (&amp;hWtx) != WTX_OK)        return (WTX_ERROR);    /* Start a block in which errors will be "caught" by a catch block */    WTX_TRY (hWtx)        {        /* attach to Target Server named "soubirou" */        wtxToolAttach (hWtx, "soubirou", "wtxApp");        /* register for events we want to hear about (all events here) */        wtxRegisterForEvent (hWtx, ".*");        /* core of the WTX application */                   .                   .                   .                   .        /* detach form the Target Server */        wtxToolDetach (hWtx);        }    /* Catch a specific error, WTX_ERR_API_NOT_CONNECTED */    WTX_CATCH (hWtx, WTX_ERR_API_NOT_CONNECTED)            {               fprintf (stderr, "Connection lost, exiting\n");            wtxTerminate (hWtx);            exit (0);

⌨️ 快捷键说明

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