MME2 changes - Propped commits from openmme/paging branch. Added scripts
for code gen
Change-Id: Ie55032217232214ac8544ca76ea34335205329e4
diff --git a/src/gtpV2Codec/ieClasses/integerNumberIe.cpp b/src/gtpV2Codec/ieClasses/integerNumberIe.cpp
new file mode 100644
index 0000000..c9201c0
--- /dev/null
+++ b/src/gtpV2Codec/ieClasses/integerNumberIe.cpp
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2019-present Infosys Limited
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/******************************************************************************
+ *
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/GtpV2StackCodeGen/tts/ietemplate.cpp.tt>
+ ******************************************************************************/
+
+#include "integerNumberIe.h"
+#include "dataTypeCodecUtils.h"
+
+IntegerNumberIe::IntegerNumberIe()
+{
+ ieType = 187;
+ // TODO
+
+}
+
+IntegerNumberIe::~IntegerNumberIe() {
+ // TODO Auto-generated destructor stub
+}
+
+bool IntegerNumberIe::encodeIntegerNumberIe(MsgBuffer &buffer, IntegerNumberIeData const &data)
+{
+ if (!(buffer.writeUint64(data.integerNumberValue)))
+ {
+ errorStream.add((char *)"Encoding of integerNumberValue failed\n");
+ return false;
+ }
+
+ return true;
+}
+
+bool IntegerNumberIe::decodeIntegerNumberIe(MsgBuffer &buffer, IntegerNumberIeData &data, Uint16 length)
+{
+ // TODO optimize the length checks
+
+ Uint16 ieBoundary = buffer.getCurrentIndex() + length;
+
+ buffer.readUint64(data.integerNumberValue);
+ if (buffer.getCurrentIndex() > ieBoundary)
+ {
+ errorStream.add((char *)"Attempt to read beyond IE boundary: integerNumberValue\n");
+ return false;
+ }
+
+ // The IE is decoded now. The buffer index should be pointing to the
+ // IE Boundary. If not, we have some more data left for the IE which we don't know
+ // how to decode
+ if (ieBoundary == buffer.getCurrentIndex())
+ {
+ return true;
+ }
+ else
+ {
+ errorStream.add((char *)"Unable to decode IE IntegerNumberIe\n");
+ return false;
+ }
+}
+void IntegerNumberIe::displayIntegerNumberIe_v(IntegerNumberIeData const &data, Debug &stream)
+{
+ stream.incrIndent();
+ stream.add((char *)"IntegerNumberIeData:");
+ stream.incrIndent();
+ stream.endOfLine();
+
+ stream.add((char *)"integerNumberValue: ");
+ stream.add(data.integerNumberValue);
+ stream.endOfLine();
+ stream.decrIndent();
+ stream.decrIndent();
+}