nmsg 1.1.2
|
Structure mapping protocol buffer schema fields to nmsg_msgmod_field_type values for "transparent" modules. More...
#include <msgmod_plugin.h>
Data Fields | |
nmsg_msgmod_field_type | type |
Intended (nmsg) type of this protobuf field. | |
const char * | name |
Name of the field. | |
unsigned | flags |
Flags for this field. | |
nmsg_msgmod_field_print_fp | |
Optional custom field printer function. | |
nmsg_msgmod_field_get_fp | get |
Optional custom field getter function. | |
nmsg_msgmod_field_format_fp | format |
nmsg_msgmod_field_parse_fp | parse |
Structure mapping protocol buffer schema fields to nmsg_msgmod_field_type values for "transparent" modules.
In order to map a protocol buffer schema into a transparent message module the module must export (in a struct nmsg_msgmod) an array of these structures indicating the intended nmsg field types of each field.
For presentation output, you may implement either the print or the format functions. The print function produces human-readable output that does not need to be reversible.
The format function is intended for use by serializable and deserializable io formats (such as JSON) and must be reversible by the parse function. It will be used for presentation mode formatting as well if a print function is not implemented.
Definition at line 144 of file msgmod_plugin.h.
nmsg_msgmod_field_type nmsg_msgmod_field::type |
Intended (nmsg) type of this protobuf field.
Definition at line 146 of file msgmod_plugin.h.
const char* nmsg_msgmod_field::name |
Name of the field.
Definition at line 149 of file msgmod_plugin.h.
unsigned nmsg_msgmod_field::flags |
Flags for this field.
Definition at line 152 of file msgmod_plugin.h.
nmsg_msgmod_field_print_fp nmsg_msgmod_field::print |
Optional custom field printer function.
Definition at line 155 of file msgmod_plugin.h.
nmsg_msgmod_field_get_fp nmsg_msgmod_field::get |
Optional custom field getter function.
Definition at line 158 of file msgmod_plugin.h.
nmsg_msgmod_field_format_fp nmsg_msgmod_field::format |
Definition at line 164 of file msgmod_plugin.h.
nmsg_msgmod_field_parse_fp nmsg_msgmod_field::parse |
Definition at line 167 of file msgmod_plugin.h.