This subsection describes callback functions, listed in alphabetical order. One of these client functions is called by the Event Server when an event for which the client has registered occurs. Each callback function defined by a client program must follow the format defined in this subsection.
SPD_commandCallbackTP
Purpose
Called when a client receives a command acknowledgment. You can optionally specify this callback when you call the function SPD_Command (see 7.5). This callback is used since the command may or may not be submitted to the host system by the Event Server. The Event Server asynchronously returns a command status to the client using this callback.
Syntax
typedef void (*SPD_commandCallbackTP)( char *hostClass, char *host, char *command, void *reservedValue, SPD_commandStatusTP status, SPD_passbackTP passback );
Description
hostClass
is the value for the objectClass parameter that you specified on the call to SPD_Command.
host
is the value for the objectName parameter that you specified on the call to SPD_Command.
command
is the value for the command parameter that you specified on the call to SPD_Command.
reservedValue
is provided for future use and is always set to SPD_reservedValueCN.
status
is the status indicating what happened when the Event Server tried to submit the command to the host. SPD_commandStatusTP is described in [xref text to replace].
passback
is the value for the passback parameter that you specified on the call to SPD_Command. SPD_passbackTP is described in [xref text to replace].
SPD_eventCallbackTP
Purpose
Called when a client receives an event from the Event Server. Register this callback by calling SPD_HandleEvent (see 7.8).
Syntax
typedef void (*SPD_eventCallbackTP)( SPD_eventTypeTP type, SPD_eventTP *event, SPD_passbackTP passback );
Description
type
is the type of event. SPD_eventTypeTP is described in [xref text to replace].
event
is a data structure that returns all available information on the event. This structure is described in 8.1.
passback
is the value that the client specified for the passback parameter when it called SPD_HandleEvent.
SPD_eventStateCallbackTP
Purpose
Called for a client when a change is detected regarding the source of an event type within the Event Server. Register this callback by calling SPD_MonitorEventState (see 7.12).
Syntax
typedef void (*SPD_eventStateCallbackTP)( SPD_eventTypeTP event, SPD_eventStateTP status, SPD_passbackTP passback );
Description
event
identifies the type of event whose state is being reported. SPD_eventTypeTP is described in [xref text to replace]
status
is the new event state. SPD_eventStateTP is described in [xref text to replace].
passback
is the value that the client specified for the passback parameter when it called SPD_MonitorEventState.
SPD_inputCallbackTP
Purpose
Called when an I/O event occurs on a file descriptor that is being monitored by a client. Register this callback by calling SPD_AddInput (see 7.2).
Syntax
typedef void (*SPD_inputCallbackTP)( SPD_inputTP id, SPD_passbackTP passback );
Description
id
is the value returned by the call to SPD_AddInput. SPD_inputTP is described in [xref text to replace].
passback
is the value that the client specified for the passback parameter when it called SPD_AddInput.
SPD_timeoutCallbackTP
Purpose
Called when a timer expires for a client. Register this callback by calling SPD_AddTimeOut (see 7.3).
Syntax
typedef void (*SPD_timeoutCallbackTP)( SPD_timeoutTP id, SPD_passbackTP passback );
Description
id
is the value returned by the call to SPD_AddTimeOut. SPD_timeoutTP is described in [xref text to replace].
passback
is the value that the client specified for the passback parameter when it called SPD_AddTimeOut.