pips_publication_new_data_handler_t

Prototype of new publication data event-handlers

Synopsis:

#include <pips/publication.h>
typedef int pips_publication_new_data_handler_t(pips_publication_t *const publication,
                                                const pips_guid_t *const writer_guid);

Arguments:

publication
A pointer to the publication for which a new data sample was received
writer_guid
A pointer to the GUID of the writer (publisher) of the new data sample. This argument may be NULL if the writer's GUID isn't known.

Library:

pips-client

Description:

This data type provides the prototype for functions that handle new data events for a given publication. These functions can be attached to a publication, and allow the caller to be notified about which publication received new data and about which endpoint generated the data sample.

Returns:

The PiPS event framework expects the handler to return a negative value and set errno if it encounters an error, and return a value greater than or equal to zero to indicate success.