slowr | 13fa5b0 | 2017-08-08 16:32:31 -0700 | [diff] [blame] | 1 | /** |
| 2 | * This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org) |
| 3 | */ |
| 4 | |
| 5 | package org.onosproject.xran.codecs.pdu; |
| 6 | |
| 7 | import org.openmuc.jasn1.ber.BerByteArrayOutputStream; |
| 8 | import org.openmuc.jasn1.ber.BerLength; |
| 9 | import org.openmuc.jasn1.ber.BerTag; |
| 10 | import org.openmuc.jasn1.ber.types.BerBoolean; |
| 11 | import org.openmuc.jasn1.ber.types.BerInteger; |
| 12 | import org.onosproject.xran.codecs.api.*; |
| 13 | |
| 14 | import java.io.IOException; |
| 15 | import java.io.InputStream; |
| 16 | import java.io.Serializable; |
| 17 | import java.util.ArrayList; |
| 18 | import java.util.Iterator; |
| 19 | import java.util.List; |
| 20 | |
| 21 | public class CellConfigReport implements Serializable { |
| 22 | |
| 23 | private static final long serialVersionUID = 1L; |
| 24 | |
| 25 | public static class CandScells 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<CandScell> seqOf = null; |
| 32 | |
| 33 | public CandScells() { |
| 34 | seqOf = new ArrayList<CandScell>(); |
| 35 | } |
| 36 | |
| 37 | public CandScells(byte[] code) { |
| 38 | this.code = code; |
| 39 | } |
| 40 | |
| 41 | public List<CandScell> getCandScells() { |
| 42 | if (seqOf == null) { |
| 43 | seqOf = new ArrayList<CandScell>(); |
| 44 | } |
| 45 | return seqOf; |
| 46 | } |
| 47 | |
| 48 | public void setCandScells(CandScell candScell) { |
| 49 | seqOf.add(candScell); |
| 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 | CandScell element = new CandScell(); |
| 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<CandScell> it = seqOf.iterator(); |
| 134 | if (it.hasNext()) { |
| 135 | it.next().appendAsString(sb, indentLevel + 1); |
| 136 | while (it.hasNext()) { |
| 137 | sb.append(",\n"); |
| 138 | for (int i = 0; i < indentLevel + 1; i++) { |
| 139 | sb.append("\t"); |
| 140 | } |
| 141 | it.next().appendAsString(sb, indentLevel + 1); |
| 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 final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16); |
| 156 | |
| 157 | public byte[] code = null; |
| 158 | private ECGI ecgi = null; |
| 159 | private PhysCellId pci = null; |
| 160 | private CandScells candScells = null; |
| 161 | private ARFCNValue earfcnDl = null; |
| 162 | private ARFCNValue earfcnUl = null; |
| 163 | private BerInteger rbsPerTtiDl = null; |
| 164 | private BerInteger rbsPerTtiUl = null; |
| 165 | private BerInteger numTxAntenna = null; |
| 166 | private DuplexMode duplexMode = null; |
| 167 | private BerInteger tddConfig = null; |
| 168 | private BerInteger tddSplSfConfig = null; |
| 169 | private BerInteger maxNumConnectedUes = null; |
| 170 | private BerInteger maxNumConnectedBearers = null; |
| 171 | private BerInteger maxNumUesSchedPerTtiDl = null; |
| 172 | private BerInteger maxNumUesSchedPerTtiUl = null; |
| 173 | private BerBoolean dlfsSchedEnable = null; |
| 174 | |
| 175 | public CellConfigReport() { |
| 176 | } |
| 177 | |
| 178 | public CellConfigReport(byte[] code) { |
| 179 | this.code = code; |
| 180 | } |
| 181 | |
| 182 | public void setEcgi(ECGI ecgi) { |
| 183 | this.ecgi = ecgi; |
| 184 | } |
| 185 | |
| 186 | public ECGI getEcgi() { |
| 187 | return ecgi; |
| 188 | } |
| 189 | |
| 190 | public void setPci(PhysCellId pci) { |
| 191 | this.pci = pci; |
| 192 | } |
| 193 | |
| 194 | public PhysCellId getPci() { |
| 195 | return pci; |
| 196 | } |
| 197 | |
| 198 | public void setCandScells(CandScells candScells) { |
| 199 | this.candScells = candScells; |
| 200 | } |
| 201 | |
| 202 | public CandScells getCandScells() { |
| 203 | return candScells; |
| 204 | } |
| 205 | |
| 206 | public void setEarfcnDl(ARFCNValue earfcnDl) { |
| 207 | this.earfcnDl = earfcnDl; |
| 208 | } |
| 209 | |
| 210 | public ARFCNValue getEarfcnDl() { |
| 211 | return earfcnDl; |
| 212 | } |
| 213 | |
| 214 | public void setEarfcnUl(ARFCNValue earfcnUl) { |
| 215 | this.earfcnUl = earfcnUl; |
| 216 | } |
| 217 | |
| 218 | public ARFCNValue getEarfcnUl() { |
| 219 | return earfcnUl; |
| 220 | } |
| 221 | |
| 222 | public void setRbsPerTtiDl(BerInteger rbsPerTtiDl) { |
| 223 | this.rbsPerTtiDl = rbsPerTtiDl; |
| 224 | } |
| 225 | |
| 226 | public BerInteger getRbsPerTtiDl() { |
| 227 | return rbsPerTtiDl; |
| 228 | } |
| 229 | |
| 230 | public void setRbsPerTtiUl(BerInteger rbsPerTtiUl) { |
| 231 | this.rbsPerTtiUl = rbsPerTtiUl; |
| 232 | } |
| 233 | |
| 234 | public BerInteger getRbsPerTtiUl() { |
| 235 | return rbsPerTtiUl; |
| 236 | } |
| 237 | |
| 238 | public void setNumTxAntenna(BerInteger numTxAntenna) { |
| 239 | this.numTxAntenna = numTxAntenna; |
| 240 | } |
| 241 | |
| 242 | public BerInteger getNumTxAntenna() { |
| 243 | return numTxAntenna; |
| 244 | } |
| 245 | |
| 246 | public void setDuplexMode(DuplexMode duplexMode) { |
| 247 | this.duplexMode = duplexMode; |
| 248 | } |
| 249 | |
| 250 | public DuplexMode getDuplexMode() { |
| 251 | return duplexMode; |
| 252 | } |
| 253 | |
| 254 | public void setTddConfig(BerInteger tddConfig) { |
| 255 | this.tddConfig = tddConfig; |
| 256 | } |
| 257 | |
| 258 | public BerInteger getTddConfig() { |
| 259 | return tddConfig; |
| 260 | } |
| 261 | |
| 262 | public void setTddSplSfConfig(BerInteger tddSplSfConfig) { |
| 263 | this.tddSplSfConfig = tddSplSfConfig; |
| 264 | } |
| 265 | |
| 266 | public BerInteger getTddSplSfConfig() { |
| 267 | return tddSplSfConfig; |
| 268 | } |
| 269 | |
| 270 | public void setMaxNumConnectedUes(BerInteger maxNumConnectedUes) { |
| 271 | this.maxNumConnectedUes = maxNumConnectedUes; |
| 272 | } |
| 273 | |
| 274 | public BerInteger getMaxNumConnectedUes() { |
| 275 | return maxNumConnectedUes; |
| 276 | } |
| 277 | |
| 278 | public void setMaxNumConnectedBearers(BerInteger maxNumConnectedBearers) { |
| 279 | this.maxNumConnectedBearers = maxNumConnectedBearers; |
| 280 | } |
| 281 | |
| 282 | public BerInteger getMaxNumConnectedBearers() { |
| 283 | return maxNumConnectedBearers; |
| 284 | } |
| 285 | |
| 286 | public void setMaxNumUesSchedPerTtiDl(BerInteger maxNumUesSchedPerTtiDl) { |
| 287 | this.maxNumUesSchedPerTtiDl = maxNumUesSchedPerTtiDl; |
| 288 | } |
| 289 | |
| 290 | public BerInteger getMaxNumUesSchedPerTtiDl() { |
| 291 | return maxNumUesSchedPerTtiDl; |
| 292 | } |
| 293 | |
| 294 | public void setMaxNumUesSchedPerTtiUl(BerInteger maxNumUesSchedPerTtiUl) { |
| 295 | this.maxNumUesSchedPerTtiUl = maxNumUesSchedPerTtiUl; |
| 296 | } |
| 297 | |
| 298 | public BerInteger getMaxNumUesSchedPerTtiUl() { |
| 299 | return maxNumUesSchedPerTtiUl; |
| 300 | } |
| 301 | |
| 302 | public void setDlfsSchedEnable(BerBoolean dlfsSchedEnable) { |
| 303 | this.dlfsSchedEnable = dlfsSchedEnable; |
| 304 | } |
| 305 | |
| 306 | public BerBoolean getDlfsSchedEnable() { |
| 307 | return dlfsSchedEnable; |
| 308 | } |
| 309 | |
| 310 | public int encode(BerByteArrayOutputStream os) throws IOException { |
| 311 | return encode(os, true); |
| 312 | } |
| 313 | |
| 314 | public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException { |
| 315 | |
| 316 | if (code != null) { |
| 317 | for (int i = code.length - 1; i >= 0; i--) { |
| 318 | os.write(code[i]); |
| 319 | } |
| 320 | if (withTag) { |
| 321 | return tag.encode(os) + code.length; |
| 322 | } |
| 323 | return code.length; |
| 324 | } |
| 325 | |
| 326 | int codeLength = 0; |
| 327 | codeLength += dlfsSchedEnable.encode(os, false); |
| 328 | // write tag: CONTEXT_CLASS, PRIMITIVE, 15 |
| 329 | os.write(0x8F); |
| 330 | codeLength += 1; |
| 331 | |
| 332 | codeLength += maxNumUesSchedPerTtiUl.encode(os, false); |
| 333 | // write tag: CONTEXT_CLASS, PRIMITIVE, 14 |
| 334 | os.write(0x8E); |
| 335 | codeLength += 1; |
| 336 | |
| 337 | codeLength += maxNumUesSchedPerTtiDl.encode(os, false); |
| 338 | // write tag: CONTEXT_CLASS, PRIMITIVE, 13 |
| 339 | os.write(0x8D); |
| 340 | codeLength += 1; |
| 341 | |
| 342 | codeLength += maxNumConnectedBearers.encode(os, false); |
| 343 | // write tag: CONTEXT_CLASS, PRIMITIVE, 12 |
| 344 | os.write(0x8C); |
| 345 | codeLength += 1; |
| 346 | |
| 347 | codeLength += maxNumConnectedUes.encode(os, false); |
| 348 | // write tag: CONTEXT_CLASS, PRIMITIVE, 11 |
| 349 | os.write(0x8B); |
| 350 | codeLength += 1; |
| 351 | |
| 352 | if (tddSplSfConfig != null) { |
| 353 | codeLength += tddSplSfConfig.encode(os, false); |
| 354 | // write tag: CONTEXT_CLASS, PRIMITIVE, 10 |
| 355 | os.write(0x8A); |
| 356 | codeLength += 1; |
| 357 | } |
| 358 | |
| 359 | if (tddConfig != null) { |
| 360 | codeLength += tddConfig.encode(os, false); |
| 361 | // write tag: CONTEXT_CLASS, PRIMITIVE, 9 |
| 362 | os.write(0x89); |
| 363 | codeLength += 1; |
| 364 | } |
| 365 | |
| 366 | codeLength += duplexMode.encode(os, false); |
| 367 | // write tag: CONTEXT_CLASS, PRIMITIVE, 8 |
| 368 | os.write(0x88); |
| 369 | codeLength += 1; |
| 370 | |
| 371 | codeLength += numTxAntenna.encode(os, false); |
| 372 | // write tag: CONTEXT_CLASS, PRIMITIVE, 7 |
| 373 | os.write(0x87); |
| 374 | codeLength += 1; |
| 375 | |
| 376 | codeLength += rbsPerTtiUl.encode(os, false); |
| 377 | // write tag: CONTEXT_CLASS, PRIMITIVE, 6 |
| 378 | os.write(0x86); |
| 379 | codeLength += 1; |
| 380 | |
| 381 | codeLength += rbsPerTtiDl.encode(os, false); |
| 382 | // write tag: CONTEXT_CLASS, PRIMITIVE, 5 |
| 383 | os.write(0x85); |
| 384 | codeLength += 1; |
| 385 | |
| 386 | codeLength += earfcnUl.encode(os, false); |
| 387 | // write tag: CONTEXT_CLASS, PRIMITIVE, 4 |
| 388 | os.write(0x84); |
| 389 | codeLength += 1; |
| 390 | |
| 391 | codeLength += earfcnDl.encode(os, false); |
| 392 | // write tag: CONTEXT_CLASS, PRIMITIVE, 3 |
| 393 | os.write(0x83); |
| 394 | codeLength += 1; |
| 395 | |
| 396 | codeLength += candScells.encode(os, false); |
| 397 | // write tag: CONTEXT_CLASS, CONSTRUCTED, 2 |
| 398 | os.write(0xA2); |
| 399 | codeLength += 1; |
| 400 | |
| 401 | codeLength += pci.encode(os, false); |
| 402 | // write tag: CONTEXT_CLASS, PRIMITIVE, 1 |
| 403 | os.write(0x81); |
| 404 | codeLength += 1; |
| 405 | |
| 406 | codeLength += ecgi.encode(os, false); |
| 407 | // write tag: CONTEXT_CLASS, CONSTRUCTED, 0 |
| 408 | os.write(0xA0); |
| 409 | codeLength += 1; |
| 410 | |
| 411 | codeLength += BerLength.encodeLength(os, codeLength); |
| 412 | |
| 413 | if (withTag) { |
| 414 | codeLength += tag.encode(os); |
| 415 | } |
| 416 | |
| 417 | return codeLength; |
| 418 | |
| 419 | } |
| 420 | |
| 421 | public int decode(InputStream is) throws IOException { |
| 422 | return decode(is, true); |
| 423 | } |
| 424 | |
| 425 | public int decode(InputStream is, boolean withTag) throws IOException { |
| 426 | int codeLength = 0; |
| 427 | int subCodeLength = 0; |
| 428 | BerTag berTag = new BerTag(); |
| 429 | |
| 430 | if (withTag) { |
| 431 | codeLength += tag.decodeAndCheck(is); |
| 432 | } |
| 433 | |
| 434 | BerLength length = new BerLength(); |
| 435 | codeLength += length.decode(is); |
| 436 | |
| 437 | int totalLength = length.val; |
| 438 | codeLength += totalLength; |
| 439 | |
| 440 | subCodeLength += berTag.decode(is); |
| 441 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) { |
| 442 | ecgi = new ECGI(); |
| 443 | subCodeLength += ecgi.decode(is, false); |
| 444 | subCodeLength += berTag.decode(is); |
| 445 | } |
| 446 | else { |
| 447 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 448 | } |
| 449 | |
| 450 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) { |
| 451 | pci = new PhysCellId(); |
| 452 | subCodeLength += pci.decode(is, false); |
| 453 | subCodeLength += berTag.decode(is); |
| 454 | } |
| 455 | else { |
| 456 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 457 | } |
| 458 | |
| 459 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) { |
| 460 | candScells = new CandScells(); |
| 461 | subCodeLength += candScells.decode(is, false); |
| 462 | subCodeLength += berTag.decode(is); |
| 463 | } |
| 464 | else { |
| 465 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 466 | } |
| 467 | |
| 468 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) { |
| 469 | earfcnDl = new ARFCNValue(); |
| 470 | subCodeLength += earfcnDl.decode(is, false); |
| 471 | subCodeLength += berTag.decode(is); |
| 472 | } |
| 473 | else { |
| 474 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 475 | } |
| 476 | |
| 477 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 4)) { |
| 478 | earfcnUl = new ARFCNValue(); |
| 479 | subCodeLength += earfcnUl.decode(is, false); |
| 480 | subCodeLength += berTag.decode(is); |
| 481 | } |
| 482 | else { |
| 483 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 484 | } |
| 485 | |
| 486 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 5)) { |
| 487 | rbsPerTtiDl = new BerInteger(); |
| 488 | subCodeLength += rbsPerTtiDl.decode(is, false); |
| 489 | subCodeLength += berTag.decode(is); |
| 490 | } |
| 491 | else { |
| 492 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 493 | } |
| 494 | |
| 495 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 6)) { |
| 496 | rbsPerTtiUl = new BerInteger(); |
| 497 | subCodeLength += rbsPerTtiUl.decode(is, false); |
| 498 | subCodeLength += berTag.decode(is); |
| 499 | } |
| 500 | else { |
| 501 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 502 | } |
| 503 | |
| 504 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 7)) { |
| 505 | numTxAntenna = new BerInteger(); |
| 506 | subCodeLength += numTxAntenna.decode(is, false); |
| 507 | subCodeLength += berTag.decode(is); |
| 508 | } |
| 509 | else { |
| 510 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 511 | } |
| 512 | |
| 513 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) { |
| 514 | duplexMode = new DuplexMode(); |
| 515 | subCodeLength += duplexMode.decode(is, false); |
| 516 | subCodeLength += berTag.decode(is); |
| 517 | } |
| 518 | else { |
| 519 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 520 | } |
| 521 | |
| 522 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 9)) { |
| 523 | tddConfig = new BerInteger(); |
| 524 | subCodeLength += tddConfig.decode(is, false); |
| 525 | subCodeLength += berTag.decode(is); |
| 526 | } |
| 527 | |
| 528 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 10)) { |
| 529 | tddSplSfConfig = new BerInteger(); |
| 530 | subCodeLength += tddSplSfConfig.decode(is, false); |
| 531 | subCodeLength += berTag.decode(is); |
| 532 | } |
| 533 | |
| 534 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 11)) { |
| 535 | maxNumConnectedUes = new BerInteger(); |
| 536 | subCodeLength += maxNumConnectedUes.decode(is, false); |
| 537 | subCodeLength += berTag.decode(is); |
| 538 | } |
| 539 | else { |
| 540 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 541 | } |
| 542 | |
| 543 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 12)) { |
| 544 | maxNumConnectedBearers = new BerInteger(); |
| 545 | subCodeLength += maxNumConnectedBearers.decode(is, false); |
| 546 | subCodeLength += berTag.decode(is); |
| 547 | } |
| 548 | else { |
| 549 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 550 | } |
| 551 | |
| 552 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 13)) { |
| 553 | maxNumUesSchedPerTtiDl = new BerInteger(); |
| 554 | subCodeLength += maxNumUesSchedPerTtiDl.decode(is, false); |
| 555 | subCodeLength += berTag.decode(is); |
| 556 | } |
| 557 | else { |
| 558 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 559 | } |
| 560 | |
| 561 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 14)) { |
| 562 | maxNumUesSchedPerTtiUl = new BerInteger(); |
| 563 | subCodeLength += maxNumUesSchedPerTtiUl.decode(is, false); |
| 564 | subCodeLength += berTag.decode(is); |
| 565 | } |
| 566 | else { |
| 567 | throw new IOException("Tag does not match the mandatory sequence element tag."); |
| 568 | } |
| 569 | |
| 570 | if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 15)) { |
| 571 | dlfsSchedEnable = new BerBoolean(); |
| 572 | subCodeLength += dlfsSchedEnable.decode(is, false); |
| 573 | if (subCodeLength == totalLength) { |
| 574 | return codeLength; |
| 575 | } |
| 576 | } |
| 577 | throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: " + subCodeLength); |
| 578 | |
| 579 | |
| 580 | } |
| 581 | |
| 582 | public void encodeAndSave(int encodingSizeGuess) throws IOException { |
| 583 | BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess); |
| 584 | encode(os, false); |
| 585 | code = os.getArray(); |
| 586 | } |
| 587 | |
| 588 | public String toString() { |
| 589 | StringBuilder sb = new StringBuilder(); |
| 590 | appendAsString(sb, 0); |
| 591 | return sb.toString(); |
| 592 | } |
| 593 | |
| 594 | public void appendAsString(StringBuilder sb, int indentLevel) { |
| 595 | |
| 596 | sb.append("{"); |
| 597 | sb.append("\n"); |
| 598 | for (int i = 0; i < indentLevel + 1; i++) { |
| 599 | sb.append("\t"); |
| 600 | } |
| 601 | if (ecgi != null) { |
| 602 | sb.append("\"ecgi\": "); |
| 603 | ecgi.appendAsString(sb, indentLevel + 1); |
| 604 | } |
| 605 | |
| 606 | sb.append(",\n"); |
| 607 | for (int i = 0; i < indentLevel + 1; i++) { |
| 608 | sb.append("\t"); |
| 609 | } |
| 610 | if (pci != null) { |
| 611 | sb.append("\"pci\": ").append(pci); |
| 612 | } |
| 613 | |
| 614 | sb.append(",\n"); |
| 615 | for (int i = 0; i < indentLevel + 1; i++) { |
| 616 | sb.append("\t"); |
| 617 | } |
| 618 | if (candScells != null) { |
| 619 | sb.append("\"candScells\": "); |
| 620 | candScells.appendAsString(sb, indentLevel + 1); |
| 621 | } |
| 622 | |
| 623 | sb.append(",\n"); |
| 624 | for (int i = 0; i < indentLevel + 1; i++) { |
| 625 | sb.append("\t"); |
| 626 | } |
| 627 | if (earfcnDl != null) { |
| 628 | sb.append("\"earfcnDl\": ").append(earfcnDl); |
| 629 | } |
| 630 | |
| 631 | sb.append(",\n"); |
| 632 | for (int i = 0; i < indentLevel + 1; i++) { |
| 633 | sb.append("\t"); |
| 634 | } |
| 635 | if (earfcnUl != null) { |
| 636 | sb.append("\"earfcnUl\": ").append(earfcnUl); |
| 637 | } |
| 638 | |
| 639 | sb.append(",\n"); |
| 640 | for (int i = 0; i < indentLevel + 1; i++) { |
| 641 | sb.append("\t"); |
| 642 | } |
| 643 | if (rbsPerTtiDl != null) { |
| 644 | sb.append("\"rbsPerTtiDl\": ").append(rbsPerTtiDl); |
| 645 | } |
| 646 | |
| 647 | sb.append(",\n"); |
| 648 | for (int i = 0; i < indentLevel + 1; i++) { |
| 649 | sb.append("\t"); |
| 650 | } |
| 651 | if (rbsPerTtiUl != null) { |
| 652 | sb.append("\"rbsPerTtiUl\": ").append(rbsPerTtiUl); |
| 653 | } |
| 654 | |
| 655 | sb.append(",\n"); |
| 656 | for (int i = 0; i < indentLevel + 1; i++) { |
| 657 | sb.append("\t"); |
| 658 | } |
| 659 | if (numTxAntenna != null) { |
| 660 | sb.append("\"numTxAntenna\": ").append(numTxAntenna); |
| 661 | } |
| 662 | |
| 663 | sb.append(",\n"); |
| 664 | for (int i = 0; i < indentLevel + 1; i++) { |
| 665 | sb.append("\t"); |
| 666 | } |
| 667 | if (duplexMode != null) { |
| 668 | sb.append("\"duplexMode\": ").append(duplexMode); |
| 669 | } |
| 670 | |
| 671 | if (tddConfig != null) { |
| 672 | sb.append(",\n"); |
| 673 | for (int i = 0; i < indentLevel + 1; i++) { |
| 674 | sb.append("\t"); |
| 675 | } |
| 676 | sb.append("\"tddConfig\": ").append(tddConfig); |
| 677 | } |
| 678 | |
| 679 | if (tddSplSfConfig != null) { |
| 680 | sb.append(",\n"); |
| 681 | for (int i = 0; i < indentLevel + 1; i++) { |
| 682 | sb.append("\t"); |
| 683 | } |
| 684 | sb.append("\"tddSplSfConfig\": ").append(tddSplSfConfig); |
| 685 | } |
| 686 | |
| 687 | sb.append(",\n"); |
| 688 | for (int i = 0; i < indentLevel + 1; i++) { |
| 689 | sb.append("\t"); |
| 690 | } |
| 691 | if (maxNumConnectedUes != null) { |
| 692 | sb.append("\"maxNumConnectedUes\": ").append(maxNumConnectedUes); |
| 693 | } |
| 694 | |
| 695 | sb.append(",\n"); |
| 696 | for (int i = 0; i < indentLevel + 1; i++) { |
| 697 | sb.append("\t"); |
| 698 | } |
| 699 | if (maxNumConnectedBearers != null) { |
| 700 | sb.append("\"maxNumConnectedBearers\": ").append(maxNumConnectedBearers); |
| 701 | } |
| 702 | |
| 703 | sb.append(",\n"); |
| 704 | for (int i = 0; i < indentLevel + 1; i++) { |
| 705 | sb.append("\t"); |
| 706 | } |
| 707 | if (maxNumUesSchedPerTtiDl != null) { |
| 708 | sb.append("\"maxNumUesSchedPerTtiDl\": ").append(maxNumUesSchedPerTtiDl); |
| 709 | } |
| 710 | |
| 711 | sb.append(",\n"); |
| 712 | for (int i = 0; i < indentLevel + 1; i++) { |
| 713 | sb.append("\t"); |
| 714 | } |
| 715 | if (maxNumUesSchedPerTtiUl != null) { |
| 716 | sb.append("\"maxNumUesSchedPerTtiUl\": ").append(maxNumUesSchedPerTtiUl); |
| 717 | } |
| 718 | |
| 719 | sb.append(",\n"); |
| 720 | for (int i = 0; i < indentLevel + 1; i++) { |
| 721 | sb.append("\t"); |
| 722 | } |
| 723 | if (dlfsSchedEnable != null) { |
| 724 | sb.append("\"dlfsSchedEnable\": ").append(dlfsSchedEnable); |
| 725 | } |
| 726 | |
| 727 | sb.append("\n"); |
| 728 | for (int i = 0; i < indentLevel; i++) { |
| 729 | sb.append("\t"); |
| 730 | } |
| 731 | sb.append("}"); |
| 732 | } |
| 733 | |
| 734 | } |
| 735 | |