The service manager provides the set of binding functions that connects the service implementation to the Natural Access infrastructure.
The dispatcher calls binding functions. Each service has a unique set of binding functions. Binding functions are named xxxFunctionName, where xxx is the service acronym.
A service must implement a subset of the binding functions. For example, each service must implement the binding function to process API commands (xxxProcessCommand). Optional binding functions need only be implemented if required by the service (for example, xxxSetTraceLevel).
xxxInitializeManager is known by the dispatcher. The remaining binding function names are registered with the dispatcher during service initialization.
Create or modify the following files when implementing the service manager binding functions:
|
File |
Description |
|---|---|
|
xxxbnd.c |
Contains the service manager binding functions. |
|
xxxdef.h |
Contains version IDs and compatibility levels of the service. |
|
xxxsys.h |
Contains trace tag codes. |
The binding functions in the service manager are divided into two groups:
|
Function type |
Description |
|
Called during service startup and shutdown. These binding functions initialize the service and handle any service specific operations required when creating and destroying Natural Access queues and contexts. | |
|
Called while the application is running. These functions include processing API commands and handling errors and events. |
The following illustration shows the binding functions:
Service manager binding functions