Defining Your Adapter Plug-In

During the design phase of your adapter, you need to decide which modes your adapter needs to handle. You also need to decide which type of data representation is best suited for your application if your adapter handles any or all of the following modes: Acquire, Process, and Deliver. See Chapter 2, “Modes” for descriptions of e-ADK modes.

Use the following criteria to decide how to handle the data from your application:

You will need to implement the appropriate functions in your adapter to handle the modes and data representation that you have selected. For example, if you decide that your adapter should handle the acquire mode using buffered data, then you will need to implement acquireBuffer() inside your adapter. In addition, you need to implement the initAdapter() utility to remember configuration settings and allocate memory or data structure. The shutdownAdapter() functionality is used to clean up any allocated memory.

Finally, you may want to implement some special-purpose callback functions:

Additional information about special-purpose callback functions is provided in e-ADK Programmer’s Reference.