The API for a Natural Access service consists of:
A set of one or more function prototypes (function name, function return, and function arguments).
A description of each API function.
A determination of whether the function operates synchronously or asynchronously.
Each API function typically includes either a context handle or a service object handle to identify the unique processing context for the function invocation. Natural Access service APIs should not require a user to pass multiple handles to individual functions. Context handles can be derived from service object handles by using Natural Access dispatcher handle functions. Service object handles are discussed in detail in the Service object handles section.
tik service
Based upon the event analysis (Understanding the managed resource), the following API functions are defined:
DWORD tikStartTimer ( CTAHD ctahd, TIK_START_PARMS *start )
Starts the timer function on tik server, asynchronously returns timer ticks. Passes a parameter structure defining the number of ticks to generate and the frequency.
DWORD tikStopTimer ( CTAHD ctahd )
Stops the timer function on tik server, asynchronously returns acknowledgment.
DWORD tikGetChannelInfo ( CTAHD ctahd, TIK_CONTEXT_INFO* info, unsigned size)
Asynchronously gets the operational information from the tik service. Passes a parameter structure to hold the channel data.
Note: The tik service does not create service object handles.