blob: a6a1ef74d1fc178cbeacaf5121da802bcdd8a4c5 [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301/*
2 * Copyright 2019-present Infosys Limited  
3 *   
4 * SPDX-License-Identifier: Apache-2.0    
5 */
6/******************************************************************************
7 *
8 * This is an auto generated file.
9 * Please do not edit this file.
10 * All edits to be made through template source file
11 * <TOP-DIR/scripts/GtpV2StackCodeGen/tts/ietemplate.cpp.tt>
12 ******************************************************************************/
13
14#include "signallingPriorityIndicationIe.h"
15#include "dataTypeCodecUtils.h"
16
17SignallingPriorityIndicationIe::SignallingPriorityIndicationIe()
18{
19 ieType = 157;
20 // TODO
21
22}
23
24SignallingPriorityIndicationIe::~SignallingPriorityIndicationIe() {
25 // TODO Auto-generated destructor stub
26}
27
28bool SignallingPriorityIndicationIe::encodeSignallingPriorityIndicationIe(MsgBuffer &buffer, SignallingPriorityIndicationIeData const &data)
29{
30 buffer.skipBytes(2);
31
32
33 return true;
34}
35
36bool SignallingPriorityIndicationIe::decodeSignallingPriorityIndicationIe(MsgBuffer &buffer, SignallingPriorityIndicationIeData &data, Uint16 length)
37{
38 // TODO optimize the length checks
39
40 Uint16 ieBoundary = buffer.getCurrentIndex() + length;
41 buffer.skipBytes(2);
42 if (buffer.getCurrentIndex() > ieBoundary)
43 {
44 errorStream.add((char *)"Attempt to read beyond IE boundary: \n");
45 return false;
46 }
47
48
49 // The IE is decoded now. The buffer index should be pointing to the
50 // IE Boundary. If not, we have some more data left for the IE which we don't know
51 // how to decode
52 if (ieBoundary == buffer.getCurrentIndex())
53 {
54 return true;
55 }
56 else
57 {
58 errorStream.add((char *)"Unable to decode IE SignallingPriorityIndicationIe\n");
59 return false;
60 }
61}
62void SignallingPriorityIndicationIe::displaySignallingPriorityIndicationIe_v(SignallingPriorityIndicationIeData const &data, Debug &stream)
63{
64 stream.incrIndent();
65 stream.add((char *)"SignallingPriorityIndicationIeData:");
66 stream.incrIndent();
67 stream.endOfLine();
68 stream.decrIndent();
69 stream.decrIndent();
70}