|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
#include "eval.h"#include "eval_ctx.h"#include "oper_eval_ctx.h"#include "valprod.h"#include "amm/oper.h"#include "cace/ari/text.h"#include "cace/amm/lookup.h"#include "cace/util/logging.h"#include "cace/util/defs.h"
Include dependency graph for eval.c:Functions | |
| static int | refda_eval_expand (refda_runctx_t *runctx, refda_eval_item_t out, const cace_ari_t *in) |
| Expand a reference to a literal value matching SIMPLE or EXPR typedef. | |
| static int | refda_eval_oper (const cace_amm_lookup_t *deref, refda_eval_ctx_t *ctx) |
| int | refda_eval_target (refda_runctx_t *runctx, cace_ari_t *result, const cace_ari_t *ari) |
| Implement the evaluation procedure from Section TBD of [ietf-dtn-amm-01]. | |
| int | refda_eval_condition (refda_runctx_t *runctx, cace_ari_t *result, const cace_ari_t *condition) |
| Evaluate given conditional ARI expression and return a boolean ARI indicating whether the condition was true or false. | |
| int refda_eval_condition | ( | refda_runctx_t * | runctx, |
| cace_ari_t * | result, | ||
| const cace_ari_t * | condition | ||
| ) |
Evaluate given conditional ARI expression and return a boolean ARI indicating whether the condition was true or false.
| [in] | runctx | The run context. |
| [out] | result | The single result value from the evaluation. This ARI must be initialized before the call and will be valid if the return code is zero but must be deinitialized regardless. |
| [in] | condition | The ARI to dereference, if necessary, and evaluate. |
References cace_amm_type_convert(), cace_amm_type_get_builtin(), cace_ari_deinit(), CACE_ARI_INIT_UNDEFINED, CACE_ARI_TYPE_BOOL, CACE_LOG_ERR, refda_eval_target(), and result.
Referenced by refda_adm_ietf_dtnma_agent_ctrl_if_then_else(), and refda_exec_check_sbr_condition().
|
static |
Expand a reference to a literal value matching SIMPLE or EXPR typedef.
References refda_runctx_t::agent, cace_amm_lookup_deinit(), cace_amm_lookup_deref(), cace_amm_lookup_init(), cace_ari_init(), CACE_ARI_TYPE_CONST, CACE_ARI_TYPE_EDD, CACE_ARI_TYPE_OPER, CACE_ARI_TYPE_TYPEDEF, CACE_ARI_TYPE_VAR, CACE_LOG_DEBUG, cace_ari_t::is_ref, cace_amm_lookup_t::obj_type, refda_agent_t::objs, REFDA_EVAL_ERR_BAD_TYPE, REFDA_EVAL_ERR_DEREF_FAILED, REFDA_EVAL_ERR_PROD_FAILED, refda_valprod_ctx_deinit(), refda_valprod_ctx_init(), refda_valprod_run(), and refda_valprod_ctx_t::value.
Referenced by refda_eval_target().
|
static |
References cace_amm_obj_desc_t::app_data, cace_amm_type_convert(), cace_amm_type_is_valid(), cace_ari_deinit(), cace_ari_init(), CACE_ARI_TEXT_ENC_OPTS_DEFAULT, cace_ari_text_encode(), CACE_LOG_DEBUG, cace_log_is_enabled_for(), CACE_LOG_WARNING, CHKRET, refda_amm_oper_desc_t::evaluate, cace_amm_idseg_val_t::name, cace_amm_lookup_t::obj, cace_amm_obj_desc_t::obj_id, refda_oper_eval_ctx_t::operands, cace_ari_itemized_t::ordered, cace_amm_user_data_t::ptr, refda_oper_eval_ctx_deinit(), refda_oper_eval_ctx_init(), refda_oper_eval_ctx_populate(), refda_amm_oper_desc_t::res_type, refda_oper_eval_ctx_t::result, and refda_eval_ctx_t::stack.
Referenced by refda_eval_target().
| int refda_eval_target | ( | refda_runctx_t * | runctx, |
| cace_ari_t * | result, | ||
| const cace_ari_t * | ari | ||
| ) |
Implement the evaluation procedure from Section TBD of [ietf-dtn-amm-01].
| [in] | agent | The agent state for ARI lookup. |
| [out] | result | The single result value from the evaluation. This ARI must be initialized before the call and will be valid if the return code is zero but must be deinitialized regardless. |
| [in] | ari | The ARI to dereference, if necessary, and evaluate. |
References cace_ari_cget_ac(), cace_ari_set_copy(), CACE_ARI_TEXT_ENC_OPTS_DEFAULT, cace_ari_text_encode(), CACE_ARI_TYPE_OPER, CACE_LOG_DEBUG, cace_log_is_enabled_for(), CHKERR1, refda_eval_ctx_t::input, cace_ari_ac_t::items, cace_amm_lookup_t::obj_type, refda_eval_ctx_deinit(), refda_eval_ctx_init(), REFDA_EVAL_ERR_BAD_TYPE, REFDA_EVAL_ERR_NON_SINGLE, refda_eval_expand(), refda_eval_oper(), result, and refda_eval_ctx_t::stack.
Referenced by refda_adm_ietf_dtnma_agent_ctrl_wait_cond_check(), refda_adm_ietf_dtnma_agent_oper_tbl_filter(), refda_alarms_compress(), refda_alarms_mgr_state(), refda_alarms_purge(), refda_eval_condition(), refda_reporting_rptt_val(), TEST_CASE(), and test_refda_eval_target_failure().