代码拉取完成,页面将自动刷新
同步操作将从 s_baoshan/dlt698.45 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "DLT69845"
* found in "dlt698.45.asn1"
* `asn1c -gen-PER -pdu=all`
*/
#include "FactoryVersion.h"
static int check_permitted_alphabet_2(const void *sptr) {
/* The underlying type is VisibleString */
const VisibleString_t *st = (const VisibleString_t *)sptr;
const uint8_t *ch = st->buf;
const uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
uint8_t cv = *ch;
if(!(cv >= 32 && cv <= 126)) return -1;
}
return 0;
}
static int check_permitted_alphabet_3(const void *sptr) {
/* The underlying type is VisibleString */
const VisibleString_t *st = (const VisibleString_t *)sptr;
const uint8_t *ch = st->buf;
const uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
uint8_t cv = *ch;
if(!(cv >= 32 && cv <= 126)) return -1;
}
return 0;
}
static int check_permitted_alphabet_4(const void *sptr) {
/* The underlying type is VisibleString */
const VisibleString_t *st = (const VisibleString_t *)sptr;
const uint8_t *ch = st->buf;
const uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
uint8_t cv = *ch;
if(!(cv >= 32 && cv <= 126)) return -1;
}
return 0;
}
static int check_permitted_alphabet_5(const void *sptr) {
/* The underlying type is VisibleString */
const VisibleString_t *st = (const VisibleString_t *)sptr;
const uint8_t *ch = st->buf;
const uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
uint8_t cv = *ch;
if(!(cv >= 32 && cv <= 126)) return -1;
}
return 0;
}
static int check_permitted_alphabet_6(const void *sptr) {
/* The underlying type is VisibleString */
const VisibleString_t *st = (const VisibleString_t *)sptr;
const uint8_t *ch = st->buf;
const uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
uint8_t cv = *ch;
if(!(cv >= 32 && cv <= 126)) return -1;
}
return 0;
}
static int check_permitted_alphabet_7(const void *sptr) {
/* The underlying type is VisibleString */
const VisibleString_t *st = (const VisibleString_t *)sptr;
const uint8_t *ch = st->buf;
const uint8_t *end = ch + st->size;
for(; ch < end; ch++) {
uint8_t cv = *ch;
if(!(cv >= 32 && cv <= 126)) return -1;
}
return 0;
}
static int
memb_vendorCode_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const VisibleString_t *st = (const VisibleString_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 4)
&& !check_permitted_alphabet_2(st)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_softVerCode_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const VisibleString_t *st = (const VisibleString_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 4)
&& !check_permitted_alphabet_3(st)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_softverDate_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const VisibleString_t *st = (const VisibleString_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 6)
&& !check_permitted_alphabet_4(st)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_hardVerCode_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const VisibleString_t *st = (const VisibleString_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 4)
&& !check_permitted_alphabet_5(st)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_hardVerDate_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const VisibleString_t *st = (const VisibleString_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 6)
&& !check_permitted_alphabet_6(st)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_vendorExtInfo_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const VisibleString_t *st = (const VisibleString_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 8)
&& !check_permitted_alphabet_7(st)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_memb_vendorCode_constr_2 GCC_NOTUSED = {
{ APC_CONSTRAINED, 7, 7, 32, 126 } /* (32..126) */,
{ APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */,
0, 0 /* No PER character map necessary */
};
static asn_per_constraints_t asn_PER_memb_softVerCode_constr_3 GCC_NOTUSED = {
{ APC_CONSTRAINED, 7, 7, 32, 126 } /* (32..126) */,
{ APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */,
0, 0 /* No PER character map necessary */
};
static asn_per_constraints_t asn_PER_memb_softverDate_constr_4 GCC_NOTUSED = {
{ APC_CONSTRAINED, 7, 7, 32, 126 } /* (32..126) */,
{ APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */,
0, 0 /* No PER character map necessary */
};
static asn_per_constraints_t asn_PER_memb_hardVerCode_constr_5 GCC_NOTUSED = {
{ APC_CONSTRAINED, 7, 7, 32, 126 } /* (32..126) */,
{ APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */,
0, 0 /* No PER character map necessary */
};
static asn_per_constraints_t asn_PER_memb_hardVerDate_constr_6 GCC_NOTUSED = {
{ APC_CONSTRAINED, 7, 7, 32, 126 } /* (32..126) */,
{ APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */,
0, 0 /* No PER character map necessary */
};
static asn_per_constraints_t asn_PER_memb_vendorExtInfo_constr_7 GCC_NOTUSED = {
{ APC_CONSTRAINED, 7, 7, 32, 126 } /* (32..126) */,
{ APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */,
0, 0 /* No PER character map necessary */
};
static asn_TYPE_member_t asn_MBR_FactoryVersion_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct FactoryVersion, vendorCode),
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
0,
&asn_DEF_VisibleString,
memb_vendorCode_constraint_1,
&asn_PER_memb_vendorCode_constr_2,
0,
"vendorCode"
},
{ ATF_NOFLAGS, 0, offsetof(struct FactoryVersion, softVerCode),
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
0,
&asn_DEF_VisibleString,
memb_softVerCode_constraint_1,
&asn_PER_memb_softVerCode_constr_3,
0,
"softVerCode"
},
{ ATF_NOFLAGS, 0, offsetof(struct FactoryVersion, softverDate),
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
0,
&asn_DEF_VisibleString,
memb_softverDate_constraint_1,
&asn_PER_memb_softverDate_constr_4,
0,
"softverDate"
},
{ ATF_NOFLAGS, 0, offsetof(struct FactoryVersion, hardVerCode),
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
0,
&asn_DEF_VisibleString,
memb_hardVerCode_constraint_1,
&asn_PER_memb_hardVerCode_constr_5,
0,
"hardVerCode"
},
{ ATF_NOFLAGS, 0, offsetof(struct FactoryVersion, hardVerDate),
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
0,
&asn_DEF_VisibleString,
memb_hardVerDate_constraint_1,
&asn_PER_memb_hardVerDate_constr_6,
0,
"hardVerDate"
},
{ ATF_NOFLAGS, 0, offsetof(struct FactoryVersion, vendorExtInfo),
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2)),
0,
&asn_DEF_VisibleString,
memb_vendorExtInfo_constraint_1,
&asn_PER_memb_vendorExtInfo_constr_7,
0,
"vendorExtInfo"
},
};
static const ber_tlv_tag_t asn_DEF_FactoryVersion_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_FactoryVersion_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 5 }, /* vendorCode */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 4 }, /* softVerCode */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 2, -2, 3 }, /* softverDate */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 3, -3, 2 }, /* hardVerCode */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 4, -4, 1 }, /* hardVerDate */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 5, -5, 0 } /* vendorExtInfo */
};
static asn_SEQUENCE_specifics_t asn_SPC_FactoryVersion_specs_1 = {
sizeof(struct FactoryVersion),
offsetof(struct FactoryVersion, _asn_ctx),
asn_MAP_FactoryVersion_tag2el_1,
6, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_FactoryVersion = {
"FactoryVersion",
"FactoryVersion",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
SEQUENCE_decode_uper,
SEQUENCE_encode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_FactoryVersion_tags_1,
sizeof(asn_DEF_FactoryVersion_tags_1)
/sizeof(asn_DEF_FactoryVersion_tags_1[0]), /* 1 */
asn_DEF_FactoryVersion_tags_1, /* Same as above */
sizeof(asn_DEF_FactoryVersion_tags_1)
/sizeof(asn_DEF_FactoryVersion_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_FactoryVersion_1,
6, /* Elements count */
&asn_SPC_FactoryVersion_specs_1 /* Additional specs */
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。