Implementing the API for a service includes:
Creating the header files that contain the API function prototypes, error and event codes, and command code definitions.
Writing the code that contains the API implementation.
Declaring parameters in a parameter source (.pf) file.
Create the following files when implementing the service API:
|
File |
Description |
|---|---|
|
xxxapi.c |
Implements the service API by calling the corresponding SPI function and handling API errors. |
|
xxxdef.h |
Contains API prototypes, event and error definitions, and public data structures. |
|
xxxparm.pf |
ASCII definition of each parameter and hierarchical structure. |
|
xxxparm.c |
Parameter source file automatically generated from xxxparm.pf. |
|
xxxparm.h |
Parameter header file automatically generated from xxxparm.pf. |
|
xxxsys.h |
Internal header file containing API command codes. |