blob: 8765da9b218bcd479d641f7db3108f66951b1053 [file] [log] [blame]
slowr13fa5b02017-08-08 16:32:31 -07001/**
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08002 * This class file was automatically generated by jASN1 v1.8.2 (http://www.openmuc.org)
slowr13fa5b02017-08-08 16:32:31 -07003 */
4
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08005package org.onosproject.xran.asn1lib.pdu;
slowr13fa5b02017-08-08 16:32:31 -07006
slowr60d4d102017-08-16 18:33:58 -07007import com.fasterxml.jackson.annotation.JsonIgnore;
8import com.fasterxml.jackson.annotation.JsonValue;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08009import org.onosproject.xran.asn1lib.api.CRNTI;
10import org.onosproject.xran.asn1lib.api.ECGI;
11import org.onosproject.xran.asn1lib.api.QCI;
12import org.onosproject.xran.asn1lib.ber.BerByteArrayOutputStream;
13import org.onosproject.xran.asn1lib.ber.BerLength;
14import org.onosproject.xran.asn1lib.ber.BerTag;
15import org.onosproject.xran.asn1lib.ber.types.BerInteger;
slowr67d05e42017-08-11 20:37:22 -070016
slowr13fa5b02017-08-08 16:32:31 -070017import java.io.IOException;
18import java.io.InputStream;
19import java.io.Serializable;
20import java.util.ArrayList;
21import java.util.Iterator;
22import java.util.List;
23
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080024public class PDCPMeasReportPerUe implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -070025
slowr67d05e42017-08-11 20:37:22 -070026 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
27 private static final long serialVersionUID = 1L;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080028
slowr60d4d102017-08-16 18:33:58 -070029 @JsonIgnore
slowr67d05e42017-08-11 20:37:22 -070030 public byte[] code = null;
31 private ECGI ecgi = null;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080032 private CRNTI crnti = null;
33 private QciVals qciVals = null;
34 private DataVolDl dataVolDl = null;
35 private DataVolUl dataVolUl = null;
36 private PktDelayDl pktDelayDl = null;
37 private PktDelayUl pktDelayUl = null;
38 private PktDiscardRateDl pktDiscardRateDl = null;
39 private PktLossRateDl pktLossRateDl = null;
40 private PktLossRateUl pktLossRateUl = null;
41 private ThroughputDl throughputDl = null;
42 private ThroughputUl throughputUl = null;
slowr13fa5b02017-08-08 16:32:31 -070043
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080044 public PDCPMeasReportPerUe() {
slowr67d05e42017-08-11 20:37:22 -070045 }
slowr13fa5b02017-08-08 16:32:31 -070046
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080047 public PDCPMeasReportPerUe(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -070048 this.code = code;
49 }
slowr13fa5b02017-08-08 16:32:31 -070050
slowr67d05e42017-08-11 20:37:22 -070051 public ECGI getEcgi() {
52 return ecgi;
53 }
slowr13fa5b02017-08-08 16:32:31 -070054
slowr67d05e42017-08-11 20:37:22 -070055 public void setEcgi(ECGI ecgi) {
56 this.ecgi = ecgi;
57 }
slowr13fa5b02017-08-08 16:32:31 -070058
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080059 public CRNTI getCrnti() {
slowr67d05e42017-08-11 20:37:22 -070060 return crnti;
61 }
slowr13fa5b02017-08-08 16:32:31 -070062
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080063 public void setCrnti(CRNTI crnti) {
slowr67d05e42017-08-11 20:37:22 -070064 this.crnti = crnti;
65 }
slowr13fa5b02017-08-08 16:32:31 -070066
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080067 public QciVals getQciVals() {
68 return qciVals;
slowr67d05e42017-08-11 20:37:22 -070069 }
slowr13fa5b02017-08-08 16:32:31 -070070
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080071 public void setQciVals(QciVals qciVals) {
72 this.qciVals = qciVals;
slowr67d05e42017-08-11 20:37:22 -070073 }
slowr13fa5b02017-08-08 16:32:31 -070074
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080075 public DataVolDl getDataVolDl() {
76 return dataVolDl;
slowr67d05e42017-08-11 20:37:22 -070077 }
slowr13fa5b02017-08-08 16:32:31 -070078
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080079 public void setDataVolDl(DataVolDl dataVolDl) {
80 this.dataVolDl = dataVolDl;
slowr67d05e42017-08-11 20:37:22 -070081 }
slowr13fa5b02017-08-08 16:32:31 -070082
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080083 public DataVolUl getDataVolUl() {
84 return dataVolUl;
slowr67d05e42017-08-11 20:37:22 -070085 }
slowr13fa5b02017-08-08 16:32:31 -070086
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080087 public void setDataVolUl(DataVolUl dataVolUl) {
88 this.dataVolUl = dataVolUl;
slowr67d05e42017-08-11 20:37:22 -070089 }
slowr13fa5b02017-08-08 16:32:31 -070090
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080091 public PktDelayDl getPktDelayDl() {
92 return pktDelayDl;
slowr67d05e42017-08-11 20:37:22 -070093 }
slowr13fa5b02017-08-08 16:32:31 -070094
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080095 public void setPktDelayDl(PktDelayDl pktDelayDl) {
96 this.pktDelayDl = pktDelayDl;
slowr67d05e42017-08-11 20:37:22 -070097 }
slowr13fa5b02017-08-08 16:32:31 -070098
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -080099 public PktDelayUl getPktDelayUl() {
100 return pktDelayUl;
slowr67d05e42017-08-11 20:37:22 -0700101 }
slowr13fa5b02017-08-08 16:32:31 -0700102
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800103 public void setPktDelayUl(PktDelayUl pktDelayUl) {
104 this.pktDelayUl = pktDelayUl;
slowr67d05e42017-08-11 20:37:22 -0700105 }
slowr13fa5b02017-08-08 16:32:31 -0700106
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800107 public PktDiscardRateDl getPktDiscardRateDl() {
108 return pktDiscardRateDl;
slowr67d05e42017-08-11 20:37:22 -0700109 }
slowr13fa5b02017-08-08 16:32:31 -0700110
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800111 public void setPktDiscardRateDl(PktDiscardRateDl pktDiscardRateDl) {
112 this.pktDiscardRateDl = pktDiscardRateDl;
slowr67d05e42017-08-11 20:37:22 -0700113 }
slowr13fa5b02017-08-08 16:32:31 -0700114
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800115 public PktLossRateDl getPktLossRateDl() {
116 return pktLossRateDl;
slowr67d05e42017-08-11 20:37:22 -0700117 }
slowr13fa5b02017-08-08 16:32:31 -0700118
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800119 public void setPktLossRateDl(PktLossRateDl pktLossRateDl) {
120 this.pktLossRateDl = pktLossRateDl;
slowr67d05e42017-08-11 20:37:22 -0700121 }
slowr13fa5b02017-08-08 16:32:31 -0700122
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800123 public PktLossRateUl getPktLossRateUl() {
124 return pktLossRateUl;
slowr67d05e42017-08-11 20:37:22 -0700125 }
slowr13fa5b02017-08-08 16:32:31 -0700126
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800127 public void setPktLossRateUl(PktLossRateUl pktLossRateUl) {
128 this.pktLossRateUl = pktLossRateUl;
129 }
130
131 public ThroughputDl getThroughputDl() {
132 return throughputDl;
133 }
134
135 public void setThroughputDl(ThroughputDl throughputDl) {
136 this.throughputDl = throughputDl;
137 }
138
139 public ThroughputUl getThroughputUl() {
140 return throughputUl;
141 }
142
143 public void setThroughputUl(ThroughputUl throughputUl) {
144 this.throughputUl = throughputUl;
slowr67d05e42017-08-11 20:37:22 -0700145 }
slowr13fa5b02017-08-08 16:32:31 -0700146
slowr67d05e42017-08-11 20:37:22 -0700147 public int encode(BerByteArrayOutputStream os) throws IOException {
148 return encode(os, true);
149 }
150
151 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
152
153 if (code != null) {
154 for (int i = code.length - 1; i >= 0; i--) {
155 os.write(code[i]);
156 }
157 if (withTag) {
158 return tag.encode(os) + code.length;
159 }
160 return code.length;
161 }
162
163 int codeLength = 0;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800164 codeLength += throughputUl.encode(os, false);
165 // write tag: CONTEXT_CLASS, CONSTRUCTED, 11
166 os.write(0xAB);
167 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700168
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800169 codeLength += throughputDl.encode(os, false);
170 // write tag: CONTEXT_CLASS, CONSTRUCTED, 10
171 os.write(0xAA);
172 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700173
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800174 codeLength += pktLossRateUl.encode(os, false);
175 // write tag: CONTEXT_CLASS, CONSTRUCTED, 9
176 os.write(0xA9);
177 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700178
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800179 codeLength += pktLossRateDl.encode(os, false);
180 // write tag: CONTEXT_CLASS, CONSTRUCTED, 8
181 os.write(0xA8);
182 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700183
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800184 codeLength += pktDiscardRateDl.encode(os, false);
185 // write tag: CONTEXT_CLASS, CONSTRUCTED, 7
186 os.write(0xA7);
187 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700188
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800189 codeLength += pktDelayUl.encode(os, false);
190 // write tag: CONTEXT_CLASS, CONSTRUCTED, 6
191 os.write(0xA6);
192 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700193
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800194 codeLength += pktDelayDl.encode(os, false);
195 // write tag: CONTEXT_CLASS, CONSTRUCTED, 5
196 os.write(0xA5);
197 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700198
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800199 codeLength += dataVolUl.encode(os, false);
200 // write tag: CONTEXT_CLASS, CONSTRUCTED, 4
201 os.write(0xA4);
202 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700203
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800204 codeLength += dataVolDl.encode(os, false);
205 // write tag: CONTEXT_CLASS, CONSTRUCTED, 3
206 os.write(0xA3);
207 codeLength += 1;
208
209 codeLength += qciVals.encode(os, false);
210 // write tag: CONTEXT_CLASS, CONSTRUCTED, 2
211 os.write(0xA2);
212 codeLength += 1;
213
214 codeLength += crnti.encode(os, false);
215 // write tag: CONTEXT_CLASS, PRIMITIVE, 1
216 os.write(0x81);
217 codeLength += 1;
slowr67d05e42017-08-11 20:37:22 -0700218
219 codeLength += ecgi.encode(os, false);
220 // write tag: CONTEXT_CLASS, CONSTRUCTED, 0
221 os.write(0xA0);
222 codeLength += 1;
223
224 codeLength += BerLength.encodeLength(os, codeLength);
225
226 if (withTag) {
227 codeLength += tag.encode(os);
228 }
229
230 return codeLength;
231
232 }
233
234 public int decode(InputStream is) throws IOException {
235 return decode(is, true);
236 }
237
238 public int decode(InputStream is, boolean withTag) throws IOException {
239 int codeLength = 0;
240 int subCodeLength = 0;
241 BerTag berTag = new BerTag();
242
243 if (withTag) {
244 codeLength += tag.decodeAndCheck(is);
245 }
246
247 BerLength length = new BerLength();
248 codeLength += length.decode(is);
249
250 int totalLength = length.val;
251 codeLength += totalLength;
252
253 subCodeLength += berTag.decode(is);
254 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
255 ecgi = new ECGI();
256 subCodeLength += ecgi.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700257 subCodeLength += berTag.decode(is);
258 } else {
259 throw new IOException("Tag does not match the mandatory sequence element tag.");
260 }
261
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800262 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
263 crnti = new CRNTI();
slowr67d05e42017-08-11 20:37:22 -0700264 subCodeLength += crnti.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700265 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800266 } else {
267 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700268 }
269
270 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800271 qciVals = new QciVals();
272 subCodeLength += qciVals.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700273 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800274 } else {
275 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700276 }
277
278 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800279 dataVolDl = new DataVolDl();
280 subCodeLength += dataVolDl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700281 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800282 } else {
283 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700284 }
285
286 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 4)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800287 dataVolUl = new DataVolUl();
288 subCodeLength += dataVolUl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700289 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800290 } else {
291 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700292 }
293
294 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800295 pktDelayDl = new PktDelayDl();
296 subCodeLength += pktDelayDl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700297 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800298 } else {
299 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700300 }
301
302 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800303 pktDelayUl = new PktDelayUl();
304 subCodeLength += pktDelayUl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700305 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800306 } else {
307 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700308 }
309
310 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 7)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800311 pktDiscardRateDl = new PktDiscardRateDl();
312 subCodeLength += pktDiscardRateDl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700313 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800314 } else {
315 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700316 }
317
318 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 8)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800319 pktLossRateDl = new PktLossRateDl();
320 subCodeLength += pktLossRateDl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700321 subCodeLength += berTag.decode(is);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800322 } else {
323 throw new IOException("Tag does not match the mandatory sequence element tag.");
slowr67d05e42017-08-11 20:37:22 -0700324 }
325
326 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 9)) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800327 pktLossRateUl = new PktLossRateUl();
328 subCodeLength += pktLossRateUl.decode(is, false);
329 subCodeLength += berTag.decode(is);
330 } else {
331 throw new IOException("Tag does not match the mandatory sequence element tag.");
332 }
333
334 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 10)) {
335 throughputDl = new ThroughputDl();
336 subCodeLength += throughputDl.decode(is, false);
337 subCodeLength += berTag.decode(is);
338 } else {
339 throw new IOException("Tag does not match the mandatory sequence element tag.");
340 }
341
342 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 11)) {
343 throughputUl = new ThroughputUl();
344 subCodeLength += throughputUl.decode(is, false);
slowr67d05e42017-08-11 20:37:22 -0700345 if (subCodeLength == totalLength) {
346 return codeLength;
347 }
348 }
349 throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: " + subCodeLength);
350
351
352 }
353
354 public void encodeAndSave(int encodingSizeGuess) throws IOException {
355 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
356 encode(os, false);
357 code = os.getArray();
358 }
359
360 public String toString() {
361 StringBuilder sb = new StringBuilder();
362 appendAsString(sb, 0);
363 return sb.toString();
364 }
365
366 public void appendAsString(StringBuilder sb, int indentLevel) {
367
368 sb.append("{");
369 sb.append("\n");
370 for (int i = 0; i < indentLevel + 1; i++) {
371 sb.append("\t");
372 }
373 if (ecgi != null) {
slowr60d4d102017-08-16 18:33:58 -0700374 sb.append("ecgi: ");
slowr67d05e42017-08-11 20:37:22 -0700375 ecgi.appendAsString(sb, indentLevel + 1);
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800376 } else {
377 sb.append("ecgi: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700378 }
379
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800380 sb.append(",\n");
381 for (int i = 0; i < indentLevel + 1; i++) {
382 sb.append("\t");
383 }
slowr67d05e42017-08-11 20:37:22 -0700384 if (crnti != null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800385 sb.append("crnti: ").append(crnti);
386 } else {
387 sb.append("crnti: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700388 }
389
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800390 sb.append(",\n");
391 for (int i = 0; i < indentLevel + 1; i++) {
392 sb.append("\t");
393 }
394 if (qciVals != null) {
395 sb.append("qciVals: ");
396 qciVals.appendAsString(sb, indentLevel + 1);
397 } else {
398 sb.append("qciVals: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700399 }
400
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800401 sb.append(",\n");
402 for (int i = 0; i < indentLevel + 1; i++) {
403 sb.append("\t");
404 }
405 if (dataVolDl != null) {
406 sb.append("dataVolDl: ");
407 dataVolDl.appendAsString(sb, indentLevel + 1);
408 } else {
409 sb.append("dataVolDl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700410 }
411
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800412 sb.append(",\n");
413 for (int i = 0; i < indentLevel + 1; i++) {
414 sb.append("\t");
415 }
416 if (dataVolUl != null) {
417 sb.append("dataVolUl: ");
418 dataVolUl.appendAsString(sb, indentLevel + 1);
419 } else {
420 sb.append("dataVolUl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700421 }
422
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800423 sb.append(",\n");
424 for (int i = 0; i < indentLevel + 1; i++) {
425 sb.append("\t");
426 }
427 if (pktDelayDl != null) {
428 sb.append("pktDelayDl: ");
429 pktDelayDl.appendAsString(sb, indentLevel + 1);
430 } else {
431 sb.append("pktDelayDl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700432 }
433
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800434 sb.append(",\n");
435 for (int i = 0; i < indentLevel + 1; i++) {
436 sb.append("\t");
437 }
438 if (pktDelayUl != null) {
439 sb.append("pktDelayUl: ");
440 pktDelayUl.appendAsString(sb, indentLevel + 1);
441 } else {
442 sb.append("pktDelayUl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700443 }
444
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800445 sb.append(",\n");
446 for (int i = 0; i < indentLevel + 1; i++) {
447 sb.append("\t");
448 }
449 if (pktDiscardRateDl != null) {
450 sb.append("pktDiscardRateDl: ");
451 pktDiscardRateDl.appendAsString(sb, indentLevel + 1);
452 } else {
453 sb.append("pktDiscardRateDl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700454 }
455
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800456 sb.append(",\n");
457 for (int i = 0; i < indentLevel + 1; i++) {
458 sb.append("\t");
459 }
460 if (pktLossRateDl != null) {
461 sb.append("pktLossRateDl: ");
462 pktLossRateDl.appendAsString(sb, indentLevel + 1);
463 } else {
464 sb.append("pktLossRateDl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700465 }
466
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800467 sb.append(",\n");
468 for (int i = 0; i < indentLevel + 1; i++) {
469 sb.append("\t");
470 }
471 if (pktLossRateUl != null) {
472 sb.append("pktLossRateUl: ");
473 pktLossRateUl.appendAsString(sb, indentLevel + 1);
474 } else {
475 sb.append("pktLossRateUl: <empty-required-field>");
476 }
477
478 sb.append(",\n");
479 for (int i = 0; i < indentLevel + 1; i++) {
480 sb.append("\t");
481 }
482 if (throughputDl != null) {
483 sb.append("throughputDl: ");
484 throughputDl.appendAsString(sb, indentLevel + 1);
485 } else {
486 sb.append("throughputDl: <empty-required-field>");
487 }
488
489 sb.append(",\n");
490 for (int i = 0; i < indentLevel + 1; i++) {
491 sb.append("\t");
492 }
493 if (throughputUl != null) {
494 sb.append("throughputUl: ");
495 throughputUl.appendAsString(sb, indentLevel + 1);
496 } else {
497 sb.append("throughputUl: <empty-required-field>");
slowr67d05e42017-08-11 20:37:22 -0700498 }
499
500 sb.append("\n");
501 for (int i = 0; i < indentLevel; i++) {
502 sb.append("\t");
503 }
504 sb.append("}");
505 }
506
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800507 public static class QciVals implements Serializable {
slowr67d05e42017-08-11 20:37:22 -0700508
509 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
510 private static final long serialVersionUID = 1L;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800511
slowr73b4eae2017-08-17 16:09:09 -0700512 @JsonIgnore
513 public byte[] code = null;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800514 private List<QCI> seqOf = null;
slowr67d05e42017-08-11 20:37:22 -0700515
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800516 public QciVals() {
517 seqOf = new ArrayList<QCI>();
slowr67d05e42017-08-11 20:37:22 -0700518 }
519
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800520 public QciVals(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -0700521 this.code = code;
522 }
523
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800524
slowr60d4d102017-08-16 18:33:58 -0700525 @JsonValue
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800526 public List<QCI> getQCI() {
slowr67d05e42017-08-11 20:37:22 -0700527 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800528 seqOf = new ArrayList<QCI>();
slowr67d05e42017-08-11 20:37:22 -0700529 }
530 return seqOf;
531 }
532
slowr67d05e42017-08-11 20:37:22 -0700533 public int encode(BerByteArrayOutputStream os) throws IOException {
534 return encode(os, true);
535 }
536
537 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
538
539 if (code != null) {
540 for (int i = code.length - 1; i >= 0; i--) {
541 os.write(code[i]);
542 }
543 if (withTag) {
544 return tag.encode(os) + code.length;
545 }
546 return code.length;
547 }
548
549 int codeLength = 0;
550 for (int i = (seqOf.size() - 1); i >= 0; i--) {
551 codeLength += seqOf.get(i).encode(os, true);
552 }
553
554 codeLength += BerLength.encodeLength(os, codeLength);
555
556 if (withTag) {
557 codeLength += tag.encode(os);
558 }
559
560 return codeLength;
561 }
562
563 public int decode(InputStream is) throws IOException {
564 return decode(is, true);
565 }
566
567 public int decode(InputStream is, boolean withTag) throws IOException {
568 int codeLength = 0;
569 int subCodeLength = 0;
570 if (withTag) {
571 codeLength += tag.decodeAndCheck(is);
572 }
573
574 BerLength length = new BerLength();
575 codeLength += length.decode(is);
576 int totalLength = length.val;
577
578 while (subCodeLength < totalLength) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800579 QCI element = new QCI();
slowr67d05e42017-08-11 20:37:22 -0700580 subCodeLength += element.decode(is, true);
581 seqOf.add(element);
582 }
583 if (subCodeLength != totalLength) {
584 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
585
586 }
587 codeLength += subCodeLength;
588
589 return codeLength;
590 }
591
592 public void encodeAndSave(int encodingSizeGuess) throws IOException {
593 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
594 encode(os, false);
595 code = os.getArray();
596 }
597
598 public String toString() {
599 StringBuilder sb = new StringBuilder();
600 appendAsString(sb, 0);
601 return sb.toString();
602 }
603
604 public void appendAsString(StringBuilder sb, int indentLevel) {
605
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800606 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -0700607 for (int i = 0; i < indentLevel + 1; i++) {
608 sb.append("\t");
609 }
610 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800611 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -0700612 } else {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800613 Iterator<QCI> it = seqOf.iterator();
slowr67d05e42017-08-11 20:37:22 -0700614 if (it.hasNext()) {
615 sb.append(it.next());
616 while (it.hasNext()) {
617 sb.append(",\n");
618 for (int i = 0; i < indentLevel + 1; i++) {
619 sb.append("\t");
620 }
621 sb.append(it.next());
622 }
623 }
624 }
slowr13fa5b02017-08-08 16:32:31 -0700625
slowr67d05e42017-08-11 20:37:22 -0700626 sb.append("\n");
627 for (int i = 0; i < indentLevel; i++) {
628 sb.append("\t");
629 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800630 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -0700631 }
slowr13fa5b02017-08-08 16:32:31 -0700632
slowr67d05e42017-08-11 20:37:22 -0700633 }
slowr13fa5b02017-08-08 16:32:31 -0700634
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800635 public static class DataVolDl implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -0700636
slowr67d05e42017-08-11 20:37:22 -0700637 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
638 private static final long serialVersionUID = 1L;
slowr13fa5b02017-08-08 16:32:31 -0700639
slowr73b4eae2017-08-17 16:09:09 -0700640 @JsonIgnore
641 public byte[] code = null;
slowr67d05e42017-08-11 20:37:22 -0700642 private List<BerInteger> seqOf = null;
slowr13fa5b02017-08-08 16:32:31 -0700643
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800644 public DataVolDl() {
slowr67d05e42017-08-11 20:37:22 -0700645 seqOf = new ArrayList<BerInteger>();
646 }
slowr13fa5b02017-08-08 16:32:31 -0700647
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800648 public DataVolDl(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -0700649 this.code = code;
650 }
slowr13fa5b02017-08-08 16:32:31 -0700651
slowr13fa5b02017-08-08 16:32:31 -0700652
slowr73b4eae2017-08-17 16:09:09 -0700653 @JsonValue
654 public List<BerInteger> getBerInteger() {
slowr67d05e42017-08-11 20:37:22 -0700655 if (seqOf == null) {
656 seqOf = new ArrayList<BerInteger>();
657 }
658 return seqOf;
659 }
slowr13fa5b02017-08-08 16:32:31 -0700660
slowr67d05e42017-08-11 20:37:22 -0700661 public int encode(BerByteArrayOutputStream os) throws IOException {
662 return encode(os, true);
663 }
slowr13fa5b02017-08-08 16:32:31 -0700664
slowr67d05e42017-08-11 20:37:22 -0700665 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
slowr13fa5b02017-08-08 16:32:31 -0700666
slowr67d05e42017-08-11 20:37:22 -0700667 if (code != null) {
668 for (int i = code.length - 1; i >= 0; i--) {
669 os.write(code[i]);
670 }
671 if (withTag) {
672 return tag.encode(os) + code.length;
673 }
674 return code.length;
675 }
slowr13fa5b02017-08-08 16:32:31 -0700676
slowr67d05e42017-08-11 20:37:22 -0700677 int codeLength = 0;
678 for (int i = (seqOf.size() - 1); i >= 0; i--) {
679 codeLength += seqOf.get(i).encode(os, true);
680 }
slowr13fa5b02017-08-08 16:32:31 -0700681
slowr67d05e42017-08-11 20:37:22 -0700682 codeLength += BerLength.encodeLength(os, codeLength);
slowr13fa5b02017-08-08 16:32:31 -0700683
slowr67d05e42017-08-11 20:37:22 -0700684 if (withTag) {
685 codeLength += tag.encode(os);
686 }
slowr13fa5b02017-08-08 16:32:31 -0700687
slowr67d05e42017-08-11 20:37:22 -0700688 return codeLength;
689 }
slowr13fa5b02017-08-08 16:32:31 -0700690
slowr67d05e42017-08-11 20:37:22 -0700691 public int decode(InputStream is) throws IOException {
692 return decode(is, true);
693 }
slowr13fa5b02017-08-08 16:32:31 -0700694
slowr67d05e42017-08-11 20:37:22 -0700695 public int decode(InputStream is, boolean withTag) throws IOException {
696 int codeLength = 0;
697 int subCodeLength = 0;
698 if (withTag) {
699 codeLength += tag.decodeAndCheck(is);
700 }
slowr13fa5b02017-08-08 16:32:31 -0700701
slowr67d05e42017-08-11 20:37:22 -0700702 BerLength length = new BerLength();
703 codeLength += length.decode(is);
704 int totalLength = length.val;
slowr13fa5b02017-08-08 16:32:31 -0700705
slowr67d05e42017-08-11 20:37:22 -0700706 while (subCodeLength < totalLength) {
707 BerInteger element = new BerInteger();
708 subCodeLength += element.decode(is, true);
709 seqOf.add(element);
710 }
711 if (subCodeLength != totalLength) {
712 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
slowr13fa5b02017-08-08 16:32:31 -0700713
slowr67d05e42017-08-11 20:37:22 -0700714 }
715 codeLength += subCodeLength;
slowr13fa5b02017-08-08 16:32:31 -0700716
slowr67d05e42017-08-11 20:37:22 -0700717 return codeLength;
718 }
slowr13fa5b02017-08-08 16:32:31 -0700719
slowr67d05e42017-08-11 20:37:22 -0700720 public void encodeAndSave(int encodingSizeGuess) throws IOException {
721 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
722 encode(os, false);
723 code = os.getArray();
724 }
slowr13fa5b02017-08-08 16:32:31 -0700725
slowr67d05e42017-08-11 20:37:22 -0700726 public String toString() {
727 StringBuilder sb = new StringBuilder();
728 appendAsString(sb, 0);
729 return sb.toString();
730 }
slowr13fa5b02017-08-08 16:32:31 -0700731
slowr67d05e42017-08-11 20:37:22 -0700732 public void appendAsString(StringBuilder sb, int indentLevel) {
733
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800734 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -0700735 for (int i = 0; i < indentLevel + 1; i++) {
736 sb.append("\t");
737 }
738 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800739 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -0700740 } else {
741 Iterator<BerInteger> it = seqOf.iterator();
742 if (it.hasNext()) {
743 sb.append(it.next());
744 while (it.hasNext()) {
745 sb.append(",\n");
746 for (int i = 0; i < indentLevel + 1; i++) {
747 sb.append("\t");
748 }
749 sb.append(it.next());
750 }
751 }
752 }
slowr13fa5b02017-08-08 16:32:31 -0700753
slowr67d05e42017-08-11 20:37:22 -0700754 sb.append("\n");
755 for (int i = 0; i < indentLevel; i++) {
756 sb.append("\t");
757 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800758 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -0700759 }
slowr13fa5b02017-08-08 16:32:31 -0700760
slowr67d05e42017-08-11 20:37:22 -0700761 }
slowr13fa5b02017-08-08 16:32:31 -0700762
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800763 public static class DataVolUl implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -0700764
slowr67d05e42017-08-11 20:37:22 -0700765 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
766 private static final long serialVersionUID = 1L;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800767
slowr73b4eae2017-08-17 16:09:09 -0700768 @JsonIgnore
769 public byte[] code = null;
slowr67d05e42017-08-11 20:37:22 -0700770 private List<BerInteger> seqOf = null;
slowr13fa5b02017-08-08 16:32:31 -0700771
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800772 public DataVolUl() {
slowr67d05e42017-08-11 20:37:22 -0700773 seqOf = new ArrayList<BerInteger>();
774 }
slowr13fa5b02017-08-08 16:32:31 -0700775
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800776 public DataVolUl(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -0700777 this.code = code;
778 }
slowr13fa5b02017-08-08 16:32:31 -0700779
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800780
slowr73b4eae2017-08-17 16:09:09 -0700781 @JsonValue
782 public List<BerInteger> getBerInteger() {
slowr67d05e42017-08-11 20:37:22 -0700783 if (seqOf == null) {
784 seqOf = new ArrayList<BerInteger>();
785 }
786 return seqOf;
787 }
slowr13fa5b02017-08-08 16:32:31 -0700788
slowr67d05e42017-08-11 20:37:22 -0700789 public int encode(BerByteArrayOutputStream os) throws IOException {
790 return encode(os, true);
791 }
slowr13fa5b02017-08-08 16:32:31 -0700792
slowr67d05e42017-08-11 20:37:22 -0700793 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
slowr13fa5b02017-08-08 16:32:31 -0700794
slowr67d05e42017-08-11 20:37:22 -0700795 if (code != null) {
796 for (int i = code.length - 1; i >= 0; i--) {
797 os.write(code[i]);
798 }
799 if (withTag) {
800 return tag.encode(os) + code.length;
801 }
802 return code.length;
803 }
slowr13fa5b02017-08-08 16:32:31 -0700804
slowr67d05e42017-08-11 20:37:22 -0700805 int codeLength = 0;
806 for (int i = (seqOf.size() - 1); i >= 0; i--) {
807 codeLength += seqOf.get(i).encode(os, true);
808 }
slowr13fa5b02017-08-08 16:32:31 -0700809
slowr67d05e42017-08-11 20:37:22 -0700810 codeLength += BerLength.encodeLength(os, codeLength);
slowr13fa5b02017-08-08 16:32:31 -0700811
slowr67d05e42017-08-11 20:37:22 -0700812 if (withTag) {
813 codeLength += tag.encode(os);
814 }
slowr13fa5b02017-08-08 16:32:31 -0700815
slowr67d05e42017-08-11 20:37:22 -0700816 return codeLength;
817 }
slowr13fa5b02017-08-08 16:32:31 -0700818
slowr67d05e42017-08-11 20:37:22 -0700819 public int decode(InputStream is) throws IOException {
820 return decode(is, true);
821 }
slowr13fa5b02017-08-08 16:32:31 -0700822
slowr67d05e42017-08-11 20:37:22 -0700823 public int decode(InputStream is, boolean withTag) throws IOException {
824 int codeLength = 0;
825 int subCodeLength = 0;
826 if (withTag) {
827 codeLength += tag.decodeAndCheck(is);
828 }
slowr13fa5b02017-08-08 16:32:31 -0700829
slowr67d05e42017-08-11 20:37:22 -0700830 BerLength length = new BerLength();
831 codeLength += length.decode(is);
832 int totalLength = length.val;
slowr13fa5b02017-08-08 16:32:31 -0700833
slowr67d05e42017-08-11 20:37:22 -0700834 while (subCodeLength < totalLength) {
835 BerInteger element = new BerInteger();
836 subCodeLength += element.decode(is, true);
837 seqOf.add(element);
838 }
839 if (subCodeLength != totalLength) {
840 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
slowr13fa5b02017-08-08 16:32:31 -0700841
slowr67d05e42017-08-11 20:37:22 -0700842 }
843 codeLength += subCodeLength;
slowr13fa5b02017-08-08 16:32:31 -0700844
slowr67d05e42017-08-11 20:37:22 -0700845 return codeLength;
846 }
slowr13fa5b02017-08-08 16:32:31 -0700847
slowr67d05e42017-08-11 20:37:22 -0700848 public void encodeAndSave(int encodingSizeGuess) throws IOException {
849 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
850 encode(os, false);
851 code = os.getArray();
852 }
slowr13fa5b02017-08-08 16:32:31 -0700853
slowr67d05e42017-08-11 20:37:22 -0700854 public String toString() {
855 StringBuilder sb = new StringBuilder();
856 appendAsString(sb, 0);
857 return sb.toString();
858 }
slowr13fa5b02017-08-08 16:32:31 -0700859
slowr67d05e42017-08-11 20:37:22 -0700860 public void appendAsString(StringBuilder sb, int indentLevel) {
slowr13fa5b02017-08-08 16:32:31 -0700861
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800862 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -0700863 for (int i = 0; i < indentLevel + 1; i++) {
864 sb.append("\t");
865 }
866 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800867 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -0700868 } else {
869 Iterator<BerInteger> it = seqOf.iterator();
870 if (it.hasNext()) {
871 sb.append(it.next());
872 while (it.hasNext()) {
873 sb.append(",\n");
874 for (int i = 0; i < indentLevel + 1; i++) {
875 sb.append("\t");
876 }
877 sb.append(it.next());
878 }
879 }
880 }
slowr13fa5b02017-08-08 16:32:31 -0700881
slowr67d05e42017-08-11 20:37:22 -0700882 sb.append("\n");
883 for (int i = 0; i < indentLevel; i++) {
884 sb.append("\t");
885 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800886 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -0700887 }
slowr13fa5b02017-08-08 16:32:31 -0700888
slowr67d05e42017-08-11 20:37:22 -0700889 }
slowr13fa5b02017-08-08 16:32:31 -0700890
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800891 public static class PktDelayDl implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -0700892
slowr67d05e42017-08-11 20:37:22 -0700893 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
894 private static final long serialVersionUID = 1L;
slowr13fa5b02017-08-08 16:32:31 -0700895
slowr73b4eae2017-08-17 16:09:09 -0700896 @JsonIgnore
897 public byte[] code = null;
slowr67d05e42017-08-11 20:37:22 -0700898 private List<BerInteger> seqOf = null;
slowr13fa5b02017-08-08 16:32:31 -0700899
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800900 public PktDelayDl() {
slowr67d05e42017-08-11 20:37:22 -0700901 seqOf = new ArrayList<BerInteger>();
902 }
slowr13fa5b02017-08-08 16:32:31 -0700903
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800904 public PktDelayDl(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -0700905 this.code = code;
906 }
slowr13fa5b02017-08-08 16:32:31 -0700907
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800908
slowr73b4eae2017-08-17 16:09:09 -0700909 @JsonValue
910 public List<BerInteger> getBerInteger() {
slowr67d05e42017-08-11 20:37:22 -0700911 if (seqOf == null) {
912 seqOf = new ArrayList<BerInteger>();
913 }
914 return seqOf;
915 }
slowr13fa5b02017-08-08 16:32:31 -0700916
slowr67d05e42017-08-11 20:37:22 -0700917 public int encode(BerByteArrayOutputStream os) throws IOException {
918 return encode(os, true);
919 }
slowr13fa5b02017-08-08 16:32:31 -0700920
slowr67d05e42017-08-11 20:37:22 -0700921 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
slowr13fa5b02017-08-08 16:32:31 -0700922
slowr67d05e42017-08-11 20:37:22 -0700923 if (code != null) {
924 for (int i = code.length - 1; i >= 0; i--) {
925 os.write(code[i]);
926 }
927 if (withTag) {
928 return tag.encode(os) + code.length;
929 }
930 return code.length;
931 }
slowr13fa5b02017-08-08 16:32:31 -0700932
slowr67d05e42017-08-11 20:37:22 -0700933 int codeLength = 0;
934 for (int i = (seqOf.size() - 1); i >= 0; i--) {
935 codeLength += seqOf.get(i).encode(os, true);
936 }
slowr13fa5b02017-08-08 16:32:31 -0700937
slowr67d05e42017-08-11 20:37:22 -0700938 codeLength += BerLength.encodeLength(os, codeLength);
slowr13fa5b02017-08-08 16:32:31 -0700939
slowr67d05e42017-08-11 20:37:22 -0700940 if (withTag) {
941 codeLength += tag.encode(os);
942 }
slowr13fa5b02017-08-08 16:32:31 -0700943
slowr67d05e42017-08-11 20:37:22 -0700944 return codeLength;
945 }
slowr13fa5b02017-08-08 16:32:31 -0700946
slowr67d05e42017-08-11 20:37:22 -0700947 public int decode(InputStream is) throws IOException {
948 return decode(is, true);
949 }
slowr13fa5b02017-08-08 16:32:31 -0700950
slowr67d05e42017-08-11 20:37:22 -0700951 public int decode(InputStream is, boolean withTag) throws IOException {
952 int codeLength = 0;
953 int subCodeLength = 0;
954 if (withTag) {
955 codeLength += tag.decodeAndCheck(is);
956 }
slowr13fa5b02017-08-08 16:32:31 -0700957
slowr67d05e42017-08-11 20:37:22 -0700958 BerLength length = new BerLength();
959 codeLength += length.decode(is);
960 int totalLength = length.val;
slowr13fa5b02017-08-08 16:32:31 -0700961
slowr67d05e42017-08-11 20:37:22 -0700962 while (subCodeLength < totalLength) {
963 BerInteger element = new BerInteger();
964 subCodeLength += element.decode(is, true);
965 seqOf.add(element);
966 }
967 if (subCodeLength != totalLength) {
968 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
slowr13fa5b02017-08-08 16:32:31 -0700969
slowr67d05e42017-08-11 20:37:22 -0700970 }
971 codeLength += subCodeLength;
slowr13fa5b02017-08-08 16:32:31 -0700972
slowr67d05e42017-08-11 20:37:22 -0700973 return codeLength;
974 }
slowr13fa5b02017-08-08 16:32:31 -0700975
slowr67d05e42017-08-11 20:37:22 -0700976 public void encodeAndSave(int encodingSizeGuess) throws IOException {
977 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
978 encode(os, false);
979 code = os.getArray();
980 }
slowr13fa5b02017-08-08 16:32:31 -0700981
slowr67d05e42017-08-11 20:37:22 -0700982 public String toString() {
983 StringBuilder sb = new StringBuilder();
984 appendAsString(sb, 0);
985 return sb.toString();
986 }
slowr13fa5b02017-08-08 16:32:31 -0700987
slowr67d05e42017-08-11 20:37:22 -0700988 public void appendAsString(StringBuilder sb, int indentLevel) {
slowr13fa5b02017-08-08 16:32:31 -0700989
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800990 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -0700991 for (int i = 0; i < indentLevel + 1; i++) {
992 sb.append("\t");
993 }
994 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -0800995 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -0700996 } else {
997 Iterator<BerInteger> it = seqOf.iterator();
998 if (it.hasNext()) {
999 sb.append(it.next());
1000 while (it.hasNext()) {
1001 sb.append(",\n");
1002 for (int i = 0; i < indentLevel + 1; i++) {
1003 sb.append("\t");
1004 }
1005 sb.append(it.next());
1006 }
1007 }
1008 }
slowr13fa5b02017-08-08 16:32:31 -07001009
slowr67d05e42017-08-11 20:37:22 -07001010 sb.append("\n");
1011 for (int i = 0; i < indentLevel; i++) {
1012 sb.append("\t");
1013 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001014 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -07001015 }
slowr13fa5b02017-08-08 16:32:31 -07001016
slowr67d05e42017-08-11 20:37:22 -07001017 }
slowr13fa5b02017-08-08 16:32:31 -07001018
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001019 public static class PktDelayUl implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -07001020
slowr67d05e42017-08-11 20:37:22 -07001021 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
1022 private static final long serialVersionUID = 1L;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001023
slowr73b4eae2017-08-17 16:09:09 -07001024 @JsonIgnore
1025 public byte[] code = null;
slowr67d05e42017-08-11 20:37:22 -07001026 private List<BerInteger> seqOf = null;
slowr13fa5b02017-08-08 16:32:31 -07001027
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001028 public PktDelayUl() {
slowr67d05e42017-08-11 20:37:22 -07001029 seqOf = new ArrayList<BerInteger>();
1030 }
slowr13fa5b02017-08-08 16:32:31 -07001031
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001032 public PktDelayUl(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -07001033 this.code = code;
1034 }
slowr13fa5b02017-08-08 16:32:31 -07001035
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001036
slowr73b4eae2017-08-17 16:09:09 -07001037 @JsonValue
1038 public List<BerInteger> getBerInteger() {
slowr67d05e42017-08-11 20:37:22 -07001039 if (seqOf == null) {
1040 seqOf = new ArrayList<BerInteger>();
1041 }
1042 return seqOf;
1043 }
slowr13fa5b02017-08-08 16:32:31 -07001044
slowr67d05e42017-08-11 20:37:22 -07001045 public int encode(BerByteArrayOutputStream os) throws IOException {
1046 return encode(os, true);
1047 }
slowr13fa5b02017-08-08 16:32:31 -07001048
slowr67d05e42017-08-11 20:37:22 -07001049 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
slowr13fa5b02017-08-08 16:32:31 -07001050
slowr67d05e42017-08-11 20:37:22 -07001051 if (code != null) {
1052 for (int i = code.length - 1; i >= 0; i--) {
1053 os.write(code[i]);
1054 }
1055 if (withTag) {
1056 return tag.encode(os) + code.length;
1057 }
1058 return code.length;
1059 }
slowr13fa5b02017-08-08 16:32:31 -07001060
slowr67d05e42017-08-11 20:37:22 -07001061 int codeLength = 0;
1062 for (int i = (seqOf.size() - 1); i >= 0; i--) {
1063 codeLength += seqOf.get(i).encode(os, true);
1064 }
slowr13fa5b02017-08-08 16:32:31 -07001065
slowr67d05e42017-08-11 20:37:22 -07001066 codeLength += BerLength.encodeLength(os, codeLength);
slowr13fa5b02017-08-08 16:32:31 -07001067
slowr67d05e42017-08-11 20:37:22 -07001068 if (withTag) {
1069 codeLength += tag.encode(os);
1070 }
slowr13fa5b02017-08-08 16:32:31 -07001071
slowr67d05e42017-08-11 20:37:22 -07001072 return codeLength;
1073 }
slowr13fa5b02017-08-08 16:32:31 -07001074
slowr67d05e42017-08-11 20:37:22 -07001075 public int decode(InputStream is) throws IOException {
1076 return decode(is, true);
1077 }
slowr13fa5b02017-08-08 16:32:31 -07001078
slowr67d05e42017-08-11 20:37:22 -07001079 public int decode(InputStream is, boolean withTag) throws IOException {
1080 int codeLength = 0;
1081 int subCodeLength = 0;
1082 if (withTag) {
1083 codeLength += tag.decodeAndCheck(is);
1084 }
slowr13fa5b02017-08-08 16:32:31 -07001085
slowr67d05e42017-08-11 20:37:22 -07001086 BerLength length = new BerLength();
1087 codeLength += length.decode(is);
1088 int totalLength = length.val;
slowr13fa5b02017-08-08 16:32:31 -07001089
slowr67d05e42017-08-11 20:37:22 -07001090 while (subCodeLength < totalLength) {
1091 BerInteger element = new BerInteger();
1092 subCodeLength += element.decode(is, true);
1093 seqOf.add(element);
1094 }
1095 if (subCodeLength != totalLength) {
1096 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
slowr13fa5b02017-08-08 16:32:31 -07001097
slowr67d05e42017-08-11 20:37:22 -07001098 }
1099 codeLength += subCodeLength;
slowr13fa5b02017-08-08 16:32:31 -07001100
slowr67d05e42017-08-11 20:37:22 -07001101 return codeLength;
1102 }
slowr13fa5b02017-08-08 16:32:31 -07001103
slowr67d05e42017-08-11 20:37:22 -07001104 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1105 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1106 encode(os, false);
1107 code = os.getArray();
1108 }
slowr13fa5b02017-08-08 16:32:31 -07001109
slowr67d05e42017-08-11 20:37:22 -07001110 public String toString() {
1111 StringBuilder sb = new StringBuilder();
1112 appendAsString(sb, 0);
1113 return sb.toString();
1114 }
slowr13fa5b02017-08-08 16:32:31 -07001115
slowr67d05e42017-08-11 20:37:22 -07001116 public void appendAsString(StringBuilder sb, int indentLevel) {
slowr13fa5b02017-08-08 16:32:31 -07001117
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001118 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -07001119 for (int i = 0; i < indentLevel + 1; i++) {
1120 sb.append("\t");
1121 }
1122 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001123 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -07001124 } else {
1125 Iterator<BerInteger> it = seqOf.iterator();
1126 if (it.hasNext()) {
1127 sb.append(it.next());
1128 while (it.hasNext()) {
1129 sb.append(",\n");
1130 for (int i = 0; i < indentLevel + 1; i++) {
1131 sb.append("\t");
1132 }
1133 sb.append(it.next());
1134 }
1135 }
1136 }
slowr13fa5b02017-08-08 16:32:31 -07001137
slowr67d05e42017-08-11 20:37:22 -07001138 sb.append("\n");
1139 for (int i = 0; i < indentLevel; i++) {
1140 sb.append("\t");
1141 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001142 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -07001143 }
slowr13fa5b02017-08-08 16:32:31 -07001144
slowr67d05e42017-08-11 20:37:22 -07001145 }
slowr13fa5b02017-08-08 16:32:31 -07001146
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001147 public static class PktDiscardRateDl implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -07001148
slowr67d05e42017-08-11 20:37:22 -07001149 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
1150 private static final long serialVersionUID = 1L;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001151
slowr73b4eae2017-08-17 16:09:09 -07001152 @JsonIgnore
1153 public byte[] code = null;
slowr67d05e42017-08-11 20:37:22 -07001154 private List<BerInteger> seqOf = null;
slowr13fa5b02017-08-08 16:32:31 -07001155
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001156 public PktDiscardRateDl() {
slowr67d05e42017-08-11 20:37:22 -07001157 seqOf = new ArrayList<BerInteger>();
1158 }
slowr13fa5b02017-08-08 16:32:31 -07001159
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001160 public PktDiscardRateDl(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -07001161 this.code = code;
1162 }
slowr13fa5b02017-08-08 16:32:31 -07001163
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001164
slowr60d4d102017-08-16 18:33:58 -07001165 @JsonValue
slowr67d05e42017-08-11 20:37:22 -07001166 public List<BerInteger> getBerInteger() {
1167 if (seqOf == null) {
1168 seqOf = new ArrayList<BerInteger>();
1169 }
1170 return seqOf;
1171 }
slowr13fa5b02017-08-08 16:32:31 -07001172
slowr67d05e42017-08-11 20:37:22 -07001173 public int encode(BerByteArrayOutputStream os) throws IOException {
1174 return encode(os, true);
1175 }
slowr13fa5b02017-08-08 16:32:31 -07001176
slowr67d05e42017-08-11 20:37:22 -07001177 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
slowr13fa5b02017-08-08 16:32:31 -07001178
slowr67d05e42017-08-11 20:37:22 -07001179 if (code != null) {
1180 for (int i = code.length - 1; i >= 0; i--) {
1181 os.write(code[i]);
1182 }
1183 if (withTag) {
1184 return tag.encode(os) + code.length;
1185 }
1186 return code.length;
1187 }
slowr13fa5b02017-08-08 16:32:31 -07001188
slowr67d05e42017-08-11 20:37:22 -07001189 int codeLength = 0;
1190 for (int i = (seqOf.size() - 1); i >= 0; i--) {
1191 codeLength += seqOf.get(i).encode(os, true);
1192 }
slowr13fa5b02017-08-08 16:32:31 -07001193
slowr67d05e42017-08-11 20:37:22 -07001194 codeLength += BerLength.encodeLength(os, codeLength);
slowr13fa5b02017-08-08 16:32:31 -07001195
slowr67d05e42017-08-11 20:37:22 -07001196 if (withTag) {
1197 codeLength += tag.encode(os);
1198 }
slowr13fa5b02017-08-08 16:32:31 -07001199
slowr67d05e42017-08-11 20:37:22 -07001200 return codeLength;
1201 }
slowr13fa5b02017-08-08 16:32:31 -07001202
slowr67d05e42017-08-11 20:37:22 -07001203 public int decode(InputStream is) throws IOException {
1204 return decode(is, true);
1205 }
slowr13fa5b02017-08-08 16:32:31 -07001206
slowr67d05e42017-08-11 20:37:22 -07001207 public int decode(InputStream is, boolean withTag) throws IOException {
1208 int codeLength = 0;
1209 int subCodeLength = 0;
1210 if (withTag) {
1211 codeLength += tag.decodeAndCheck(is);
1212 }
slowr13fa5b02017-08-08 16:32:31 -07001213
slowr67d05e42017-08-11 20:37:22 -07001214 BerLength length = new BerLength();
1215 codeLength += length.decode(is);
1216 int totalLength = length.val;
slowr13fa5b02017-08-08 16:32:31 -07001217
slowr67d05e42017-08-11 20:37:22 -07001218 while (subCodeLength < totalLength) {
1219 BerInteger element = new BerInteger();
1220 subCodeLength += element.decode(is, true);
1221 seqOf.add(element);
1222 }
1223 if (subCodeLength != totalLength) {
1224 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
slowr13fa5b02017-08-08 16:32:31 -07001225
slowr67d05e42017-08-11 20:37:22 -07001226 }
1227 codeLength += subCodeLength;
slowr13fa5b02017-08-08 16:32:31 -07001228
slowr67d05e42017-08-11 20:37:22 -07001229 return codeLength;
1230 }
slowr13fa5b02017-08-08 16:32:31 -07001231
slowr67d05e42017-08-11 20:37:22 -07001232 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1233 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1234 encode(os, false);
1235 code = os.getArray();
1236 }
slowr13fa5b02017-08-08 16:32:31 -07001237
slowr67d05e42017-08-11 20:37:22 -07001238 public String toString() {
1239 StringBuilder sb = new StringBuilder();
1240 appendAsString(sb, 0);
1241 return sb.toString();
1242 }
slowr13fa5b02017-08-08 16:32:31 -07001243
slowr67d05e42017-08-11 20:37:22 -07001244 public void appendAsString(StringBuilder sb, int indentLevel) {
slowr13fa5b02017-08-08 16:32:31 -07001245
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001246 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -07001247 for (int i = 0; i < indentLevel + 1; i++) {
1248 sb.append("\t");
1249 }
1250 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001251 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -07001252 } else {
1253 Iterator<BerInteger> it = seqOf.iterator();
1254 if (it.hasNext()) {
1255 sb.append(it.next());
1256 while (it.hasNext()) {
1257 sb.append(",\n");
1258 for (int i = 0; i < indentLevel + 1; i++) {
1259 sb.append("\t");
1260 }
1261 sb.append(it.next());
1262 }
1263 }
1264 }
slowr13fa5b02017-08-08 16:32:31 -07001265
slowr67d05e42017-08-11 20:37:22 -07001266 sb.append("\n");
1267 for (int i = 0; i < indentLevel; i++) {
1268 sb.append("\t");
1269 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001270 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -07001271 }
slowr13fa5b02017-08-08 16:32:31 -07001272
slowr67d05e42017-08-11 20:37:22 -07001273 }
slowr13fa5b02017-08-08 16:32:31 -07001274
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001275 public static class PktLossRateDl implements Serializable {
slowr13fa5b02017-08-08 16:32:31 -07001276
slowr67d05e42017-08-11 20:37:22 -07001277 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
1278 private static final long serialVersionUID = 1L;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001279
slowr73b4eae2017-08-17 16:09:09 -07001280 @JsonIgnore
1281 public byte[] code = null;
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001282 private List<BerInteger> seqOf = null;
slowr13fa5b02017-08-08 16:32:31 -07001283
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001284 public PktLossRateDl() {
1285 seqOf = new ArrayList<BerInteger>();
slowr67d05e42017-08-11 20:37:22 -07001286 }
slowr13fa5b02017-08-08 16:32:31 -07001287
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001288 public PktLossRateDl(byte[] code) {
slowr67d05e42017-08-11 20:37:22 -07001289 this.code = code;
1290 }
slowr13fa5b02017-08-08 16:32:31 -07001291
slowr73b4eae2017-08-17 16:09:09 -07001292
slowr60d4d102017-08-16 18:33:58 -07001293 @JsonValue
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001294 public List<BerInteger> getBerInteger() {
slowr67d05e42017-08-11 20:37:22 -07001295 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001296 seqOf = new ArrayList<BerInteger>();
slowr67d05e42017-08-11 20:37:22 -07001297 }
1298 return seqOf;
1299 }
slowr13fa5b02017-08-08 16:32:31 -07001300
slowr67d05e42017-08-11 20:37:22 -07001301 public int encode(BerByteArrayOutputStream os) throws IOException {
1302 return encode(os, true);
1303 }
slowr13fa5b02017-08-08 16:32:31 -07001304
slowr67d05e42017-08-11 20:37:22 -07001305 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
slowr13fa5b02017-08-08 16:32:31 -07001306
slowr67d05e42017-08-11 20:37:22 -07001307 if (code != null) {
1308 for (int i = code.length - 1; i >= 0; i--) {
1309 os.write(code[i]);
1310 }
1311 if (withTag) {
1312 return tag.encode(os) + code.length;
1313 }
1314 return code.length;
1315 }
slowr13fa5b02017-08-08 16:32:31 -07001316
slowr67d05e42017-08-11 20:37:22 -07001317 int codeLength = 0;
1318 for (int i = (seqOf.size() - 1); i >= 0; i--) {
1319 codeLength += seqOf.get(i).encode(os, true);
1320 }
slowr13fa5b02017-08-08 16:32:31 -07001321
slowr67d05e42017-08-11 20:37:22 -07001322 codeLength += BerLength.encodeLength(os, codeLength);
slowr13fa5b02017-08-08 16:32:31 -07001323
slowr67d05e42017-08-11 20:37:22 -07001324 if (withTag) {
1325 codeLength += tag.encode(os);
1326 }
slowr13fa5b02017-08-08 16:32:31 -07001327
slowr67d05e42017-08-11 20:37:22 -07001328 return codeLength;
1329 }
slowr13fa5b02017-08-08 16:32:31 -07001330
slowr67d05e42017-08-11 20:37:22 -07001331 public int decode(InputStream is) throws IOException {
1332 return decode(is, true);
1333 }
slowr13fa5b02017-08-08 16:32:31 -07001334
slowr67d05e42017-08-11 20:37:22 -07001335 public int decode(InputStream is, boolean withTag) throws IOException {
1336 int codeLength = 0;
1337 int subCodeLength = 0;
1338 if (withTag) {
1339 codeLength += tag.decodeAndCheck(is);
1340 }
slowr13fa5b02017-08-08 16:32:31 -07001341
slowr67d05e42017-08-11 20:37:22 -07001342 BerLength length = new BerLength();
1343 codeLength += length.decode(is);
1344 int totalLength = length.val;
slowr13fa5b02017-08-08 16:32:31 -07001345
slowr67d05e42017-08-11 20:37:22 -07001346 while (subCodeLength < totalLength) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001347 BerInteger element = new BerInteger();
slowr67d05e42017-08-11 20:37:22 -07001348 subCodeLength += element.decode(is, true);
1349 seqOf.add(element);
1350 }
1351 if (subCodeLength != totalLength) {
1352 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
slowr13fa5b02017-08-08 16:32:31 -07001353
slowr67d05e42017-08-11 20:37:22 -07001354 }
1355 codeLength += subCodeLength;
slowr13fa5b02017-08-08 16:32:31 -07001356
slowr67d05e42017-08-11 20:37:22 -07001357 return codeLength;
1358 }
slowr13fa5b02017-08-08 16:32:31 -07001359
slowr67d05e42017-08-11 20:37:22 -07001360 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1361 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1362 encode(os, false);
1363 code = os.getArray();
1364 }
slowr13fa5b02017-08-08 16:32:31 -07001365
slowr67d05e42017-08-11 20:37:22 -07001366 public String toString() {
1367 StringBuilder sb = new StringBuilder();
1368 appendAsString(sb, 0);
1369 return sb.toString();
1370 }
slowr13fa5b02017-08-08 16:32:31 -07001371
slowr67d05e42017-08-11 20:37:22 -07001372 public void appendAsString(StringBuilder sb, int indentLevel) {
slowr13fa5b02017-08-08 16:32:31 -07001373
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001374 sb.append("{\n");
slowr67d05e42017-08-11 20:37:22 -07001375 for (int i = 0; i < indentLevel + 1; i++) {
1376 sb.append("\t");
1377 }
1378 if (seqOf == null) {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001379 sb.append("null");
slowr67d05e42017-08-11 20:37:22 -07001380 } else {
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001381 Iterator<BerInteger> it = seqOf.iterator();
slowr67d05e42017-08-11 20:37:22 -07001382 if (it.hasNext()) {
1383 sb.append(it.next());
1384 while (it.hasNext()) {
1385 sb.append(",\n");
1386 for (int i = 0; i < indentLevel + 1; i++) {
1387 sb.append("\t");
1388 }
1389 sb.append(it.next());
1390 }
1391 }
1392 }
slowr13fa5b02017-08-08 16:32:31 -07001393
slowr67d05e42017-08-11 20:37:22 -07001394 sb.append("\n");
1395 for (int i = 0; i < indentLevel; i++) {
1396 sb.append("\t");
1397 }
Dimitrios Mavrommatis96b255a2017-12-06 13:09:25 -08001398 sb.append("}");
1399 }
1400
1401 }
1402
1403 public static class PktLossRateUl implements Serializable {
1404
1405 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
1406 private static final long serialVersionUID = 1L;
1407
1408 @JsonIgnore
1409 public byte[] code = null;
1410 private List<BerInteger> seqOf = null;
1411
1412 public PktLossRateUl() {
1413 seqOf = new ArrayList<BerInteger>();
1414 }
1415
1416 public PktLossRateUl(byte[] code) {
1417 this.code = code;
1418 }
1419
1420
1421 @JsonValue
1422 public List<BerInteger> getBerInteger() {
1423 if (seqOf == null) {
1424 seqOf = new ArrayList<BerInteger>();
1425 }
1426 return seqOf;
1427 }
1428
1429 public int encode(BerByteArrayOutputStream os) throws IOException {
1430 return encode(os, true);
1431 }
1432
1433 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
1434
1435 if (code != null) {
1436 for (int i = code.length - 1; i >= 0; i--) {
1437 os.write(code[i]);
1438 }
1439 if (withTag) {
1440 return tag.encode(os) + code.length;
1441 }
1442 return code.length;
1443 }
1444
1445 int codeLength = 0;
1446 for (int i = (seqOf.size() - 1); i >= 0; i--) {
1447 codeLength += seqOf.get(i).encode(os, true);
1448 }
1449
1450 codeLength += BerLength.encodeLength(os, codeLength);
1451
1452 if (withTag) {
1453 codeLength += tag.encode(os);
1454 }
1455
1456 return codeLength;
1457 }
1458
1459 public int decode(InputStream is) throws IOException {
1460 return decode(is, true);
1461 }
1462
1463 public int decode(InputStream is, boolean withTag) throws IOException {
1464 int codeLength = 0;
1465 int subCodeLength = 0;
1466 if (withTag) {
1467 codeLength += tag.decodeAndCheck(is);
1468 }
1469
1470 BerLength length = new BerLength();
1471 codeLength += length.decode(is);
1472 int totalLength = length.val;
1473
1474 while (subCodeLength < totalLength) {
1475 BerInteger element = new BerInteger();
1476 subCodeLength += element.decode(is, true);
1477 seqOf.add(element);
1478 }
1479 if (subCodeLength != totalLength) {
1480 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
1481
1482 }
1483 codeLength += subCodeLength;
1484
1485 return codeLength;
1486 }
1487
1488 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1489 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1490 encode(os, false);
1491 code = os.getArray();
1492 }
1493
1494 public String toString() {
1495 StringBuilder sb = new StringBuilder();
1496 appendAsString(sb, 0);
1497 return sb.toString();
1498 }
1499
1500 public void appendAsString(StringBuilder sb, int indentLevel) {
1501
1502 sb.append("{\n");
1503 for (int i = 0; i < indentLevel + 1; i++) {
1504 sb.append("\t");
1505 }
1506 if (seqOf == null) {
1507 sb.append("null");
1508 } else {
1509 Iterator<BerInteger> it = seqOf.iterator();
1510 if (it.hasNext()) {
1511 sb.append(it.next());
1512 while (it.hasNext()) {
1513 sb.append(",\n");
1514 for (int i = 0; i < indentLevel + 1; i++) {
1515 sb.append("\t");
1516 }
1517 sb.append(it.next());
1518 }
1519 }
1520 }
1521
1522 sb.append("\n");
1523 for (int i = 0; i < indentLevel; i++) {
1524 sb.append("\t");
1525 }
1526 sb.append("}");
1527 }
1528
1529 }
1530
1531 public static class ThroughputDl implements Serializable {
1532
1533 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
1534 private static final long serialVersionUID = 1L;
1535
1536 @JsonIgnore
1537 public byte[] code = null;
1538 private List<BerInteger> seqOf = null;
1539
1540 public ThroughputDl() {
1541 seqOf = new ArrayList<BerInteger>();
1542 }
1543
1544 public ThroughputDl(byte[] code) {
1545 this.code = code;
1546 }
1547
1548
1549 @JsonValue
1550 public List<BerInteger> getBerInteger() {
1551 if (seqOf == null) {
1552 seqOf = new ArrayList<BerInteger>();
1553 }
1554 return seqOf;
1555 }
1556
1557 public int encode(BerByteArrayOutputStream os) throws IOException {
1558 return encode(os, true);
1559 }
1560
1561 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
1562
1563 if (code != null) {
1564 for (int i = code.length - 1; i >= 0; i--) {
1565 os.write(code[i]);
1566 }
1567 if (withTag) {
1568 return tag.encode(os) + code.length;
1569 }
1570 return code.length;
1571 }
1572
1573 int codeLength = 0;
1574 for (int i = (seqOf.size() - 1); i >= 0; i--) {
1575 codeLength += seqOf.get(i).encode(os, true);
1576 }
1577
1578 codeLength += BerLength.encodeLength(os, codeLength);
1579
1580 if (withTag) {
1581 codeLength += tag.encode(os);
1582 }
1583
1584 return codeLength;
1585 }
1586
1587 public int decode(InputStream is) throws IOException {
1588 return decode(is, true);
1589 }
1590
1591 public int decode(InputStream is, boolean withTag) throws IOException {
1592 int codeLength = 0;
1593 int subCodeLength = 0;
1594 if (withTag) {
1595 codeLength += tag.decodeAndCheck(is);
1596 }
1597
1598 BerLength length = new BerLength();
1599 codeLength += length.decode(is);
1600 int totalLength = length.val;
1601
1602 while (subCodeLength < totalLength) {
1603 BerInteger element = new BerInteger();
1604 subCodeLength += element.decode(is, true);
1605 seqOf.add(element);
1606 }
1607 if (subCodeLength != totalLength) {
1608 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
1609
1610 }
1611 codeLength += subCodeLength;
1612
1613 return codeLength;
1614 }
1615
1616 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1617 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1618 encode(os, false);
1619 code = os.getArray();
1620 }
1621
1622 public String toString() {
1623 StringBuilder sb = new StringBuilder();
1624 appendAsString(sb, 0);
1625 return sb.toString();
1626 }
1627
1628 public void appendAsString(StringBuilder sb, int indentLevel) {
1629
1630 sb.append("{\n");
1631 for (int i = 0; i < indentLevel + 1; i++) {
1632 sb.append("\t");
1633 }
1634 if (seqOf == null) {
1635 sb.append("null");
1636 } else {
1637 Iterator<BerInteger> it = seqOf.iterator();
1638 if (it.hasNext()) {
1639 sb.append(it.next());
1640 while (it.hasNext()) {
1641 sb.append(",\n");
1642 for (int i = 0; i < indentLevel + 1; i++) {
1643 sb.append("\t");
1644 }
1645 sb.append(it.next());
1646 }
1647 }
1648 }
1649
1650 sb.append("\n");
1651 for (int i = 0; i < indentLevel; i++) {
1652 sb.append("\t");
1653 }
1654 sb.append("}");
1655 }
1656
1657 }
1658
1659 public static class ThroughputUl implements Serializable {
1660
1661 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
1662 private static final long serialVersionUID = 1L;
1663
1664 @JsonIgnore
1665 public byte[] code = null;
1666 private List<BerInteger> seqOf = null;
1667
1668 public ThroughputUl() {
1669 seqOf = new ArrayList<BerInteger>();
1670 }
1671
1672 public ThroughputUl(byte[] code) {
1673 this.code = code;
1674 }
1675
1676
1677 @JsonValue
1678 public List<BerInteger> getBerInteger() {
1679 if (seqOf == null) {
1680 seqOf = new ArrayList<BerInteger>();
1681 }
1682 return seqOf;
1683 }
1684
1685 public int encode(BerByteArrayOutputStream os) throws IOException {
1686 return encode(os, true);
1687 }
1688
1689 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
1690
1691 if (code != null) {
1692 for (int i = code.length - 1; i >= 0; i--) {
1693 os.write(code[i]);
1694 }
1695 if (withTag) {
1696 return tag.encode(os) + code.length;
1697 }
1698 return code.length;
1699 }
1700
1701 int codeLength = 0;
1702 for (int i = (seqOf.size() - 1); i >= 0; i--) {
1703 codeLength += seqOf.get(i).encode(os, true);
1704 }
1705
1706 codeLength += BerLength.encodeLength(os, codeLength);
1707
1708 if (withTag) {
1709 codeLength += tag.encode(os);
1710 }
1711
1712 return codeLength;
1713 }
1714
1715 public int decode(InputStream is) throws IOException {
1716 return decode(is, true);
1717 }
1718
1719 public int decode(InputStream is, boolean withTag) throws IOException {
1720 int codeLength = 0;
1721 int subCodeLength = 0;
1722 if (withTag) {
1723 codeLength += tag.decodeAndCheck(is);
1724 }
1725
1726 BerLength length = new BerLength();
1727 codeLength += length.decode(is);
1728 int totalLength = length.val;
1729
1730 while (subCodeLength < totalLength) {
1731 BerInteger element = new BerInteger();
1732 subCodeLength += element.decode(is, true);
1733 seqOf.add(element);
1734 }
1735 if (subCodeLength != totalLength) {
1736 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
1737
1738 }
1739 codeLength += subCodeLength;
1740
1741 return codeLength;
1742 }
1743
1744 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1745 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1746 encode(os, false);
1747 code = os.getArray();
1748 }
1749
1750 public String toString() {
1751 StringBuilder sb = new StringBuilder();
1752 appendAsString(sb, 0);
1753 return sb.toString();
1754 }
1755
1756 public void appendAsString(StringBuilder sb, int indentLevel) {
1757
1758 sb.append("{\n");
1759 for (int i = 0; i < indentLevel + 1; i++) {
1760 sb.append("\t");
1761 }
1762 if (seqOf == null) {
1763 sb.append("null");
1764 } else {
1765 Iterator<BerInteger> it = seqOf.iterator();
1766 if (it.hasNext()) {
1767 sb.append(it.next());
1768 while (it.hasNext()) {
1769 sb.append(",\n");
1770 for (int i = 0; i < indentLevel + 1; i++) {
1771 sb.append("\t");
1772 }
1773 sb.append(it.next());
1774 }
1775 }
1776 }
1777
1778 sb.append("\n");
1779 for (int i = 0; i < indentLevel; i++) {
1780 sb.append("\t");
1781 }
1782 sb.append("}");
slowr67d05e42017-08-11 20:37:22 -07001783 }
slowr13fa5b02017-08-08 16:32:31 -07001784
slowr67d05e42017-08-11 20:37:22 -07001785 }
slowr13fa5b02017-08-08 16:32:31 -07001786
slowr13fa5b02017-08-08 16:32:31 -07001787}
1788