-
Notifications
You must be signed in to change notification settings - Fork 198
/
CurrentRate.c
165 lines (155 loc) · 5.01 KB
/
CurrentRate.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "TcpkaliOrchestration"
* found in "TcpkaliOrchestration.asn1"
* `asn1c -gen-OER -gen-PER -pdu=TcpkaliMessage`
*/
#include "CurrentRate.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static int
value_6_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
/* Nothing is here. See below */
}
return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using NonNegativeReal,
* so here we adjust the DEF accordingly.
*/
static asn_oer_constraints_t asn_OER_type_valueBase_constr_2 CC_NOTUSED = {
{ 0, 0 },
-1};
static asn_per_constraints_t asn_PER_type_valueBase_constr_2 CC_NOTUSED = {
{ APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_oer_constraints_t asn_OER_type_value_constr_6 CC_NOTUSED = {
{ sizeof(float), 0 },
-1};
static asn_per_constraints_t asn_PER_type_value_constr_6 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_valueBase_value2enum_2[] = {
{ 0, 9, "unlimited" },
{ 1, 14, "bytesPerSecond" },
{ 2, 17, "messagesPerSecond" }
};
static const unsigned int asn_MAP_valueBase_enum2value_2[] = {
1, /* bytesPerSecond(1) */
2, /* messagesPerSecond(2) */
0 /* unlimited(0) */
};
static const asn_INTEGER_specifics_t asn_SPC_valueBase_specs_2 = {
asn_MAP_valueBase_value2enum_2, /* "tag" => N; sorted by tag */
asn_MAP_valueBase_enum2value_2, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_valueBase_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_valueBase_2 = {
"valueBase",
"valueBase",
&asn_OP_NativeEnumerated,
asn_DEF_valueBase_tags_2,
sizeof(asn_DEF_valueBase_tags_2)
/sizeof(asn_DEF_valueBase_tags_2[0]) - 1, /* 1 */
asn_DEF_valueBase_tags_2, /* Same as above */
sizeof(asn_DEF_valueBase_tags_2)
/sizeof(asn_DEF_valueBase_tags_2[0]), /* 2 */
{ &asn_OER_type_valueBase_constr_2, &asn_PER_type_valueBase_constr_2, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_valueBase_specs_2 /* Additional specs */
};
static const asn_NativeReal_specifics_t asn_SPC_value_specs_6 = {
4 /* Use 'float' type. */
};
static const ber_tlv_tag_t asn_DEF_value_tags_6[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_value_6 = {
"value",
"value",
&asn_OP_NativeReal,
asn_DEF_value_tags_6,
sizeof(asn_DEF_value_tags_6)
/sizeof(asn_DEF_value_tags_6[0]) - 1, /* 1 */
asn_DEF_value_tags_6, /* Same as above */
sizeof(asn_DEF_value_tags_6)
/sizeof(asn_DEF_value_tags_6[0]), /* 2 */
{ &asn_OER_type_value_constr_6, &asn_PER_type_value_constr_6, value_6_constraint },
0, 0, /* No members */
&asn_SPC_value_specs_6 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_CurrentRate_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct CurrentRate, valueBase),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_valueBase_2,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"valueBase"
},
{ ATF_NOFLAGS, 0, offsetof(struct CurrentRate, value),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NonNegativeReal,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"value"
},
};
static const ber_tlv_tag_t asn_DEF_CurrentRate_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_CurrentRate_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* valueBase */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* value */
};
asn_SEQUENCE_specifics_t asn_SPC_CurrentRate_specs_1 = {
sizeof(struct CurrentRate),
offsetof(struct CurrentRate, _asn_ctx),
asn_MAP_CurrentRate_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_CurrentRate = {
"CurrentRate",
"CurrentRate",
&asn_OP_SEQUENCE,
asn_DEF_CurrentRate_tags_1,
sizeof(asn_DEF_CurrentRate_tags_1)
/sizeof(asn_DEF_CurrentRate_tags_1[0]), /* 1 */
asn_DEF_CurrentRate_tags_1, /* Same as above */
sizeof(asn_DEF_CurrentRate_tags_1)
/sizeof(asn_DEF_CurrentRate_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_CurrentRate_1,
2, /* Elements count */
&asn_SPC_CurrentRate_specs_1 /* Additional specs */
};