From 4ed89e280999c53fd98afa944830eb0c47c2d675 Mon Sep 17 00:00:00 2001
From: Navid Nikaein <navid.nikaein@eurecom.fr>
Date: Wed, 17 Jun 2015 17:06:56 +0000
Subject: [PATCH] add files to doxygen and restructure the openair2 modules

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7588 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair2/ENB_APP/enb_config.h                 | 13 +++++++---
 openair2/LAYER2/MAC/defs.h                    | 23 +++++++++++++++---
 openair2/LAYER2/MAC/proto.h                   | 12 +++++++---
 openair2/LAYER2/PDCP_v10.1.0/pdcp.h           |  6 +++++
 .../LAYER2/PDCP_v10.1.0/pdcp_primitives.h     | 24 ++++++++++---------
 openair2/LAYER2/RLC/rlc.h                     |  4 ++--
 openair2/RRC/LITE/defs.h                      |  4 ++--
 openair2/RRC/LITE/proto.h                     |  7 ++++--
 targets/DOCS/Doxyfile                         |  4 +++-
 9 files changed, 70 insertions(+), 27 deletions(-)

diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h
index 924405f9d98..269fc32c299 100755
--- a/openair2/ENB_APP/enb_config.h
+++ b/openair2/ENB_APP/enb_config.h
@@ -52,9 +52,6 @@
 #include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
 #endif
 
-// Hard to find a defined value for max enb...
-#define MAX_ENB 16
-
 #define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
             struct in_addr inp;\
             if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
@@ -64,6 +61,15 @@
             }\
         } while (0);
 
+/** @defgroup _enb_app ENB APP 
+ * @ingroup _oai2
+ * @{
+ */
+
+// Hard to find a defined value for max enb...
+#define MAX_ENB 16
+
+
 typedef struct mme_ip_address_s {
   unsigned  ipv4:1;
   unsigned  ipv6:1;
@@ -235,3 +241,4 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP);
 const Enb_properties_array_t *enb_config_get(void);
 
 #endif /* ENB_CONFIG_H_ */
+/** @} */
diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h
index 611c9439e35..35934dff425 100644
--- a/openair2/LAYER2/MAC/defs.h
+++ b/openair2/LAYER2/MAC/defs.h
@@ -32,10 +32,14 @@
 * \date 2011
 * \version 0.5
 * \email navid.nikaein@eurecom.fr
-* @ingroup _mac
 
 */
+/** @defgroup _oai2  openair2 Reference Implementation
+ * @ingroup _ref_implementation_
+ * @{
+ */
 
+/*@}*/
 
 #ifndef __LAYER2_MAC_DEFS_H__
 #define __LAYER2_MAC_DEFS_H__
@@ -71,8 +75,8 @@
 //#include "SIMULATION/PHY_EMULATION/impl_defs.h"
 //#endif
 
-/** @defgroup _mac_impl_ MAC Layer Reference Implementation
- * @ingroup _ref_implementation_
+/** @defgroup _mac  MAC
+ * @ingroup _oai2
  * @{
  */
 
