GrowNode
gn_commons.c File Reference

Macros

#define TAG   "gn_commons"
 

Functions

size_t gn_leaf_event_mask_param (gn_leaf_parameter_event_handle_t evt, gn_leaf_param_handle_t param)
 
uint64_t gn_hash (const char *key)
 
void gn_hash_str (const char *key, char *buf, size_t len)
 
gn_leaf_param_validator_result_t gn_validator_double_positive (gn_leaf_param_handle_t param, void **param_value)
 
gn_leaf_param_validator_result_t gn_validator_double (gn_leaf_param_handle_t param, void **param_value)
 
gn_leaf_param_validator_result_t gn_validator_boolean (gn_leaf_param_handle_t param, void **param_value)
 

Variables

const char * gn_config_status_descriptions [14]
 
const double min = DBL_MIN
 
const double zero = 0
 
const double max = DBL_MAX
 
const bool bool_false = false
 
const bool bool_true = !bool_false
 

Macro Definition Documentation

◆ TAG

#define TAG   "gn_commons"

Function Documentation

◆ gn_hash()

uint64_t gn_hash ( const char *  key)
inline

◆ gn_hash_str()

void gn_hash_str ( const char *  key,
char *  buf,
size_t  len 
)
inline

◆ gn_leaf_event_mask_param()

size_t gn_leaf_event_mask_param ( gn_leaf_parameter_event_handle_t  evt,
gn_leaf_param_handle_t  param 
)
inline

◆ gn_validator_boolean()

gn_leaf_param_validator_result_t gn_validator_boolean ( gn_leaf_param_handle_t  param,
void **  param_value 
)

◆ gn_validator_double()

gn_leaf_param_validator_result_t gn_validator_double ( gn_leaf_param_handle_t  param,
void **  param_value 
)

◆ gn_validator_double_positive()

gn_leaf_param_validator_result_t gn_validator_double_positive ( gn_leaf_param_handle_t  param,
void **  param_value 
)

Variable Documentation

◆ bool_false

const bool bool_false = false

◆ bool_true

const bool bool_true = !bool_false

◆ gn_config_status_descriptions

const char* gn_config_status_descriptions[14]
Initial value:
= {
"Not Initialized",
"Initializing",
"Generic Error",
"Network Error",
"Server Error",
"Completed",
"Started",
"Bad Firmware URL",
"Bad Provisioning Password",
"Bad Server Base Topic",
"Bad Server URL",
"Bad Server Keepalive",
"Bad SNTP URL",
"Bad Server Discovery Prefix"
}

◆ max

const double max = DBL_MAX

◆ min

const double min = DBL_MIN

◆ zero

const double zero = 0