struct cfg_primary_type
Overview
Primary type structure More…
#include <conf_types.h> struct cfg_primary_type { // fields te_errno(* str2val)(char *val_str, cfg_inst_val *val); te_errno(* val2str)(cfg_inst_val val, char **val_str); te_errno(* def_val)(cfg_inst_val *val); void(* free)(cfg_inst_val val); te_errno(* copy)(cfg_inst_val val, cfg_inst_val *var); te_errno(* get_from_msg)(struct cfg_msg *msg, cfg_inst_val *val); void(* put_to_msg)(cfg_inst_val val, struct cfg_msg *msg); bool(* is_equal)(cfg_inst_val val1, cfg_inst_val val2); size_t(* value_size)(cfg_inst_val val); };
Detailed Documentation
Primary type structure
Fields
te_errno(* str2val)(char *val_str, cfg_inst_val *val)
Convert value from string representation to cfg_inst_val
te_errno(* val2str)(cfg_inst_val val, char **val_str)
Convert value from cfg_inst_val to string representation
te_errno(* def_val)(cfg_inst_val *val)
Put default value of the type to cfg_inst_val
void(* free)(cfg_inst_val val)
Free memory allocated for the value (dummy for integer types)
te_errno(* copy)(cfg_inst_val val, cfg_inst_val *var)
Copy the value (allocating memory, if necessary).
te_errno(* get_from_msg)(struct cfg_msg *msg, cfg_inst_val *val)
Obtain value from the message
void(* put_to_msg)(cfg_inst_val val, struct cfg_msg *msg)
Put the value to the message; the message length should be updated.
bool(* is_equal)(cfg_inst_val val1, cfg_inst_val val2)
Compare two values
size_t(* value_size)(cfg_inst_val val)
Get the size of given value