| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#include <asn_internal.h> |
| 8 |
|
| 9 |
#include "ManufacturerID.h" |
| 10 |
|
| 11 |
static int |
| 12 |
memb_uuid_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 13 |
asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 14 |
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; |
| 15 |
size_t size; |
| 16 |
|
| 17 |
if(!sptr) { |
| 18 |
_ASN_CTFAIL(app_key, td, sptr, |
| 19 |
"%s: value not given (%s:%d)", |
| 20 |
td->name, __FILE__, __LINE__); |
| 21 |
return -1; |
| 22 |
} |
| 23 |
|
| 24 |
size = st->size; |
| 25 |
|
| 26 |
if((size == 16)) { |
| 27 |
|
| 28 |
return 0; |
| 29 |
} else { |
| 30 |
_ASN_CTFAIL(app_key, td, sptr, |
| 31 |
"%s: constraint failed (%s:%d)", |
| 32 |
td->name, __FILE__, __LINE__); |
| 33 |
return -1; |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
static asn_TYPE_member_t asn_MBR_ManufacturerID_1[] = { |
| 38 |
{ ATF_NOFLAGS, 0, offsetof(struct ManufacturerID, choice.oid), |
| 39 |
(ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 40 |
-1, |
| 41 |
&asn_DEF_OBJECT_IDENTIFIER, |
| 42 |
0, |
| 43 |
0, |
| 44 |
0, |
| 45 |
"oid" |
| 46 |
}, |
| 47 |
{ ATF_NOFLAGS, 0, offsetof(struct ManufacturerID, choice.uuid), |
| 48 |
(ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 49 |
-1, |
| 50 |
&asn_DEF_OCTET_STRING, |
| 51 |
memb_uuid_constraint_1, |
| 52 |
0, |
| 53 |
0, |
| 54 |
"uuid" |
| 55 |
}, |
| 56 |
}; |
| 57 |
static asn_TYPE_tag2member_t asn_MAP_ManufacturerID_tag2el_1[] = { |
| 58 |
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, |
| 59 |
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } |
| 60 |
}; |
| 61 |
static asn_CHOICE_specifics_t asn_SPC_ManufacturerID_specs_1 = { |
| 62 |
sizeof(struct ManufacturerID), |
| 63 |
offsetof(struct ManufacturerID, _asn_ctx), |
| 64 |
offsetof(struct ManufacturerID, present), |
| 65 |
sizeof(((struct ManufacturerID *)0)->present), |
| 66 |
asn_MAP_ManufacturerID_tag2el_1, |
| 67 |
2, |
| 68 |
0, |
| 69 |
-1 |
| 70 |
}; |
| 71 |
asn_TYPE_descriptor_t asn_DEF_ManufacturerID = { |
| 72 |
"ManufacturerID", |
| 73 |
"ManufacturerID", |
| 74 |
CHOICE_free, |
| 75 |
CHOICE_print, |
| 76 |
CHOICE_constraint, |
| 77 |
CHOICE_decode_ber, |
| 78 |
CHOICE_encode_der, |
| 79 |
CHOICE_decode_xer, |
| 80 |
CHOICE_encode_xer, |
| 81 |
0, 0, |
| 82 |
CHOICE_outmost_tag, |
| 83 |
0, |
| 84 |
0, |
| 85 |
0, |
| 86 |
0, |
| 87 |
0, |
| 88 |
asn_MBR_ManufacturerID_1, |
| 89 |
2, |
| 90 |
&asn_SPC_ManufacturerID_specs_1 |
| 91 |
}; |
| 92 |
|