in cmd/stat_mgmt/port/mynewt/src/mynewt_stat_mgmt.c [71:97]
case sizeof (uint16_t):
entry.value = *(uint16_t *) stat_val;
break;
case sizeof (uint32_t):
entry.value = *(uint32_t *) stat_val;
break;
case sizeof (uint64_t):
entry.value = *(uint64_t *) stat_val;
break;
default:
return MGMT_ERR_EUNKNOWN;
}
entry.name = name;
return walk_arg->cb(&entry, walk_arg->arg);
}
int
stat_mgmt_impl_foreach_entry(const char *group_name,
stat_mgmt_foreach_entry_fn *cb,
void *arg)
{
struct mynewt_stat_mgmt_walk_arg walk_arg;
struct stats_hdr *hdr;
hdr = stats_group_find(group_name);
if (hdr == NULL) {