DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
Loading...
Searching...
No Matches
edd_prod_ctx.h File Reference
#include "agent.h"
#include "valprod.h"
#include "refda/amm/edd.h"
#include <cace/amm/lookup.h>
#include <cace/ari.h>
+ Include dependency graph for edd_prod_ctx.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  refda_edd_prod_ctx_t
 Context for CTRL execution activities. More...
 

Macros

#define REFDA_EDD_PROD_RESULT_TYPE_NOMATCH   2
 

Functions

void refda_edd_prod_ctx_init (refda_edd_prod_ctx_t *obj, const refda_amm_edd_desc_t *edd, refda_valprod_ctx_t *prodctx)
 Initialize a context based on an object reference ARI and a target object's formal parameters.
 
void refda_edd_prod_ctx_deinit (refda_edd_prod_ctx_t *obj)
 
bool refda_edd_prod_ctx_has_aparam_undefined (const refda_edd_prod_ctx_t *ctx)
 Determine if any actual parameter is undefined.
 
const cace_ari_trefda_edd_prod_ctx_get_aparam_index (const refda_edd_prod_ctx_t *ctx, size_t index)
 Get an actual parameter for this production.
 
const cace_ari_trefda_edd_prod_ctx_get_aparam_name (const refda_edd_prod_ctx_t *ctx, const char *name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int refda_edd_prod_ctx_set_result_copy (refda_edd_prod_ctx_t *ctx, const cace_ari_t *value)
 Set the result for a value production.
 
int refda_edd_prod_ctx_set_result_move (refda_edd_prod_ctx_t *ctx, cace_ari_t *value)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Macro Definition Documentation

◆ REFDA_EDD_PROD_RESULT_TYPE_NOMATCH

#define REFDA_EDD_PROD_RESULT_TYPE_NOMATCH   2

Function Documentation

◆ refda_edd_prod_ctx_deinit()

void refda_edd_prod_ctx_deinit ( refda_edd_prod_ctx_t obj)

References CHKVOID.

◆ refda_edd_prod_ctx_get_aparam_index()

const cace_ari_t * refda_edd_prod_ctx_get_aparam_index ( const refda_edd_prod_ctx_t ctx,
size_t  index 
)

Get an actual parameter for this production.

Parameters
[in]ctxThe production context.
[in]indexThe index into the parameter list.
Returns
A pointer to the parameter value or NULL if no such parameter is present.

References cace_amm_lookup_t::aparams, CHKNULL, refda_valprod_ctx_t::deref, cace_ari_itemized_t::ordered, and refda_edd_prod_ctx_t::prodctx.

Referenced by refda_adm_ietf_dtnma_agent_edd_const_list(), refda_adm_ietf_dtnma_agent_edd_sbr_list(), refda_adm_ietf_dtnma_agent_edd_tbr_list(), refda_adm_ietf_dtnma_agent_edd_typedef_list(), refda_adm_ietf_dtnma_agent_edd_var_list(), test_reporting_edd_one_int(), and test_reporting_edd_one_int().

◆ refda_edd_prod_ctx_get_aparam_name()

const cace_ari_t * refda_edd_prod_ctx_get_aparam_name ( const refda_edd_prod_ctx_t ctx,
const char *  name 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References cace_amm_lookup_t::aparams, CHKNULL, refda_valprod_ctx_t::deref, cace_ari_itemized_t::named, and refda_edd_prod_ctx_t::prodctx.

◆ refda_edd_prod_ctx_has_aparam_undefined()

bool refda_edd_prod_ctx_has_aparam_undefined ( const refda_edd_prod_ctx_t ctx)

Determine if any actual parameter is undefined.

Parameters
[in]ctxThe production context.
Returns
True if there are any undefined values.

References cace_ari_itemized_t::any_undefined, cace_amm_lookup_t::aparams, CHKFALSE, refda_valprod_ctx_t::deref, and refda_edd_prod_ctx_t::prodctx.

◆ refda_edd_prod_ctx_init()

void refda_edd_prod_ctx_init ( refda_edd_prod_ctx_t obj,
const refda_amm_edd_desc_t edd,
refda_valprod_ctx_t prodctx 
)

Initialize a context based on an object reference ARI and a target object's formal parameters.

Parameters
[out]objThe context to initialize.
[in]eddThe EDD descriptor to produce from.
[in,out]prodctxThe production state. The result must outlive this context.

References CHKVOID, refda_edd_prod_ctx_t::edd, and refda_edd_prod_ctx_t::prodctx.

Referenced by refda_valprod_edd_run().

◆ refda_edd_prod_ctx_set_result_copy()

int refda_edd_prod_ctx_set_result_copy ( refda_edd_prod_ctx_t ctx,
const cace_ari_t value 
)

Set the result for a value production.

Parameters
[in,out]ctxThe context to update.
[in]valueThe value to use as the production result.
Returns
Zero if successful and the value has a matching type. Otherwise REFDA_EDD_PROD_RESULT_TYPE_NOMATCH.

References cace_ari_set_copy(), CHKERR1, refda_edd_prod_ctx_t::prodctx, refda_edd_prod_check_result(), and refda_valprod_ctx_t::value.

Referenced by test_reporting_edd_one_int(), and test_reporting_edd_one_int().

◆ refda_edd_prod_ctx_set_result_move()

int refda_edd_prod_ctx_set_result_move ( refda_edd_prod_ctx_t ctx,
cace_ari_t value 
)