# IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

# Chapter 2. Writing a Simple Module

Partial Table-of-Contents

- 2.1 Getting Started Writing a Module
- 2.2 Adding the Hello Module
- Hello Module with Error Checking

  This chapter discusses the basics of writing a simple module for Data Explorer. Subsequent chapters cover some typical types of modules you might want to write. Although Data Explorer modules support a broad range of data and connections types, your module need support only those types it can be expected to encounter. Moreover, it is not necessary to manipulate all the components of a Data Explorer Field. The programming examples in later chapters illustrate modules that manipulate particular components (e.g., "data").

  Before writing a module, you should have a general understanding of the Data Explorer data model and be familiar with the way data is carried in Fields, Groups, and components (see 4.1 , "Data Explorer Data Model"). For a detailed treatment of the data model, see Chapter 3. "Understanding the Data Model" in IBM Visualization Data Explorer User's Guide. In this manual, Chapter 12. "Working with Data Model Objects", summarizes the routines that implement the model.

  Two other important topics are briefly reviewed in subsequent sections:

  1. managing the memory allocated to and used by visual programs and their constituent modules (see 4.2 , "Memory Management") and
  2. the Data Explorer execution model (see 4.3 , "Data Explorer Execution Model").

  ## 2.1 Getting Started Writing a Module

  To build a module, you must:

  1. Define the module's function and its interface (i.e., its inputs and outputs).
  2. Create a module description file containing this information.
  3. Write the module.
  4. Compile and link the module.

  Once you have completed these four steps, you can run a version of Data Explorer that incorporates the module.

  The Module Builder is a point-and-click interface that facilitates much of this work by creating the files necessary for a module:

  - a module description file
  - a C-code framework (or template) file
  - a makefile.
  All you need do is add your own application code to the framework file. (See Chapter 3. "Module Builder".)

  A module can be added to Data Explorer in one of three forms: inboard, outboard, or runtime-loadable. An inboard module is linked directly into a new Data Explorer executive. An outboard module is a separate executable linked to the Data Explorer routine library and controlled by the executive. It can later be compiled and linked as an inboard module for greater efficiency. A runtime-loadable module can be loaded when Data Explorer is started or while it is running. It is more portable than the inboard module version of the same function and more efficient than the outboard version. See 11.3 , "Inboard, Outboard, and Runtime-loadable Modules".

  [ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
  [Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

  [Data Explorer Home Page]

  [IBM Home Page | Order | Search | Contact IBM | Legal ]