|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
Include dependency graph for semtype_cnst.c:Functions | |
| void | cace_amm_semtype_cnst_init (cace_amm_semtype_cnst_t *obj) |
| void | cace_amm_semtype_cnst_deinit (cace_amm_semtype_cnst_t *obj) |
| cace_amm_range_int64_t * | cace_amm_semtype_cnst_set_range_int64 (cace_amm_semtype_cnst_t *obj) |
| Configure a constraint on integer values based on a range of valid signed 64-bit values. | |
| uint64_t * | cace_amm_semtype_cnst_set_int_bits (cace_amm_semtype_cnst_t *obj) |
| Configure a constraint on integer values based on a mask of valid bit positions (in an integer value). | |
| cace_amm_range_size_t * | cace_amm_semtype_cnst_set_strlen (cace_amm_semtype_cnst_t *obj) |
| Configure a constraint on text-string or byte-string size. | |
| int | cace_amm_semtype_cnst_set_textpat (cace_amm_semtype_cnst_t *obj, const char *pat) |
| Configure a constraint on text-string regular expression pattern. | |
| bool | cace_amm_semtype_cnst_is_valid (const cace_amm_semtype_cnst_t *obj, const cace_ari_t *val) |
| Determine if a specific value is valid according to a constraint. | |
| void cace_amm_semtype_cnst_deinit | ( | cace_amm_semtype_cnst_t * | obj | ) |
References AMM_SEMTYPE_CNST_INT_BITS, AMM_SEMTYPE_CNST_INVALID, AMM_SEMTYPE_CNST_RANGE_INT64, AMM_SEMTYPE_CNST_STRLEN, AMM_SEMTYPE_CNST_TEXTPAT, cace_amm_semtype_cnst_t::as_range_int64, cace_amm_semtype_cnst_t::as_strlen, cace_amm_semtype_cnst_t::as_textpat, CHKVOID, and cace_amm_semtype_cnst_t::type.
Referenced by cace_amm_semtype_cnst_set_int_bits(), cace_amm_semtype_cnst_set_range_int64(), cace_amm_semtype_cnst_set_strlen(), cace_amm_semtype_cnst_set_textpat(), test_amm_semtype_cnst_int_bits_1intvl_finite(), test_amm_semtype_cnst_range_int64_1intvl_finite(), test_amm_semtype_cnst_strlen_1intvl_finite(), test_amm_semtype_cnst_strlen_1intvl_highindef(), test_amm_semtype_cnst_strlen_1intvl_infinite(), test_amm_semtype_cnst_strlen_1intvl_lowindef(), test_amm_semtype_cnst_strlen_2intvl_finite(), test_amm_semtype_cnst_strlen_empty(), and test_amm_semtype_cnst_textpat().
| void cace_amm_semtype_cnst_init | ( | cace_amm_semtype_cnst_t * | obj | ) |
References AMM_SEMTYPE_CNST_INVALID, CHKVOID, and cace_amm_semtype_cnst_t::type.
Referenced by test_amm_semtype_cnst_int_bits_1intvl_finite(), test_amm_semtype_cnst_range_int64_1intvl_finite(), test_amm_semtype_cnst_strlen_1intvl_finite(), test_amm_semtype_cnst_strlen_1intvl_highindef(), test_amm_semtype_cnst_strlen_1intvl_infinite(), test_amm_semtype_cnst_strlen_1intvl_lowindef(), test_amm_semtype_cnst_strlen_2intvl_finite(), test_amm_semtype_cnst_strlen_empty(), and test_amm_semtype_cnst_textpat().
| bool cace_amm_semtype_cnst_is_valid | ( | const cace_amm_semtype_cnst_t * | obj, |
| const cace_ari_t * | val | ||
| ) |
Determine if a specific value is valid according to a constraint.
| [in] | obj | The constraint to check against. |
| [in] | val | The value to check. |
References AMM_SEMTYPE_CNST_INT_BITS, AMM_SEMTYPE_CNST_INVALID, AMM_SEMTYPE_CNST_RANGE_INT64, AMM_SEMTYPE_CNST_STRLEN, AMM_SEMTYPE_CNST_TEXTPAT, cace_amm_semtype_cnst_t::as_bit_mask, cace_ari_t::as_lit, cace_amm_semtype_cnst_t::as_range_int64, cace_amm_semtype_cnst_t::as_strlen, cace_amm_semtype_cnst_t::as_textpat, cace_ari_cget_bstr(), cace_ari_cget_tstr(), cace_ari_get_uvast(), cace_ari_get_vast(), CACE_ARI_PRIM_BSTR, CACE_ARI_PRIM_TSTR, CACE_LOG_DEBUG, cace_ari_t::is_ref, cace_data_t::len, cace_ari_lit_t::prim_type, cace_data_t::ptr, and cace_amm_semtype_cnst_t::type.
Referenced by cace_amm_semtype_use_constraints(), and check_cnst().
| uint64_t * cace_amm_semtype_cnst_set_int_bits | ( | cace_amm_semtype_cnst_t * | obj | ) |
Configure a constraint on integer values based on a mask of valid bit positions (in an integer value).
The constraint allows none or multiple of these bits to be set.
This applies to CACE_ARI_TYPE_BYTE, CACE_ARI_TYPE_INT, CACE_ARI_TYPE_UINT, CACE_ARI_TYPE_VAST, and a limited domain of CACE_ARI_TYPE_UVAST as well as untyped primitive integer values.
| [in,out] | obj | The struct to set the state of. |
References AMM_SEMTYPE_CNST_INT_BITS, cace_amm_semtype_cnst_t::as_bit_mask, cace_amm_semtype_cnst_deinit(), CHKNULL, and cace_amm_semtype_cnst_t::type.
Referenced by test_amm_semtype_cnst_int_bits_1intvl_finite().
| cace_amm_range_int64_t * cace_amm_semtype_cnst_set_range_int64 | ( | cace_amm_semtype_cnst_t * | obj | ) |
Configure a constraint on integer values based on a range of valid signed 64-bit values.
This can be used for enum values also, where the names of those values does not matter for this constraint.
This applies to CACE_ARI_TYPE_BYTE, CACE_ARI_TYPE_INT, CACE_ARI_TYPE_UINT, CACE_ARI_TYPE_VAST, and a limited domain of CACE_ARI_TYPE_UVAST as well as untyped primitive integer values.
| [in,out] | obj | The struct to set the state of. |
References AMM_SEMTYPE_CNST_RANGE_INT64, cace_amm_semtype_cnst_t::as_range_int64, cace_amm_semtype_cnst_deinit(), CHKNULL, and cace_amm_semtype_cnst_t::type.
Referenced by refda_adm_ietf_dtnma_agent_init(), and test_amm_semtype_cnst_range_int64_1intvl_finite().
| cace_amm_range_size_t * cace_amm_semtype_cnst_set_strlen | ( | cace_amm_semtype_cnst_t * | obj | ) |
Configure a constraint on text-string or byte-string size.
This applies to CACE_ARI_TYPE_TEXTSTR and CACE_ARI_TYPE_BYTESTR as well as untyped primitive text- and byte-strings.
| [in,out] | obj | The struct to set the state of. |
References AMM_SEMTYPE_CNST_STRLEN, cace_amm_semtype_cnst_t::as_strlen, cace_amm_semtype_cnst_deinit(), CHKNULL, and cace_amm_semtype_cnst_t::type.
Referenced by test_amm_semtype_cnst_strlen_1intvl_finite(), test_amm_semtype_cnst_strlen_1intvl_highindef(), test_amm_semtype_cnst_strlen_1intvl_infinite(), test_amm_semtype_cnst_strlen_1intvl_lowindef(), test_amm_semtype_cnst_strlen_2intvl_finite(), and test_amm_semtype_cnst_strlen_empty().
| int cace_amm_semtype_cnst_set_textpat | ( | cace_amm_semtype_cnst_t * | obj, |
| const char * | pat | ||
| ) |
Configure a constraint on text-string regular expression pattern.
This applies to CACE_ARI_TYPE_TEXTSTR as well as untyped primitive text strings.
pat parameter is the start- and end-anchored PCRE pattern, which conforms to the I-Regexp standard of RFC 9485 [rfc9485]. This pattern does not need to include leading "\A(?" or trailing ")\z" parts.| [in,out] | obj | The struct to set the state of. |
| [in] | pat | The regular expression to compile. |
References AMM_SEMTYPE_CNST_TEXTPAT, cace_amm_semtype_cnst_t::as_textpat, cace_amm_semtype_cnst_deinit(), CACE_LOG_ERR, CHKERR1, and cace_amm_semtype_cnst_t::type.
Referenced by refda_adm_ietf_dtnma_agent_init(), and test_amm_semtype_cnst_textpat().