|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
#include "ref.h"#include "containers.h"#include "text_util.h"#include "cace/util/defs.h"#include <inttypes.h>
Include dependency graph for ref.c:Functions | |
| void | cace_ari_date_init (cace_ari_date_t *obj) |
| void | cace_ari_date_deinit (cace_ari_date_t *obj) |
| void | cace_ari_date_copy (cace_ari_date_t *obj, const cace_ari_date_t *src) |
| int | cace_ari_date_cmp (const cace_ari_date_t *left, const cace_ari_date_t *right) |
| int | cace_ari_date_from_text (cace_ari_date_t *obj, const char *text) |
| A helper function to decode date text. | |
| void | cace_ari_objpath_init (cace_ari_objpath_t *obj) |
| void | cace_ari_objpath_deinit (cace_ari_objpath_t *obj) |
| void | cace_ari_objpath_copy (cace_ari_objpath_t *obj, const cace_ari_objpath_t *src) |
| bool | cace_ari_objpath_equal (const cace_ari_objpath_t *left, const cace_ari_objpath_t *right) |
| bool | cace_ari_objpath_cmp (const cace_ari_objpath_t *left, const cace_ari_objpath_t *right) |
| static bool | cace_ari_valid_type_for_objpath (cace_ari_type_t type) |
| int | cace_ari_objpath_derive_type (cace_ari_objpath_t *path) |
| Derive the ARI Type of a referenced object. | |
| void | cace_ari_objpath_set_textid (cace_ari_objpath_t *path, const char *org_id, const char *model_id, cace_ari_type_t type_id, const char *obj_id) |
| Set the ARI as an object reference with a specific text-named path. | |
| void | cace_ari_objpath_set_textid_opt (cace_ari_objpath_t *path, const char *org_id, const char *model_id, const cace_ari_type_t *type_id, const char *obj_id) |
| Set the ARI as an object reference with a specific text-named path. | |
| void | cace_ari_objpath_set_intid (cace_ari_objpath_t *path, cace_ari_int_id_t org_id, cace_ari_int_id_t model_id, cace_ari_type_t type_id, cace_ari_int_id_t obj_id) |
| Set the ARI as an object reference with a specific integer-enumerated path. | |
| void | cace_ari_objpath_set_intid_opt (cace_ari_objpath_t *path, const cace_ari_int_id_t *org_id, const cace_ari_int_id_t *model_id, const cace_ari_type_t *type_id, const cace_ari_int_id_t *obj_id) |
| Set the ARI as an object reference with a specific integer-enumerated path. | |
| int | cace_ari_params_deinit (cace_ari_params_t *obj) |
| int | cace_ari_params_copy (cace_ari_params_t *obj, const cace_ari_params_t *src) |
| cace_ari_ac_t * | cace_ari_params_set_ac (cace_ari_params_t *obj, struct cace_ari_list_s *src) |
| Set the parameters to a specific state. | |
| cace_ari_am_t * | cace_ari_params_set_am (cace_ari_params_t *obj, struct cace_ari_tree_s *src) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | cace_ari_ref_deinit (cace_ari_ref_t *obj) |
| int | cace_ari_ref_copy (cace_ari_ref_t *obj, const cace_ari_ref_t *src) |
| int cace_ari_date_cmp | ( | const cace_ari_date_t * | left, |
| const cace_ari_date_t * | right | ||
| ) |
References cace_ari_date_t::parts, and cace_ari_date_t::valid.
Referenced by cace_ari_objpath_cmp(), cace_ari_objpath_equal(), and TEST_CASE().
| void cace_ari_date_copy | ( | cace_ari_date_t * | obj, |
| const cace_ari_date_t * | src | ||
| ) |
References cace_ari_date_t::parts, and cace_ari_date_t::valid.
Referenced by cace_ari_objpath_copy().
| void cace_ari_date_deinit | ( | cace_ari_date_t * | obj | ) |
References cace_ari_date_t::valid.
Referenced by cace_amm_obj_ns_deinit(), and cace_ari_objpath_deinit().
| int cace_ari_date_from_text | ( | cace_ari_date_t * | obj, |
| const char * | text | ||
| ) |
A helper function to decode date text.
| [out] | obj | The object to decode into, setting its cace_ari_date_t::valid state depending on decoding success. |
| [in] | text | The text to decode. |
References cace_data_deinit(), cace_data_init_view_cstr(), cace_date_decode(), CHKERR1, cace_ari_date_t::parts, and cace_ari_date_t::valid.
Referenced by cace_amm_obj_store_add_ns(), test_ari_text_encode_nsref_text(), TEST_CASE(), and TEST_CASE().
| void cace_ari_date_init | ( | cace_ari_date_t * | obj | ) |
References cace_ari_date_t::parts, and cace_ari_date_t::valid.
Referenced by cace_amm_obj_ns_init(), cace_ari_objpath_init(), and TEST_CASE().
| bool cace_ari_objpath_cmp | ( | const cace_ari_objpath_t * | left, |
| const cace_ari_objpath_t * | right | ||
| ) |
| void cace_ari_objpath_copy | ( | cace_ari_objpath_t * | obj, |
| const cace_ari_objpath_t * | src | ||
| ) |
References cace_ari_objpath_t::ari_type, cace_ari_date_copy(), cace_ari_idseg_copy(), CHKVOID, cace_ari_objpath_t::has_ari_type, cace_ari_objpath_t::model_id, cace_ari_objpath_t::model_rev, cace_ari_objpath_t::obj_id, cace_ari_objpath_t::org_id, and cace_ari_objpath_t::type_id.
Referenced by cace_ari_ref_copy(), and cace_ari_translate_ari().
| void cace_ari_objpath_deinit | ( | cace_ari_objpath_t * | obj | ) |
References cace_ari_date_deinit(), cace_ari_idseg_deinit(), CHKVOID, cace_ari_objpath_t::has_ari_type, cace_ari_objpath_t::model_id, cace_ari_objpath_t::model_rev, cace_ari_objpath_t::obj_id, cace_ari_objpath_t::org_id, and cace_ari_objpath_t::type_id.
Referenced by cace_ari_objpath_set_intid_opt(), cace_ari_objpath_set_textid_opt(), and cace_ari_ref_deinit().
| int cace_ari_objpath_derive_type | ( | cace_ari_objpath_t * | path | ) |
Derive the ARI Type of a referenced object.
This sets the cace_ari_objpath_t::ari_type based on the cace_ari_objpath_t::type_id value.
| [in,out] | path | The object to update. |
References cace_ari_objpath_t::ari_type, cace_ari_idseg_t::as_int, cace_ari_idseg_t::as_text, cace_ari_type_from_name(), cace_ari_type_to_name(), cace_ari_valid_type_for_objpath(), CHKERR1, cace_ari_idseg_t::form, cace_ari_objpath_t::has_ari_type, and cace_ari_objpath_t::type_id.
Referenced by cace_ari_cbor_decode_stream().
| bool cace_ari_objpath_equal | ( | const cace_ari_objpath_t * | left, |
| const cace_ari_objpath_t * | right | ||
| ) |
References cace_ari_objpath_t::ari_type, cace_ari_date_cmp(), cace_ari_idseg_equal(), cace_ari_objpath_t::has_ari_type, cace_ari_objpath_t::model_id, cace_ari_objpath_t::model_rev, cace_ari_objpath_t::obj_id, cace_ari_objpath_t::org_id, and cace_ari_objpath_t::type_id.
Referenced by cace_ari_equal().
| void cace_ari_objpath_init | ( | cace_ari_objpath_t * | obj | ) |
| void cace_ari_objpath_set_intid | ( | cace_ari_objpath_t * | path, |
| cace_ari_int_id_t | org_id, | ||
| cace_ari_int_id_t | model_id, | ||
| cace_ari_type_t | type_id, | ||
| cace_ari_int_id_t | obj_id | ||
| ) |
Set the ARI as an object reference with a specific integer-enumerated path.
| [in,out] | path | The path to modify. |
| [in] | org_id | The organization ID. |
| [in] | model_id | The model ID. |
| type_id | The object type ID. | |
| [in] | obj_id | The object ID. |
References cace_ari_objpath_set_intid_opt().
Referenced by cace_ari_set_objref_path_intid().
| void cace_ari_objpath_set_intid_opt | ( | cace_ari_objpath_t * | path, |
| const cace_ari_int_id_t * | org_id, | ||
| const cace_ari_int_id_t * | model_id, | ||
| const cace_ari_type_t * | type_id, | ||
| const cace_ari_int_id_t * | obj_id | ||
| ) |
Set the ARI as an object reference with a specific integer-enumerated path.
For all pointer arguments, the pointed-to lifetime does not need to outlast this function call. Pointed-to values are copied into the path.
| [in,out] | path | The path to modify. |
| [in] | org_id | The organization ID, or NULL for none. |
| [in] | model_id | The model ID, or NULL for none. |
| type_id | The object type ID, or NULL for none. | |
| [in] | obj_id | The object ID, or NULL for none. |
References cace_ari_objpath_t::ari_type, cace_ari_idseg_t::as_int, cace_ari_objpath_deinit(), CHKVOID, cace_ari_idseg_t::form, cace_ari_objpath_t::has_ari_type, cace_ari_objpath_t::model_id, cace_ari_objpath_t::obj_id, cace_ari_objpath_t::org_id, and cace_ari_objpath_t::type_id.
Referenced by cace_ari_objpath_set_intid(), cace_ari_set_nsref_path_intid(), and test_cace_ari_cbor_encode_objref_path_int().
| void cace_ari_objpath_set_textid | ( | cace_ari_objpath_t * | path, |
| const char * | org_id, | ||
| const char * | model_id, | ||
| cace_ari_type_t | type_id, | ||
| const char * | obj_id | ||
| ) |
Set the ARI as an object reference with a specific text-named path.
| [in,out] | path | The path to modify. |
| [in] | org_id | The organization ID. |
| [in] | model_id | The model ID. |
| type_id | The object type ID. | |
| [in] | obj_id | The object ID. |
References cace_ari_objpath_set_textid_opt().
Referenced by cace_amm_obj_ns_add_obj(), cace_amm_semtype_dlist_name(), cace_amm_semtype_seq_name(), cace_amm_semtype_tblt_name(), cace_amm_semtype_ulist_name(), cace_amm_semtype_umap_name(), cace_amm_semtype_union_name(), cace_amm_semtype_use_name(), and cace_ari_set_objref_path_textid().
| void cace_ari_objpath_set_textid_opt | ( | cace_ari_objpath_t * | path, |
| const char * | org_id, | ||
| const char * | model_id, | ||
| const cace_ari_type_t * | type_id, | ||
| const char * | obj_id | ||
| ) |
Set the ARI as an object reference with a specific text-named path.
For all pointer arguments, the pointed-to lifetime does not need to outlast this function call. Pointed-to values are copied into the path.
| [in,out] | path | The path to modify. |
| [in] | org_id | The organization ID, or NULL for none. |
| [in] | model_id | The model ID, or NULL for none. |
| type_id | The object type ID, or NULL for none. | |
| [in] | obj_id | The object ID, or NULL for none. |
References cace_ari_objpath_t::ari_type, cace_ari_idseg_t::as_text, cace_ari_objpath_deinit(), cace_ari_type_to_name(), CHKVOID, cace_ari_idseg_t::form, cace_ari_objpath_t::has_ari_type, cace_ari_objpath_t::model_id, cace_ari_objpath_t::obj_id, cace_ari_objpath_t::org_id, and cace_ari_objpath_t::type_id.
Referenced by cace_ari_objpath_set_textid(), and TEST_CASE().
| int cace_ari_params_copy | ( | cace_ari_params_t * | obj, |
| const cace_ari_params_t * | src | ||
| ) |
References cace_ari_params_t::as_ac, cace_ari_params_t::as_am, cace_ari_ac_init(), cace_ari_am_init(), CACE_ARI_PARAMS_AC, CACE_ARI_PARAMS_AM, cace_ari_params_deinit(), CACE_ARI_PARAMS_NONE, CACE_MALLOC, CHKERR1, cace_ari_ac_t::items, cace_ari_am_t::items, and cace_ari_params_t::state.
Referenced by cace_ari_ref_copy().
| int cace_ari_params_deinit | ( | cace_ari_params_t * | obj | ) |
References cace_ari_params_t::as_ac, cace_ari_params_t::as_am, cace_ari_ac_deinit(), cace_ari_am_deinit(), CACE_ARI_PARAMS_AC, CACE_ARI_PARAMS_AM, CACE_ARI_PARAMS_NONE, CACE_FREE, CHKERR1, and cace_ari_params_t::state.
Referenced by cace_ari_params_copy(), cace_ari_params_set_ac(), cace_ari_params_set_am(), and cace_ari_ref_deinit().
| cace_ari_ac_t * cace_ari_params_set_ac | ( | cace_ari_params_t * | obj, |
| struct cace_ari_list_s * | src | ||
| ) |
Set the parameters to a specific state.
| [in,out] | obj | The state to modify, which must already be initialized. |
| [in,out] | src | An optional existing value struct to move from. |
References cace_ari_params_t::as_ac, CACE_ARI_PARAMS_AC, cace_ari_params_deinit(), CACE_MALLOC, CHKNULL, cace_ari_ac_t::items, and cace_ari_params_t::state.
Referenced by main(), suite_adms_init(), test_refda_adm_ietf_alarms_purge_all(), test_refda_adm_ietf_dtnma_agent_ctrl_ensure_var(), test_refda_adm_ietf_dtnma_agent_ctrl_var_store_reset(), test_refda_exec_wait_cond(), test_refda_exec_wait_for(), test_refda_exec_wait_until(), and test_util_group_add().
| cace_ari_am_t * cace_ari_params_set_am | ( | cace_ari_params_t * | obj, |
| struct cace_ari_tree_s * | src | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References cace_ari_params_t::as_am, CACE_ARI_PARAMS_AM, cace_ari_params_deinit(), CACE_MALLOC, CHKNULL, cace_ari_am_t::items, and cace_ari_params_t::state.
Referenced by cace_amm_semtype_dlist_name(), cace_amm_semtype_seq_name(), cace_amm_semtype_tblt_name(), cace_amm_semtype_ulist_name(), cace_amm_semtype_umap_name(), cace_amm_semtype_union_name(), and cace_amm_semtype_use_name().
| int cace_ari_ref_copy | ( | cace_ari_ref_t * | obj, |
| const cace_ari_ref_t * | src | ||
| ) |
References cace_ari_objpath_copy(), cace_ari_params_copy(), cace_ari_ref_t::objpath, and cace_ari_ref_t::params.
Referenced by cace_ari_copy_deep().
| void cace_ari_ref_deinit | ( | cace_ari_ref_t * | obj | ) |
References cace_ari_objpath_deinit(), cace_ari_params_deinit(), CHKVOID, cace_ari_ref_t::objpath, and cace_ari_ref_t::params.
Referenced by cace_ari_deinit_parts().
|
static |
References CACE_ARI_TYPE_NULL, and CACE_ARI_TYPE_OBJECT.
Referenced by cace_ari_objpath_derive_type().