initialize member variables of EpsBearer upon construction
authorNicola Baldo <nbaldo@cttc.es>
Wed, 19 Dec 2012 17:34:54 +0100
changeset 9223 0037859c17c9
parent 9222 b72fd6e6a4b5
child 9224 16af460a31ab
initialize member variables of EpsBearer upon construction
src/lte/model/eps-bearer.cc
src/lte/model/eps-bearer.h
--- a/src/lte/model/eps-bearer.cc	Fri Jan 18 13:03:18 2013 -0800
+++ b/src/lte/model/eps-bearer.cc	Wed Dec 19 17:34:54 2012 +0100
@@ -27,7 +27,20 @@
 namespace ns3 {
 
 
+GbrQosInformation::GbrQosInformation ()
+  : gbrDl (0),
+    gbrUl (0),
+    mbrDl (0),
+    mbrUl (0)
+{
+}
 
+AllocationRetentionPriority::AllocationRetentionPriority ()
+  : priorityLevel (0),
+    preemptionCapability (false),
+    preemptionVulnerability (false)
+{
+}
 
 EpsBearer::EpsBearer ()
 {
--- a/src/lte/model/eps-bearer.h	Fri Jan 18 13:03:18 2013 -0800
+++ b/src/lte/model/eps-bearer.h	Wed Dec 19 17:34:54 2012 +0100
@@ -32,6 +32,11 @@
  */
 struct GbrQosInformation
 {
+  /** 
+   * Default constructor, inizializes member variables to zero or equivalent
+   */
+  GbrQosInformation ();
+
   uint64_t gbrDl;  /**< Guaranteed Bit Rate (bit/s) in downlink */
   uint64_t gbrUl;  /**< Guaranteed Bit Rate (bit/s) in uplink */
   uint64_t mbrDl;  /**< Maximum Bit Rate (bit/s) in downlink */
@@ -45,6 +50,10 @@
  */
 struct AllocationRetentionPriority
 {
+  /** 
+   * Default constructor, inizializes member variables to zero or equivalent
+   */
+  AllocationRetentionPriority ();
   uint8_t priorityLevel;     // /< 1-15; 1 = highest
   bool preemprionCapability; // /< true if bearer can preempt others
   bool preemprionVulnerability; // true if bearer can be preempted by others