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