INtime SDK Help
Service
INtime Help

Service

This handler is invoked by the service thread when an event occurs. For example, an interrupt service calls this routine from its interrupt thread. In the case of a polled service this handler is invoked from a thread which is waiting on a kernel alarm event. A port service handler is invoked from a thread performing a call to ReceiveRtMessage.

The handler is invoked with different parameters depending on the configuration. For the interrupt service and the polled service it is invoked as follows:

void Service(LPSERVICEDESC 
    pServiceDesc
);

For a port service it is invoked with the following parameters:

void Service(LPSERVICEDESC 

pServiceDesc,
LPVOID pData,
LPRECEIVEINFO pInfo
);

Parameters

pServiceDesc
A pointer to the service descriptor.
pData
A pointer to a data buffer where the data part of the message was received.
pInfo
A pointer to a RECEIVEINFO structure describing the message just received.

In the case of a "custom" service type, it is up to the implementer what parameters are passed from the service thread to the service routine.

See Also

RT Service handlers, ReceiveRtMessage, RECEIVEINFO