65 #include <amxc/amxc.h>
66 #include <amxp/amxp.h>
68 #include <amxd/amxd_common.h>
69 #include <amxd/amxd_dm.h>
70 #include <amxd/amxd_path.h>
71 #include <amxd/amxd_object.h>
79 amxc_var_t* req_paths,
83 int retval = amxd_status_ok;
84 amxc_var_set_type(ret, AMXC_VAR_ID_HTABLE);
86 when_false(amxc_var_type_of(req_paths) == AMXC_VAR_ID_LIST, exit);
88 amxc_var_for_each(path, req_paths) {
90 amxc_var_t* sub_ret = NULL;
91 amxc_var_t* sub_ret_result = NULL;
92 const char* path_string = NULL;
94 path_string = amxc_var_constcast(cstring_t, path);
95 sub_ret = amxc_var_add_key(amxc_htable_t, ret, path_string, NULL);
96 sub_ret_result = amxc_var_add_new_key(sub_ret,
"result");
98 if(amxc_var_type_of(sub_ret_result) == AMXC_VAR_ID_NULL) {
99 amxc_var_set_type(sub_ret_result, AMXC_VAR_ID_LIST);
100 amxc_var_add(amxc_htable_t, sub_ret_result, NULL);
101 rv = amxd_status_object_not_found;
103 amxc_var_add_key(uint32_t, sub_ret,
"status", rv);
106 retval = amxd_status_ok;
Ambiorix bus agnostic API header file.
Ambiorix Bus Backend Interface.
int amxb_get_multiple(amxb_bus_ctx_t *const bus_ctx, amxc_var_t *req_paths, int32_t depth, amxc_var_t *ret, int timeout)
Fetches one or more (root) objects or multiple parameters.
int amxb_get(amxb_bus_ctx_t *const bus_ctx, const char *object, int32_t depth, amxc_var_t *ret, int timeout)
Fetches one or more objects or a single parameter.
static amxb_bus_ctx_t * bus_ctx