bps_event_create()

Create an event.

Synopsis:

#include <bps/event.h>
 
BPS_API int bps_event_create(bps_event_t **event, unsigned int domain, unsigned int code, const bps_event_payload_t *payload_ptr, bps_event_completion_func completion_function)

Arguments:

event
The event to be returned.
domain
The domain of the event. This value must be no greater than BPS_EVENT_DOMAIN_MAX. Your event's domain must be a number generated by a call to bps_register_domain() to ensure uniqueness.
code
The code of the event. This value may be any number from 0 to 65535.
payload_ptr
A pointer to the event's payload, which will be copied.
completion_function
An optional completion function that will be invoked when the system is done with the event.

Library:

libbps

Description:

The bps_event_create() function creates a bps_event_t event. An application may create its own event, which may then be passed to bps_push_event() .

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.