Go to the documentation of this file.
14 #define IN_EXTENSION_GROUP(specs, memb_idx) \
15 ((specs)->first_extension >= 0 \
16 && (unsigned)(specs)->first_extension <= (memb_idx))
40 ASN_DEBUG(
"Decoding %s as SEQUENCE (APER)", td->
name);
51 memset(&opmd, 0,
sizeof(opmd));
62 ASN_DEBUG(
"Read in presence bitmap for %s of %d bits (%x..)",
84 memb_ptr2 = (
void **)((
char *)st + elm->
memb_offset);
87 memb_ptr2 = &memb_ptr;
91 padding = (8 - (pd->
moved % 8)) % 8;
93 ASN_DEBUG(
"For element %s,offset= %ld Padding bits = %d", td->
name, pd->
moved, padding);
101 ASN_DEBUG(
">>>>> not skipping padding of %d bits for element:%ld out of %d", padding, edx, td->
elements_count);
110 ASN_DEBUG(
"Member %s->%s is optional, p=%d (%d->%d)",
112 (
int)opmd.nboff, (
int)opmd.nbits);
121 ASN_DEBUG(
"Filled-in default");
130 ASN_DEBUG(
"Decoding member \"%s\" in %s", elm->
name, td->
name);
144 if(rv.code !=
RC_OK) {
145 ASN_DEBUG(
"Failed decode %s in %s",
168 epres = (uint8_t *)
MALLOC((bmlength + 15) >> 3);
175 memset(&epmd, 0,
sizeof(epmd));
177 epmd.
nbits = bmlength;
178 ASN_DEBUG(
"Read in extensions bitmap for %s of %zd bits (%x..)",
179 td->
name, bmlength, *epres);
193 ASN_DEBUG(
"%zu is not extension", edx);
199 memb_ptr2 = (
void **)((
char *)st + elm->
memb_offset);
201 memb_ptr = (
void *)((
char *)st + elm->
memb_offset);
202 memb_ptr2 = &memb_ptr;
207 if(present < 0)
break;
211 ASN_DEBUG(
"Decoding member %s in %s %p", elm->
name, td->
name, *memb_ptr2);
215 if(rv.code !=
RC_OK) {
224 ASN_DEBUG(
"Getting overflow extensions");
243 for(edx = specs->
roms_count; edx < specs->roms_count
252 memb_ptr2 = (
void **)((
char *)st + elm->
memb_offset);
253 if(*memb_ptr2)
continue;
275 int exts_present = 0;
286 const void *memb_ptr;
287 const void *
const *memb_ptr2;
291 ASN_DEBUG(
"%s (@%zu) is not extension", elm->
type->
name, edx);
297 memb_ptr2 = (
const void *
const *)((
const char *)sptr + elm->
memb_offset);
298 present = (*memb_ptr2 != 0);
300 memb_ptr = (
const void *)((
const char *)sptr + elm->
memb_offset);
301 memb_ptr2 = &memb_ptr;
305 ASN_DEBUG(
"checking %s (@%zu) present => %d",
308 exts_present += present;
321 return exts_present ? exts_count : 0;
342 ASN_DEBUG(
"Encoding %s as SEQUENCE (APER)", td->name);
348 if(specs->first_extension < 0) {
359 for(i = 0; i < specs->roms_count; i++) {
361 const void *memb_ptr;
362 const void *
const *memb_ptr2;
366 elm = &td->elements[edx];
370 memb_ptr2 = (
const void *
const *)((
const char *)sptr + elm->
memb_offset);
371 present = (*memb_ptr2 != 0);
373 memb_ptr = (
const void *)((
const char *)sptr + elm->
memb_offset);
374 memb_ptr2 = &memb_ptr;
383 ASN_DEBUG(
"Element %s %s %s->%s is %s",
386 td->name, elm->
name, present ?
"present" :
"absent");
394 ASN_DEBUG(
"first_extension = %d, elements = %d", specs->first_extension,
397 edx < ((specs->first_extension < 0) ? td->elements_count
398 : (
size_t)specs->first_extension);
401 const void *memb_ptr;
402 const void *
const *memb_ptr2;
407 ASN_DEBUG(
"About to encode %s", elm->
type->
name);
411 memb_ptr2 = (
const void *
const *)((
const char *)sptr + elm->
memb_offset);
413 ASN_DEBUG(
"Element %s %zu not present",
421 memb_ptr = (
const void *)((
const char *)sptr + elm->
memb_offset);
422 memb_ptr2 = &memb_ptr;
429 ASN_DEBUG(
"Encoding %s->%s", td->name, elm->
name);
440 ASN_DEBUG(
"Length of %d bit-map", n_extensions);
445 ASN_DEBUG(
"Bit-map of %d elements", n_extensions);
451 ASN_DEBUG(
"Writing %d extensions", n_extensions);
int aper_put_nslength(asn_per_outp_t *po, size_t length)
int aper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd)
per_type_encoder_f * aper_encoder
static int SEQUENCE_handle_extensions_aper(const asn_TYPE_descriptor_t *td, const void *sptr, asn_per_outp_t *po1, asn_per_outp_t *po2)
asn_dec_rval_t aper_open_type_get(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 ASN__ENCODED_OK(rval)
#define CALLOC(nmemb, size)
#define IN_EXTENSION_GROUP(specs, memb_idx)
#define per_get_few_bits(data, bits)
asn_dec_rval_t SEQUENCE_decode_aper(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)
ssize_t aper_get_nslength(asn_per_data_t *pd)
#define ASN__ENCODE_FAILED
asn_TYPE_descriptor_t * type
asn_enc_rval_t SEQUENCE_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po)
int32_t aper_get_align(asn_per_data_t *pd)
int OPEN_TYPE_aper_is_unknown_type(const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm)
asn_TYPE_operation_t * op
per_type_decoder_f * aper_decoder
asn_dec_rval_t OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *parent_type, void *parent_structure, const asn_TYPE_member_t *element, asn_per_data_t *pd)
int aper_open_type_put(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po)
static int CC_NOTUSED ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx)
asn_dec_rval_t OPEN_TYPE_aper_unknown_type_discard_bytes(asn_per_data_t *pd)
#define ASN__DECODE_STARVED
#define per_get_many_bits(data, dst, align, bits)
const struct asn_per_constraints_s * per_constraints
struct asn_TYPE_member_s * elements
#define ASN__DECODE_FAILED
enum asn_TYPE_flags_e flags
int(* default_value_cmp)(const void *sptr)
#define per_put_few_bits(out, bits, obits)
asn_encoding_constraints_t encoding_constraints
int(* default_value_set)(void **sptr)
etsi_its_vam_ts_coding
Author(s): Jean-Pierre Busch
, Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:30:55