|
DTNMA Reference Tools v2.1.0 - 7.g389b8d8
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) |
| 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_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(), CHKERR1, cace_ari_date_t::parts, and cace_ari_date_t::valid.
| 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, 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().
| 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, 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(), and cace_ari_set_nsref_path_intid().
| 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_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, 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().
| 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_MALLOC, CHKNULL, cace_ari_ac_t::items, and cace_ari_params_t::state.