Signatures of User Functions

Each user-defined adapter must provide three or four entry points in order to function. Introduces these adapter functions, their purposes, and parameters.

The entry points are identical for both input and output adapters, though the internal logic will differ. Refer to the In-Process Input Adapterand In-process Output Adapter sections and the examples for details on function implementation.

While the actual function names are arbitrary, the names must match the names specified in the ADL file. If the names are missing or do not match, a fatal runtime error will result.

For example, part of the ADL file may look like:

<LibraryName>
my_input_adapter_lib
</LibraryName>
  <InitializeFunction>
my_input_adapter_init
</InitializeFunction>
  <ExecuteFunction>
my_input_adapter_execute
</ExecuteFunction>
  <ShutdownFunction>
my_input_adapter_shutdown
</ShutdownFunction>
  <ReconnectFunction>
my_input_adapter_reconnect
</ReconnectFunction>

The corresponding C function signatures would be:

C8Bool my_input_adapter_init(C8Adapter* i_adapter_ptr);
C8Bool my_input_adapter_execute(C8Adapter* i_adapter_ptr);
void my_input_adapter_shutdown(C8Adapter* i_adapter_ptr);
C8Bool my_input_adapter_reconnect(C8Adapter* i_adapter_ptr);