Go to the documentation of this file.
16 long *native = (
long *)*sptr;
22 if(constraints) ct = &constraints->
value;
29 native = (
long *)(*sptr =
CALLOC(1,
sizeof(*native)));
33 ASN_DEBUG(
"Decoding %s as NativeEnumerated", td->
name);
35 if(ct->
flags & APC_EXTENSIBLE) {
61 ASN_DEBUG(
"Decoded %s = %ld", td->
name, *native);
82 if(constraints) ct = &constraints->value;
83 else if(td->encoding_constraints.per_constraints)
84 ct = &td->encoding_constraints.per_constraints->value;
87 ASN_DEBUG(
"Encoding %s as NativeEnumerated", td->name);
91 native = *(
const long *)sptr;
93 key.nat_value = native;
94 kf = bsearch(&
key, specs->value2enum, specs->map_count,
97 ASN_DEBUG(
"No element corresponds to %ld", native);
100 value = kf - specs->value2enum;
103 int cmpWith = specs->extension
104 ? specs->extension - 1 : specs->map_count;
108 if(ct->
flags & APC_EXTENSIBLE) {
122 if(!specs->extension)
128 ASN_DEBUG(
"value = %ld, ext = %d, inext = %d, res = %ld",
129 value, specs->extension, inext,
130 value - (inext ? (specs->extension - 1) : 0));
#define ASN__ENCODED_OK(rval)
int uper_put_nsnnwn(asn_per_outp_t *po, int n)
asn_dec_rval_t NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd)
#define CALLOC(nmemb, size)
#define per_get_few_bits(data, bits)
asn_per_constraint_t value
int NativeEnumerated__compar_value2enum(const void *ap, const void *bp)
asn_enc_rval_t NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po)
#define ASN__ENCODE_FAILED
#define ASN__DECODE_STARVED
const struct asn_per_constraints_s * per_constraints
static void ssize_t void * key
#define ASN__DECODE_FAILED
asn_encoding_constraints_t encoding_constraints
const asn_INTEGER_enum_map_t * value2enum
enum asn_per_constraint_s::asn_per_constraint_flags flags
ssize_t uper_get_nsnnwn(asn_per_data_t *pd)
#define per_put_few_bits(out, bits, obits)
etsi_its_vam_ts_coding
Author(s): Jean-Pierre Busch
, Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:30:55