1.5   Overview of Tornado APIs

A central feature of Tornado is the rich set of APIs that allow access to each level of the technology. These APIs are outlined here to provide a broad view of what options are available to developers who wish to extend the Tornado environment.

The easiest APIs to learn about are those based on Tcl, in part because of the interactive nature of Tcl, but also because extensive examples are readily available. (If you are not familiar with Tcl, see the Tornado User's Guide: Tcl for an overview of the language and for references to more detailed expositions.) The Tcl source for all standard Tornado tools is included with every Tornado installation: for example, procedures for examining semaphores, dumping memory, spawning tasks, and so on are available for customization, extension, or simply for their educational value. On UNIX hosts, every aspect of the user interface is also under user control, from dialogs to menu items. (The graphical interface on Windows hosts is somewhat less configurable, in part due to the existence of interface standards on that platform).

The Tornado APIs are shown graphically in Figure 1-4. The following paragraphs discuss each interface:

  • Graphical User Interface.  
    This API provides a set of Tcl commands to create and configure graphical user interfaces (such as menus, buttons, dialog boxes, or charts). You can use this interface to create new Tornado tools or to customize existing tools like the launcher or browser.

  • WTX C API.  
    This API provides a complete set of C routines covering all the WTX protocol services. Use this interface to create tools that access the target server or the Tornado registry, when you use C as the implementation language. The CrossWind debugger is implemented using this API.

  • WTX Tcl API.  
    The WTX Tcl API provides a complete set of Tcl commands covering all the WTX protocol services. Use this interface to create tools that access the target server or the Tornado registry, when you use Tcl as the implementation language. The Tornado shell and browser (and, on UNIX hosts, the launcher) are implemented through this API.

  • WTX Java API.  
    The WTX Java API provides a set of Java classes permitting access to the WTX protocol services. It is built on top of the WTX C API using the Java Native Interface; its principal class implementing methods call the WTX C protocol routines. Use this interface to create tools that access the target server or the Tornado registry using Java. It is available free of charge through Wind River System WEB server (www.wrs.com).

  • WTX Protocol.  
    The WTX protocol defines a set of RPC requests interpreted by the target server or the Tornado registry. You can use RPC calls to send WTX protocol requests directly, but in order to simplify application development, we recommend the use of the WTX C or Tcl APIs instead.

  • Target Server Core API.  
    Several C subroutine libraries provide callbacks to target server core services. These callbacks are required to write support for either a new object module format (OMF) reader, or a new target communication back end. The libraries listed in Table 1-1 collectively constitute the target server core API. The associated DLLs are shown in Table 1-2 and Table 1-3 for UNIX and Windows.

    Table 1-1:  Target Server Core API Libraries


    Library
     
    Description
     

    bkendlib
     
    Back-end communications interface.
     
    bkendlog
     
    Back-end logging facility.
     
    loadlib
     
    Common object module loader routines.
     
    symlib
     
    Symbol management facility.
     
    tgtlib
     
    Target operation support routines.
     
    tgtmem
     
    Target server memory management facility.
     
    wpwrlog
     
    Error and warning logging utilities.
     


  • OMF Reader Interface.  
    The OMF (object module format) reader interface specifies a set of format-independent subroutine calls to manage object code. A new shared library or DLL to support a new object-code format must define the subroutines specified by this interface.

  • Target Server Back-End Interface.  
    The back-end interface specifies a set of transport-independent subroutine calls to manage communication with the target agent. A new shared library or DLL to support a new transport mechanism must define the subroutines specified by this interface.

  • Target Agent Interface.  
    The WDB agent relies on low-level device drivers to connect with the target server. The agent interface specifies what routines a device driver must provide to the WDB agent.

    The remaining chapters of this manual discuss these APIs in more detail. Reference entries for all subroutines, protocols, and interfaces appear in the online reference material under Tornado API Reference.