src/lte/model/lte-enb-rrc.cc
changeset 7905 80557b09aa7f
parent 7903 eed953cd94a0
child 8007 845888b95c15
equal deleted inserted replaced
7904:d3271eaf1920 7905:80557b09aa7f
    32 
    32 
    33 namespace ns3 {
    33 namespace ns3 {
    34 
    34 
    35 
    35 
    36 
    36 
       
    37 
       
    38 
    37 // ///////////////////////////
    39 // ///////////////////////////
    38 // CMAC SAP forwarder
    40 // CMAC SAP forwarder
    39 // ///////////////////////////
    41 // ///////////////////////////
    40 
    42 
    41 class EnbRrcMemberLteEnbCmacSapUser : public LteEnbCmacSapUser
    43 class EnbRrcMemberLteEnbCmacSapUser : public LteEnbCmacSapUser
    80 private:
    82 private:
    81 
    83 
    82   Ptr<LteRlc> m_rlc;
    84   Ptr<LteRlc> m_rlc;
    83 
    85 
    84 };
    86 };
       
    87 
       
    88 NS_OBJECT_ENSURE_REGISTERED(EnbRadioBearerInfo);
    85 
    89 
    86 EnbRadioBearerInfo::EnbRadioBearerInfo (void)
    90 EnbRadioBearerInfo::EnbRadioBearerInfo (void)
    87 {
    91 {
    88   // Nothing to do here
    92   // Nothing to do here
    89 }
    93 }
    98   static TypeId
   102   static TypeId
    99   tid =
   103   tid =
   100     TypeId ("ns3::EnbRadioBearerInfo")
   104     TypeId ("ns3::EnbRadioBearerInfo")
   101     .SetParent<Object> ()
   105     .SetParent<Object> ()
   102     .AddConstructor<EnbRadioBearerInfo> ()
   106     .AddConstructor<EnbRadioBearerInfo> ()
   103     .AddAttribute ("RLC", "RLC.",
   107     .AddAttribute ("LteRlc", "RLC instance of the radio bearer.",
   104                    PointerValue (),
   108                    PointerValue (),
   105                    MakePointerAccessor (&EnbRadioBearerInfo::m_rlc),
   109                    MakePointerAccessor (&EnbRadioBearerInfo::m_rlc),
   106                    MakePointerChecker<LteRlc> ())
   110                    MakePointerChecker<LteRlc> ())
   107     ;
   111     ;
   108   return tid;
   112   return tid;
   117 
   121 
   118 /**
   122 /**
   119  * Manages all the radio bearer information possessed by the ENB RRC for a single UE
   123  * Manages all the radio bearer information possessed by the ENB RRC for a single UE
   120  *
   124  *
   121  */
   125  */
       
   126 
   122 class UeInfo : public Object
   127 class UeInfo : public Object
   123 {
   128 {
   124 public:
   129 public:
   125   /**
   130   /**
   126    *
   131    *
   155 
   160 
   156 private:
   161 private:
   157   std::map <uint8_t, Ptr<EnbRadioBearerInfo> > m_rbMap;
   162   std::map <uint8_t, Ptr<EnbRadioBearerInfo> > m_rbMap;
   158   uint8_t m_lastAllocatedId;
   163   uint8_t m_lastAllocatedId;
   159 };
   164 };
       
   165 
       
   166 NS_OBJECT_ENSURE_REGISTERED(UeInfo);
   160 
   167 
   161 UeInfo::UeInfo (void) :
   168 UeInfo::UeInfo (void) :
   162     m_lastAllocatedId (0)
   169     m_lastAllocatedId (0)
   163 {
   170 {
   164   // Nothing to do here
   171   // Nothing to do here
   226 
   233 
   227 // ///////////////////////////
   234 // ///////////////////////////
   228 // eNB RRC methods
   235 // eNB RRC methods
   229 // ///////////////////////////
   236 // ///////////////////////////
   230 
   237 
       
   238 NS_OBJECT_ENSURE_REGISTERED (LteEnbRrc);
   231 
   239 
   232 LteEnbRrc::LteEnbRrc ()
   240 LteEnbRrc::LteEnbRrc ()
   233   : m_cmacSapProvider (0),
   241   : m_cmacSapProvider (0),
   234     m_ffMacSchedSapProvider (0),
   242     m_ffMacSchedSapProvider (0),
   235     m_macSapProvider (0),
   243     m_macSapProvider (0),
   360   Ptr<UeInfo> ueInfo = GetUeInfo (rnti);
   368   Ptr<UeInfo> ueInfo = GetUeInfo (rnti);
   361 
   369 
   362   // create RLC instance
   370   // create RLC instance
   363   // for now we support RLC SM only
   371   // for now we support RLC SM only
   364 
   372 
   365   Ptr<LteRlcSm> rlc = CreateObject<LteRlcSm> ();
   373   Ptr<LteRlc> rlc = CreateObject<LteRlcSm> ();
   366   rlc->SetLteMacSapProvider (m_macSapProvider);
   374   rlc->SetLteMacSapProvider (m_macSapProvider);
   367   rlc->SetRnti (rnti);
   375   rlc->SetRnti (rnti);
   368 
   376 
   369   Ptr<EnbRadioBearerInfo> rbInfo = CreateObject<EnbRadioBearerInfo> ();
   377   Ptr<EnbRadioBearerInfo> rbInfo = CreateObject<EnbRadioBearerInfo> ();
   370   rbInfo->SetRlc (rlc);
   378   rbInfo->SetRlc (rlc);