EvmCallback(5)EvmCallback(5)NAMEEvmCallback() - event management (EVM) callback function
SYNOPSISDESCRIPTION
An EVM callback function is a function that you provide to allow your
program to handle messages arriving on an EVM connection. Most mes‐
sages are incoming events or responses to requests you have made to the
EVM daemon, but you may also get a callback for other reasons.
Specify the name (EventCB) of the callback function in the callback
parameter when you create an EVM connection with a response mode of
callback.
Your callback function is invoked by which you must call whenever you
detect activity pending on the connection.
An EVM callback function must conform to the prototype shown.
Callback Function Parameters
· The connection parameter contains the connection context pertain‐
ing to this callback. This value was returned by when the connec‐
tion was created. If you have one callback function servicing
multiple connections, you might test this to determine which con‐
nection a particular invocation is handling.
· The callbackArg parameter contains the value you specified as the
callbackArg parameter to when you created the connection. For
example, you might use it to hold a pointer to your own context
data for the connection.
· The callbackData parameter points to a structure containing the
details of the callback. The structure includes a callback reason
code, an event, and a union containing data specific to each pos‐
sible reason. The event member may contain NULL if it is not
applicable to the reason. You may get these reasons:
This callback reason indicates that the daemon was unable to
deliver one or more events, probably because the client
process had not finished processing earlier events, causing
the connection buffer to overflow.
If necessary, you can use to increase the size of the
receive buffer. See the EvmConnControl(3) reference page.
This callback reason indicates that an EVM event has been received
from
the daemon. The event is available in the structure. You
must use to free the event when you have finished with it.
See the EvmEventDestroy(3) reference page.
This callback reason indicates that a prior
call has completed, usually with a response from the daemon
if the responseMode was specified as when the connection
was created. The posting status is available in the struc‐
ture.
This callback reason indicates that a requested template has been
delivered in response to an request. You must use to free
the template when you have finished with it.
This callback reason indicates that a prior
call has completed, usually with a response from the dae‐
mon.
This callback reason indicates that event template information has
been delivered in response to an request.
The template is available in the structure. You must use
to free the template when you have finished with it.
FILES
Header file that contains the event declaration, structures, and proto‐
type
for the callback function
SEE ALSO
Routines
EvmConnCheck(3), EvmConnCreate(3), EvmConnSubscribe(3), EvmEvent‐
Post(3).
Event Management
EVM(5).
Event Connection
EvmConnection(5).
EVM EventsEvmEvent(5).
EvmCallback(5)