Purpose
Register a callback function for events. The callback function is called whenever an event of the specified type occurs.
Syntax
#include "spd.h" SPD_errorTP SPD_HandleEvent( SPD_eventTypeTP type, SPD_eventCallbackTP callback, SPD_passbackTP passback );
Description
type
is the type of event that causes the callback function to be called. This value will be supplied as an argument to the callback function. See 8.1 for the list of possible types.
callback
is the callback function that is invoked when an event of the specified type is received by the client. See 8.2 for a description of the callback function.
passback
is a value that the client wants passed to the callback function when it is invoked.
Return Value
The return value indicates whether an error occurred, as follows:
Return | Indication |
SPD_normalCN | No error |
SPD_notInitializedCN | SPD_InitClient not called previously |
SPD_invalidTypeCN | Bad type parameter |
SPD_commFailureCN | Communications problem |
See Also
See also the following client functions:
SPD_AckAlarm (see [xref text to replace])
SPD_ClearAlarm (see [xref text to replace])
SPD_DeleteObject (see [xref text to replace])
SPD_LogMessage (see [xref text to replace])
SPD_MainLoop (see [xref text to replace])
SPD_ProcessEvents (see [xref text to replace])
SPD_ReportValue (see [xref text to replace])
SPD_RequestEvents (see [xref text to replace])
SPD_SendAlarm (see [xref text to replace])
SPD_SendUserAlarm (see [xref text to replace])
Use of this function is illustrated in 6.1 and 6.7.