blob: a2ed8fb3a130a5c1705c4bd82ed72808dd0b9eb0 [file] [log] [blame]
slowr13fa5b02017-08-08 16:32:31 -07001/**
2 * This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
3 */
4
5package org.onosproject.xran.codecs.api;
6
7import java.io.IOException;
8import java.io.EOFException;
9import java.io.InputStream;
10import java.util.List;
11import java.util.ArrayList;
12import java.util.Iterator;
13import java.io.UnsupportedEncodingException;
14import java.math.BigInteger;
15import java.io.Serializable;
16import org.openmuc.jasn1.ber.*;
17import org.openmuc.jasn1.ber.types.*;
18import org.openmuc.jasn1.ber.types.string.*;
19
20
21public class SchedMeasRepPerServCell implements Serializable {
22
23 private static final long serialVersionUID = 1L;
24
25 public static class QciVals implements Serializable {
26
27 private static final long serialVersionUID = 1L;
28
29 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
30 public byte[] code = null;
31 private List<QCI> seqOf = null;
32
33 public QciVals() {
34 seqOf = new ArrayList<QCI>();
35 }
36
37 public QciVals(byte[] code) {
38 this.code = code;
39 }
40
41 public List<QCI> getQCI() {
42 if (seqOf == null) {
43 seqOf = new ArrayList<QCI>();
44 }
45 return seqOf;
46 }
47
48 public void setQCI(QCI qci) {
49 seqOf.add(qci);
50 }
51
52 public int encode(BerByteArrayOutputStream os) throws IOException {
53 return encode(os, true);
54 }
55
56 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
57
58 if (code != null) {
59 for (int i = code.length - 1; i >= 0; i--) {
60 os.write(code[i]);
61 }
62 if (withTag) {
63 return tag.encode(os) + code.length;
64 }
65 return code.length;
66 }
67
68 int codeLength = 0;
69 for (int i = (seqOf.size() - 1); i >= 0; i--) {
70 codeLength += seqOf.get(i).encode(os, true);
71 }
72
73 codeLength += BerLength.encodeLength(os, codeLength);
74
75 if (withTag) {
76 codeLength += tag.encode(os);
77 }
78
79 return codeLength;
80 }
81
82 public int decode(InputStream is) throws IOException {
83 return decode(is, true);
84 }
85
86 public int decode(InputStream is, boolean withTag) throws IOException {
87 int codeLength = 0;
88 int subCodeLength = 0;
89 if (withTag) {
90 codeLength += tag.decodeAndCheck(is);
91 }
92
93 BerLength length = new BerLength();
94 codeLength += length.decode(is);
95 int totalLength = length.val;
96
97 while (subCodeLength < totalLength) {
98 QCI element = new QCI();
99 subCodeLength += element.decode(is, true);
100 seqOf.add(element);
101 }
102 if (subCodeLength != totalLength) {
103 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
104
105 }
106 codeLength += subCodeLength;
107
108 return codeLength;
109 }
110
111 public void encodeAndSave(int encodingSizeGuess) throws IOException {
112 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
113 encode(os, false);
114 code = os.getArray();
115 }
116
117 public String toString() {
118 StringBuilder sb = new StringBuilder();
119 appendAsString(sb, 0);
120 return sb.toString();
121 }
122
123 public void appendAsString(StringBuilder sb, int indentLevel) {
124
125 sb.append("[\n");
126 for (int i = 0; i < indentLevel + 1; i++) {
127 sb.append("\t");
128 }
129 if (seqOf == null) {
130// sb.append("null");
131 }
132 else {
133 Iterator<QCI> it = seqOf.iterator();
134 if (it.hasNext()) {
135 sb.append(it.next());
136 while (it.hasNext()) {
137 sb.append(",\n");
138 for (int i = 0; i < indentLevel + 1; i++) {
139 sb.append("\t");
140 }
141 sb.append(it.next());
142 }
143 }
144 }
145
146 sb.append("\n");
147 for (int i = 0; i < indentLevel; i++) {
148 sb.append("\t");
149 }
150 sb.append("]");
151 }
152
153 }
154
155 public static class McsDl implements Serializable {
156
157 private static final long serialVersionUID = 1L;
158
159 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
160 public byte[] code = null;
161 private List<BerInteger> seqOf = null;
162
163 public McsDl() {
164 seqOf = new ArrayList<BerInteger>();
165 }
166
167 public McsDl(byte[] code) {
168 this.code = code;
169 }
170
171 public List<BerInteger> getBerInteger() {
172 if (seqOf == null) {
173 seqOf = new ArrayList<BerInteger>();
174 }
175 return seqOf;
176 }
177
178 public void setBerInteger(BerInteger berInteger) {
179 seqOf.add(berInteger);
180 }
181
182 public int encode(BerByteArrayOutputStream os) throws IOException {
183 return encode(os, true);
184 }
185
186 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
187
188 if (code != null) {
189 for (int i = code.length - 1; i >= 0; i--) {
190 os.write(code[i]);
191 }
192 if (withTag) {
193 return tag.encode(os) + code.length;
194 }
195 return code.length;
196 }
197
198 int codeLength = 0;
199 for (int i = (seqOf.size() - 1); i >= 0; i--) {
200 codeLength += seqOf.get(i).encode(os, true);
201 }
202
203 codeLength += BerLength.encodeLength(os, codeLength);
204
205 if (withTag) {
206 codeLength += tag.encode(os);
207 }
208
209 return codeLength;
210 }
211
212 public int decode(InputStream is) throws IOException {
213 return decode(is, true);
214 }
215
216 public int decode(InputStream is, boolean withTag) throws IOException {
217 int codeLength = 0;
218 int subCodeLength = 0;
219 if (withTag) {
220 codeLength += tag.decodeAndCheck(is);
221 }
222
223 BerLength length = new BerLength();
224 codeLength += length.decode(is);
225 int totalLength = length.val;
226
227 while (subCodeLength < totalLength) {
228 BerInteger element = new BerInteger();
229 subCodeLength += element.decode(is, true);
230 seqOf.add(element);
231 }
232 if (subCodeLength != totalLength) {
233 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
234
235 }
236 codeLength += subCodeLength;
237
238 return codeLength;
239 }
240
241 public void encodeAndSave(int encodingSizeGuess) throws IOException {
242 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
243 encode(os, false);
244 code = os.getArray();
245 }
246
247 public String toString() {
248 StringBuilder sb = new StringBuilder();
249 appendAsString(sb, 0);
250 return sb.toString();
251 }
252
253public void appendAsString(StringBuilder sb, int indentLevel) {
254
255 sb.append("[\n");
256 for (int i = 0; i < indentLevel + 1; i++) {
257 sb.append("\t");
258 }
259 if (seqOf == null) {
260// sb.append("null");
261 }
262 else {
263 Iterator<BerInteger> it = seqOf.iterator();
264 if (it.hasNext()) {
265 sb.append(it.next());
266 while (it.hasNext()) {
267 sb.append(",\n");
268 for (int i = 0; i < indentLevel + 1; i++) {
269 sb.append("\t");
270 }
271 sb.append(it.next());
272 }
273 }
274 }
275
276 sb.append("\n");
277 for (int i = 0; i < indentLevel; i++) {
278 sb.append("\t");
279 }
280 sb.append("]");
281 }
282
283 }
284
285 public static class NumSchedTtisDl implements Serializable {
286
287 private static final long serialVersionUID = 1L;
288
289 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
290 public byte[] code = null;
291 private List<BerInteger> seqOf = null;
292
293 public NumSchedTtisDl() {
294 seqOf = new ArrayList<BerInteger>();
295 }
296
297 public NumSchedTtisDl(byte[] code) {
298 this.code = code;
299 }
300
301 public List<BerInteger> getBerInteger() {
302 if (seqOf == null) {
303 seqOf = new ArrayList<BerInteger>();
304 }
305 return seqOf;
306 }
307
308 public void setBerInteger(BerInteger berInteger) {
309 seqOf.add(berInteger);
310 }
311
312 public int encode(BerByteArrayOutputStream os) throws IOException {
313 return encode(os, true);
314 }
315
316 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
317
318 if (code != null) {
319 for (int i = code.length - 1; i >= 0; i--) {
320 os.write(code[i]);
321 }
322 if (withTag) {
323 return tag.encode(os) + code.length;
324 }
325 return code.length;
326 }
327
328 int codeLength = 0;
329 for (int i = (seqOf.size() - 1); i >= 0; i--) {
330 codeLength += seqOf.get(i).encode(os, true);
331 }
332
333 codeLength += BerLength.encodeLength(os, codeLength);
334
335 if (withTag) {
336 codeLength += tag.encode(os);
337 }
338
339 return codeLength;
340 }
341
342 public int decode(InputStream is) throws IOException {
343 return decode(is, true);
344 }
345
346 public int decode(InputStream is, boolean withTag) throws IOException {
347 int codeLength = 0;
348 int subCodeLength = 0;
349 if (withTag) {
350 codeLength += tag.decodeAndCheck(is);
351 }
352
353 BerLength length = new BerLength();
354 codeLength += length.decode(is);
355 int totalLength = length.val;
356
357 while (subCodeLength < totalLength) {
358 BerInteger element = new BerInteger();
359 subCodeLength += element.decode(is, true);
360 seqOf.add(element);
361 }
362 if (subCodeLength != totalLength) {
363 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
364
365 }
366 codeLength += subCodeLength;
367
368 return codeLength;
369 }
370
371 public void encodeAndSave(int encodingSizeGuess) throws IOException {
372 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
373 encode(os, false);
374 code = os.getArray();
375 }
376
377 public String toString() {
378 StringBuilder sb = new StringBuilder();
379 appendAsString(sb, 0);
380 return sb.toString();
381 }
382
383public void appendAsString(StringBuilder sb, int indentLevel) {
384
385 sb.append("[\n");
386 for (int i = 0; i < indentLevel + 1; i++) {
387 sb.append("\t");
388 }
389 if (seqOf == null) {
390// sb.append("null");
391 }
392 else {
393 Iterator<BerInteger> it = seqOf.iterator();
394 if (it.hasNext()) {
395 sb.append(it.next());
396 while (it.hasNext()) {
397 sb.append(",\n");
398 for (int i = 0; i < indentLevel + 1; i++) {
399 sb.append("\t");
400 }
401 sb.append(it.next());
402 }
403 }
404 }
405
406 sb.append("\n");
407 for (int i = 0; i < indentLevel; i++) {
408 sb.append("\t");
409 }
410 sb.append("]");
411 }
412
413 }
414
415 public static class McsUl implements Serializable {
416
417 private static final long serialVersionUID = 1L;
418
419 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
420 public byte[] code = null;
421 private List<BerInteger> seqOf = null;
422
423 public McsUl() {
424 seqOf = new ArrayList<BerInteger>();
425 }
426
427 public McsUl(byte[] code) {
428 this.code = code;
429 }
430
431 public List<BerInteger> getBerInteger() {
432 if (seqOf == null) {
433 seqOf = new ArrayList<BerInteger>();
434 }
435 return seqOf;
436 }
437
438 public void setBerInteger(BerInteger berInteger) {
439 seqOf.add(berInteger);
440 }
441
442 public int encode(BerByteArrayOutputStream os) throws IOException {
443 return encode(os, true);
444 }
445
446 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
447
448 if (code != null) {
449 for (int i = code.length - 1; i >= 0; i--) {
450 os.write(code[i]);
451 }
452 if (withTag) {
453 return tag.encode(os) + code.length;
454 }
455 return code.length;
456 }
457
458 int codeLength = 0;
459 for (int i = (seqOf.size() - 1); i >= 0; i--) {
460 codeLength += seqOf.get(i).encode(os, true);
461 }
462
463 codeLength += BerLength.encodeLength(os, codeLength);
464
465 if (withTag) {
466 codeLength += tag.encode(os);
467 }
468
469 return codeLength;
470 }
471
472 public int decode(InputStream is) throws IOException {
473 return decode(is, true);
474 }
475
476 public int decode(InputStream is, boolean withTag) throws IOException {
477 int codeLength = 0;
478 int subCodeLength = 0;
479 if (withTag) {
480 codeLength += tag.decodeAndCheck(is);
481 }
482
483 BerLength length = new BerLength();
484 codeLength += length.decode(is);
485 int totalLength = length.val;
486
487 while (subCodeLength < totalLength) {
488 BerInteger element = new BerInteger();
489 subCodeLength += element.decode(is, true);
490 seqOf.add(element);
491 }
492 if (subCodeLength != totalLength) {
493 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
494
495 }
496 codeLength += subCodeLength;
497
498 return codeLength;
499 }
500
501 public void encodeAndSave(int encodingSizeGuess) throws IOException {
502 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
503 encode(os, false);
504 code = os.getArray();
505 }
506
507 public String toString() {
508 StringBuilder sb = new StringBuilder();
509 appendAsString(sb, 0);
510 return sb.toString();
511 }
512
513public void appendAsString(StringBuilder sb, int indentLevel) {
514
515 sb.append("[\n");
516 for (int i = 0; i < indentLevel + 1; i++) {
517 sb.append("\t");
518 }
519 if (seqOf == null) {
520// sb.append("null");
521 }
522 else {
523 Iterator<BerInteger> it = seqOf.iterator();
524 if (it.hasNext()) {
525 sb.append(it.next());
526 while (it.hasNext()) {
527 sb.append(",\n");
528 for (int i = 0; i < indentLevel + 1; i++) {
529 sb.append("\t");
530 }
531 sb.append(it.next());
532 }
533 }
534 }
535
536 sb.append("\n");
537 for (int i = 0; i < indentLevel; i++) {
538 sb.append("\t");
539 }
540 sb.append("]");
541 }
542
543 }
544
545 public static class NumSchedTtisUl implements Serializable {
546
547 private static final long serialVersionUID = 1L;
548
549 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
550 public byte[] code = null;
551 private List<BerInteger> seqOf = null;
552
553 public NumSchedTtisUl() {
554 seqOf = new ArrayList<BerInteger>();
555 }
556
557 public NumSchedTtisUl(byte[] code) {
558 this.code = code;
559 }
560
561 public List<BerInteger> getBerInteger() {
562 if (seqOf == null) {
563 seqOf = new ArrayList<BerInteger>();
564 }
565 return seqOf;
566 }
567
568 public void setBerInteger(BerInteger berInteger) {
569 seqOf.add(berInteger);
570 }
571
572 public int encode(BerByteArrayOutputStream os) throws IOException {
573 return encode(os, true);
574 }
575
576 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
577
578 if (code != null) {
579 for (int i = code.length - 1; i >= 0; i--) {
580 os.write(code[i]);
581 }
582 if (withTag) {
583 return tag.encode(os) + code.length;
584 }
585 return code.length;
586 }
587
588 int codeLength = 0;
589 for (int i = (seqOf.size() - 1); i >= 0; i--) {
590 codeLength += seqOf.get(i).encode(os, true);
591 }
592
593 codeLength += BerLength.encodeLength(os, codeLength);
594
595 if (withTag) {
596 codeLength += tag.encode(os);
597 }
598
599 return codeLength;
600 }
601
602 public int decode(InputStream is) throws IOException {
603 return decode(is, true);
604 }
605
606 public int decode(InputStream is, boolean withTag) throws IOException {
607 int codeLength = 0;
608 int subCodeLength = 0;
609 if (withTag) {
610 codeLength += tag.decodeAndCheck(is);
611 }
612
613 BerLength length = new BerLength();
614 codeLength += length.decode(is);
615 int totalLength = length.val;
616
617 while (subCodeLength < totalLength) {
618 BerInteger element = new BerInteger();
619 subCodeLength += element.decode(is, true);
620 seqOf.add(element);
621 }
622 if (subCodeLength != totalLength) {
623 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
624
625 }
626 codeLength += subCodeLength;
627
628 return codeLength;
629 }
630
631 public void encodeAndSave(int encodingSizeGuess) throws IOException {
632 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
633 encode(os, false);
634 code = os.getArray();
635 }
636
637 public String toString() {
638 StringBuilder sb = new StringBuilder();
639 appendAsString(sb, 0);
640 return sb.toString();
641 }
642
643public void appendAsString(StringBuilder sb, int indentLevel) {
644
645 sb.append("[\n");
646 for (int i = 0; i < indentLevel + 1; i++) {
647 sb.append("\t");
648 }
649 if (seqOf == null) {
650// sb.append("null");
651 }
652 else {
653 Iterator<BerInteger> it = seqOf.iterator();
654 if (it.hasNext()) {
655 sb.append(it.next());
656 while (it.hasNext()) {
657 sb.append(",\n");
658 for (int i = 0; i < indentLevel + 1; i++) {
659 sb.append("\t");
660 }
661 sb.append(it.next());
662 }
663 }
664 }
665
666 sb.append("\n");
667 for (int i = 0; i < indentLevel; i++) {
668 sb.append("\t");
669 }
670 sb.append("]");
671 }
672
673 }
674
675 public static class RankDl1 implements Serializable {
676
677 private static final long serialVersionUID = 1L;
678
679 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
680 public byte[] code = null;
681 private List<BerInteger> seqOf = null;
682
683 public RankDl1() {
684 seqOf = new ArrayList<BerInteger>();
685 }
686
687 public RankDl1(byte[] code) {
688 this.code = code;
689 }
690
691 public List<BerInteger> getBerInteger() {
692 if (seqOf == null) {
693 seqOf = new ArrayList<BerInteger>();
694 }
695 return seqOf;
696 }
697
698 public void setBerInteger(BerInteger berInteger) {
699 seqOf.add(berInteger);
700 }
701
702 public int encode(BerByteArrayOutputStream os) throws IOException {
703 return encode(os, true);
704 }
705
706 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
707
708 if (code != null) {
709 for (int i = code.length - 1; i >= 0; i--) {
710 os.write(code[i]);
711 }
712 if (withTag) {
713 return tag.encode(os) + code.length;
714 }
715 return code.length;
716 }
717
718 int codeLength = 0;
719 for (int i = (seqOf.size() - 1); i >= 0; i--) {
720 codeLength += seqOf.get(i).encode(os, true);
721 }
722
723 codeLength += BerLength.encodeLength(os, codeLength);
724
725 if (withTag) {
726 codeLength += tag.encode(os);
727 }
728
729 return codeLength;
730 }
731
732 public int decode(InputStream is) throws IOException {
733 return decode(is, true);
734 }
735
736 public int decode(InputStream is, boolean withTag) throws IOException {
737 int codeLength = 0;
738 int subCodeLength = 0;
739 if (withTag) {
740 codeLength += tag.decodeAndCheck(is);
741 }
742
743 BerLength length = new BerLength();
744 codeLength += length.decode(is);
745 int totalLength = length.val;
746
747 while (subCodeLength < totalLength) {
748 BerInteger element = new BerInteger();
749 subCodeLength += element.decode(is, true);
750 seqOf.add(element);
751 }
752 if (subCodeLength != totalLength) {
753 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
754
755 }
756 codeLength += subCodeLength;
757
758 return codeLength;
759 }
760
761 public void encodeAndSave(int encodingSizeGuess) throws IOException {
762 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
763 encode(os, false);
764 code = os.getArray();
765 }
766
767 public String toString() {
768 StringBuilder sb = new StringBuilder();
769 appendAsString(sb, 0);
770 return sb.toString();
771 }
772
773public void appendAsString(StringBuilder sb, int indentLevel) {
774
775 sb.append("[\n");
776 for (int i = 0; i < indentLevel + 1; i++) {
777 sb.append("\t");
778 }
779 if (seqOf == null) {
780// sb.append("null");
781 }
782 else {
783 Iterator<BerInteger> it = seqOf.iterator();
784 if (it.hasNext()) {
785 sb.append(it.next());
786 while (it.hasNext()) {
787 sb.append(",\n");
788 for (int i = 0; i < indentLevel + 1; i++) {
789 sb.append("\t");
790 }
791 sb.append(it.next());
792 }
793 }
794 }
795
796 sb.append("\n");
797 for (int i = 0; i < indentLevel; i++) {
798 sb.append("\t");
799 }
800 sb.append("]");
801 }
802
803 }
804
805 public static class RankDl2 implements Serializable {
806
807 private static final long serialVersionUID = 1L;
808
809 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
810 public byte[] code = null;
811 private List<BerInteger> seqOf = null;
812
813 public RankDl2() {
814 seqOf = new ArrayList<BerInteger>();
815 }
816
817 public RankDl2(byte[] code) {
818 this.code = code;
819 }
820
821 public List<BerInteger> getBerInteger() {
822 if (seqOf == null) {
823 seqOf = new ArrayList<BerInteger>();
824 }
825 return seqOf;
826 }
827
828 public void setBerInteger(BerInteger berInteger) {
829 seqOf.add(berInteger);
830 }
831
832 public int encode(BerByteArrayOutputStream os) throws IOException {
833 return encode(os, true);
834 }
835
836 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
837
838 if (code != null) {
839 for (int i = code.length - 1; i >= 0; i--) {
840 os.write(code[i]);
841 }
842 if (withTag) {
843 return tag.encode(os) + code.length;
844 }
845 return code.length;
846 }
847
848 int codeLength = 0;
849 for (int i = (seqOf.size() - 1); i >= 0; i--) {
850 codeLength += seqOf.get(i).encode(os, true);
851 }
852
853 codeLength += BerLength.encodeLength(os, codeLength);
854
855 if (withTag) {
856 codeLength += tag.encode(os);
857 }
858
859 return codeLength;
860 }
861
862 public int decode(InputStream is) throws IOException {
863 return decode(is, true);
864 }
865
866 public int decode(InputStream is, boolean withTag) throws IOException {
867 int codeLength = 0;
868 int subCodeLength = 0;
869 if (withTag) {
870 codeLength += tag.decodeAndCheck(is);
871 }
872
873 BerLength length = new BerLength();
874 codeLength += length.decode(is);
875 int totalLength = length.val;
876
877 while (subCodeLength < totalLength) {
878 BerInteger element = new BerInteger();
879 subCodeLength += element.decode(is, true);
880 seqOf.add(element);
881 }
882 if (subCodeLength != totalLength) {
883 throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has " + subCodeLength);
884
885 }
886 codeLength += subCodeLength;
887
888 return codeLength;
889 }
890
891 public void encodeAndSave(int encodingSizeGuess) throws IOException {
892 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
893 encode(os, false);
894 code = os.getArray();
895 }
896
897 public String toString() {
898 StringBuilder sb = new StringBuilder();
899 appendAsString(sb, 0);
900 return sb.toString();
901 }
902
903public void appendAsString(StringBuilder sb, int indentLevel) {
904
905 sb.append("[\n");
906 for (int i = 0; i < indentLevel + 1; i++) {
907 sb.append("\t");
908 }
909 if (seqOf == null) {
910// sb.append("null");
911 }
912 else {
913 Iterator<BerInteger> it = seqOf.iterator();
914 if (it.hasNext()) {
915 sb.append(it.next());
916 while (it.hasNext()) {
917 sb.append(",\n");
918 for (int i = 0; i < indentLevel + 1; i++) {
919 sb.append("\t");
920 }
921 sb.append(it.next());
922 }
923 }
924 }
925
926 sb.append("\n");
927 for (int i = 0; i < indentLevel; i++) {
928 sb.append("\t");
929 }
930 sb.append("]");
931 }
932
933 }
934
935 public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
936
937 public byte[] code = null;
938 private PCIARFCN pciArfcn = null;
939 private QciVals qciVals = null;
940 private PRBUsage prbUsage = null;
941 private McsDl mcsDl = null;
942 private NumSchedTtisDl numSchedTtisDl = null;
943 private McsUl mcsUl = null;
944 private NumSchedTtisUl numSchedTtisUl = null;
945 private RankDl1 rankDl1 = null;
946 private RankDl2 rankDl2 = null;
947
948 public SchedMeasRepPerServCell() {
949 }
950
951 public SchedMeasRepPerServCell(byte[] code) {
952 this.code = code;
953 }
954
955 public void setPciArfcn(PCIARFCN pciArfcn) {
956 this.pciArfcn = pciArfcn;
957 }
958
959 public PCIARFCN getPciArfcn() {
960 return pciArfcn;
961 }
962
963 public void setQciVals(QciVals qciVals) {
964 this.qciVals = qciVals;
965 }
966
967 public QciVals getQciVals() {
968 return qciVals;
969 }
970
971 public void setPrbUsage(PRBUsage prbUsage) {
972 this.prbUsage = prbUsage;
973 }
974
975 public PRBUsage getPrbUsage() {
976 return prbUsage;
977 }
978
979 public void setMcsDl(McsDl mcsDl) {
980 this.mcsDl = mcsDl;
981 }
982
983 public McsDl getMcsDl() {
984 return mcsDl;
985 }
986
987 public void setNumSchedTtisDl(NumSchedTtisDl numSchedTtisDl) {
988 this.numSchedTtisDl = numSchedTtisDl;
989 }
990
991 public NumSchedTtisDl getNumSchedTtisDl() {
992 return numSchedTtisDl;
993 }
994
995 public void setMcsUl(McsUl mcsUl) {
996 this.mcsUl = mcsUl;
997 }
998
999 public McsUl getMcsUl() {
1000 return mcsUl;
1001 }
1002
1003 public void setNumSchedTtisUl(NumSchedTtisUl numSchedTtisUl) {
1004 this.numSchedTtisUl = numSchedTtisUl;
1005 }
1006
1007 public NumSchedTtisUl getNumSchedTtisUl() {
1008 return numSchedTtisUl;
1009 }
1010
1011 public void setRankDl1(RankDl1 rankDl1) {
1012 this.rankDl1 = rankDl1;
1013 }
1014
1015 public RankDl1 getRankDl1() {
1016 return rankDl1;
1017 }
1018
1019 public void setRankDl2(RankDl2 rankDl2) {
1020 this.rankDl2 = rankDl2;
1021 }
1022
1023 public RankDl2 getRankDl2() {
1024 return rankDl2;
1025 }
1026
1027 public int encode(BerByteArrayOutputStream os) throws IOException {
1028 return encode(os, true);
1029 }
1030
1031 public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
1032
1033 if (code != null) {
1034 for (int i = code.length - 1; i >= 0; i--) {
1035 os.write(code[i]);
1036 }
1037 if (withTag) {
1038 return tag.encode(os) + code.length;
1039 }
1040 return code.length;
1041 }
1042
1043 int codeLength = 0;
1044 codeLength += rankDl2.encode(os, false);
1045 // write tag: CONTEXT_CLASS, CONSTRUCTED, 8
1046 os.write(0xA8);
1047 codeLength += 1;
1048
1049 codeLength += rankDl1.encode(os, false);
1050 // write tag: CONTEXT_CLASS, CONSTRUCTED, 7
1051 os.write(0xA7);
1052 codeLength += 1;
1053
1054 codeLength += numSchedTtisUl.encode(os, false);
1055 // write tag: CONTEXT_CLASS, CONSTRUCTED, 6
1056 os.write(0xA6);
1057 codeLength += 1;
1058
1059 codeLength += mcsUl.encode(os, false);
1060 // write tag: CONTEXT_CLASS, CONSTRUCTED, 5
1061 os.write(0xA5);
1062 codeLength += 1;
1063
1064 codeLength += numSchedTtisDl.encode(os, false);
1065 // write tag: CONTEXT_CLASS, CONSTRUCTED, 4
1066 os.write(0xA4);
1067 codeLength += 1;
1068
1069 codeLength += mcsDl.encode(os, false);
1070 // write tag: CONTEXT_CLASS, CONSTRUCTED, 3
1071 os.write(0xA3);
1072 codeLength += 1;
1073
1074 codeLength += prbUsage.encode(os, false);
1075 // write tag: CONTEXT_CLASS, CONSTRUCTED, 2
1076 os.write(0xA2);
1077 codeLength += 1;
1078
1079 codeLength += qciVals.encode(os, false);
1080 // write tag: CONTEXT_CLASS, CONSTRUCTED, 1
1081 os.write(0xA1);
1082 codeLength += 1;
1083
1084 codeLength += pciArfcn.encode(os, false);
1085 // write tag: CONTEXT_CLASS, CONSTRUCTED, 0
1086 os.write(0xA0);
1087 codeLength += 1;
1088
1089 codeLength += BerLength.encodeLength(os, codeLength);
1090
1091 if (withTag) {
1092 codeLength += tag.encode(os);
1093 }
1094
1095 return codeLength;
1096
1097 }
1098
1099 public int decode(InputStream is) throws IOException {
1100 return decode(is, true);
1101 }
1102
1103 public int decode(InputStream is, boolean withTag) throws IOException {
1104 int codeLength = 0;
1105 int subCodeLength = 0;
1106 BerTag berTag = new BerTag();
1107
1108 if (withTag) {
1109 codeLength += tag.decodeAndCheck(is);
1110 }
1111
1112 BerLength length = new BerLength();
1113 codeLength += length.decode(is);
1114
1115 int totalLength = length.val;
1116 codeLength += totalLength;
1117
1118 subCodeLength += berTag.decode(is);
1119 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
1120 pciArfcn = new PCIARFCN();
1121 subCodeLength += pciArfcn.decode(is, false);
1122 subCodeLength += berTag.decode(is);
1123 }
1124 else {
1125 throw new IOException("Tag does not match the mandatory sequence element tag.");
1126 }
1127
1128 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) {
1129 qciVals = new QciVals();
1130 subCodeLength += qciVals.decode(is, false);
1131 subCodeLength += berTag.decode(is);
1132 }
1133 else {
1134 throw new IOException("Tag does not match the mandatory sequence element tag.");
1135 }
1136
1137 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
1138 prbUsage = new PRBUsage();
1139 subCodeLength += prbUsage.decode(is, false);
1140 subCodeLength += berTag.decode(is);
1141 }
1142 else {
1143 throw new IOException("Tag does not match the mandatory sequence element tag.");
1144 }
1145
1146 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) {
1147 mcsDl = new McsDl();
1148 subCodeLength += mcsDl.decode(is, false);
1149 subCodeLength += berTag.decode(is);
1150 }
1151 else {
1152 throw new IOException("Tag does not match the mandatory sequence element tag.");
1153 }
1154
1155 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 4)) {
1156 numSchedTtisDl = new NumSchedTtisDl();
1157 subCodeLength += numSchedTtisDl.decode(is, false);
1158 subCodeLength += berTag.decode(is);
1159 }
1160 else {
1161 throw new IOException("Tag does not match the mandatory sequence element tag.");
1162 }
1163
1164 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) {
1165 mcsUl = new McsUl();
1166 subCodeLength += mcsUl.decode(is, false);
1167 subCodeLength += berTag.decode(is);
1168 }
1169 else {
1170 throw new IOException("Tag does not match the mandatory sequence element tag.");
1171 }
1172
1173 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) {
1174 numSchedTtisUl = new NumSchedTtisUl();
1175 subCodeLength += numSchedTtisUl.decode(is, false);
1176 subCodeLength += berTag.decode(is);
1177 }
1178 else {
1179 throw new IOException("Tag does not match the mandatory sequence element tag.");
1180 }
1181
1182 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 7)) {
1183 rankDl1 = new RankDl1();
1184 subCodeLength += rankDl1.decode(is, false);
1185 subCodeLength += berTag.decode(is);
1186 }
1187 else {
1188 throw new IOException("Tag does not match the mandatory sequence element tag.");
1189 }
1190
1191 if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 8)) {
1192 rankDl2 = new RankDl2();
1193 subCodeLength += rankDl2.decode(is, false);
1194 if (subCodeLength == totalLength) {
1195 return codeLength;
1196 }
1197 }
1198 throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: " + subCodeLength);
1199
1200
1201 }
1202
1203 public void encodeAndSave(int encodingSizeGuess) throws IOException {
1204 BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
1205 encode(os, false);
1206 code = os.getArray();
1207 }
1208
1209 public String toString() {
1210 StringBuilder sb = new StringBuilder();
1211 appendAsString(sb, 0);
1212 return sb.toString();
1213 }
1214
1215 public void appendAsString(StringBuilder sb, int indentLevel) {
1216
1217 sb.append("{");
1218 sb.append("\n");
1219 for (int i = 0; i < indentLevel + 1; i++) {
1220 sb.append("\t");
1221 }
1222 if (pciArfcn != null) {
1223 sb.append("\"pciArfcn\": ");
1224 pciArfcn.appendAsString(sb, indentLevel + 1);
1225 }
1226
1227 sb.append(",\n");
1228 for (int i = 0; i < indentLevel + 1; i++) {
1229 sb.append("\t");
1230 }
1231 if (qciVals != null) {
1232 sb.append("\"qciVals\": ");
1233 qciVals.appendAsString(sb, indentLevel + 1);
1234 }
1235
1236 sb.append(",\n");
1237 for (int i = 0; i < indentLevel + 1; i++) {
1238 sb.append("\t");
1239 }
1240 if (prbUsage != null) {
1241 sb.append("\"prbUsage\": ");
1242 prbUsage.appendAsString(sb, indentLevel + 1);
1243 }
1244
1245 sb.append(",\n");
1246 for (int i = 0; i < indentLevel + 1; i++) {
1247 sb.append("\t");
1248 }
1249 if (mcsDl != null) {
1250 sb.append("\"mcsDl\": ");
1251 mcsDl.appendAsString(sb, indentLevel + 1);
1252 }
1253
1254 sb.append(",\n");
1255 for (int i = 0; i < indentLevel + 1; i++) {
1256 sb.append("\t");
1257 }
1258 if (numSchedTtisDl != null) {
1259 sb.append("\"numSchedTtisDl\": ");
1260 numSchedTtisDl.appendAsString(sb, indentLevel + 1);
1261 }
1262
1263 sb.append(",\n");
1264 for (int i = 0; i < indentLevel + 1; i++) {
1265 sb.append("\t");
1266 }
1267 if (mcsUl != null) {
1268 sb.append("\"mcsUl\": ");
1269 mcsUl.appendAsString(sb, indentLevel + 1);
1270 }
1271
1272 sb.append(",\n");
1273 for (int i = 0; i < indentLevel + 1; i++) {
1274 sb.append("\t");
1275 }
1276 if (numSchedTtisUl != null) {
1277 sb.append("\"numSchedTtisUl\": ");
1278 numSchedTtisUl.appendAsString(sb, indentLevel + 1);
1279 }
1280
1281 sb.append(",\n");
1282 for (int i = 0; i < indentLevel + 1; i++) {
1283 sb.append("\t");
1284 }
1285 if (rankDl1 != null) {
1286 sb.append("\"rankDl1\": ");
1287 rankDl1.appendAsString(sb, indentLevel + 1);
1288 }
1289
1290 sb.append(",\n");
1291 for (int i = 0; i < indentLevel + 1; i++) {
1292 sb.append("\t");
1293 }
1294 if (rankDl2 != null) {
1295 sb.append("\"rankDl2\": ");
1296 rankDl2.appendAsString(sb, indentLevel + 1);
1297 }
1298
1299 sb.append("\n");
1300 for (int i = 0; i < indentLevel; i++) {
1301 sb.append("\t");
1302 }
1303 sb.append("}");
1304 }
1305
1306}
1307