Debian Codegraph @

biosig4c++/t240/PowerStatus.c

raw symbols SCIP
1 /*
2 * Generated by asn1c-0.9.21 (http://lionet.info/asn1c)
3 * From ASN.1 module "FEF-IntermediateDraft"
4 * found in "../annexb-snacc-122001.asn1"
5 */
6
7 #include <asn_internal.h>
8
9 #include "PowerStatus.h"
10
11 int
12 PowerStatus_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
13 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14 /* Replace with underlying type checker */
15 td->check_constraints = asn_DEF_BIT_STRING.check_constraints;
16 return td->check_constraints(td, sptr, ctfailcb, app_key);
17 }
18
19 /*
20 * This type is implemented using BIT_STRING,
21 * so here we adjust the DEF accordingly.
22 */
23 static void
24 PowerStatus_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
25 td->free_struct = asn_DEF_BIT_STRING.free_struct;
26 td->print_struct = asn_DEF_BIT_STRING.print_struct;
27 td->ber_decoder = asn_DEF_BIT_STRING.ber_decoder;
28 td->der_encoder = asn_DEF_BIT_STRING.der_encoder;
29 td->xer_decoder = asn_DEF_BIT_STRING.xer_decoder;
30 td->xer_encoder = asn_DEF_BIT_STRING.xer_encoder;
31 td->uper_decoder = asn_DEF_BIT_STRING.uper_decoder;
32 td->uper_encoder = asn_DEF_BIT_STRING.uper_encoder;
33 if(!td->per_constraints)
34 td->per_constraints = asn_DEF_BIT_STRING.per_constraints;
35 td->elements = asn_DEF_BIT_STRING.elements;
36 td->elements_count = asn_DEF_BIT_STRING.elements_count;
37 td->specifics = asn_DEF_BIT_STRING.specifics;
38 }
39
40 void
41 PowerStatus_free(asn_TYPE_descriptor_t *td,
42 void *struct_ptr, int contents_only) {
43 PowerStatus_1_inherit_TYPE_descriptor(td);
44 td->free_struct(td, struct_ptr, contents_only);
45 }
46
47 int
48 PowerStatus_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
49 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
50 PowerStatus_1_inherit_TYPE_descriptor(td);
51 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
52 }
53
54 asn_dec_rval_t
55 PowerStatus_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
56 void **structure, const void *bufptr, size_t size, int tag_mode) {
57 PowerStatus_1_inherit_TYPE_descriptor(td);
58 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
59 }
60
61 asn_enc_rval_t
62 PowerStatus_encode_der(asn_TYPE_descriptor_t *td,
63 void *structure, int tag_mode, ber_tlv_tag_t tag,
64 asn_app_consume_bytes_f *cb, void *app_key) {
65 PowerStatus_1_inherit_TYPE_descriptor(td);
66 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
67 }
68
69 asn_dec_rval_t
70 PowerStatus_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
71 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
72 PowerStatus_1_inherit_TYPE_descriptor(td);
73 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
74 }
75
76 asn_enc_rval_t
77 PowerStatus_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
78 int ilevel, enum xer_encoder_flags_e flags,
79 asn_app_consume_bytes_f *cb, void *app_key) {
80 PowerStatus_1_inherit_TYPE_descriptor(td);
81 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
82 }
83
84 static ber_tlv_tag_t asn_DEF_PowerStatus_tags_1[] = {
85 (ASN_TAG_CLASS_UNIVERSAL | (3 << 2))
86 };
87 asn_TYPE_descriptor_t asn_DEF_PowerStatus = {
88 "PowerStatus",
89 "PowerStatus",
90 PowerStatus_free,
91 PowerStatus_print,
92 PowerStatus_constraint,
93 PowerStatus_decode_ber,
94 PowerStatus_encode_der,
95 PowerStatus_decode_xer,
96 PowerStatus_encode_xer,
97 0, 0, /* No PER support, use "-gen-PER" to enable */
98 0, /* Use generic outmost tag fetcher */
99 asn_DEF_PowerStatus_tags_1,
100 sizeof(asn_DEF_PowerStatus_tags_1)
101 /sizeof(asn_DEF_PowerStatus_tags_1[0]), /* 1 */
102 asn_DEF_PowerStatus_tags_1, /* Same as above */
103 sizeof(asn_DEF_PowerStatus_tags_1)
104 /sizeof(asn_DEF_PowerStatus_tags_1[0]), /* 1 */
105 0, /* No PER visible constraints */
106 0, 0, /* Defined elsewhere */
107 0 /* No specifics */
108 };
109