39 nmsg_output_type_stream,
40 nmsg_output_type_pres,
41 nmsg_output_type_callback,
42 nmsg_output_type_json,
259 const char *vname,
const char *mname);
void(* nmsg_cb_message)(nmsg_message_t msg, void *user)
Callback function for processing nmsg messages.
void nmsg_output_set_zlibout(nmsg_output_t output, bool zlibout)
Enable or disable zlib compression of output NMSG containers.
nmsg_output_t nmsg_output_open_zmq_endpoint(void *zmq_ctx, const char *ep, size_t bufsz)
Create an ZMQ socket and initialize a new NMSG stream output from it.
nmsg_res nmsg_output_close(nmsg_output_t *output)
Close an nmsg_output_t object.
void nmsg_output_set_source(nmsg_output_t output, unsigned source)
Set the 'source' field on all output NMSG payloads.
void nmsg_output_set_filter_msgtype(nmsg_output_t output, unsigned vid, unsigned msgtype)
Filter an nmsg_output_t for a given vendor ID / message type.
void nmsg_output_set_rate(nmsg_output_t output, nmsg_rate_t rate)
Limit the payload output rate.
nmsg_output_t nmsg_output_open_callback(nmsg_cb_message cb, void *user)
Initialize a new nmsg output closure.
void nmsg_output_set_buffered(nmsg_output_t output, bool buffered)
Make an nmsg_output_t socket output buffered or unbuffered.
nmsg_output_t nmsg_output_open_json(int fd)
Initialize a new JSON format nmsg output.
nmsg_output_t nmsg_output_open_file(int fd, size_t bufsz)
Initialize a new byte-stream nmsg output.
void nmsg_output_set_endline(nmsg_output_t output, const char *endline)
Set the line continuation string for presentation format output.
nmsg_res nmsg_output_flush(nmsg_output_t output)
Flush an nmsg_output_t object.
nmsg_output_t nmsg_output_open_sock(int fd, size_t bufsz)
Initialize a new datagram socket nmsg output.
nmsg_res nmsg_output_write(nmsg_output_t output, nmsg_message_t msg)
Write an nmsg message to an nmsg_output_t object.
nmsg_res nmsg_output_set_filter_msgtype_byname(nmsg_output_t output, const char *vname, const char *mname)
Filter an nmsg_output_t for a given vendor ID / message type.
nmsg_output_type
An enum identifying the underlying implementation of an nmsg_output_t object.
nmsg_output_t nmsg_output_open_pres(int fd)
Initialize a new presentation format (ASCII lines) nmsg output.
void nmsg_output_set_operator(nmsg_output_t output, unsigned operator_)
Set the 'operator' field on all output NMSG payloads.
void nmsg_output_set_group(nmsg_output_t output, unsigned group)
Set the 'group' field on all output NMSG payloads.
nmsg_output_t nmsg_output_open_zmq(void *s, size_t bufsz)
Initialize a new ZMQ socket NMSG output.