/// Outgoing DCI for PHY generated by eNB scheduler
DCI_PDU_NBDCI_pdu;
/// Outgoing BCCH pdu for PHY
BCCH_PDU_NBBCCH_pdu;
/// Outgoing BCCH DCI allocation
uint32_tBCCH_alloc_pdu;
/// Outgoing CCCH pdu for PHY
CCCH_PDUCCCH_pdu;
RA_TEMPLATE_NBRA_template[NB_RA_PROC_MAX];
/// Delete VRB map for common channels
/// Delete MBSFN SubframeConfig
/// Delete number of subframe allocation pattern available for MBSFN sync area
// #if defined(Rel10) || defined(Rel14)
/// Delete MBMS Flag
/// Delete Outgoing MCCH pdu for PHY
/// Delete MCCH active flag
/// Delete MCCH active flag
/// Delete MTCH active flag
/// Delete number of active MBSFN area
/// Delete MBSFN Area Info
/// Delete PMCH Config
/// Delete MBMS session info list
/// Delete Outgoing MCH pdu for PHY
// #endif
// #ifdef CBA
/// Delete number of CBA groups
/// Delete RNTI for each CBA group
/// Delete MCS for each CBA group
// #endif
}COMMON_channels_NB_t;
/*! \brief top level eNB MAC structure */
typedefstruct{
///
uint16_tNode_id;
/// frame counter
frame_tframe;
/// subframe counter
sub_frame_tsubframe;
/// Common cell resources
COMMON_channels_NB_tcommon_channels[MAX_NUM_CCs];
UE_list_NB_tUE_list;
///Delete subband bitmap configuration, no related CQI report
// / Modify CCE table used to build DCI scheduling information
intCCE_table[MAX_NUM_CCs][12];//180 khz for Anchor carrier
/// active flag for Other lcid
uint8_tlcid_active[NB_RB_MAX];
/// eNB stats
eNB_STATSeNB_stats[MAX_NUM_CCs];
// MAC function execution peformance profiler
/// processing time of eNB scheduler
time_stats_teNB_scheduler;
/// processing time of eNB scheduler for SI
time_stats_tschedule_si;
/// processing time of eNB scheduler for Random access
time_stats_tschedule_ra;
/// processing time of eNB ULSCH scheduler
time_stats_tschedule_ulsch;
/// processing time of eNB DCI generation
time_stats_tfill_DLSCH_dci;
/// processing time of eNB MAC preprocessor
time_stats_tschedule_dlsch_preprocessor;
/// processing time of eNB DLSCH scheduler
time_stats_tschedule_dlsch;// include rlc_data_req + MAC header + preprocessor
/// Delete processing time of eNB MCH scheduler
/// processing time of eNB ULSCH reception
time_stats_trx_ulsch_sdu;// include rlc_data_ind
}eNB_MAC_INST_NB;
/*
* UE part
*/
/*!\brief UE layer 2 status */
typedefenum{
CONNECTION_OK=0,
CONNECTION_LOST,
PHY_RESYNCH,
PHY_HO_PRACH
}UE_L2_STATE_t_NB;
/*!\brief UE scheduling info */
typedefstruct{
/// buffer status for each lcgid
uint8_tBSR[MAX_NUM_LCGID];// should be more for mesh topology
/// keep the number of bytes in rlc buffer for each lcgid
int32_tBSR_bytes[MAX_NUM_LCGID];
/// after multiplexing buffer remain for each lcid
int32_tLCID_buffer_remain[MAX_NUM_LCID];
/// sum of all lcid buffer size
uint16_tAll_lcid_buffer_size_lastTTI;
/// buffer status for each lcid
uint8_tLCID_status[MAX_NUM_LCID];
/// Delete SR pending as defined in 36.321
/// Delete SR_COUNTER as defined in 36.321
/// logical channel group ide for each LCID
uint8_tLCGID[MAX_NUM_LCID];
/// retxBSR-Timer, default value is sf2560
uint16_tretxBSR_Timer;
/// retxBSR_SF, number of subframe before triggering a regular BSR
uint16_tretxBSR_SF;
/// periodicBSR-Timer, default to infinity
uint16_tperiodicBSR_Timer;
/// periodicBSR_SF, number of subframe before triggering a periodic BSR
uint16_tperiodicBSR_SF;
/// Delete sr_ProhibitTimer in MAC_MainConfig, default value is 0: not configured
/// Delete sr ProhibitTime running
/// Delete maxHARQ_Tx in MAC_MainConfig, default value to n5
/// delete ttiBundling in MAC_MainConfig, default value is false
/// default value is release
structDRX_Config*drx_config;
/// Delete phr_config in MAC_MainConfig, default value is release
///Delete timer before triggering a periodic PHR
///Delete timer before triggering a prohibit PHR
///DL Pathloss change value
uint16_tPathlossChange;
///Delete number of subframe before triggering a periodic PHR
///Delete number of subframe before triggering a prohibit PHR
///DL Pathloss Change in db
uint16_tPathlossChange_db;
/// Delete extendedBSR_Sizes_r10, default value is false, only support short BSR
/// Delete extendedPHR_r10, default value is false
//For NB-IoT in TS 36.321, prioritisedBitRate, bucketSizeDuration and the corresponding steps of the Logical Channel Prioritisation procedure (i.e., Step 1 and Step 2 below) are not applicable.