anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2019-present Infosys Limited |
| 3 | * |
| 4 | * SPDX-License-Identifier: Apache-2.0 |
| 5 | */ |
| 6 | |
| 7 | /****************************************************************************** |
| 8 | * |
| 9 | * This is an auto generated file. |
| 10 | * Please do not edit this file. |
| 11 | * All edits to be made through template source file |
| 12 | * <TOP-DIR/scripts/GtpV2StackCodeGen/tts/msgtemplate.cpp.tt> |
| 13 | ******************************************************************************/ |
| 14 | |
| 15 | #include "deleteBearerRequestMsg.h" |
| 16 | #include "../ieClasses/manual/gtpV2Ie.h" |
| 17 | #include "../ieClasses/gtpV2IeFactory.h" |
| 18 | #include "../ieClasses/ebiIe.h" |
| 19 | #include "../ieClasses/ebiIe.h" |
| 20 | #include "../ieClasses/bearerContextIe.h" |
| 21 | #include "../ieClasses/failedBearerContextsInDeleteBearerRequest.h" |
| 22 | #include "../ieClasses/ptiIe.h" |
| 23 | #include "../ieClasses/pcoIe.h" |
| 24 | #include "../ieClasses/fqCsidIe.h" |
| 25 | #include "../ieClasses/fqCsidIe.h" |
| 26 | #include "../ieClasses/causeIe.h" |
| 27 | #include "../ieClasses/indicationIe.h" |
| 28 | #include "../ieClasses/loadControlInformationIe.h" |
| 29 | #include "../ieClasses/pgwsNodeLevelLoadControlInformationInDeleteBearerRequest.h" |
| 30 | #include "../ieClasses/loadControlInformationIe.h" |
| 31 | #include "../ieClasses/pgwsApnLevelLoadControlInformationInDeleteBearerRequest.h" |
| 32 | #include "../ieClasses/loadControlInformationIe.h" |
| 33 | #include "../ieClasses/sgwsNodeLevelLoadControlInformationInDeleteBearerRequest.h" |
| 34 | #include "../ieClasses/overloadControlInformationIe.h" |
| 35 | #include "../ieClasses/pgwsOverloadControlInformationInDeleteBearerRequest.h" |
| 36 | #include "../ieClasses/overloadControlInformationIe.h" |
| 37 | #include "../ieClasses/sgwsOverloadControlInformationInDeleteBearerRequest.h" |
| 38 | #include "../ieClasses/fContainerIe.h" |
| 39 | #include "../ieClasses/epcoIe.h" |
| 40 | |
| 41 | DeleteBearerRequestMsg::DeleteBearerRequestMsg() |
| 42 | { |
| 43 | msgType = DeleteBearerRequestMsgType; |
| 44 | |
| 45 | } |
| 46 | |
| 47 | DeleteBearerRequestMsg::~DeleteBearerRequestMsg() |
| 48 | { |
| 49 | |
| 50 | } |
| 51 | |
| 52 | bool DeleteBearerRequestMsg::encodeDeleteBearerRequestMsg(MsgBuffer &buffer, |
| 53 | DeleteBearerRequestMsgData |
| 54 | const &data) |
| 55 | { |
| 56 | bool rc = false; |
| 57 | GtpV2IeHeader header; |
| 58 | Uint16 startIndex = 0; |
| 59 | Uint16 endIndex = 0; |
| 60 | Uint16 length = 0; |
| 61 | |
| 62 | if (data.linkedEpsBearerIdIePresent) |
| 63 | { |
| 64 | |
| 65 | // Encode the Ie Header |
| 66 | header.ieType = EbiIeType; |
| 67 | header.instance = 0; |
| 68 | header.length = 0; // We will encode the IE first and then update the length |
| 69 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 70 | startIndex = buffer.getCurrentIndex(); |
| 71 | EbiIe ebi= |
| 72 | dynamic_cast< |
| 73 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 74 | rc = ebi.encodeEbiIe(buffer, data.linkedEpsBearerId); |
| 75 | endIndex = buffer.getCurrentIndex(); |
| 76 | length = endIndex - startIndex; |
| 77 | |
| 78 | // encode the length value now |
| 79 | buffer.goToIndex(startIndex - 3); |
| 80 | buffer.writeUint16(length, false); |
| 81 | buffer.goToIndex(endIndex); |
| 82 | |
| 83 | if (!(rc)) |
| 84 | { |
| 85 | errorStream.add((char *)"Failed to encode IE: linkedEpsBearerId\n"); |
| 86 | return false; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | if (data.epsBearerIdsIePresent) |
| 91 | { |
| 92 | |
| 93 | // Encode the Ie Header |
| 94 | header.ieType = EbiIeType; |
| 95 | header.instance = 1; |
| 96 | header.length = 0; // We will encode the IE first and then update the length |
| 97 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 98 | startIndex = buffer.getCurrentIndex(); |
| 99 | EbiIe ebi= |
| 100 | dynamic_cast< |
| 101 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 102 | rc = ebi.encodeEbiIe(buffer, data.epsBearerIds); |
| 103 | endIndex = buffer.getCurrentIndex(); |
| 104 | length = endIndex - startIndex; |
| 105 | |
| 106 | // encode the length value now |
| 107 | buffer.goToIndex(startIndex - 3); |
| 108 | buffer.writeUint16(length, false); |
| 109 | buffer.goToIndex(endIndex); |
| 110 | |
| 111 | if (!(rc)) |
| 112 | { |
| 113 | errorStream.add((char *)"Failed to encode IE: epsBearerIds\n"); |
| 114 | return false; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // First validate if the applicatoin provided more than the expected cardinality |
| 119 | if (data.failedBearerContextsCount > 11) |
| 120 | { |
| 121 | errorStream.add((char *)"Number of entries of failedBearerContexts exceeded\n"); |
| 122 | errorStream.add((char *)"Expected count: 11 Received count: "); |
| 123 | errorStream.add((char *)"data.failedBearerContextsCount"); |
| 124 | errorStream.endOfLine(); |
| 125 | return false; |
| 126 | } |
| 127 | for (Uint8 i = 0; i < data.failedBearerContextsCount; i++) |
| 128 | { |
| 129 | // Encode the Ie Header |
| 130 | header.ieType = BearerContextIeType; |
| 131 | header.instance = 0; |
| 132 | header.length = 0; // We will encode the IE first and then update the length |
| 133 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 134 | startIndex = buffer.getCurrentIndex(); |
| 135 | BearerContextIe bearerContext= |
| 136 | dynamic_cast< |
| 137 | BearerContextIe&>(GtpV2IeFactory::getInstance(). |
| 138 | getIeObject(BearerContextIeType)); |
| 139 | FailedBearerContextsInDeleteBearerRequest groupedIeInstance = dynamic_cast<FailedBearerContextsInDeleteBearerRequest&>(bearerContext.getGroupedIe(msgType, 0)); |
| 140 | rc = groupedIeInstance.encodeFailedBearerContextsInDeleteBearerRequest(buffer, data.failedBearerContexts[i]); |
| 141 | endIndex = buffer.getCurrentIndex(); |
| 142 | length = endIndex - startIndex; |
| 143 | |
| 144 | // encode the length value now |
| 145 | buffer.goToIndex(startIndex - 3); |
| 146 | buffer.writeUint16(length, false); |
| 147 | buffer.goToIndex(endIndex); |
| 148 | } |
| 149 | |
| 150 | if (!(rc)) |
| 151 | { |
| 152 | errorStream.add((char *)"Failed to encode IE: failedBearerContexts\n"); |
| 153 | return false; |
| 154 | } |
| 155 | |
| 156 | if (data.procedureTransactionIdIePresent) |
| 157 | { |
| 158 | |
| 159 | // Encode the Ie Header |
| 160 | header.ieType = PtiIeType; |
| 161 | header.instance = 0; |
| 162 | header.length = 0; // We will encode the IE first and then update the length |
| 163 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 164 | startIndex = buffer.getCurrentIndex(); |
| 165 | PtiIe pti= |
| 166 | dynamic_cast< |
| 167 | PtiIe&>(GtpV2IeFactory::getInstance().getIeObject(PtiIeType)); |
| 168 | rc = pti.encodePtiIe(buffer, data.procedureTransactionId); |
| 169 | endIndex = buffer.getCurrentIndex(); |
| 170 | length = endIndex - startIndex; |
| 171 | |
| 172 | // encode the length value now |
| 173 | buffer.goToIndex(startIndex - 3); |
| 174 | buffer.writeUint16(length, false); |
| 175 | buffer.goToIndex(endIndex); |
| 176 | |
| 177 | if (!(rc)) |
| 178 | { |
| 179 | errorStream.add((char *)"Failed to encode IE: procedureTransactionId\n"); |
| 180 | return false; |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | if (data.protocolConfigurationOptionsIePresent) |
| 185 | { |
| 186 | |
| 187 | // Encode the Ie Header |
| 188 | header.ieType = PcoIeType; |
| 189 | header.instance = 0; |
| 190 | header.length = 0; // We will encode the IE first and then update the length |
| 191 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 192 | startIndex = buffer.getCurrentIndex(); |
| 193 | PcoIe pco= |
| 194 | dynamic_cast< |
| 195 | PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType)); |
| 196 | rc = pco.encodePcoIe(buffer, data.protocolConfigurationOptions); |
| 197 | endIndex = buffer.getCurrentIndex(); |
| 198 | length = endIndex - startIndex; |
| 199 | |
| 200 | // encode the length value now |
| 201 | buffer.goToIndex(startIndex - 3); |
| 202 | buffer.writeUint16(length, false); |
| 203 | buffer.goToIndex(endIndex); |
| 204 | |
| 205 | if (!(rc)) |
| 206 | { |
| 207 | errorStream.add((char *)"Failed to encode IE: protocolConfigurationOptions\n"); |
| 208 | return false; |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | if (data.pgwFqCsidIePresent) |
| 213 | { |
| 214 | |
| 215 | // Encode the Ie Header |
| 216 | header.ieType = FqCsidIeType; |
| 217 | header.instance = 0; |
| 218 | header.length = 0; // We will encode the IE first and then update the length |
| 219 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 220 | startIndex = buffer.getCurrentIndex(); |
| 221 | FqCsidIe fqCsid= |
| 222 | dynamic_cast< |
| 223 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 224 | rc = fqCsid.encodeFqCsidIe(buffer, data.pgwFqCsid); |
| 225 | endIndex = buffer.getCurrentIndex(); |
| 226 | length = endIndex - startIndex; |
| 227 | |
| 228 | // encode the length value now |
| 229 | buffer.goToIndex(startIndex - 3); |
| 230 | buffer.writeUint16(length, false); |
| 231 | buffer.goToIndex(endIndex); |
| 232 | |
| 233 | if (!(rc)) |
| 234 | { |
| 235 | errorStream.add((char *)"Failed to encode IE: pgwFqCsid\n"); |
| 236 | return false; |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | if (data.sgwFqCsidIePresent) |
| 241 | { |
| 242 | |
| 243 | // Encode the Ie Header |
| 244 | header.ieType = FqCsidIeType; |
| 245 | header.instance = 1; |
| 246 | header.length = 0; // We will encode the IE first and then update the length |
| 247 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 248 | startIndex = buffer.getCurrentIndex(); |
| 249 | FqCsidIe fqCsid= |
| 250 | dynamic_cast< |
| 251 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 252 | rc = fqCsid.encodeFqCsidIe(buffer, data.sgwFqCsid); |
| 253 | endIndex = buffer.getCurrentIndex(); |
| 254 | length = endIndex - startIndex; |
| 255 | |
| 256 | // encode the length value now |
| 257 | buffer.goToIndex(startIndex - 3); |
| 258 | buffer.writeUint16(length, false); |
| 259 | buffer.goToIndex(endIndex); |
| 260 | |
| 261 | if (!(rc)) |
| 262 | { |
| 263 | errorStream.add((char *)"Failed to encode IE: sgwFqCsid\n"); |
| 264 | return false; |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | if (data.causeIePresent) |
| 269 | { |
| 270 | |
| 271 | // Encode the Ie Header |
| 272 | header.ieType = CauseIeType; |
| 273 | header.instance = 0; |
| 274 | header.length = 0; // We will encode the IE first and then update the length |
| 275 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 276 | startIndex = buffer.getCurrentIndex(); |
| 277 | CauseIe cause= |
| 278 | dynamic_cast< |
| 279 | CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType)); |
| 280 | rc = cause.encodeCauseIe(buffer, data.cause); |
| 281 | endIndex = buffer.getCurrentIndex(); |
| 282 | length = endIndex - startIndex; |
| 283 | |
| 284 | // encode the length value now |
| 285 | buffer.goToIndex(startIndex - 3); |
| 286 | buffer.writeUint16(length, false); |
| 287 | buffer.goToIndex(endIndex); |
| 288 | |
| 289 | if (!(rc)) |
| 290 | { |
| 291 | errorStream.add((char *)"Failed to encode IE: cause\n"); |
| 292 | return false; |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | if (data.indicationFlagsIePresent) |
| 297 | { |
| 298 | |
| 299 | // Encode the Ie Header |
| 300 | header.ieType = IndicationIeType; |
| 301 | header.instance = 0; |
| 302 | header.length = 0; // We will encode the IE first and then update the length |
| 303 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 304 | startIndex = buffer.getCurrentIndex(); |
| 305 | IndicationIe indication= |
| 306 | dynamic_cast< |
| 307 | IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType)); |
| 308 | rc = indication.encodeIndicationIe(buffer, data.indicationFlags); |
| 309 | endIndex = buffer.getCurrentIndex(); |
| 310 | length = endIndex - startIndex; |
| 311 | |
| 312 | // encode the length value now |
| 313 | buffer.goToIndex(startIndex - 3); |
| 314 | buffer.writeUint16(length, false); |
| 315 | buffer.goToIndex(endIndex); |
| 316 | |
| 317 | if (!(rc)) |
| 318 | { |
| 319 | errorStream.add((char *)"Failed to encode IE: indicationFlags\n"); |
| 320 | return false; |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | if (data.pgwsNodeLevelLoadControlInformationIePresent) |
| 325 | { |
| 326 | |
| 327 | // Encode the Ie Header |
| 328 | header.ieType = LoadControlInformationIeType; |
| 329 | header.instance = 0; |
| 330 | header.length = 0; // We will encode the IE first and then update the length |
| 331 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 332 | startIndex = buffer.getCurrentIndex(); |
| 333 | LoadControlInformationIe loadControlInformation= |
| 334 | dynamic_cast< |
| 335 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 336 | PgwsNodeLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 337 | dynamic_cast< |
| 338 | PgwsNodeLevelLoadControlInformationInDeleteBearerRequest&>(loadControlInformation.getGroupedIe(msgType, 0)); |
| 339 | rc = groupedIeInstance.encodePgwsNodeLevelLoadControlInformationInDeleteBearerRequest(buffer, data.pgwsNodeLevelLoadControlInformation); |
| 340 | endIndex = buffer.getCurrentIndex(); |
| 341 | length = endIndex - startIndex; |
| 342 | |
| 343 | // encode the length value now |
| 344 | buffer.goToIndex(startIndex - 3); |
| 345 | buffer.writeUint16(length, false); |
| 346 | buffer.goToIndex(endIndex); |
| 347 | |
| 348 | if (!(rc)) |
| 349 | { |
| 350 | errorStream.add((char *)"Failed to encode IE: pgwsNodeLevelLoadControlInformation\n"); |
| 351 | return false; |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | if (data.pgwsApnLevelLoadControlInformationIePresent) |
| 356 | { |
| 357 | |
| 358 | // Encode the Ie Header |
| 359 | header.ieType = LoadControlInformationIeType; |
| 360 | header.instance = 1; |
| 361 | header.length = 0; // We will encode the IE first and then update the length |
| 362 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 363 | startIndex = buffer.getCurrentIndex(); |
| 364 | LoadControlInformationIe loadControlInformation= |
| 365 | dynamic_cast< |
| 366 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 367 | PgwsApnLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 368 | dynamic_cast< |
| 369 | PgwsApnLevelLoadControlInformationInDeleteBearerRequest&>(loadControlInformation.getGroupedIe(msgType, 1)); |
| 370 | rc = groupedIeInstance.encodePgwsApnLevelLoadControlInformationInDeleteBearerRequest(buffer, data.pgwsApnLevelLoadControlInformation); |
| 371 | endIndex = buffer.getCurrentIndex(); |
| 372 | length = endIndex - startIndex; |
| 373 | |
| 374 | // encode the length value now |
| 375 | buffer.goToIndex(startIndex - 3); |
| 376 | buffer.writeUint16(length, false); |
| 377 | buffer.goToIndex(endIndex); |
| 378 | |
| 379 | if (!(rc)) |
| 380 | { |
| 381 | errorStream.add((char *)"Failed to encode IE: pgwsApnLevelLoadControlInformation\n"); |
| 382 | return false; |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | if (data.sgwsNodeLevelLoadControlInformationIePresent) |
| 387 | { |
| 388 | |
| 389 | // Encode the Ie Header |
| 390 | header.ieType = LoadControlInformationIeType; |
| 391 | header.instance = 2; |
| 392 | header.length = 0; // We will encode the IE first and then update the length |
| 393 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 394 | startIndex = buffer.getCurrentIndex(); |
| 395 | LoadControlInformationIe loadControlInformation= |
| 396 | dynamic_cast< |
| 397 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 398 | SgwsNodeLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 399 | dynamic_cast< |
| 400 | SgwsNodeLevelLoadControlInformationInDeleteBearerRequest&>(loadControlInformation.getGroupedIe(msgType, 2)); |
| 401 | rc = groupedIeInstance.encodeSgwsNodeLevelLoadControlInformationInDeleteBearerRequest(buffer, data.sgwsNodeLevelLoadControlInformation); |
| 402 | endIndex = buffer.getCurrentIndex(); |
| 403 | length = endIndex - startIndex; |
| 404 | |
| 405 | // encode the length value now |
| 406 | buffer.goToIndex(startIndex - 3); |
| 407 | buffer.writeUint16(length, false); |
| 408 | buffer.goToIndex(endIndex); |
| 409 | |
| 410 | if (!(rc)) |
| 411 | { |
| 412 | errorStream.add((char *)"Failed to encode IE: sgwsNodeLevelLoadControlInformation\n"); |
| 413 | return false; |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | if (data.pgwsOverloadControlInformationIePresent) |
| 418 | { |
| 419 | |
| 420 | // Encode the Ie Header |
| 421 | header.ieType = OverloadControlInformationIeType; |
| 422 | header.instance = 0; |
| 423 | header.length = 0; // We will encode the IE first and then update the length |
| 424 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 425 | startIndex = buffer.getCurrentIndex(); |
| 426 | OverloadControlInformationIe overloadControlInformation= |
| 427 | dynamic_cast< |
| 428 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 429 | PgwsOverloadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 430 | dynamic_cast< |
| 431 | PgwsOverloadControlInformationInDeleteBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 0)); |
| 432 | rc = groupedIeInstance.encodePgwsOverloadControlInformationInDeleteBearerRequest(buffer, data.pgwsOverloadControlInformation); |
| 433 | endIndex = buffer.getCurrentIndex(); |
| 434 | length = endIndex - startIndex; |
| 435 | |
| 436 | // encode the length value now |
| 437 | buffer.goToIndex(startIndex - 3); |
| 438 | buffer.writeUint16(length, false); |
| 439 | buffer.goToIndex(endIndex); |
| 440 | |
| 441 | if (!(rc)) |
| 442 | { |
| 443 | errorStream.add((char *)"Failed to encode IE: pgwsOverloadControlInformation\n"); |
| 444 | return false; |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | if (data.sgwsOverloadControlInformationIePresent) |
| 449 | { |
| 450 | |
| 451 | // Encode the Ie Header |
| 452 | header.ieType = OverloadControlInformationIeType; |
| 453 | header.instance = 1; |
| 454 | header.length = 0; // We will encode the IE first and then update the length |
| 455 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 456 | startIndex = buffer.getCurrentIndex(); |
| 457 | OverloadControlInformationIe overloadControlInformation= |
| 458 | dynamic_cast< |
| 459 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 460 | SgwsOverloadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 461 | dynamic_cast< |
| 462 | SgwsOverloadControlInformationInDeleteBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 1)); |
| 463 | rc = groupedIeInstance.encodeSgwsOverloadControlInformationInDeleteBearerRequest(buffer, data.sgwsOverloadControlInformation); |
| 464 | endIndex = buffer.getCurrentIndex(); |
| 465 | length = endIndex - startIndex; |
| 466 | |
| 467 | // encode the length value now |
| 468 | buffer.goToIndex(startIndex - 3); |
| 469 | buffer.writeUint16(length, false); |
| 470 | buffer.goToIndex(endIndex); |
| 471 | |
| 472 | if (!(rc)) |
| 473 | { |
| 474 | errorStream.add((char *)"Failed to encode IE: sgwsOverloadControlInformation\n"); |
| 475 | return false; |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | if (data.nbifomContainerIePresent) |
| 480 | { |
| 481 | |
| 482 | // Encode the Ie Header |
| 483 | header.ieType = FContainerIeType; |
| 484 | header.instance = 0; |
| 485 | header.length = 0; // We will encode the IE first and then update the length |
| 486 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 487 | startIndex = buffer.getCurrentIndex(); |
| 488 | FContainerIe fContainer= |
| 489 | dynamic_cast< |
| 490 | FContainerIe&>(GtpV2IeFactory::getInstance().getIeObject(FContainerIeType)); |
| 491 | rc = fContainer.encodeFContainerIe(buffer, data.nbifomContainer); |
| 492 | endIndex = buffer.getCurrentIndex(); |
| 493 | length = endIndex - startIndex; |
| 494 | |
| 495 | // encode the length value now |
| 496 | buffer.goToIndex(startIndex - 3); |
| 497 | buffer.writeUint16(length, false); |
| 498 | buffer.goToIndex(endIndex); |
| 499 | |
| 500 | if (!(rc)) |
| 501 | { |
| 502 | errorStream.add((char *)"Failed to encode IE: nbifomContainer\n"); |
| 503 | return false; |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | if (data.extendedProtocolConfigurationOptionsIePresent) |
| 508 | { |
| 509 | |
| 510 | // Encode the Ie Header |
| 511 | header.ieType = EpcoIeType; |
| 512 | header.instance = 0; |
| 513 | header.length = 0; // We will encode the IE first and then update the length |
| 514 | GtpV2Ie::encodeGtpV2IeHeader(buffer, header); |
| 515 | startIndex = buffer.getCurrentIndex(); |
| 516 | EpcoIe epco= |
| 517 | dynamic_cast< |
| 518 | EpcoIe&>(GtpV2IeFactory::getInstance().getIeObject(EpcoIeType)); |
| 519 | rc = epco.encodeEpcoIe(buffer, data.extendedProtocolConfigurationOptions); |
| 520 | endIndex = buffer.getCurrentIndex(); |
| 521 | length = endIndex - startIndex; |
| 522 | |
| 523 | // encode the length value now |
| 524 | buffer.goToIndex(startIndex - 3); |
| 525 | buffer.writeUint16(length, false); |
| 526 | buffer.goToIndex(endIndex); |
| 527 | |
| 528 | if (!(rc)) |
| 529 | { |
| 530 | errorStream.add((char *)"Failed to encode IE: extendedProtocolConfigurationOptions\n"); |
| 531 | return false; |
| 532 | } |
| 533 | } |
| 534 | return rc; |
| 535 | |
| 536 | } |
| 537 | |
| 538 | bool DeleteBearerRequestMsg::decodeDeleteBearerRequestMsg(MsgBuffer &buffer, |
| 539 | DeleteBearerRequestMsgData |
| 540 | &data, Uint16 length) |
| 541 | { |
| 542 | |
| 543 | bool rc = false; |
| 544 | GtpV2IeHeader ieHeader; |
| 545 | |
| 546 | set<Uint16> mandatoryIeLocalList = mandatoryIeSet; |
| 547 | while (buffer.lengthLeft() > IE_HEADER_SIZE) |
| 548 | { |
| 549 | GtpV2Ie::decodeGtpV2IeHeader(buffer, ieHeader); |
| 550 | if (ieHeader.length > buffer.lengthLeft()) |
| 551 | { |
| 552 | // We do not have enough bytes left in the message for this IE |
| 553 | errorStream.add((char *)"IE Length exceeds beyond message boundary\n"); |
| 554 | errorStream.add((char *)" Offending IE Type: "); |
| 555 | errorStream.add(ieHeader.ieType); |
| 556 | errorStream.add((char *)"\n Ie Length in Header: "); |
| 557 | errorStream.add(ieHeader.length); |
| 558 | errorStream.add((char *)"\n Bytes left in message: "); |
| 559 | errorStream.add(buffer.lengthLeft()); |
| 560 | errorStream.endOfLine(); |
| 561 | return false; |
| 562 | } |
| 563 | |
| 564 | switch (ieHeader.ieType){ |
| 565 | |
| 566 | case EbiIeType: |
| 567 | { |
| 568 | EbiIe ieObject = |
| 569 | dynamic_cast< |
| 570 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 571 | |
| 572 | if(ieHeader.instance == 0) |
| 573 | { |
| 574 | rc = ieObject.decodeEbiIe(buffer, data.linkedEpsBearerId, ieHeader.length); |
| 575 | |
| 576 | data.linkedEpsBearerIdIePresent = true; |
| 577 | if (!(rc)) |
| 578 | { |
| 579 | errorStream.add((char *)"Failed to decode IE: linkedEpsBearerId\n"); |
| 580 | return false; |
| 581 | } |
| 582 | } |
| 583 | else if(ieHeader.instance == 1) |
| 584 | { |
| 585 | rc = ieObject.decodeEbiIe(buffer, data.epsBearerIds, ieHeader.length); |
| 586 | |
| 587 | data.epsBearerIdsIePresent = true; |
| 588 | if (!(rc)) |
| 589 | { |
| 590 | errorStream.add((char *)"Failed to decode IE: epsBearerIds\n"); |
| 591 | return false; |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | else |
| 596 | { |
| 597 | // Unknown IE instance print error |
| 598 | errorStream.add((char *)"Unknown IE Type: "); |
| 599 | errorStream.add(ieHeader.ieType); |
| 600 | errorStream.endOfLine(); |
| 601 | buffer.skipBytes(ieHeader.length); |
| 602 | } |
| 603 | break; |
| 604 | } |
| 605 | |
| 606 | case BearerContextIeType: |
| 607 | { |
| 608 | BearerContextIe ieObject = |
| 609 | dynamic_cast< |
| 610 | BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType)); |
| 611 | |
| 612 | if(ieHeader.instance == 0) |
| 613 | { |
| 614 | // First check if we have enough space left to decode and store this instance |
| 615 | if (data.failedBearerContextsCount == 11) |
| 616 | { |
| 617 | errorStream.add((char *)"More than 11 instances of failedBearerContexts received\n"); |
| 618 | return false; |
| 619 | } |
| 620 | FailedBearerContextsInDeleteBearerRequest groupedIeInstance = |
| 621 | dynamic_cast< |
| 622 | FailedBearerContextsInDeleteBearerRequest&>(ieObject.getGroupedIe(msgType, 0)); |
| 623 | rc = groupedIeInstance.decodeFailedBearerContextsInDeleteBearerRequest(buffer, |
| 624 | data.failedBearerContexts[data.failedBearerContextsCount], ieHeader.length); |
| 625 | data.failedBearerContextsCount++; // TODO Count validation |
| 626 | |
| 627 | if (!(rc)) |
| 628 | { |
| 629 | errorStream.add((char *)"Failed to decode IE: failedBearerContexts\n"); |
| 630 | return false; |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | else |
| 635 | { |
| 636 | // Unknown IE instance print error |
| 637 | errorStream.add((char *)"Unknown IE Type: "); |
| 638 | errorStream.add(ieHeader.ieType); |
| 639 | errorStream.endOfLine(); |
| 640 | buffer.skipBytes(ieHeader.length); |
| 641 | } |
| 642 | break; |
| 643 | } |
| 644 | |
| 645 | case PtiIeType: |
| 646 | { |
| 647 | PtiIe ieObject = |
| 648 | dynamic_cast< |
| 649 | PtiIe&>(GtpV2IeFactory::getInstance().getIeObject(PtiIeType)); |
| 650 | |
| 651 | if(ieHeader.instance == 0) |
| 652 | { |
| 653 | rc = ieObject.decodePtiIe(buffer, data.procedureTransactionId, ieHeader.length); |
| 654 | |
| 655 | data.procedureTransactionIdIePresent = true; |
| 656 | if (!(rc)) |
| 657 | { |
| 658 | errorStream.add((char *)"Failed to decode IE: procedureTransactionId\n"); |
| 659 | return false; |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | else |
| 664 | { |
| 665 | // Unknown IE instance print error |
| 666 | errorStream.add((char *)"Unknown IE Type: "); |
| 667 | errorStream.add(ieHeader.ieType); |
| 668 | errorStream.endOfLine(); |
| 669 | buffer.skipBytes(ieHeader.length); |
| 670 | } |
| 671 | break; |
| 672 | } |
| 673 | |
| 674 | case PcoIeType: |
| 675 | { |
| 676 | PcoIe ieObject = |
| 677 | dynamic_cast< |
| 678 | PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType)); |
| 679 | |
| 680 | if(ieHeader.instance == 0) |
| 681 | { |
| 682 | rc = ieObject.decodePcoIe(buffer, data.protocolConfigurationOptions, ieHeader.length); |
| 683 | |
| 684 | data.protocolConfigurationOptionsIePresent = true; |
| 685 | if (!(rc)) |
| 686 | { |
| 687 | errorStream.add((char *)"Failed to decode IE: protocolConfigurationOptions\n"); |
| 688 | return false; |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | else |
| 693 | { |
| 694 | // Unknown IE instance print error |
| 695 | errorStream.add((char *)"Unknown IE Type: "); |
| 696 | errorStream.add(ieHeader.ieType); |
| 697 | errorStream.endOfLine(); |
| 698 | buffer.skipBytes(ieHeader.length); |
| 699 | } |
| 700 | break; |
| 701 | } |
| 702 | |
| 703 | case FqCsidIeType: |
| 704 | { |
| 705 | FqCsidIe ieObject = |
| 706 | dynamic_cast< |
| 707 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 708 | |
| 709 | if(ieHeader.instance == 0) |
| 710 | { |
| 711 | rc = ieObject.decodeFqCsidIe(buffer, data.pgwFqCsid, ieHeader.length); |
| 712 | |
| 713 | data.pgwFqCsidIePresent = true; |
| 714 | if (!(rc)) |
| 715 | { |
| 716 | errorStream.add((char *)"Failed to decode IE: pgwFqCsid\n"); |
| 717 | return false; |
| 718 | } |
| 719 | } |
| 720 | else if(ieHeader.instance == 1) |
| 721 | { |
| 722 | rc = ieObject.decodeFqCsidIe(buffer, data.sgwFqCsid, ieHeader.length); |
| 723 | |
| 724 | data.sgwFqCsidIePresent = true; |
| 725 | if (!(rc)) |
| 726 | { |
| 727 | errorStream.add((char *)"Failed to decode IE: sgwFqCsid\n"); |
| 728 | return false; |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | else |
| 733 | { |
| 734 | // Unknown IE instance print error |
| 735 | errorStream.add((char *)"Unknown IE Type: "); |
| 736 | errorStream.add(ieHeader.ieType); |
| 737 | errorStream.endOfLine(); |
| 738 | buffer.skipBytes(ieHeader.length); |
| 739 | } |
| 740 | break; |
| 741 | } |
| 742 | |
| 743 | case CauseIeType: |
| 744 | { |
| 745 | CauseIe ieObject = |
| 746 | dynamic_cast< |
| 747 | CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType)); |
| 748 | |
| 749 | if(ieHeader.instance == 0) |
| 750 | { |
| 751 | rc = ieObject.decodeCauseIe(buffer, data.cause, ieHeader.length); |
| 752 | |
| 753 | data.causeIePresent = true; |
| 754 | if (!(rc)) |
| 755 | { |
| 756 | errorStream.add((char *)"Failed to decode IE: cause\n"); |
| 757 | return false; |
| 758 | } |
| 759 | } |
| 760 | |
| 761 | else |
| 762 | { |
| 763 | // Unknown IE instance print error |
| 764 | errorStream.add((char *)"Unknown IE Type: "); |
| 765 | errorStream.add(ieHeader.ieType); |
| 766 | errorStream.endOfLine(); |
| 767 | buffer.skipBytes(ieHeader.length); |
| 768 | } |
| 769 | break; |
| 770 | } |
| 771 | |
| 772 | case IndicationIeType: |
| 773 | { |
| 774 | IndicationIe ieObject = |
| 775 | dynamic_cast< |
| 776 | IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType)); |
| 777 | |
| 778 | if(ieHeader.instance == 0) |
| 779 | { |
| 780 | rc = ieObject.decodeIndicationIe(buffer, data.indicationFlags, ieHeader.length); |
| 781 | |
| 782 | data.indicationFlagsIePresent = true; |
| 783 | if (!(rc)) |
| 784 | { |
| 785 | errorStream.add((char *)"Failed to decode IE: indicationFlags\n"); |
| 786 | return false; |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | else |
| 791 | { |
| 792 | // Unknown IE instance print error |
| 793 | errorStream.add((char *)"Unknown IE Type: "); |
| 794 | errorStream.add(ieHeader.ieType); |
| 795 | errorStream.endOfLine(); |
| 796 | buffer.skipBytes(ieHeader.length); |
| 797 | } |
| 798 | break; |
| 799 | } |
| 800 | |
| 801 | case LoadControlInformationIeType: |
| 802 | { |
| 803 | LoadControlInformationIe ieObject = |
| 804 | dynamic_cast< |
| 805 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 806 | |
| 807 | if(ieHeader.instance == 0) |
| 808 | { |
| 809 | PgwsNodeLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 810 | dynamic_cast< |
| 811 | PgwsNodeLevelLoadControlInformationInDeleteBearerRequest&>(ieObject.getGroupedIe(msgType, 0)); |
| 812 | rc = groupedIeInstance.decodePgwsNodeLevelLoadControlInformationInDeleteBearerRequest(buffer, data.pgwsNodeLevelLoadControlInformation, ieHeader.length); |
| 813 | |
| 814 | data.pgwsNodeLevelLoadControlInformationIePresent = true; |
| 815 | if (!(rc)) |
| 816 | { |
| 817 | errorStream.add((char *)"Failed to decode IE: pgwsNodeLevelLoadControlInformation\n"); |
| 818 | return false; |
| 819 | } |
| 820 | } |
| 821 | else if(ieHeader.instance == 1) |
| 822 | { |
| 823 | PgwsApnLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 824 | dynamic_cast< |
| 825 | PgwsApnLevelLoadControlInformationInDeleteBearerRequest&>(ieObject.getGroupedIe(msgType, 1)); |
| 826 | rc = groupedIeInstance.decodePgwsApnLevelLoadControlInformationInDeleteBearerRequest(buffer, data.pgwsApnLevelLoadControlInformation, ieHeader.length); |
| 827 | |
| 828 | data.pgwsApnLevelLoadControlInformationIePresent = true; |
| 829 | if (!(rc)) |
| 830 | { |
| 831 | errorStream.add((char *)"Failed to decode IE: pgwsApnLevelLoadControlInformation\n"); |
| 832 | return false; |
| 833 | } |
| 834 | } |
| 835 | else if(ieHeader.instance == 2) |
| 836 | { |
| 837 | SgwsNodeLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 838 | dynamic_cast< |
| 839 | SgwsNodeLevelLoadControlInformationInDeleteBearerRequest&>(ieObject.getGroupedIe(msgType, 2)); |
| 840 | rc = groupedIeInstance.decodeSgwsNodeLevelLoadControlInformationInDeleteBearerRequest(buffer, data.sgwsNodeLevelLoadControlInformation, ieHeader.length); |
| 841 | |
| 842 | data.sgwsNodeLevelLoadControlInformationIePresent = true; |
| 843 | if (!(rc)) |
| 844 | { |
| 845 | errorStream.add((char *)"Failed to decode IE: sgwsNodeLevelLoadControlInformation\n"); |
| 846 | return false; |
| 847 | } |
| 848 | } |
| 849 | |
| 850 | else |
| 851 | { |
| 852 | // Unknown IE instance print error |
| 853 | errorStream.add((char *)"Unknown IE Type: "); |
| 854 | errorStream.add(ieHeader.ieType); |
| 855 | errorStream.endOfLine(); |
| 856 | buffer.skipBytes(ieHeader.length); |
| 857 | } |
| 858 | break; |
| 859 | } |
| 860 | |
| 861 | case OverloadControlInformationIeType: |
| 862 | { |
| 863 | OverloadControlInformationIe ieObject = |
| 864 | dynamic_cast< |
| 865 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 866 | |
| 867 | if(ieHeader.instance == 0) |
| 868 | { |
| 869 | PgwsOverloadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 870 | dynamic_cast< |
| 871 | PgwsOverloadControlInformationInDeleteBearerRequest&>(ieObject.getGroupedIe(msgType, 0)); |
| 872 | rc = groupedIeInstance.decodePgwsOverloadControlInformationInDeleteBearerRequest(buffer, data.pgwsOverloadControlInformation, ieHeader.length); |
| 873 | |
| 874 | data.pgwsOverloadControlInformationIePresent = true; |
| 875 | if (!(rc)) |
| 876 | { |
| 877 | errorStream.add((char *)"Failed to decode IE: pgwsOverloadControlInformation\n"); |
| 878 | return false; |
| 879 | } |
| 880 | } |
| 881 | else if(ieHeader.instance == 1) |
| 882 | { |
| 883 | SgwsOverloadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 884 | dynamic_cast< |
| 885 | SgwsOverloadControlInformationInDeleteBearerRequest&>(ieObject.getGroupedIe(msgType, 1)); |
| 886 | rc = groupedIeInstance.decodeSgwsOverloadControlInformationInDeleteBearerRequest(buffer, data.sgwsOverloadControlInformation, ieHeader.length); |
| 887 | |
| 888 | data.sgwsOverloadControlInformationIePresent = true; |
| 889 | if (!(rc)) |
| 890 | { |
| 891 | errorStream.add((char *)"Failed to decode IE: sgwsOverloadControlInformation\n"); |
| 892 | return false; |
| 893 | } |
| 894 | } |
| 895 | |
| 896 | else |
| 897 | { |
| 898 | // Unknown IE instance print error |
| 899 | errorStream.add((char *)"Unknown IE Type: "); |
| 900 | errorStream.add(ieHeader.ieType); |
| 901 | errorStream.endOfLine(); |
| 902 | buffer.skipBytes(ieHeader.length); |
| 903 | } |
| 904 | break; |
| 905 | } |
| 906 | |
| 907 | case FContainerIeType: |
| 908 | { |
| 909 | FContainerIe ieObject = |
| 910 | dynamic_cast< |
| 911 | FContainerIe&>(GtpV2IeFactory::getInstance().getIeObject(FContainerIeType)); |
| 912 | |
| 913 | if(ieHeader.instance == 0) |
| 914 | { |
| 915 | rc = ieObject.decodeFContainerIe(buffer, data.nbifomContainer, ieHeader.length); |
| 916 | |
| 917 | data.nbifomContainerIePresent = true; |
| 918 | if (!(rc)) |
| 919 | { |
| 920 | errorStream.add((char *)"Failed to decode IE: nbifomContainer\n"); |
| 921 | return false; |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | else |
| 926 | { |
| 927 | // Unknown IE instance print error |
| 928 | errorStream.add((char *)"Unknown IE Type: "); |
| 929 | errorStream.add(ieHeader.ieType); |
| 930 | errorStream.endOfLine(); |
| 931 | buffer.skipBytes(ieHeader.length); |
| 932 | } |
| 933 | break; |
| 934 | } |
| 935 | |
| 936 | case EpcoIeType: |
| 937 | { |
| 938 | EpcoIe ieObject = |
| 939 | dynamic_cast< |
| 940 | EpcoIe&>(GtpV2IeFactory::getInstance().getIeObject(EpcoIeType)); |
| 941 | |
| 942 | if(ieHeader.instance == 0) |
| 943 | { |
| 944 | rc = ieObject.decodeEpcoIe(buffer, data.extendedProtocolConfigurationOptions, ieHeader.length); |
| 945 | |
| 946 | data.extendedProtocolConfigurationOptionsIePresent = true; |
| 947 | if (!(rc)) |
| 948 | { |
| 949 | errorStream.add((char *)"Failed to decode IE: extendedProtocolConfigurationOptions\n"); |
| 950 | return false; |
| 951 | } |
| 952 | } |
| 953 | |
| 954 | else |
| 955 | { |
| 956 | // Unknown IE instance print error |
| 957 | errorStream.add((char *)"Unknown IE Type: "); |
| 958 | errorStream.add(ieHeader.ieType); |
| 959 | errorStream.endOfLine(); |
| 960 | buffer.skipBytes(ieHeader.length); |
| 961 | } |
| 962 | break; |
| 963 | } |
| 964 | |
| 965 | default: |
| 966 | { |
| 967 | // Unknown IE print error |
| 968 | errorStream.add((char *)"Unknown IE Type: "); |
| 969 | errorStream.add(ieHeader.ieType); |
| 970 | errorStream.endOfLine(); |
| 971 | buffer.skipBytes(ieHeader.length); |
| 972 | } |
| 973 | } |
| 974 | } |
| 975 | return rc; // TODO validations |
| 976 | } |
| 977 | |
| 978 | void DeleteBearerRequestMsg:: |
| 979 | displayDeleteBearerRequestMsgData_v(DeleteBearerRequestMsgData const &data, Debug &stream) |
| 980 | { |
| 981 | stream.incrIndent(); |
| 982 | stream.add((char *)"DeleteBearerRequestMsg:"); |
| 983 | stream.endOfLine(); |
| 984 | stream.incrIndent(); |
| 985 | |
| 986 | |
| 987 | if (data.linkedEpsBearerIdIePresent) |
| 988 | { |
| 989 | |
| 990 | |
| 991 | stream.add((char *)"IE - linkedEpsBearerId:"); |
| 992 | stream.endOfLine(); |
| 993 | EbiIe ebi= |
| 994 | dynamic_cast< |
| 995 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 996 | ebi.displayEbiIe_v(data.linkedEpsBearerId, stream); |
| 997 | |
| 998 | } |
| 999 | if (data.epsBearerIdsIePresent) |
| 1000 | { |
| 1001 | |
| 1002 | |
| 1003 | stream.add((char *)"IE - epsBearerIds:"); |
| 1004 | stream.endOfLine(); |
| 1005 | EbiIe ebi= |
| 1006 | dynamic_cast< |
| 1007 | EbiIe&>(GtpV2IeFactory::getInstance().getIeObject(EbiIeType)); |
| 1008 | ebi.displayEbiIe_v(data.epsBearerIds, stream); |
| 1009 | |
| 1010 | } |
| 1011 | |
| 1012 | Uint8 displayCount; |
| 1013 | |
| 1014 | displayCount = data.failedBearerContextsCount; |
| 1015 | if (displayCount > 11) |
| 1016 | { |
| 1017 | stream.add((char *)"Invalid data more than 11 instances"); |
| 1018 | stream.endOfLine(); |
| 1019 | stream.add((char *)"Displaying only 11"); |
| 1020 | stream.endOfLine(); |
| 1021 | displayCount = 11; |
| 1022 | } |
| 1023 | for (Uint8 i = 0; i < displayCount; i++) |
| 1024 | { |
| 1025 | stream.add((char *)"IE - failedBearerContexts:"); |
| 1026 | stream.endOfLine(); |
| 1027 | BearerContextIe bearerContext= |
| 1028 | dynamic_cast< |
| 1029 | BearerContextIe&>(GtpV2IeFactory::getInstance().getIeObject(BearerContextIeType)); |
| 1030 | FailedBearerContextsInDeleteBearerRequest groupedIeInstance = |
| 1031 | dynamic_cast< |
| 1032 | FailedBearerContextsInDeleteBearerRequest&>(bearerContext.getGroupedIe(msgType, 0)); |
| 1033 | groupedIeInstance.displayFailedBearerContextsInDeleteBearerRequestData_v(data.failedBearerContexts[i], stream); |
| 1034 | } |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | if (data.procedureTransactionIdIePresent) |
| 1040 | { |
| 1041 | |
| 1042 | |
| 1043 | stream.add((char *)"IE - procedureTransactionId:"); |
| 1044 | stream.endOfLine(); |
| 1045 | PtiIe pti= |
| 1046 | dynamic_cast< |
| 1047 | PtiIe&>(GtpV2IeFactory::getInstance().getIeObject(PtiIeType)); |
| 1048 | pti.displayPtiIe_v(data.procedureTransactionId, stream); |
| 1049 | |
| 1050 | } |
| 1051 | if (data.protocolConfigurationOptionsIePresent) |
| 1052 | { |
| 1053 | |
| 1054 | |
| 1055 | stream.add((char *)"IE - protocolConfigurationOptions:"); |
| 1056 | stream.endOfLine(); |
| 1057 | PcoIe pco= |
| 1058 | dynamic_cast< |
| 1059 | PcoIe&>(GtpV2IeFactory::getInstance().getIeObject(PcoIeType)); |
| 1060 | pco.displayPcoIe_v(data.protocolConfigurationOptions, stream); |
| 1061 | |
| 1062 | } |
| 1063 | if (data.pgwFqCsidIePresent) |
| 1064 | { |
| 1065 | |
| 1066 | |
| 1067 | stream.add((char *)"IE - pgwFqCsid:"); |
| 1068 | stream.endOfLine(); |
| 1069 | FqCsidIe fqCsid= |
| 1070 | dynamic_cast< |
| 1071 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 1072 | fqCsid.displayFqCsidIe_v(data.pgwFqCsid, stream); |
| 1073 | |
| 1074 | } |
| 1075 | if (data.sgwFqCsidIePresent) |
| 1076 | { |
| 1077 | |
| 1078 | |
| 1079 | stream.add((char *)"IE - sgwFqCsid:"); |
| 1080 | stream.endOfLine(); |
| 1081 | FqCsidIe fqCsid= |
| 1082 | dynamic_cast< |
| 1083 | FqCsidIe&>(GtpV2IeFactory::getInstance().getIeObject(FqCsidIeType)); |
| 1084 | fqCsid.displayFqCsidIe_v(data.sgwFqCsid, stream); |
| 1085 | |
| 1086 | } |
| 1087 | if (data.causeIePresent) |
| 1088 | { |
| 1089 | |
| 1090 | |
| 1091 | stream.add((char *)"IE - cause:"); |
| 1092 | stream.endOfLine(); |
| 1093 | CauseIe cause= |
| 1094 | dynamic_cast< |
| 1095 | CauseIe&>(GtpV2IeFactory::getInstance().getIeObject(CauseIeType)); |
| 1096 | cause.displayCauseIe_v(data.cause, stream); |
| 1097 | |
| 1098 | } |
| 1099 | if (data.indicationFlagsIePresent) |
| 1100 | { |
| 1101 | |
| 1102 | |
| 1103 | stream.add((char *)"IE - indicationFlags:"); |
| 1104 | stream.endOfLine(); |
| 1105 | IndicationIe indication= |
| 1106 | dynamic_cast< |
| 1107 | IndicationIe&>(GtpV2IeFactory::getInstance().getIeObject(IndicationIeType)); |
| 1108 | indication.displayIndicationIe_v(data.indicationFlags, stream); |
| 1109 | |
| 1110 | } |
| 1111 | if (data.pgwsNodeLevelLoadControlInformationIePresent) |
| 1112 | { |
| 1113 | |
| 1114 | |
| 1115 | stream.add((char *)"IE - pgwsNodeLevelLoadControlInformation:"); |
| 1116 | stream.endOfLine(); |
| 1117 | LoadControlInformationIe loadControlInformation= |
| 1118 | dynamic_cast< |
| 1119 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 1120 | PgwsNodeLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 1121 | dynamic_cast< |
| 1122 | PgwsNodeLevelLoadControlInformationInDeleteBearerRequest&>(loadControlInformation.getGroupedIe(msgType, 0)); |
| 1123 | groupedIeInstance.displayPgwsNodeLevelLoadControlInformationInDeleteBearerRequestData_v(data.pgwsNodeLevelLoadControlInformation, stream); |
| 1124 | |
| 1125 | } |
| 1126 | if (data.pgwsApnLevelLoadControlInformationIePresent) |
| 1127 | { |
| 1128 | |
| 1129 | |
| 1130 | stream.add((char *)"IE - pgwsApnLevelLoadControlInformation:"); |
| 1131 | stream.endOfLine(); |
| 1132 | LoadControlInformationIe loadControlInformation= |
| 1133 | dynamic_cast< |
| 1134 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 1135 | PgwsApnLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 1136 | dynamic_cast< |
| 1137 | PgwsApnLevelLoadControlInformationInDeleteBearerRequest&>(loadControlInformation.getGroupedIe(msgType, 1)); |
| 1138 | groupedIeInstance.displayPgwsApnLevelLoadControlInformationInDeleteBearerRequestData_v(data.pgwsApnLevelLoadControlInformation, stream); |
| 1139 | |
| 1140 | } |
| 1141 | if (data.sgwsNodeLevelLoadControlInformationIePresent) |
| 1142 | { |
| 1143 | |
| 1144 | |
| 1145 | stream.add((char *)"IE - sgwsNodeLevelLoadControlInformation:"); |
| 1146 | stream.endOfLine(); |
| 1147 | LoadControlInformationIe loadControlInformation= |
| 1148 | dynamic_cast< |
| 1149 | LoadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(LoadControlInformationIeType)); |
| 1150 | SgwsNodeLevelLoadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 1151 | dynamic_cast< |
| 1152 | SgwsNodeLevelLoadControlInformationInDeleteBearerRequest&>(loadControlInformation.getGroupedIe(msgType, 2)); |
| 1153 | groupedIeInstance.displaySgwsNodeLevelLoadControlInformationInDeleteBearerRequestData_v(data.sgwsNodeLevelLoadControlInformation, stream); |
| 1154 | |
| 1155 | } |
| 1156 | if (data.pgwsOverloadControlInformationIePresent) |
| 1157 | { |
| 1158 | |
| 1159 | |
| 1160 | stream.add((char *)"IE - pgwsOverloadControlInformation:"); |
| 1161 | stream.endOfLine(); |
| 1162 | OverloadControlInformationIe overloadControlInformation= |
| 1163 | dynamic_cast< |
| 1164 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 1165 | PgwsOverloadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 1166 | dynamic_cast< |
| 1167 | PgwsOverloadControlInformationInDeleteBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 0)); |
| 1168 | groupedIeInstance.displayPgwsOverloadControlInformationInDeleteBearerRequestData_v(data.pgwsOverloadControlInformation, stream); |
| 1169 | |
| 1170 | } |
| 1171 | if (data.sgwsOverloadControlInformationIePresent) |
| 1172 | { |
| 1173 | |
| 1174 | |
| 1175 | stream.add((char *)"IE - sgwsOverloadControlInformation:"); |
| 1176 | stream.endOfLine(); |
| 1177 | OverloadControlInformationIe overloadControlInformation= |
| 1178 | dynamic_cast< |
| 1179 | OverloadControlInformationIe&>(GtpV2IeFactory::getInstance().getIeObject(OverloadControlInformationIeType)); |
| 1180 | SgwsOverloadControlInformationInDeleteBearerRequest groupedIeInstance = |
| 1181 | dynamic_cast< |
| 1182 | SgwsOverloadControlInformationInDeleteBearerRequest&>(overloadControlInformation.getGroupedIe(msgType, 1)); |
| 1183 | groupedIeInstance.displaySgwsOverloadControlInformationInDeleteBearerRequestData_v(data.sgwsOverloadControlInformation, stream); |
| 1184 | |
| 1185 | } |
| 1186 | if (data.nbifomContainerIePresent) |
| 1187 | { |
| 1188 | |
| 1189 | |
| 1190 | stream.add((char *)"IE - nbifomContainer:"); |
| 1191 | stream.endOfLine(); |
| 1192 | FContainerIe fContainer= |
| 1193 | dynamic_cast< |
| 1194 | FContainerIe&>(GtpV2IeFactory::getInstance().getIeObject(FContainerIeType)); |
| 1195 | fContainer.displayFContainerIe_v(data.nbifomContainer, stream); |
| 1196 | |
| 1197 | } |
| 1198 | if (data.extendedProtocolConfigurationOptionsIePresent) |
| 1199 | { |
| 1200 | |
| 1201 | |
| 1202 | stream.add((char *)"IE - extendedProtocolConfigurationOptions:"); |
| 1203 | stream.endOfLine(); |
| 1204 | EpcoIe epco= |
| 1205 | dynamic_cast< |
| 1206 | EpcoIe&>(GtpV2IeFactory::getInstance().getIeObject(EpcoIeType)); |
| 1207 | epco.displayEpcoIe_v(data.extendedProtocolConfigurationOptions, stream); |
| 1208 | |
| 1209 | } |
| 1210 | |
| 1211 | stream.decrIndent(); |
| 1212 | stream.decrIndent(); |
| 1213 | } |
| 1214 | |
| 1215 | |