Coding commands with Developer's Toolkit for DAPL

This page shows the structure and organization of a processing command.

Command identification
Each code module includes the DTD.H header file and declares the command identity to the DAPL system.

#include "DTDMOD.H"
#include "DTD.H"
#define  ENTRY    MONITOR_entry
// Some boilerplate code here

Main function
The main function declares task variables and invokes the task parameter validation. A returned list provides access to runtime interconnections.

int __stdcall  ENTRY (PIB **plib)
  void  **argv;
  int     argc, received;
  PIPE  * in_pipe, out_pipe;
  FIRB  * pFirFilter;
  argv = param_process (plib,
    &argc, 3, 3,

Activate runtime connections
Extract handles from the linkage information provided by the DAPL system. Activate the connections with special function calls.

  in_pipe  = (PIPE *) argv[1];
  limit    = (VAR  *) argv[2];
  out_pipe = (PIPE *) argv[3];
  pipe_open (in_pipe, P_READ);
  pipe_open (out_pipe, P_WRITE);

Establish processing state, and construct supplemental elements for internal processes such as filtering.

  pFirFilter = fir_init(pCoeffs,
    iLength, iScale, iDecimate);

The main body of the processing command is a continuous cycle: await new data, and when it arrives, fetch and process it. The waiting is automatic. When your processing has nothing to do, the DAPL system will schedule other tasks to run.

  while (1)
      &(pipe_value._i16), 1);
    // Your Processing Here...
} // End main command body

Your processing functions
You invoke your customized processing from the runtime loop, applying specialized data transformations and monitoring processing state.

static void  Special( VAR * pVar )
    // Custom processing here!