@@ -261,6 +265,17 @@ typedef struct {
 typedef struct {
   uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ;/*!< \brief MCCH payload */
 } __attribute__((__packed__))MCCH_PDU;
+
+typedef struct {
+  uint8_t C7:1;/*!< \brief Component carrier 7 */
+  uint8_t C6:1;/*!< \brief Component carrier 6 */
+  uint8_t C5:1;/*!< \brief Component carrier 5 */
+  uint8_t C4:1;/*!< \brief Component carrier 4 */
+  uint8_t C3:1;/*!< \brief Component carrier 3 */
+  uint8_t C2:1;/*!< \brief Component carrier 2 */
+  uint8_t C1:1;/*!< \brief Component carrier 1 */
+  uint8_t R:1;/*!< \brief Reserved  */
+} __attribute__((__packed__))CC_ELEMENT;
 #endif
 
 typedef struct {
@@ -280,6 +295,7 @@ typedef struct {
 // MCH LCHAN IDs (table6.2.1-4 TS36.321)
 #define MCCH_LCHANID 0
 #define MCH_SCHDL_INFO 30
+#define CC_ACT_DEACT 27
 
 #endif
 
@@ -696,6 +712,7 @@ typedef struct {
   int numactiveCCs[NUMBER_OF_UE_MAX];
   int ordered_ULCCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
   int numactiveULCCs[NUMBER_OF_UE_MAX];
+  uint8_t dl_CC_bitmap[NUMBER_OF_UE_MAX];
   /// eNB to UE statistics
   eNB_UE_STATS eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
   UE_sched_ctrl UE_sched_ctrl[NUMBER_OF_UE_MAX];
diff --git a/openair2/LAYER2/MAC/proto.h b/openair2/LAYER2/MAC/proto.h
index d33c5c61a07..8f47be74c2c 100644
--- a/openair2/LAYER2/MAC/proto.h
+++ b/openair2/LAYER2/MAC/proto.h
@@ -32,18 +32,23 @@
  * \date 2010 - 2014
  * \email navid.nikaein@eurecom.fr
  * \version 1.0
- * @ingroup _mac
-
  */
 #ifndef __LAYER2_MAC_PROTO_H__
 #define __LAYER2_MAC_PROTO_H__
+/** \addtogroup _mac
+ *  @{
+ */
 
+/** \fn void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt,uint8_t ra_flag);
+\brief 
 
+*/
 void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt,uint8_t ra_flag);
 
 //LG commented cause compilation error for RT eNB extern inline unsigned int taus(void);
 
-/** \brief First stage of Random-Access Scheduling. Loops over the RA_templates and checks if RAR, Msg3 or its retransmission are to be scheduled in the subframe.  It returns the total number of PRB used for RA SDUs.  For Msg3 it retrieves the L3msg from RRC and fills the appropriate buffers.  For the others it just computes the number of PRBs. Each DCI uses 3 PRBs (format 1A)
+/** \fn void schedule_RA(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,uint8_t Msg3_subframe,unsigned int *nprb,unsigned int *nCCE);
+\brief First stage of Random-Access Scheduling. Loops over the RA_templates and checks if RAR, Msg3 or its retransmission are to be scheduled in the subframe.  It returns the total number of PRB used for RA SDUs.  For Msg3 it retrieves the L3msg from RRC and fills the appropriate buffers.  For the others it just computes the number of PRBs. Each DCI uses 3 PRBs (format 1A)
 for the message.
 @param Mod_id Instance ID of eNB
 @param frame Frame index
@@ -773,3 +778,4 @@ rrc_get_estimated_ue_distance(
 
 
 #endif
+/** @}*/
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
index 7b3febfd3bd..ee1ef82c932 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
@@ -34,6 +34,11 @@
 * \version 1.0
 */
 
+/** @defgroup _pdcp PDCP 
+* @ingroup _oai2
+* @{
+*/
+
 #ifndef __PDCP_H__
 #    define __PDCP_H__
 //-----------------------------------------------------------------------------
@@ -482,3 +487,4 @@ protected_pdcp(sdu_size_t             pdcp_input_sdu_remaining_size_to_read;)
 public_pdcp(hash_table_t  *pdcp_coll_p;)
 
 #endif
+/*@}*/
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
index 5dd8d1b0674..185b50f8667 100755
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
@@ -25,15 +25,18 @@
 
   Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
 
- *******************************************************************************/
-/*
-                             pdcp_primitives.h
-                             -------------------
-  AUTHOR  : Baris Demiray
-  COMPANY : EURECOM
-  EMAIL   : Baris.Demiray@eurecom.fr
- ***************************************************************************/
+  ***************************************************************************/
+
+/*! \file LAYER2/PDCP_v10.1.0/pdcp_primitives.h
+* \brief pdcp primitives  
+* \author  Baris Demiray and Navid Nikaein
+* \date 2009-2012
+* \version 1.0
+*/
 
+/** \addtogroup _pdcp
+*  @{
+ */
 #ifndef PDCP_PRIMITIVES_H
 #define PDCP_PRIMITIVES_H
 
@@ -41,9 +44,7 @@
  * 3GPP TS 36.323 V10.1.0 (2011-03)
  */
 
-/*
- * Data or control (1-bit, see 6.3.7)
- */
+/*! \brief Data or control (1-bit, see 6.3.7) */
 #define PDCP_CONTROL_PDU_BIT_SET 0x00
 #define PDCP_DATA_PDU_BIT_SET    0x01
 
@@ -201,3 +202,4 @@ int pdcp_validate_security(const protocol_ctxt_t* const  ctxt_pP,
 #endif /* defined(ENABLE_SECURITY) */
 
 #endif
+/** @}*/
diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h
index cb5868a600b..bcd4062b57d 100755
--- a/openair2/LAYER2/RLC/rlc.h
+++ b/openair2/LAYER2/RLC/rlc.h
@@ -35,8 +35,8 @@
 * \bug
 * \warning
 */
-/** @defgroup _rlc_impl_ RLC Layer Reference Implementation
-* @ingroup _ref_implementation_
+/** @defgroup _rlc_impl_ RLC 
+* @ingroup _oai2
 * @{
 */
 #ifndef __RLC_H__
diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h
index 8a9560a74cd..faace800d8a 100644
--- a/openair2/RRC/LITE/defs.h
+++ b/openair2/RRC/LITE/defs.h
@@ -135,8 +135,8 @@ typedef struct uid_linear_allocator_s {
 
 #define PROTOCOL_RRC_CTXT_FMT           PROTOCOL_CTXT_FMT
 #define PROTOCOL_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
-/** @defgroup _rrc_impl_ RRC Layer Reference Implementation
- * @ingroup _ref_implementation_
+/** @defgroup _rrc RRC 
+ * @ingroup _oai2
  * @{
  */
 
diff --git a/openair2/RRC/LITE/proto.h b/openair2/RRC/LITE/proto.h
index 270a3fa21ca..80ed256f6e5 100644
--- a/openair2/RRC/LITE/proto.h
+++ b/openair2/RRC/LITE/proto.h
@@ -32,8 +32,10 @@
  * \date 2010 - 2014
  * \email navid.nikaein@eurecom.fr
  * \version 1.0
- * @ingroup _rrc
-
+ 
+ */
+/** \addtogroup _rrc
+ *  @{
  */
 
 //main.c
@@ -424,3 +426,4 @@ long binary_search_int(int elements[], long numElem, int value);
 
 long binary_search_float(float elements[], long numElem, float value);
 
+/** @}*/
diff --git a/targets/DOCS/Doxyfile b/targets/DOCS/Doxyfile
index 805b0323f7a..ace86944770 100644
--- a/targets/DOCS/Doxyfile
+++ b/targets/DOCS/Doxyfile
@@ -757,7 +757,9 @@ INPUT                  = $(OPENAIR1_DIR)/PHY/defs.h \
                          $(OPENAIR1_DIR)/SCHED/defs.h \
                          $(OPENAIR1_DIR)/SIMULATION/RF/defs.h \
                          $(OPENAIR1_DIR)/SIMULATION/TOOLS/defs.h \
-                         $(OPENAIR2_DIR)/RRC/LITE/defs.h \
+                         $(OPENAIR2_DIR)/ENB_APP/enb_config.h \
+    		         $(OPENAIR2_DIR)/RRC/LITE/defs.h \
+			 $(OPENAIR2_DIR)/RRC/LITE/proto.h \
                          $(OPENAIR2_DIR)/RRC/LITE/rrc_eNB_S1AP.h \
                          $(OPENAIR2_DIR)/RRC/LITE/rrc_eNB_GTPV1U.h \
                          $(OPENAIR2_DIR)/LAYER2/PDCP_v10.1.0/pdcp.h \
-- 
GitLab