- Fix: avoid infinite loop on mulitcast read thread if no data to read
Pre-ci test passed git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4000 818b1a75-f10b-46b9-bf7c-635c3b92a50f
@@ -0,0 +1,9 @@
|
||||
#ifndef __MAC_PRIMITIVES_H__
|
||||
#define __MAC_PRIMITIVES_H__
|
||||
|
||||
|
||||
|
||||
//void ue_decode_chbch(unsigned char Node_id);
|
||||
//void ue_scheduler(unsigned char Node_id);
|
||||
//void nodeb_decode_ul_sach();
|
||||
#endif
|
||||
@@ -0,0 +1,262 @@
|
||||
/***************************************************************************
|
||||
mac_rlc_primitives.h - description
|
||||
-------------------
|
||||
***************************************************************************/
|
||||
#ifndef __MAC_RLC_PRIMITIVES_H__
|
||||
# define __MAC_RLC_PRIMITIVES_H__
|
||||
|
||||
/** @defgroup _mac_rlc_primitives_ MAC Layer Primitives for Communications with RLC
|
||||
* @ingroup _openair_mac_layer_specs_
|
||||
* @{
|
||||
This subclause describes the primitives for communications between the RLC and MAC sub-layers.
|
||||
|
||||
|
||||
This clause describes the primitives for communications between the RLC and MAC sub-layers. It is largely inspired by
|
||||
3GPP TS 25.321 V4.2.0.
|
||||
\image html mac_w3g4f_rlc_tx_sequence_diagram.png "MAC-RLC TX Sequence Diagram" width=15cm
|
||||
\image latex mac_w3g4f_rlc_tx_sequence_diagram.png "MAC-RLC TX Sequence Diagram" width=15cm
|
||||
|
||||
MAC-STATUS-Ind (mac_status_ind} primitive indicates to RLC for each logical channel the rate at which it may transfer data to MAC. Parameters
|
||||
are the number of PDUs that can be transferred in each transmission time interval and the PDU size; it is possible that MAC
|
||||
would use this primitive to indicate that it expects the current buffer occupancy of the addressed logical channel in order
|
||||
to provide for optimised TFC selection on transport channels with long transmission time interval. At the UE, MAC-STATUS-Ind
|
||||
primitive is also used to indicate from MAC to RLC that MAC has requested data transmission by PHY (i.e. PHY-DATA-REQ has
|
||||
been submitted, see Fig. 11.2.2.1), or that transmission of an RLC PDU on RACH or CPCH has failed due to exceeded preamble
|
||||
ramping cycle counter.
|
||||
|
||||
MAC-STATUS-Resp (mac_status_resp) primitive enables RLC to acknowledge a MAC-STATUS-Ind. It is possible
|
||||
that RLC would use this primitive to indicate that it has nothing to send or that it is
|
||||
in a suspended state or to indicate the current buffer occupancy to MAC.
|
||||
|
||||
*/
|
||||
# include "list.h"
|
||||
# include "rrm_constants.h"
|
||||
//# include "LAYER2/MAC/defs.h"
|
||||
|
||||
# define MAC_DCCH 0xCC
|
||||
# define MAC_DTCH 0xDC
|
||||
//----------------------------------------------------------
|
||||
// primitives
|
||||
//----------------------------------------------------------
|
||||
# define MAC_DATA_REQ 0x01
|
||||
# define MAC_DATA_IND 0x02
|
||||
# define MAC_STATUS_IND 0x04
|
||||
# define MAC_STATUS_RESP 0x08
|
||||
//----------------------------------------------------------
|
||||
// primitives definition
|
||||
//----------------------------------------------------------
|
||||
# define UE_ID_TYPE_U_RNTI 0xFF
|
||||
// should not be used ?
|
||||
# define UE_ID_TYPE_C_RNTI 0xCC
|
||||
|
||||
# define MAC_TX_STATUS_SUCCESSFUL 0x0F
|
||||
# define MAC_TX_STATUS_UNSUCCESSFUL 0xF0
|
||||
|
||||
# define MAC_HEADER_MAX_SIZE 6
|
||||
|
||||
|
||||
// Parameters:
|
||||
// a) data:
|
||||
// - it contains the RLC layer messages (RLC-PDU) to be transmitted, or the RLC layer messages
|
||||
// that have been received by the MAC sub-layer.
|
||||
//
|
||||
// b) no_tb :
|
||||
// - indicates the number of transport blocks transmitted by the peer entity within the
|
||||
// transmission time interval, based on the TFI value.
|
||||
//
|
||||
// c) buffer_occupancy :
|
||||
// - the parameter Buffer Occupancy (BO) indicates for each logical channel the amount of data
|
||||
// in number of bytes that is available for transmission and retransmission in RLC layer.
|
||||
// When MAC is connected to an AM RLC entity, control PDUs to be transmitted and RLC PDUs
|
||||
// outside the RLC Tx window shall also be included in the BO. RLC PDUs that have been
|
||||
// transmitted but not negatively acknowledged by the peer entity shall not be included in the BO.
|
||||
//
|
||||
// d) rx_timing_deviation, TDD only:
|
||||
// - it contains the RX Timing Deviation as measured by the physical layer for the physical
|
||||
// resources carrying the data of the Message Unit. This parameter is optional and only for
|
||||
// Indication. It is needed for the transfer of the RX Timing Deviation measurement of RACH
|
||||
// transmissions carrying CCCH data to RRC.
|
||||
//
|
||||
// e) no_pdu:
|
||||
// - specifies the number of PDUs that the RLC is permitted to transfer to MAC within a
|
||||
// transmission time interval.
|
||||
//
|
||||
// f) pdu_size:
|
||||
// - specifies the size of PDU that can be transferred to MAC within a transmission time interval.
|
||||
//
|
||||
// g) UE-ID Type Indicator:
|
||||
// - indicates the UE-ID type to be included in MAC for a DCCH when it is mapped onto a common
|
||||
// transport channel (i.e. FACH, RACH, DSCH in FDD or CPCH). On the UE side UE-ID Type Indicator
|
||||
// shall always be set to C-RNTI.
|
||||
//
|
||||
// h) tx_status:
|
||||
// - when set to value "transmission unsuccessful" this parameter indicates to RLC that transmission
|
||||
// of an RLC PDU failed in the previous Transmission Time Interval, when set to value
|
||||
// "transmission successful" this parameter indicates to RLC that the requested RLC PDU(s)
|
||||
// has been submitted for transmission by the physical layer.
|
||||
//
|
||||
// i) rlc_info
|
||||
// - indicates to MAC the configuration parameters that are critical to TFC selection depending
|
||||
// on its mode and the amount of data that could be transmitted at the next TTI. This primitive
|
||||
// is meant to insure that MAC can perform TFC selection.
|
||||
struct rlc_entity_info {
|
||||
unsigned char rlc_protocol_state;
|
||||
};
|
||||
|
||||
struct mac_tx_tb_management {
|
||||
// BE CAREFULL TO KEEP THE SAME MAPPING FOR THE 6 FIELDS BELLOW AS FOR struct mac_tb_req
|
||||
unsigned char *data_ptr;
|
||||
unsigned char first_bit; // 0 if data starts on byte boundary(b7), 1 if b6, 2 if b5, etc.
|
||||
// Previously designed for interlayers optimizations, (avoid aligning on byte boundary)
|
||||
// but not used by L1 !, so extra cost for alignement in MAC.
|
||||
unsigned short tb_size_in_bits; // L1H does not care of the field first bit any more, so in order to byte
|
||||
// align the tb we have to know its size
|
||||
|
||||
// for reporting tx status to upper layers
|
||||
void *rlc;
|
||||
void (*rlc_callback) (void *rlcP, unsigned short rlc_tb_type);
|
||||
unsigned short rlc_tb_type;
|
||||
|
||||
unsigned short log_ch_interface_src; // index of the logical channel interface from which the tb was submitted
|
||||
unsigned char mac_header[MAC_HEADER_MAX_SIZE]; // worst case : tctf(5bits)+UE-Id type(2bits)+UE-Id(16 or 32bits)+C/T(4bits)=43bits max
|
||||
};
|
||||
|
||||
struct mac_rx_tb_management {
|
||||
unsigned char *data_ptr;
|
||||
unsigned short tb_size; // in bits
|
||||
unsigned char valid_checksum;
|
||||
unsigned char first_bit; // 0 if data starts on byte boundary(b7), 1 if b6, 2 if b5, etc
|
||||
};
|
||||
|
||||
struct mac_tb_req {
|
||||
// BE CAREFULL TO KEEP THE SAME MAPPING FOR THE 6 FIELDS BELLOW AS FOR struct mac_tx_tb_management
|
||||
unsigned char *data_ptr;
|
||||
unsigned char first_bit;
|
||||
unsigned short tb_size_in_bits; // L1H does not care of the field first bit any more, so in order to byte
|
||||
// align the tb we have to know its size
|
||||
|
||||
// for reporting tx status to upper layers
|
||||
void *rlc;
|
||||
void (*rlc_callback) (void *rlcP, unsigned short rlc_tb_type);
|
||||
unsigned short rlc_tb_type;
|
||||
|
||||
unsigned char mac_header[MAC_HEADER_MAX_SIZE]; // worst case : tctf(5bits)+UE-Id type(2bits)+UE-Id(16 or 32bits)+C/T(4bits)=43bits max
|
||||
};
|
||||
|
||||
// MAC-STATUS-Ind/Resp:
|
||||
/*!\brief
|
||||
MAC-STATUS-Ind primitive indicates to RLC for each logical channel the rate at which it may transfer data to MAC. Parameters
|
||||
are the number of PDUs that can be transferred in each transmission time interval and the PDU size; it is possible that MAC
|
||||
would use this primitive to indicate that it expects the current buffer occupancy of the addressed logical channel in order
|
||||
to provide for optimised TFC selection on transport channels with long transmission time interval. At the UE, MAC-STATUS-Ind
|
||||
primitive is also used to indicate from MAC to RLC that MAC has requested data transmission by PHY (i.e. PHY-DATA-REQ has
|
||||
been submitted, see Fig. 11.2.2.1), or that transmission of an RLC PDU on RACH or CPCH has failed due to exceeded preamble
|
||||
ramping cycle counter.*/
|
||||
struct mac_status_ind {
|
||||
unsigned short no_pdu; /*!< \brief PDUs number*/
|
||||
unsigned short tx_status; /*!< \brief status is successful or unsuccessful*/
|
||||
};
|
||||
|
||||
/*!\brief
|
||||
MAC-STATUS-Resp primitive enables RLC to acknowledge a MAC-STATUS-Ind. It is possible
|
||||
that RLC would use this primitive to indicate that it has nothing to send or that it is
|
||||
in a suspended state or to indicate the current buffer occupancy to MAC.
|
||||
*/
|
||||
struct mac_status_resp {
|
||||
unsigned int buffer_occupancy_in_bytes; /*!< \brief the parameter Buffer Occupancy (BO) indicates for each logical channel the amount of data in number of bytes that is available for transmission and retransmission in RLC layer. */
|
||||
unsigned short buffer_occupancy_in_pdus; /*!< xxx*/
|
||||
struct rlc_entity_info rlc_info; /*!< xxx*/
|
||||
};
|
||||
|
||||
struct mac_tb_ind {
|
||||
unsigned char *data_ptr;
|
||||
unsigned short size;
|
||||
unsigned char error_indication;
|
||||
unsigned char first_bit; // 0 if data starts on byte boundary(b7), 1 if b6, 2 if b5, etc
|
||||
};
|
||||
|
||||
// MAC-DATA-Req/Ind:
|
||||
|
||||
|
||||
|
||||
//---------------------
|
||||
/*! \brief MAC-DATA-Req primitive is used to request that an upper layer PDU be sent using the
|
||||
procedures for the information transfer service;
|
||||
*/
|
||||
struct mac_data_req {
|
||||
list_t data; /*!< contains the RLC layer messages (RLC-PDU) to be transmitted*/
|
||||
unsigned int buffer_occupancy_in_bytes; /*!< the parameter Buffer Occupancy (BO) indicates for each logical channel the amount of data
|
||||
in number of bytes that is available for transmission and retransmission in RLC layer.
|
||||
When MAC is connected to an AM RLC entity, control PDUs to be transmitted and RLC PDUs
|
||||
outside the RLC Tx window shall also be included in the BO. RLC PDUs that have been
|
||||
transmitted but not negatively acknowledged by the peer entity shall not be included in the BO.*/
|
||||
unsigned short buffer_occupancy_in_pdus; /*!< xxx*/
|
||||
struct rlc_entity_info rlc_info; /*!< indicates to MAC the configuration parameters that are critical to TFC selection depending
|
||||
on its mode and the amount of data that could be transmitted at the next TTI. This primitive
|
||||
is meant to insure that MAC can perform TFC selection.*/
|
||||
unsigned char ue_id_type_indicator; /*!< indicates the UE-ID type to be included in MAC for a DCCH when it is mapped onto a common
|
||||
transport channel (i.e. FACH, RACH, DSCH in FDD or CPCH). On the UE side UE-ID Type Indicator
|
||||
shall always be set to C-RNTI.*/
|
||||
};
|
||||
//---------------------
|
||||
/*! \brief MAC-DATA-Ind primitive indicates the arrival of upper layer PDUs received within one
|
||||
transmission time interval by means of the information transfer service.*/
|
||||
struct mac_data_ind {
|
||||
list_t data; /*! the RLC layer messages that have been received by the MAC sub-layer*/
|
||||
unsigned short no_tb;
|
||||
unsigned short tb_size; // in bits
|
||||
//unsigned char error_indication;
|
||||
};
|
||||
|
||||
|
||||
//---------------------
|
||||
|
||||
//---------------------
|
||||
struct mac_primitive {
|
||||
unsigned char primitive_type;
|
||||
union {
|
||||
struct mac_data_req data_req;
|
||||
struct mac_status_resp status_resp;
|
||||
struct mac_data_ind data_ind;
|
||||
//struct mac_status_ind status_ind;
|
||||
} primitive;
|
||||
};
|
||||
|
||||
# ifdef BYPASS_L1
|
||||
// List element of TrCh Blocks data
|
||||
struct Bypass_TrChBlk_MAC_Interface {
|
||||
unsigned char first_bit; // First valid Bit in first word. 0 if word is full
|
||||
unsigned char valid_checksum; // 1 if valid checksum (receive only)
|
||||
unsigned char peer_trch_id;
|
||||
unsigned int data_start_index;
|
||||
unsigned char data[100];
|
||||
};
|
||||
|
||||
struct Bypass_TrChData_MAC_Interface {
|
||||
unsigned short tf;
|
||||
unsigned char nb_blocks;
|
||||
unsigned char updated;
|
||||
struct Bypass_TrChBlk_MAC_Interface tb[32];
|
||||
};
|
||||
|
||||
struct Bypass_L1 {
|
||||
struct Bypass_TrChData_MAC_Interface ul_trch[JRRM_MAX_TRCH_RG]; // MT write data here. RG read here, index are rg trch ids
|
||||
struct Bypass_TrChData_MAC_Interface dl_trch[JRRM_MAX_TRCH_RG]; // RG write data here. MT read here,
|
||||
unsigned char mt_ack[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char rg_ack[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char mt_wrote[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char rg_wrote[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char num_mobiles;
|
||||
|
||||
unsigned char join_request; // act as boolean
|
||||
unsigned char detach_request; // act as boolean
|
||||
unsigned char join_requests[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char join_acks[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char detach_requests[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
unsigned char detach_acks[JRRM_MAX_MANAGED_MOBILES_PER_RG];
|
||||
};
|
||||
|
||||
|
||||
# endif
|
||||
/** @} */
|
||||
#endif
|
||||
@@ -0,0 +1,417 @@
|
||||
/*________________________mac_rrc_primitives.h________________________
|
||||
|
||||
Authors : Hicham Anouar, Raymond Knopp
|
||||
Company : EURECOM
|
||||
Emails : anouar@eurecom.fr, knopp@eurecom.fr
|
||||
________________________________________________________________*/
|
||||
|
||||
|
||||
#ifndef __MAC_RRC_PRIMITIVES_H__
|
||||
# define __MAC_RRC_PRIMITIVES_H__
|
||||
|
||||
|
||||
|
||||
#ifndef OPENAIR2_IN
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#endif
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
|
||||
#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#ifdef Rel10
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#endif
|
||||
//#include "rrm_config_structs.h"
|
||||
//#include "platform_types.h"
|
||||
/** @defgroup _mac_rrc_primitives_ MAC Layer Primitives for Communications with RRC
|
||||
* @ingroup _openair_mac_layer_specs_
|
||||
* @{
|
||||
This subclause describes the primitives for communications between the RRC and MAC sub-layers.
|
||||
|
||||
|
||||
This subclause describes the primitives for communications between the RRC and MAC sub-layers.
|
||||
The RRC sequence diagrams are shown below.
|
||||
|
||||
The primitives responsible for relaying of radio and traffic measurements to the radio resource manager via
|
||||
RRC signaling are :
|
||||
-# MAC_MEAS_REQ: enables RRC to request a measurement process in the MAC (one-shot, periodic or event-driven). This configures
|
||||
a measurement process in the MAC.
|
||||
-# MAC_MEAS_IND: indicates to RRC that a (periodic) measurement request is available.
|
||||
-# MAC_MEAS_CONFIRM: enables RRC to acknowledge a MAC-MEAS-Ind.
|
||||
|
||||
These associate a set of measurements (described by the MAC_MEAS_t structure) to a particular logical channel. Each measurement has
|
||||
an associated period (which can be infinite in the case of a one-shot measurement) and a set of triggers for generating event-driven
|
||||
instantaneous measurement reports. The latter is typically used to signal events that correspond to degradation or loss of links with respect to
|
||||
negotiated QoS values. These consequently trigger reconfiguration of services by the network. The averaging parameters used by the
|
||||
MAC measurement process is described by the structure MAC_AVG_t. Note that it is the responsibility
|
||||
of the MAC-layer to relay PHY measurements which are directly available to the scheduling entity in the MAC-layer.
|
||||
RRC does not directly act on the PHY measurement sub-system.
|
||||
|
||||
The primitives responsible for logical channel MAC configuration by the radio resource manager via RRC signaling are
|
||||
|
||||
-# MAC_CONFIG_REQ: enables RRC to configure a new logical channel description at the MAC layer. The associated QoS
|
||||
descriptor (MAC_LCHAN_DESC contains the parameters defining the logical channel resource scheduling.
|
||||
-# MAC_CONFIG_CONFIRM: indicates to RRC that a given logical channel has or has not been configured.
|
||||
|
||||
The primitives responsible for indicating data synchronization (or loss of) to RRC are
|
||||
-# MAC_SYNC : indicates to RRC that a physical link for a newly established logical channel has been used (reception) with
|
||||
success. The parameter passed indicates the logical channel id. This represents the event of successfully decoding a particular logical
|
||||
channel for the first time. In the event that several logical channels share the same physical resources (e.g. BCCH and CCCH), it
|
||||
shall only be sent for the logical channel with the lowest id.
|
||||
-# MAC_OUT_OF_SYNC : UE primitive indicating to RRC that a physical link for a particular Node-B has been lossed. The parameter
|
||||
passed indicates the id of the Node-B. This represents the event of detecting an unacceptable error rate on the CHBCH of the Node-B in question.
|
||||
and can be used in the case of handover between Node-B's. Note that this message is redundant since an equivalent way of obtaining the same
|
||||
result could be based on an event-driven measurement report.
|
||||
*/
|
||||
|
||||
# define NB_SIG_CNX_CH 1
|
||||
# define NB_CNX_CH MAX_MOBILES_PER_RG
|
||||
|
||||
# define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
|
||||
# define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
|
||||
|
||||
#define NUMBER_OF_MEASUREMENT_SUBBANDS 16
|
||||
|
||||
#define RRC_RACH_ASS_REQ 0
|
||||
#define MAC_RACH_BW_REQ 1
|
||||
|
||||
typedef enum {
|
||||
RRC_OK=0,
|
||||
RRC_ConnSetup_failed,
|
||||
RRC_PHY_RESYNCH
|
||||
} RRC_status_t;
|
||||
|
||||
|
||||
/*! MAC/PHY Measurement Structure*/
|
||||
/*! \brief Logical Channel ID structure */
|
||||
typedef struct{
|
||||
unsigned short Index __attribute__ ((packed)); //QOS CLASS? /*!< \brief Index of logical channel*/
|
||||
}LCHAN_ID;
|
||||
|
||||
|
||||
typedef struct{
|
||||
char Rssi; /*!< \brief RSSI (dBm) on physical resources corresponding to logical channel*/
|
||||
char Sinr[NUMBER_OF_MEASUREMENT_SUBBANDS]; /*!< \brief Average SINR (dB) on physical resources corresponding to logical channel*/
|
||||
u8 Harq_delay; /*!< \brief Average number of transmission rounds (times 10) on transport channel associated with
|
||||
logical channel*/
|
||||
unsigned short Bler; /*!< \brief Average block error rate (times 1000) on transport channel associated with logical channel*/
|
||||
u8 Spec_eff; /*!< \brief Actual Spectral efficiency (bits/symbol times 10) of transport channel associated with logical channel*/
|
||||
u8 Qdepth;
|
||||
//u8 Tx_rate;
|
||||
//u8 Rx_rate;
|
||||
}__attribute__ ((__packed__)) MAC_MEAS_T;
|
||||
#define MAC_MEAS_T_SIZE sizeof(MAC_MEAS_T)
|
||||
|
||||
/*!\brief MAC/RLC Measurement Information
|
||||
*/
|
||||
typedef struct{
|
||||
char Rssi; /*!< \brief RSSI (dBm) on physical resources corresponding to logical channel*/
|
||||
char Sinr[NUMBER_OF_MEASUREMENT_SUBBANDS]; /*!< \brief Average SINR (dB) on physical resources corresponding to logical channel*/
|
||||
u8 Harq_delay; /*!< \brief Average number of transmission rounds (times 10) on transport channel associated with
|
||||
logical channel*/
|
||||
unsigned short Bler; /*!< \brief Average block error rate (times 1000) on transport channel associated with logical channel*/
|
||||
u8 Spec_eff; /*!< \brief Actual Spectral efficiency (bits/symbol times 10) of transport channel associated with logical channel*/
|
||||
u8 rlc_sdu_buffer_occ; /*!< \brief RLC SDU buffer occupancy */
|
||||
unsigned short rlc_sdu_loss_indicator; /*!< \brief RLC SDU Loss indicator */
|
||||
}__attribute__ ((__packed__)) MAC_RLC_MEAS_T;
|
||||
#define MAC_RLC_MEAS_T_SIZE sizeof(MAC_RLC_MEAS_T)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*! MAC/PHY Measurement Averaging Parameters. These are fixed-point 16-bit representations of the interval [0,1)*/
|
||||
|
||||
typedef struct {
|
||||
unsigned short Rssi_forgetting_factor; /*!< \brief Forgetting factor for RSSI averaging*/
|
||||
unsigned short Sinr_forgetting_factor; /*!< \brief Forgetting factor for SINR averaging*/
|
||||
unsigned short Harq_delay_forgetting_factor; /*!< \brief Forgetting factor for HARQ delay averaging*/
|
||||
unsigned short Bler_forgetting_factor; /*!< \brief Forgetting factor for block error rate (times 1000) averaging*/
|
||||
unsigned short Spec_eff_forgetting_factor; /*!< \brief Forgetting factor for Spectral efficiency averaging*/
|
||||
}__attribute__ ((__packed__)) MAC_AVG_T;
|
||||
|
||||
/*!\brief This primitive indicates to RRC that a measurement request is available */
|
||||
|
||||
typedef struct {
|
||||
LCHAN_ID Lchan_id; /*!< \brief Logical Channel ID*/
|
||||
unsigned short Process_id; /*!< \brief Id of MAC measurement process*/
|
||||
MAC_MEAS_T Meas;
|
||||
char Meas_status; /*!< \brief Latest set of MAC measurements performed in the current process*/
|
||||
}__attribute__ ((__packed__)) MAC_MEAS_IND;
|
||||
|
||||
#define MAC_MEAS_IND_SIZE sizeof(MAC_MEAS_IND)
|
||||
|
||||
/*!\brief This primitive indicates to MAC that a measurement request was received
|
||||
*/
|
||||
typedef struct {
|
||||
//LCHAN_ID Lchan_id; /*!< \brief Logical Channel ID*/
|
||||
//unsigned short Process_id; /*!< \brief Id of new MAC measurement process*/
|
||||
char Meas_status; /*!< \brief Status (0-positive, 1-negative)*/
|
||||
}__attribute__ ((__packed__)) MAC_MEAS_CONFIRM;
|
||||
|
||||
/*!\brief This primitive parametrizes a MAC measurement process
|
||||
*/
|
||||
typedef struct {
|
||||
MAC_MEAS_T Meas_trigger; /*!< \brief Thresholds to trigger event driven measurement reports*/
|
||||
MAC_AVG_T Mac_avg; /*!< \brief Set of forgetting factors for the averaging of the MAC measurement process*/
|
||||
unsigned int bo_forgetting_factor; /*!< \brief Forgetting factor for RLC buffer occupancy averaging*/
|
||||
unsigned int sdu_loss_trigger; /*!< \brief Trigger for RLC SDU losses*/
|
||||
unsigned short Rep_amount; /*!< \brief Number of Measurements for this process, 0 means infinite*/
|
||||
unsigned short Rep_interval; /*!< \brief Reporting interval between successive measurement reports in this process*/
|
||||
}__attribute__ ((__packed__)) MAC_RLC_MEAS_DESC;
|
||||
|
||||
|
||||
|
||||
/*!\brief This primitive indicates to MAC that a (periodic) measurement request is requested for a particular logical channel
|
||||
*/
|
||||
typedef struct {
|
||||
LCHAN_ID Lchan_id; /*!< \brief Logical Channel ID*/
|
||||
unsigned short UE_eNB_index;
|
||||
unsigned short Process_id; /*!< \brief Id of new MAC measurement process*/
|
||||
// MAC_MEAS_DESC Meas_desc;/*!< \brief Measurement descriptor associated with Logical channel*/
|
||||
MAC_MEAS_T Meas_trigger; /*!< \brief Thresholds to trigger event driven measurement reports*/
|
||||
MAC_AVG_T Mac_avg; /*!< \brief Set of forgetting factors for the averaging of the MAC measurement process*/
|
||||
unsigned short Rep_amount; /*!< \brief Number of Measurements for this process, 0 means infinite*/
|
||||
unsigned short Rep_interval; /*!< \brief Reporting interval between successive measurement reports in this process*/
|
||||
MAC_MEAS_T Mac_meas; /*!< \brief Measure structure to be filled by the MAC */
|
||||
}__attribute__ ((__packed__)) MAC_MEAS_REQ;
|
||||
#define MAC_MEAS_REQ_SIZE sizeof(MAC_MEAS_REQ)
|
||||
|
||||
typedef struct MEAS_REQ_TABLE_ENTRY{
|
||||
MAC_MEAS_REQ Mac_meas_req;
|
||||
unsigned int Last_report_frame;
|
||||
unsigned int Next_check_frame;
|
||||
u8 Status;
|
||||
u8 Meas_req_status;
|
||||
u8 Rx_activity;
|
||||
//u8 Meas_Direction;//???
|
||||
struct MEAS_REQ_TABLE_ENTRY *Next_entry;
|
||||
struct MEAS_REQ_TABLE_ENTRY *Prev_entry;
|
||||
}__attribute__ ((__packed__)) MAC_MEAS_REQ_ENTRY;
|
||||
|
||||
|
||||
/*!\brief This primitive parametrizes an RLC measurement process
|
||||
*/
|
||||
typedef struct{
|
||||
unsigned int bo_forgetting_factor; /*!< \brief Forgetting factor for buffer occupancy averaging*/
|
||||
unsigned int sdu_loss_trigger; /*!< \brief Trigger for RLC sdu losses*/
|
||||
}__attribute__ ((__packed__)) RLC_MEAS_DESC;
|
||||
|
||||
//#define NUM_MEAS_REQ_MAX 100 //from rrm
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*! \brief MAC Logical Channel Descriptor
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
|
||||
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
|
||||
u8 Delay_class; /*!< \brief Delay class offered by MAC layer scheduling*/
|
||||
u8 Target_bler; /*!< \brief Target Average Transport Block Error rate*/
|
||||
u8 Lchan_t; /*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
|
||||
}__attribute__ ((__packed__)) LCHAN_DESC;
|
||||
|
||||
#define LCHAN_DESC_SIZE sizeof(LCHAN_DESC)
|
||||
|
||||
/*!\brief This primitive indicates to RRC that a particular logical channel has been established and that successful transmission has
|
||||
been received. The parameter passed is the logical channel id.
|
||||
*/
|
||||
typedef struct MAC_SYNC {
|
||||
LCHAN_ID Lchan_id; /*!< \brief Logical Channel ID*/
|
||||
} MAC_SYNC;
|
||||
|
||||
/*!\brief This primitive indicates to RRC (UE) that a particular Node-B has been lossed and passes CHBCH logical channel
|
||||
node_id as parameter
|
||||
*/
|
||||
typedef struct MAC_OUT_OF_SYNC {
|
||||
unsigned short Node_id; /*!< \brief Logical Channel ID*/
|
||||
} MAC_OUT_OF_SYNC;
|
||||
|
||||
|
||||
/*!\brief This primitive enables RRC to configure a new logical channel description at the MAC layer.
|
||||
*/
|
||||
typedef struct{
|
||||
LCHAN_ID Lchan_id; /*!< \brief Logical Channel ID*/
|
||||
// unsigned short UE_eNB_index; //ID of CH who configued the LC (Need this to identify LC in the UE side)
|
||||
u8 Lchan_type; // DCCH_LCHAN, DTCH_LCHAN
|
||||
LCHAN_DESC Lchan_desc[2]; /*!< \brief Logical Channel QoS Descriptor (MAC component) */
|
||||
u8 L3_info_type;
|
||||
u8 L3_info[16];
|
||||
//#ifndef CELLULAR
|
||||
unsigned short UE_eNB_index;
|
||||
//#endif
|
||||
}__attribute__ ((__packed__)) MAC_CONFIG_REQ;
|
||||
#define MAC_CONFIG_REQ_SIZE sizeof(MAC_CONFIG_REQ)
|
||||
|
||||
|
||||
/*!\brief This primitive indicates to RRC that a given logical channel has or has not been configured.
|
||||
*/
|
||||
typedef struct {
|
||||
LCHAN_ID Lchan_id; /*!< \brief Logical Channel ID*/
|
||||
u8 Config_status; /*!< \brief Configuration status (0-positive, 1-negative)*/
|
||||
}__attribute__ ((__packed__)) MAC_CONFIG_CONFIRM;
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
||||
/*
|
||||
** @addtogroup _mac_impl_ MAC Layer (MAC) Reference Implementation
|
||||
*@{
|
||||
*/
|
||||
|
||||
//#include "LAYER2/MAC/defs.h"
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
char Sinr_meas[NB_CNX_CH+1][NUMBER_OF_MEASUREMENT_SUBBANDS];
|
||||
char Wideband_sinr;
|
||||
u8 Forg_fact;
|
||||
unsigned short Rep_interval;
|
||||
u8 Status;
|
||||
unsigned int Last_report_frame;
|
||||
unsigned int Next_check_frame;
|
||||
u8 Active;
|
||||
}__attribute__ ((__packed__)) DEFAULT_UE_MEAS;
|
||||
#define DEFAULT_UE_MEAS_SIZE sizeof(DEFAULT_UE_MEAS)
|
||||
|
||||
typedef struct { //From RRC
|
||||
unsigned short UE_index;
|
||||
u8 Forg_fact;
|
||||
unsigned short Rep_interval;;
|
||||
}__attribute__ ((__packed__)) DEFAULT_MEAS_REQ;
|
||||
#define DEFAULT_MEAS_REQ_SIZE sizeof(DEFAULT_MEAS_REQ)
|
||||
|
||||
typedef struct { //To RRC
|
||||
unsigned short UE_index __attribute__ ((packed));
|
||||
char Sinr_meas[NB_CNX_CH+1];
|
||||
u8 Rb_active[NB_RAB_MAX];
|
||||
}__attribute__ ((__packed__)) DEFAULT_MEAS_IND;
|
||||
#define DEFAULT_MEAS_IND_SIZE sizeof(DEFAULT_MEAS_IND)
|
||||
|
||||
|
||||
typedef struct {
|
||||
char Sinr_meas[NB_CNX_CH+1][NUMBER_OF_MEASUREMENT_SUBBANDS];
|
||||
char Wideband_sinr;
|
||||
unsigned int cqi;
|
||||
u8 Forg_fact;
|
||||
unsigned short Rep_interval;
|
||||
unsigned int Last_report_frame;
|
||||
unsigned int Next_check_frame;
|
||||
u8 Status; //IDLE,NEED_rADIO_CONFIG, RADIO_CONFIG_TX, RADIO_CONFIG_ok
|
||||
u8 Active;
|
||||
}__attribute__ ((__packed__)) DEFAULT_CH_MEAS;
|
||||
#define DEFAULT_eNB_MEAS_SIZE sizeof(DEFAULT_eNB_MEAS)
|
||||
|
||||
|
||||
|
||||
#ifndef OPENAIR2_IN
|
||||
|
||||
#ifndef CELLULAR
|
||||
//#include "L3_rrc_defs.h"
|
||||
#endif
|
||||
|
||||
typedef struct{ //RRC_INTERFACE_FUNCTIONS
|
||||
unsigned int Frame_index;
|
||||
unsigned short UE_index[NB_MODULES_MAX][NB_SIG_CNX_UE];
|
||||
u8 eNB_id[NB_MODULES_MAX][NB_CNX_UE];
|
||||
#ifndef CELLULAR
|
||||
// L2_ID UE_id[NB_MODULES_MAX][NB_CNX_CH];
|
||||
u8 UE_id[NB_MODULES_MAX][NB_CNX_CH][5];
|
||||
#endif
|
||||
void (*openair_rrc_top_init)(void);
|
||||
char (*openair_rrc_eNB_init)(u8 );
|
||||
char (*openair_rrc_UE_init)(u8, u8);
|
||||
RRC_status_t (*rrc_rx_tx)(u8,u32,u8,u8);
|
||||
u8 (*mac_rrc_data_ind)(u8,u32,unsigned short,char *,unsigned short,u8 eNB_flag, u8 eNB_index);
|
||||
u8 (*mac_rrc_data_req)(u8,u32,unsigned short,u8,char *,u8 eNB_flag, u8 eNB_index);
|
||||
void (*mac_rrc_meas_ind)(u8,MAC_MEAS_REQ_ENTRY*);
|
||||
void (*def_meas_ind)(u8, u8);
|
||||
void (*rrc_data_indP) (module_id_t , rb_id_t , sdu_size_t , char*);
|
||||
void (*fn_rrc) (void);
|
||||
u8 (*get_rrc_status)(u8 Mod_id,u8 eNB_flag,u8 eNB_index);
|
||||
}RRC_XFACE;
|
||||
|
||||
|
||||
typedef struct{
|
||||
//MAC_INTERFACE_FUNCTIONS
|
||||
unsigned int frame;
|
||||
unsigned short Node_id[NB_MODULES_MAX];
|
||||
char Is_cluster_head[NB_MODULES_MAX];
|
||||
void (*macphy_exit)(const char *); /* Pointer function that stops the low-level scheduler due an exit condition */
|
||||
unsigned short (*mac_config_req)(u8,u8,MAC_CONFIG_REQ*);
|
||||
MAC_MEAS_REQ_ENTRY* (*mac_meas_req)(u8 , MAC_MEAS_REQ*);
|
||||
void (*mac_out_of_sync_ind)(u8,u32,unsigned short);
|
||||
//u8 (*mac_rrc_data_ind)(u8,unsigned short,char *,u8);
|
||||
//u8 (*mac_rrc_data_req)( u8, unsigned short, u8,char *);
|
||||
//void (*mac_switch_node_function)(u8);
|
||||
// void (*mac_rlc_exit)(void);
|
||||
//RLC_INTERFACE_FUNCTIONS
|
||||
// void (*pdcp_run)(unsigned int);
|
||||
void (*pdcp_run)(void);
|
||||
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char*);
|
||||
signed int (*rrc_rlc_config_req)(unsigned int, unsigned int, unsigned int, unsigned int, rlc_info_t );
|
||||
int (*rrc_mac_config_req)(u8 Mod_id,u8 eNB_flag,u8 UE_id,u8 eNB_index,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t *logicalChannelConfig,
|
||||
MeasGapConfig_t *measGapConfig,
|
||||
TDD_Config_t *tdd_Config,
|
||||
u8 *SIwindowsize,
|
||||
u16 *SIperiod
|
||||
#ifdef Rel10
|
||||
,
|
||||
u8 MBMS_Flag,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
struct PMCH_InfoList_r9 *pmch_InfoList
|
||||
#endif
|
||||
);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, char*);
|
||||
void (*mac_rlc_data_ind)(module_id_t, chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
|
||||
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t, chan_id_t, tb_size_t, num_tb_t);
|
||||
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
|
||||
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
|
||||
//rlc_op_status_t rrc_rlc_config_req (module_id_t, rb_id_t, rb_type_t, rlc_info_t );
|
||||
//rlc_op_status_t rrc_rlc_data_req (module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, mem_block_t*);
|
||||
//void rrc_rlc_register_rrc ( void(*rrc_data_indP) (module_id_t , rb_id_t , sdu_size_t , mem_block_t*),void(*rrc_data_conf) (module_id_t , rb_id_t , mui_t) );
|
||||
void (*mrbch_phy_sync_failure) (u8 Mod_id, u32 frame, u8 Free_ch_index);
|
||||
void (*dl_phy_sync_success) (u8 Mod_id, u32 frame, u8 eNB_index);
|
||||
}MAC_RLC_XFACE;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define IDLE 0
|
||||
#define NEED_RADIO_CONFIG 3
|
||||
#define RADIO_CONFIG_TX 2
|
||||
#define RADIO_CONFIG_OK 1
|
||||
|
||||
#define MEAS_CONFIGURED 4
|
||||
#define MEAS_OK 5
|
||||
#define MEAS_TRIGGER 6
|
||||
#define RRC_MEAS_REPORT_REQ 7
|
||||
#define MEAS_REPORT 8
|
||||
|
||||
#define RAB_MEAS_IND 0
|
||||
#define DEF_MEAS_IND 1
|
||||
|
||||
#define ADD_LC 0
|
||||
#define REMOVE_LC 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
#ifndef __openair_DEFS_H__
|
||||
#define __openair_DEFS_H__
|
||||
|
||||
#ifndef USER_MODE
|
||||
#include <linux/kernel.h>
|
||||
#endif //USER_MODE
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define msg printf
|
||||
#define malloc16(x) memalign(16,x) //malloc(x)
|
||||
#define free16(y,x) free(y)
|
||||
#define bigmalloc malloc
|
||||
#define bigmalloc16 malloc16
|
||||
#define openair_free(y,x) free((y))
|
||||
#define PAGE_SIZE 4096
|
||||
|
||||
#define PAGE_MASK 0xfffff000
|
||||
#define virt_to_phys(x) (x)
|
||||
|
||||
#else // USER_MODE
|
||||
#include <rtai.h>
|
||||
#define msg rt_printk
|
||||
|
||||
#ifdef BIGPHYSAREA
|
||||
|
||||
#define bigmalloc(x) (bigphys_malloc(x))
|
||||
#define bigmalloc16(x) (bigphys_malloc(x))
|
||||
|
||||
#define malloc16(x) (bigphys_malloc(x))
|
||||
#define free16(y,x)
|
||||
|
||||
#define bigfree(y,x)
|
||||
|
||||
#else // BIGPHYSAREA
|
||||
|
||||
#define bigmalloc(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0))
|
||||
#define bigmalloc16(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0))
|
||||
#define bigfree(y,x) (dma_free_coherent(pdev[0],(x),(void *)(y),dummy_dma_ptr))
|
||||
#define malloc16(x) (kmalloc(x,GFP_KERNEL))
|
||||
#define free16(y,x) (kfree(y))
|
||||
|
||||
#endif // BIGPHYSAREA
|
||||
|
||||
|
||||
#ifdef CBMIMO1
|
||||
#define openair_get_mbox() (*(unsigned int *)mbox)
|
||||
#else //CBMIMO1
|
||||
#define openair_get_mbox() (*(unsigned int *)PHY_vars->mbox>>1)
|
||||
#endif //CBMIMO1
|
||||
|
||||
|
||||
#endif // USERMODE
|
||||
|
||||
// #define bzero(s,n) (memset((s),0,(n)))
|
||||
|
||||
#define cmax(a,b) ((a>b) ? (a) : (b))
|
||||
#define cmin(a,b) ((a<b) ? (a) : (b))
|
||||
#endif // /*__openair_DEFS_H__ */
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
#ifndef __openair_TYPES_H__
|
||||
#define __openair_TYPES_H__
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <sys/types.h>
|
||||
typedef unsigned char u8;
|
||||
typedef char s8;
|
||||
typedef unsigned short u16;
|
||||
typedef short s16;
|
||||
typedef unsigned int u32;
|
||||
typedef int s32;
|
||||
typedef unsigned long long u64;
|
||||
typedef long long s64;
|
||||
#else
|
||||
#include <linux/types.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*__openair_TYPES_H__ */
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
platform_constants.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "RRC/LITE/MESSAGES/asn1_constants.h"
|
||||
|
||||
#ifndef __PLATFORM_CONSTANTS_H__
|
||||
# define __PLATFORM_CONSTANTS_H__
|
||||
|
||||
#ifdef USER_MODE
|
||||
#ifdef LARGE_SCALE
|
||||
# define NB_MODULES_MAX 128
|
||||
# define NB_NODE_MAX 128
|
||||
#else
|
||||
# define NB_MODULES_MAX 32
|
||||
# define NB_NODE_MAX 32
|
||||
#endif
|
||||
#else
|
||||
# define NB_MODULES_MAX 1
|
||||
# define NB_NODE_MAX 1
|
||||
#endif //PHY_EMUL
|
||||
|
||||
|
||||
#ifdef JUMBO_FRAME
|
||||
# define MAX_IP_PACKET_SIZE 9000
|
||||
#else
|
||||
# define MAX_IP_PACKET_SIZE 1500
|
||||
#endif
|
||||
// overwrite the previous deinitions
|
||||
|
||||
# define MAX_MODULES NB_MODULES_MAX
|
||||
|
||||
#ifdef LARGE_SCALE
|
||||
# define MAX_MOBILES_PER_RG 128
|
||||
# define MAX_RG 2
|
||||
#else
|
||||
# define MAX_MOBILES_PER_RG 16
|
||||
# define MAX_RG 2
|
||||
#endif
|
||||
|
||||
# define MAX_MANAGED_RG_PER_MOBILE 2
|
||||
|
||||
# define NB_RB_MAX 11
|
||||
# define NB_RAB_MAX 8 // 4
|
||||
# define RAB_SHIFT1 9
|
||||
# define RAB_SHIFT2 3
|
||||
# define RAB_OFFSET 0x0007
|
||||
# define RAB_OFFSET1 0x7E00
|
||||
# define RAB_OFFSET2 0x01F8
|
||||
# define DIR_OFFSET 0x8000
|
||||
# define DIR_SHIFT 15
|
||||
# define CH_OFFSET 0x0004
|
||||
# define CH_SHIFT 2
|
||||
#ifdef MESH
|
||||
|
||||
# define MAX_RB_MOBILE NB_RB_MAX * ( MAX_MANAGED_RG_PER_MOBILE + MAX_MOBILES_PER_RG - 1 )
|
||||
# define MAX_RAB_MOBILE NB_RAB_MAX * ( MAX_MANAGED_RG_PER_MOBILE + MAX_MOBILES_PER_RG - 1 )
|
||||
# define MAX_RB_RG MAX_RB_MOBILE //NB_RB_MAX * MAX_MOBILES_PER_RG
|
||||
# define MAX_RAB_RG (NB_RB_MAX+1) * (MAX_MOBILES_PER_RG + 1)
|
||||
# define MAX_RAB MAX_RAB_RG
|
||||
# define MAX_RB MAX_RB_RG
|
||||
#else
|
||||
|
||||
# define MAX_RB_MOBILE NB_RB_MAX * MAX_MANAGED_RG_PER_MOBILE
|
||||
# define MAX_RAB_MOBILE NB_RAB_MAX * MAX_MANAGED_RG_PER_MOBILE
|
||||
# define MAX_RB_RG NB_RB_MAX * MAX_MOBILES_PER_RG
|
||||
# define MAX_RAB_RG NB_RB_MAX * MAX_MOBILES_PER_RG
|
||||
# //ifdef NODE_RG
|
||||
# define MAX_RAB MAX_RAB_RG
|
||||
# define MAX_RB MAX_RB_RG
|
||||
# //else
|
||||
# // ifdef NODE_MT
|
||||
# // define MAX_RAB MAX_RAB_MOBILE
|
||||
# // define MAX_RB MAX_RB_MOBILE
|
||||
# //else
|
||||
# //error NODE_RG or NODE_MT must be defined
|
||||
# //endif
|
||||
//# endif
|
||||
#endif //MESH
|
||||
|
||||
// RLC_MODE
|
||||
# define RLC_NONE 0
|
||||
# define RLC_MODE_AM 1
|
||||
# define RLC_MODE_TM 2
|
||||
# define RLC_MODE_UM 3
|
||||
|
||||
//E_R
|
||||
# define E_R_RLC_ER_RELEASE 1
|
||||
# define E_R_RLC_ER_MODIFICATION 2
|
||||
# define E_R_RLC_ER_RE_ESTABLISHMENT 4
|
||||
# define E_R_RLC_ER_STOP 8
|
||||
# define E_R_RLC_ER_CONTINUE 16
|
||||
# define E_R_RLC_ER_NONE 0
|
||||
|
||||
// RLC_AM_SEND_MRW
|
||||
# define SEND_MRW_OFF 15
|
||||
# define SEND_MRW_ON 240
|
||||
|
||||
// RLC_SEGMENTATION_INDICATION
|
||||
# define SEGMENTATION_NOT_ALLOWED 0
|
||||
# define SEGMENTATION_ALLOWED 1
|
||||
|
||||
// RLC_DELIVERY_OF_ERRONEOUS_SDU
|
||||
# define DELIVERY_OF_ERRONEOUS_SDU_NO 0
|
||||
# define DELIVERY_OF_ERRONEOUS_SDU_YES 1
|
||||
# define DELIVERY_OF_ERRONEOUS_SDU_NO_DETECT 2
|
||||
|
||||
|
||||
// CBA constant
|
||||
#define NUM_MAX_CBA_GROUP 4
|
||||
|
||||
# ifndef __cplusplus
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
# endif
|
||||
# ifndef null
|
||||
# define null 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#define printk printf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
platform_types.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PLATFORM_TYPES_H__
|
||||
# define __PLATFORM_TYPES_H__
|
||||
|
||||
#ifndef USER_MODE
|
||||
#else
|
||||
#include "openair_types.h"
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8_t;
|
||||
typedef unsigned short int u16_t;
|
||||
typedef unsigned int u32_t;
|
||||
typedef unsigned long int u64_t;
|
||||
|
||||
typedef signed char s8_t;
|
||||
typedef signed short int s16_t;
|
||||
typedef signed int s32_t;
|
||||
typedef signed long int s64_t;
|
||||
|
||||
typedef unsigned int config_action_t;
|
||||
|
||||
typedef unsigned int sdu_size_t;
|
||||
typedef unsigned int tbs_size_t;
|
||||
typedef unsigned int tb_size_t;
|
||||
typedef unsigned int rb_id_t;
|
||||
typedef unsigned int module_id_t;
|
||||
typedef unsigned int mui_t;
|
||||
typedef unsigned int confirm_t;
|
||||
typedef unsigned int rb_type_t;
|
||||
typedef rb_id_t chan_id_t;
|
||||
typedef unsigned int num_tb_t;
|
||||
typedef unsigned int crc_t;
|
||||
typedef unsigned int rlc_tx_status_t;
|
||||
typedef unsigned int rlc_mode_t;
|
||||
|
||||
typedef signed int rlc_op_status_t;
|
||||
|
||||
typedef unsigned char crc8_t;
|
||||
typedef unsigned short crc16_t;
|
||||
typedef unsigned int crc32_t;
|
||||
|
||||
typedef signed char boolean_t;
|
||||
|
||||
|
||||
// just for integration
|
||||
extern unsigned int frame;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
rrm_config_structs.h
|
||||
-------------------
|
||||
AUTHOR : Linus GASSER modified by Lionel GAUTHIER Raymond KNOPP
|
||||
COMPANY : EURECOM
|
||||
EMAIL : linus.gasser@epfl.ch
|
||||
EMAIL : lionel.gauthier@eurecom.fr
|
||||
EMAIL : raymond.knopp@eurecom.fr
|
||||
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
# ifndef __RRM_CONFIG_STRUCTS_H__
|
||||
# define __RRM_CONFIG_STRUCTS_H__
|
||||
|
||||
# include "platform_types.h"
|
||||
# include "platform_constants.h"
|
||||
# include "rrm_constants.h"
|
||||
# include "rlc.h"
|
||||
|
||||
typedef volatile struct {
|
||||
u32 e_r;
|
||||
int timer_poll;
|
||||
int timer_poll_prohibit;
|
||||
int timer_discard;
|
||||
int timer_poll_periodic;
|
||||
int timer_status_prohibit;
|
||||
int timer_status_periodic;
|
||||
int timer_rst;
|
||||
int timer_mrw;
|
||||
int missing_pdu_indicator;
|
||||
u32 pdu_size;
|
||||
// int in_sequence_delivery; // not implemented
|
||||
u8 max_rst;
|
||||
u8 max_dat;
|
||||
u16 poll_pdu;
|
||||
u16 poll_sdu;
|
||||
u8 poll_window;
|
||||
u32 tx_window_size;
|
||||
u32 rx_window_size;
|
||||
u8 max_mrw;
|
||||
u8 last_transmission_pdu_poll_trigger;
|
||||
u8 last_retransmission_pdu_poll_trigger;
|
||||
enum RLC_SDU_DISCARD_MODE sdu_discard_mode;
|
||||
u32 send_mrw;
|
||||
} AM;
|
||||
|
||||
typedef volatile struct {
|
||||
u32 e_r;
|
||||
u32 timer_discard;
|
||||
u32 sdu_discard_mode;
|
||||
u32 segmentation_indication;
|
||||
u32 delivery_of_erroneous_sdu;
|
||||
} TM;
|
||||
|
||||
typedef volatile struct {
|
||||
u32 e_r;
|
||||
u32 timer_discard;
|
||||
u32 sdu_discard_mode;
|
||||
} UM;
|
||||
|
||||
typedef volatile struct {
|
||||
u8 logch_identity;
|
||||
u8 mac_logch_priority;
|
||||
} MAP_INFO;
|
||||
|
||||
typedef volatile struct {
|
||||
u32 rlc_mode;
|
||||
AM am;
|
||||
TM tm;
|
||||
UM um;
|
||||
} RLC_INFO;
|
||||
|
||||
typedef volatile struct {
|
||||
int header_compression_algorithm;
|
||||
} PDCP_INFO;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef volatile struct {
|
||||
rb_type_t rb_type;
|
||||
RLC_INFO rlc_info;
|
||||
PDCP_INFO pdcp_info;
|
||||
u16 rb_id;
|
||||
// Added for OPENAIR MAC
|
||||
//LCHAN_DESC Lchan_desc;
|
||||
|
||||
} RADIOBEARER;
|
||||
|
||||
|
||||
typedef volatile struct {
|
||||
int TIMER300;
|
||||
int TIMER302;
|
||||
int TIMER305;
|
||||
int TIMER307;
|
||||
int TIMER308;
|
||||
int TIMER312;
|
||||
int TIMER313;
|
||||
int TIMER314;
|
||||
int TIMER315;
|
||||
} L3TIMERS_;
|
||||
|
||||
typedef volatile struct {
|
||||
int COUNTERN300;
|
||||
int COUNTERN302;
|
||||
int COUNTERN308;
|
||||
int COUNTERN312;
|
||||
int COUNTERN313;
|
||||
} L3COUNTERS_;
|
||||
|
||||
|
||||
typedef volatile struct {
|
||||
int MaxNumRemote;
|
||||
L3TIMERS_ Timers;
|
||||
L3COUNTERS_ Counters;
|
||||
} L3_;
|
||||
|
||||
|
||||
typedef volatile struct {
|
||||
u8 rrm_action; // ACTION_NULL,ADD,REMOVE,MODIFY
|
||||
u8 rrm_element; // rb,trch,cctrch
|
||||
u8 rrm_element_index; // rb/trch/cctrch index
|
||||
} RRM_COMMAND_MT;
|
||||
|
||||
typedef volatile struct {
|
||||
u8 rrm_action; // ACTION_NULL,ADD,REMOVE,MODIFY
|
||||
u8 mobile;
|
||||
u8 rrm_element; // rb,trch,cctrch
|
||||
u8 rrm_element_index; // rb/trch/cctrch index
|
||||
} RRM_COMMAND_RG;
|
||||
|
||||
|
||||
typedef volatile struct {
|
||||
u8 nb_commands;
|
||||
RRM_COMMAND_RG rrm_commands[JRRM_MAX_COMMANDS_PER_TRANSACTION];
|
||||
|
||||
|
||||
RADIOBEARER bearer[MAX_RB_RG];
|
||||
L3_ L3;
|
||||
|
||||
} RG_CONFIG;
|
||||
|
||||
typedef volatile struct {
|
||||
u8 nb_commands;
|
||||
RRM_COMMAND_MT rrm_commands[JRRM_MAX_COMMANDS_PER_TRANSACTION];
|
||||
|
||||
RADIOBEARER bearer[MAX_RB_MOBILE];
|
||||
L3_ L3;
|
||||
|
||||
} MT_CONFIG;
|
||||
|
||||
# ifdef NODE_RG
|
||||
typedef volatile struct {
|
||||
RG_CONFIG rg_config;
|
||||
MT_CONFIG mt_config[MAX_MOBILES_PER_RG];
|
||||
} RRM_VARS;
|
||||
|
||||
# else
|
||||
/* NODE_RG */
|
||||
typedef volatile struct {
|
||||
MT_CONFIG mt_config[MAX_MANAGED_RG_PER_MOBILE];
|
||||
|
||||
|
||||
|
||||
} RRM_VARS;
|
||||
# endif
|
||||
/* NODE_RG */
|
||||
//typedef MT_CONFIG MAIN_MOBILE ;
|
||||
//typedef RG_CONFIG MAIN_RADIO_GATEWAY;
|
||||
|
||||
# endif
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
rrm_constants.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
# ifndef __RRM_CONSTANTS_H__
|
||||
# define __RRM_CONSTANTS_H__
|
||||
# include "platform_constants.h"
|
||||
|
||||
/*#################################################
|
||||
CONSTANTS FOR L1/L2/L3 LAYERS
|
||||
#################################################*/
|
||||
# define RRM_CONFIG_VALID 0xFF
|
||||
# define RRM_CONFIG_INVALID 0x00
|
||||
# define RRM_NO_REFERENCE -1
|
||||
# define TRANSACTION_NULL 0
|
||||
|
||||
// RRM action
|
||||
# define ACTION_NULL 0
|
||||
# define ACTION_ADD 1
|
||||
# define ACTION_REMOVE 2
|
||||
# define ACTION_MODIFY 3
|
||||
# define ACTION_SET_SECURITY_MODE 4
|
||||
# define ACTION_MBMS_ADD 10
|
||||
# define ACTION_MBMS_MODIFY 11
|
||||
|
||||
# define UPLINK 1
|
||||
# define DOWNLINK 2
|
||||
|
||||
# define SIGNALLING_RADIO_BEARER 1
|
||||
# define RADIO_ACCESS_BEARER 2
|
||||
# define MOBILE 7
|
||||
|
||||
// equipment type
|
||||
# define MOBILE_TERMINAL 1
|
||||
# define RADIO_GATEWAY 2
|
||||
|
||||
|
||||
# define UNUSED_PARAMETER -1
|
||||
//---------------------------
|
||||
// COMMON TRCH
|
||||
//---------------------------
|
||||
# define PREFERED_RLC_BLOCK_SIZE 336
|
||||
//(43 bytes)
|
||||
|
||||
|
||||
# define JRRM_MAX_TTI 2
|
||||
# define JRRM_MAX_COMMANDS_PER_TRANSACTION 50
|
||||
|
||||
# endif
|
||||
@@ -0,0 +1,43 @@
|
||||
#ifndef _RTOS_HEADER_H_
|
||||
# define _RTOS_HEADER_H_
|
||||
# if defined(RTAI) && !defined(USER_MODE)
|
||||
// CONVERSION BETWEEN POSIX PTHREAD AND RTAI FUNCTIONS
|
||||
/*
|
||||
# define pthread_mutex_init pthread_mutex_init_rt
|
||||
# define pthread_mutexattr_init pthread_mutexattr_init_rt
|
||||
# define pthread_mutex_lock pthread_mutex_lock_rt
|
||||
# define pthread_mutex_unlock pthread_mutex_unlock_rt
|
||||
# define pthread_mutex_destroy pthread_mutex_destroy_rt
|
||||
# define pthread_cond_init pthread_cond_init_rt
|
||||
# define pthread_cond_wait pthread_cond_wait_rt
|
||||
# define pthread_cond_signal pthread_cond_signal_rt
|
||||
# define pthread_cond_destroy pthread_cond_destroy_rt
|
||||
# define pthread_attr_init pthread_attr_init_rt
|
||||
# define pthread_attr_setschedparam pthread_attr_setschedparam_rt
|
||||
# define pthread_create pthread_create_rt
|
||||
# define pthread_cancel pthread_cancel_rt
|
||||
# define pthread_delete_np pthread_cancel_rt
|
||||
# define pthread_attr_setstacksize pthread_attr_setstacksize_rt
|
||||
# define pthread_self rt_whoami
|
||||
*/
|
||||
# include <asm/rtai.h>
|
||||
# include <rtai.h>
|
||||
# include <rtai_posix.h>
|
||||
# include <rtai_fifos.h>
|
||||
# include <rtai_sched.h>
|
||||
# ifdef CONFIG_PROC_FS
|
||||
# include <rtai_proc_fs.h>
|
||||
# endif
|
||||
# else
|
||||
# ifdef USER_MODE
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <math.h>
|
||||
# include <pthread.h>
|
||||
# include <assert.h>
|
||||
# define rtf_get read
|
||||
# define rtf_put write
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@@ -0,0 +1,220 @@
|
||||
# Doxyfile 1.3.8
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = OPENAIR2
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
MULTILINE_CPP_IS_BRIEF = YES
|
||||
DETAILS_AT_TOP = YES
|
||||
INHERIT_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= NO
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = $(OPENAIR2_DIR)/LAYER2/MAC/defs.h \
|
||||
$(OPENAIR2_DIR)/COMMON/mac_rrc_primitives.h \
|
||||
$(OPENAIR2_DIR)/COMMON/mac_rlc_primitives.h \
|
||||
$(OPENAIR2_DIR)/LAYER2/MAC/lchan_interface.h \
|
||||
$(OPENAIR2_DIR)/PHY_INTERFACE/defs.h \
|
||||
$(OPENAIR2_DIR)/NAS/DRIVER/MESH/proto_extern.h \
|
||||
|
||||
|
||||
FILE_PATTERNS = *.h
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH = images
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = YES
|
||||
CHM_FILE = irs_openair.chm
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES = amsmath amssymb
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = YES
|
||||
RTF_HYPERLINKS = YES
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = __attribute__(x)=
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = NO
|
||||
COLLABORATION_GRAPH = NO
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = NO
|
||||
DOT_IMAGE_FORMAT = jpg
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS = ../docs/dotfiles
|
||||
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
@@ -0,0 +1,568 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Pages: (atend)
|
||||
%%BoundingBox: 32 0 559 609
|
||||
%%HiResBoundingBox: 32.385937 0.800000 558.200000 608.900000
|
||||
%.......................................
|
||||
%%Creator: GPL Ghostscript 850 (pswrite)
|
||||
%%CreationDate: 2006/04/24 11:54:23
|
||||
%%DocumentData: Clean7Bit
|
||||
%%LanguageLevel: 2
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
% This copyright applies to everything between here and the %%EndProlog:
|
||||
% Copyright (C) 2005 artofcode LLC, Benicia, CA. All rights reserved.
|
||||
%%BeginResource: procset GS_pswrite_2_0_1001
|
||||
/GS_pswrite_2_0_1001 80 dict dup begin
|
||||
/PageSize 2 array def/setpagesize{ PageSize aload pop 3 index eq exch
|
||||
4 index eq and{ pop pop pop}{ PageSize dup 1
|
||||
5 -1 roll put 0 4 -1 roll put dup null eq {false} {dup where} ifelse{ exch get exec}
|
||||
{ pop/setpagedevice where
|
||||
{ pop 1 dict dup /PageSize PageSize put setpagedevice}
|
||||
{ /setpage where{ pop PageSize aload pop pageparams 3 {exch pop} repeat
|
||||
setpage}if}ifelse}ifelse}ifelse} bind def
|
||||
/!{bind def}bind def/#{load def}!/N/counttomark #
|
||||
/rG{3{3 -1 roll 255 div}repeat setrgbcolor}!/G{255 div setgray}!/K{0 G}!
|
||||
/r6{dup 3 -1 roll rG}!/r5{dup 3 1 roll rG}!/r3{dup rG}!
|
||||
/w/setlinewidth #/J/setlinecap #
|
||||
/j/setlinejoin #/M/setmiterlimit #/d/setdash #/i/setflat #
|
||||
/m/moveto #/l/lineto #/c/rcurveto #
|
||||
/p{N 2 idiv{N -2 roll rlineto}repeat}!
|
||||
/P{N 0 gt{N -2 roll moveto p}if}!
|
||||
/h{p closepath}!/H{P closepath}!
|
||||
/lx{0 rlineto}!/ly{0 exch rlineto}!/v{0 0 6 2 roll c}!/y{2 copy c}!
|
||||
/re{4 -2 roll m exch dup lx exch ly neg lx h}!
|
||||
/^{3 index neg 3 index neg}!
|
||||
/f{P fill}!/f*{P eofill}!/s{H stroke}!/S{P stroke}!
|
||||
/q/gsave #/Q/grestore #/rf{re fill}!
|
||||
/Y{P clip newpath}!/Y*{P eoclip newpath}!/rY{re Y}!
|
||||
/|={pop exch 4 1 roll 1 array astore cvx 3 array astore cvx exch 1 index def exec}!
|
||||
/|{exch string readstring |=}!
|
||||
/+{dup type/nametype eq{2 index 7 add -3 bitshift 2 index mul}if}!
|
||||
/@/currentfile #/${+ @ |}!
|
||||
/B{{2 copy string{readstring pop}aload pop 4 array astore cvx
|
||||
3 1 roll}repeat pop pop true}!
|
||||
/Ix{[1 0 0 1 11 -2 roll exch neg exch neg]exch}!
|
||||
/,{true exch Ix imagemask}!/If{false exch Ix imagemask}!/I{exch Ix image}!
|
||||
/Ic{exch Ix false 3 colorimage}!
|
||||
/F{/Columns counttomark 3 add -2 roll/Rows exch/K -1/BlackIs1 true>>
|
||||
/CCITTFaxDecode filter}!/FX{<</EndOfBlock false F}!
|
||||
/X{/ASCII85Decode filter}!/@X{@ X}!/&2{2 index 2 index}!
|
||||
/@F{@ &2<<F}!/@C{@X &2 FX}!
|
||||
/$X{+ @X |}!/&4{4 index 4 index}!/$F{+ @ &4<<F |}!/$C{+ @X &4 FX |}!
|
||||
/IC{3 1 roll 10 dict begin 1{/ImageType/Interpolate/Decode/DataSource
|
||||
/ImageMatrix/BitsPerComponent/Height/Width}{exch def}forall
|
||||
currentdict end image}!
|
||||
/~{@ read {pop} if}!
|
||||
end readonly def
|
||||
%%EndResource
|
||||
/pagesave null def
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
%%BeginPageSetup
|
||||
GS_pswrite_2_0_1001 begin
|
||||
595 842 /a4 setpagesize
|
||||
/pagesave save store 197 dict begin
|
||||
0.1 0.1 scale
|
||||
%%EndPageSetup
|
||||
gsave mark
|
||||
Q q
|
||||
321.859 6 5262.14 6082.19 re
|
||||
Y
|
||||
4 w
|
||||
1 j
|
||||
K
|
||||
325.859 3430 2074.14 640 re
|
||||
S
|
||||
1016 3853 60 72 /1D
|
||||
$C
|
||||
+@.;U&Hj't(4j=H<#d$5F:`=&%F@htDNf13V=s.:/$%t$pSIan^K:=op&G'ls53/ZrV^YagL#*:
|
||||
p=6SEe[9=4=CDja)aQOp/24q9)%/jkLfc@$JHTo~>
|
||||
,
|
||||
1080 3855 55 70 /4D
|
||||
$C
|
||||
3!p,tJ+A,D3*9iJ^]4?6s8W-!s8W-!s8W-!rVulqed.>?DtdPFlnl4\KY%f*0O0,-s8W-!s7Me8
|
||||
K)[&0~>
|
||||
,
|
||||
1135 3854 51 46 /1H
|
||||
$C
|
||||
22H?7$l;4H,%Cm>#TJr>+Ibs:hpQ?gl&SpGs*t('rser#qgH39$pGLl)%2i:)<ARYM3%Huo_O(;
|
||||
df-jM@&hp]d]h0(@0I'+K*;~>
|
||||
,
|
||||
1185 3855 55 44 /4H
|
||||
$C
|
||||
3!p,tJ+A,D3(R^?s8W-!s8W-!s8W-!s8W,ts8N&VM"Pt!I9T<U'o,Ud)I,$V>VQRaUSR~>
|
||||
,
|
||||
1241 3855 4H ,
|
||||
1296 3854 44 46 /1L
|
||||
$C
|
||||
+U!pYLdZ\3+G#;6#3e'<\kUW<hO_0B^)H=hs8GAjf9'$\s8/k#n*[?el`Ib,Q*d6lX;FPHKcn<a~>
|
||||
,
|
||||
1340 3855 27 70 /4L
|
||||
$C
|
||||
3">eY,W5W%s8W-!s8W-!s8W-!s8W-!s8W-!XNWdCq&#b~>
|
||||
,
|
||||
1409 3853 1D ,
|
||||
1473 3854 49 46 /1P
|
||||
$C
|
||||
+MpDHKM#[i#VbHbh'VAF8\3_)l[!m7l["'[\,ZL.rq6<jg0_OBg0_:RlIo:e[ZiJ_$GhChLf+dT~>
|
||||
,
|
||||
1526 3854 55 71 /4P
|
||||
$C
|
||||
+N-)V&31.;KL`lB+E%N.gkj-3<1']"\kcDZ?hO*lp&G'ls8VQfJ+*BoqtAUpg[1bs[MQB(iI_GU
|
||||
`%DHN5QCc`s8W,uZ7$b%r.:j~>
|
||||
,
|
||||
1581 3855 27 67 /1T
|
||||
$C
|
||||
3">eY,W5W%s8W-!s8W-!s8VC@%h&;o;?-2Qe#-"Am96m~>
|
||||
,
|
||||
1609 3855 4H ,
|
||||
1664 3834 50 66 /4T
|
||||
$C
|
||||
-,[tnZ4Rf/i=`4O5m%UKDNf13Uu-K"huE^\InJU7/[1Hnb&HjjWX>%!L`"]6::7;*\aaneG/>QA
|
||||
iXg$%3_e/tFhL$*J,fQKhS3oU>tk-;K5Ge\fO5DCnAHXmK*3$iL7e~>
|
||||
,
|
||||
1281 3734 1H ,
|
||||
1330 3735 4H ,
|
||||
1386 3734 4P ,
|
||||
1018 3616 67 68 /1X
|
||||
$C
|
||||
4:7J\5iL">8T=BUG76YSmJHA,s)7o2s8W,Is/s)IqWW+5$\T<%/4.E8%$=!]iIg*E_gT8:pYXkH
|
||||
rVccrs8UOIY.ZJo/sSb&_?tN*0NeV-!!~>
|
||||
,
|
||||
1089 3616 1T ,
|
||||
1117 3615 35 62 /4X
|
||||
$C
|
||||
--$-/'#t:_o\D.%s'8k/s8W,s5QCc`s8W-!k/0-q_2spFmsFs3J,fN;~>
|
||||
,
|
||||
1155 3635 29 6 /2B
|
||||
$C
|
||||
0H"6m~>
|
||||
,
|
||||
1188 3616 35 68 /5B
|
||||
$C
|
||||
3"6or"LW%Fs8W-!s8W-!s8W-!s8W-!s8W-!e#,/7*W~>
|
||||
,
|
||||
1224 3616 4H ,
|
||||
1277 3615 4X ,
|
||||
1316 3615 1L ,
|
||||
1360 3616 38 44 /2F
|
||||
$C
|
||||
3!K>H"LYH5s8W-!s8W,frVfQ:7"%:t\#ni2[tS7ufJ;oM.T<(%~>
|
||||
,
|
||||
1399 3616 4L ,
|
||||
1427 3615 1L ,
|
||||
1471 3615 1H ,
|
||||
1518 3615 53 44 /5F
|
||||
$C
|
||||
.5+KGqlcY\Hi:N_H<9sPYIuIb>M%_sriPMT9)hrbpSEA?H<T496%f_a2?XQg~>
|
||||
,
|
||||
1571 3616 1T ,
|
||||
1598 3616 4H ,
|
||||
1654 3595 4T ,
|
||||
1920 1510 2074.14 640 re
|
||||
S
|
||||
2716 1881 90 68 /2J
|
||||
$C
|
||||
4:2S/e2)7EaoN3/%h't'(gC9m=7uOk#`nq6mJal&s*pmFDtX'YmJS^:rh&NVDtX'Io`&:qJ$82<
|
||||
Ds;c+rI82OInTfkVu$GJrI82Hhq.kblh^Y9qHrsr?e>;7lh^XYrkJ1,?UO7_>juEgfPA0.~>
|
||||
,
|
||||
2808 1880 1P ,
|
||||
2860 1880 4P ,
|
||||
2915 1880 55 45 /5J
|
||||
$C
|
||||
+TsVAN!r6;W[%$&Jdq>kOYJ3JXk(7lfC/b6s8W-!s8W-!s8W-!s8W,&en,oe#mC_:aM^t)~>
|
||||
,
|
||||
2971 1881 4L ,
|
||||
2998 1880 1H ,
|
||||
3048 1880 4X ,
|
||||
3087 1881 1T ,
|
||||
3115 1880 1P ,
|
||||
3164 1881 4H ,
|
||||
2888 1760 1H ,
|
||||
2938 1761 4H ,
|
||||
2993 1760 4P ,
|
||||
2743 1642 70 67 /2N
|
||||
$C
|
||||
,6M0G!t7O(fDkmNs8W-!s8W-!s8W,^]J'<brTa?2s8VE"s1NpN?0d9"Y\A\kO8&~>
|
||||
,
|
||||
2807 1642 2F ,
|
||||
2846 1641 1H ,
|
||||
2896 1642 4H ,
|
||||
2951 1641 38 46 /5N
|
||||
$C
|
||||
3Ko-K5kYdMLTl=3Gc(,iS(6d'X8fA1erkhk=U#BoJIkpU&6,SX"[k(MKe@pb')n6os80"eYO/HH
|
||||
(;gEFpgOo]69G~>
|
||||
,
|
||||
2990 1642 38 70 /2R
|
||||
$C
|
||||
3!K>H"bsGbs8W-!s8W-!s8W,si+7B]QiI*cs6nj0+&:O=hYV.oHOca,K*;~>
|
||||
,
|
||||
3021 1641 1P ,
|
||||
3071 1642 2F ,
|
||||
3110 1642 83 44 /5R
|
||||
$C
|
||||
3!p,tF26]5aoW:9$?2*RBncTes8W-!s8W-!s8W-!s8W-!s8W-!GQ7]Ts58_*&K\+>C[Z2BBfAsE
|
||||
X?Eq`X>H;YE6-fWaZAC:6&8F0&E9jC~>
|
||||
,
|
||||
1915 860 330 320 re
|
||||
S
|
||||
2425 860 330 320 re
|
||||
S
|
||||
2895 860 330 320 re
|
||||
S
|
||||
3685 860 330 320 re
|
||||
S
|
||||
2080 1490 0 -300 S
|
||||
2080 1190 23.33 70 -46.66 0 f*
|
||||
2080 1190 23.33 70 -46.66 0 H
|
||||
S
|
||||
3060 1490 0 -300 S
|
||||
3060 1190 23.33 70 -46.66 0 f*
|
||||
3060 1190 23.33 70 -46.66 0 H
|
||||
S
|
||||
2080 1490 0 -300 S
|
||||
2080 1190 23.33 70 -46.66 0 f*
|
||||
2080 1190 23.33 70 -46.66 0 H
|
||||
S
|
||||
2590 1490 0 -300 S
|
||||
2590 1190 23.33 70 -46.66 0 f*
|
||||
2590 1190 23.33 70 -46.66 0 H
|
||||
S
|
||||
3060 1490 0 -300 S
|
||||
3060 1190 23.33 70 -46.66 0 f*
|
||||
3060 1190 23.33 70 -46.66 0 H
|
||||
S
|
||||
3850 1490 0 -300 S
|
||||
3850 1190 23.33 70 -46.66 0 f*
|
||||
3850 1190 23.33 70 -46.66 0 H
|
||||
S
|
||||
2010 998 1L ,
|
||||
2054 999 53 43 /2V
|
||||
$C
|
||||
0E`!j8,;Z5OSfPAU$D;n[[$.3<mnSIXefkbCV%)X.f,u6T'20i0!4BL:"$UK<qP2uV00AeT[5]L
|
||||
fSD6]p]~>
|
||||
,
|
||||
2107 998 4X ,
|
||||
2520 998 1L ,
|
||||
2564 999 2V ,
|
||||
2617 998 4X ,
|
||||
2990 998 1L ,
|
||||
3034 999 2V ,
|
||||
3087 998 4X ,
|
||||
3780 998 1L ,
|
||||
3824 999 2V ,
|
||||
3877 998 4X ,
|
||||
3505.86 3460 2074.14 640 re
|
||||
S
|
||||
4196 3873 1D ,
|
||||
4260 3875 4D ,
|
||||
4315 3874 1H ,
|
||||
4365 3875 4H ,
|
||||
4421 3875 4H ,
|
||||
4476 3874 1L ,
|
||||
4520 3875 4L ,
|
||||
4589 3873 1D ,
|
||||
4653 3874 1P ,
|
||||
4706 3874 4P ,
|
||||
4761 3875 1T ,
|
||||
4789 3875 4H ,
|
||||
4844 3854 4T ,
|
||||
4461 3754 1H ,
|
||||
4510 3755 4H ,
|
||||
4566 3754 4P ,
|
||||
4198 3636 1X ,
|
||||
4269 3636 1T ,
|
||||
4297 3635 4X ,
|
||||
4335 3655 2B ,
|
||||
4368 3636 5B ,
|
||||
4404 3636 4H ,
|
||||
4457 3635 4X ,
|
||||
4496 3635 1L ,
|
||||
4540 3636 2F ,
|
||||
4579 3636 4L ,
|
||||
4607 3635 1L ,
|
||||
4651 3635 1H ,
|
||||
4698 3635 5F ,
|
||||
4751 3636 1T ,
|
||||
4778 3636 4H ,
|
||||
4834 3615 4T ,
|
||||
1043 6006 2J ,
|
||||
1134 6006 73 71 /5V
|
||||
$C
|
||||
3"<sEbPsC(-3Fff"r4#;GOCglh(S6.?eo";DS#i'A+m52n%El$HL&<<[JfE,qpsBLrN5Cgqq#-J
|
||||
Y.O..GM]V%?eYM2p:L~>
|
||||
,
|
||||
1214 6004 1D ,
|
||||
1311 6006 64 68 /2Z
|
||||
$C
|
||||
3"6tTJ<grMs8W-!s8W-!r^!5?L6dpH&7aY9iP+2f\*pg+IK/d9s8T:qp&:;\QV4/OPqYL!!koF9
|
||||
[5\~>
|
||||
,
|
||||
1379 6006 72 68 /5Z
|
||||
$C
|
||||
3#c!(@drPGjZ$I4+I<Q2*t@r@ID4V9ID>[Jn,:$$hu!H2s8W-!s8QHls'Pf/^\-419DpK0Y.ZHS
|
||||
#VMB..U[ju##$S&d]`~>
|
||||
,
|
||||
1455 6004 73 70 /3D
|
||||
$C
|
||||
,(Ukf_$:7!QuiTQKFhS?DNJb"dVi2fks)aTqR?EQX+10Ls8W-!s8W-!s8W-!s8W-!s8W-!s8W-!
|
||||
:\;L6QpK""6.?TuJ,~>
|
||||
,
|
||||
1563 6004 48 68 /6D
|
||||
$C
|
||||
+U*H@JANVK_?`(d#3e'<]%n_+e\BPHotUP"]g)PnhuE`Vs8W-!s8VuJs8W)k[JfFk[[6Ge>Lg*_
|
||||
V/7_s6O!fE@MBY-~>
|
||||
,
|
||||
4147 6020 2J ,
|
||||
4238 6020 5V ,
|
||||
4318 6018 1D ,
|
||||
4415 6020 2Z ,
|
||||
4483 6020 5Z ,
|
||||
4559 6018 3D ,
|
||||
4673 6020 84 68 /3J
|
||||
$C
|
||||
-D7#krI6pM3+6dShtM9n>Me!2#`me[J(">j9)&>!YC?23s.nKNFnPaideEaTXl&i=s.nKNFnPai
|
||||
deE\nmG>O[s.nKNBn-(?FnbhfmG>O[qo)jiU_#Pb1_jEU=5X~>
|
||||
,
|
||||
4787 6043 64 4 /6L
|
||||
$C
|
||||
2?e3rTE~>
|
||||
,
|
||||
4888 6020 36 66 /3P
|
||||
$C
|
||||
0F`Iu"GRYps8W-!s8W-!s8W-!s8W-!s8W#5GmaIj5^<b`*Zk'+~>
|
||||
,
|
||||
325.859 4393.18 2074.14 640 re
|
||||
S
|
||||
988 4746 1D ,
|
||||
1052 4746 75 70 /6P
|
||||
$C
|
||||
-:5l%4Q&%!7E<hpV":6'[qRJCs)7jb^Baf=rI=kIrI=coHL'#DFLhj3=G"H3Q&!2.iP$.W^O<iR
|
||||
^O?.Ns8W-!?%%4!l_W%g.YJNmW*-o9_.5EX^]~>
|
||||
,
|
||||
1130 4746 1D ,
|
||||
1227 4748 5V ,
|
||||
1299 4747 4X ,
|
||||
1338 4747 4X ,
|
||||
1377 4747 1H ,
|
||||
1427 4747 43 46 /3T
|
||||
$C
|
||||
+U!B,#`IZg+N&kbFIT)uY>*R3?`VbOs&K+!s7cC7%dEWcDuIE=Cc1)':teqg<Z!+e+[L^1~>
|
||||
,
|
||||
1468 4748 4D ,
|
||||
1523 4748 5R ,
|
||||
1606 4747 1L ,
|
||||
1651 4748 4H ,
|
||||
1703 4747 4X ,
|
||||
1017 4603 27 100 /6U
|
||||
$C
|
||||
$DAqKWG8f>=&c6#lFrU]r@_N]?a!i:qQKr!s8W-!^Yf(Kn)*R5g]$*En%8#]pNq)P]6<SZD?~>
|
||||
,
|
||||
1048 4626 48 68 /3Y
|
||||
$C
|
||||
+Mp`i@M!L7P7E-G%M1q;6+RB92cnPXIs(D_p&Fnjp!U:\$ZrM)[M$$6Ya)ShL(^p-L*9`nTdmnh
|
||||
LbB7"D[D1j]I)hidrZ>hp$'/>fDGU4>P_CtV/7^k-"3WX_$(66OFf^~>
|
||||
,
|
||||
1106 4609 14 30 /6Y
|
||||
$X
|
||||
$igb;#64jV!Pe]N!8mib!,qol!&srq!#P\Q!"8i9!"8i9!"9+V&,[OI+8d5Y+8?rQ+8?rI&)[].~>
|
||||
,
|
||||
1133 4628 3P ,
|
||||
1175 4626 48 68 /4C
|
||||
$C
|
||||
+U!B%#WP4Y%Y=oL2bC\A9'Z8a\$!KWs7a+ts8T:rQiI(irH6q(M#(Dgp6TVH[[1EU(CWXhK&^eL
|
||||
IG`hH4f<Dhs0pbNp=cqc@AOF0@)46G$4J<~>
|
||||
,
|
||||
1233 4609 6Y ,
|
||||
1253 4628 47 66 /7C
|
||||
$C
|
||||
4rV1[^$g;/8%5t^mCg6iYkIe,[r6HWgT^)"\%?hNmbbLcIc'k@h@P17s8@@J97m+H?.IP@>=ue*
|
||||
g/,V;<Zsg6"pt~>
|
||||
,
|
||||
1302 4628 49 67 /4G
|
||||
$C
|
||||
+N#kR&9qtts8W,E!iO88N:$YShqr@e^>FEg^Ae"XrV$-cn([Tohf$9Dhg^'grqlEeGJCiin*^~>
|
||||
,
|
||||
1360 4609 6Y ,
|
||||
1380 4626 47 68 /7G
|
||||
$C
|
||||
-,NAa`$""NAfUp]3XNA(\kUV!=,,QR:A=MWrmoZO5@1qtV<LfUWBpq]"6rI7#2t>UG4#0VIRn=m
|
||||
&,e`mrk$_ofIG]]9#F9=8f076L*9)AO8~>
|
||||
,
|
||||
1430 4628 7C ,
|
||||
1488 4603 23 100 /4K
|
||||
$C
|
||||
-GJm%[r6HWg\1Aig\1T\Du5%Ps*juts6m`&s8W)!s8Q+!?Fp-&oXuoXlBQKbd\TT9WD]Rk~>
|
||||
,
|
||||
1552 4627 54 71 /7K
|
||||
$C
|
||||
.0PeVJaeNk4eRFS5mAE&]qjL6^>>@RYIFO]n,In;s8W%IrI'1I?.V_b]"o!>]4`h7$#m_6(CWXh
|
||||
K&cn2s8W-!s/c!??fa>!~>
|
||||
,
|
||||
1607 4628 1T ,
|
||||
1635 4627 4X ,
|
||||
1673 4627 5N ,
|
||||
3505.86 4400 2074.14 640 re
|
||||
S
|
||||
4168 4756 1D ,
|
||||
4232 4756 6P ,
|
||||
4310 4756 1D ,
|
||||
4407 4758 5V ,
|
||||
4479 4757 4X ,
|
||||
4518 4757 4X ,
|
||||
4557 4757 1H ,
|
||||
4607 4757 3T ,
|
||||
4648 4758 4D ,
|
||||
4703 4758 5R ,
|
||||
4786 4757 1L ,
|
||||
4831 4758 4H ,
|
||||
4883 4757 4X ,
|
||||
4197 4613 6U ,
|
||||
4228 4636 3Y ,
|
||||
4286 4619 6Y ,
|
||||
4313 4638 3P ,
|
||||
4355 4636 4C ,
|
||||
4413 4619 6Y ,
|
||||
4433 4638 7C ,
|
||||
4482 4638 4G ,
|
||||
4540 4619 6Y ,
|
||||
4560 4636 7G ,
|
||||
4610 4638 7C ,
|
||||
4668 4613 4K ,
|
||||
4732 4637 7K ,
|
||||
4787 4638 1T ,
|
||||
4815 4637 4X ,
|
||||
4853 4637 5N ,
|
||||
1350 3430 0 -920 970 0 0 -340 S
|
||||
2320 2170 23.33 70 -46.66 0 f*
|
||||
2320 2170 23.33 70 -46.66 0 H
|
||||
S
|
||||
4550 3470 0 -980 -1060 0 0 -330 S
|
||||
3490 2160 23.33 70 -46.66 0 f*
|
||||
3490 2160 23.33 70 -46.66 0 H
|
||||
S
|
||||
1360 4380 0 -290 S
|
||||
1360 4090 23.33 70 -46.66 0 f*
|
||||
1360 4090 23.33 70 -46.66 0 H
|
||||
S
|
||||
4570 4410 0 -290 S
|
||||
4570 4120 23.33 70 -46.66 0 f*
|
||||
4570 4120 23.33 70 -46.66 0 H
|
||||
S
|
||||
[ 10 30 ] 0 d
|
||||
20 w
|
||||
2530 4140 710 0 S
|
||||
4 w
|
||||
2640 2470 0 -300 S
|
||||
2640 2170 23.33 70 -46.66 0 f*
|
||||
[ ] 0 d
|
||||
2640 2170 23.33 70 -46.66 0 H
|
||||
S
|
||||
[ 10 30 ] 0 d
|
||||
2960 2470 0 -300 S
|
||||
2960 2170 23.33 70 -46.66 0 f*
|
||||
[ ] 0 d
|
||||
2960 2170 23.33 70 -46.66 0 H
|
||||
S
|
||||
325.859 5235.6 2074.14 434.008 re
|
||||
S
|
||||
1360 5226.66 0 -196.66 S
|
||||
1360 5030 23.33 70 -46.66 0 f*
|
||||
1360 5030 23.33 70 -46.66 0 H
|
||||
S
|
||||
993 5435 2Z ,
|
||||
1061 5435 5Z ,
|
||||
1137 5433 3D ,
|
||||
1253 5433 44 72 /4O
|
||||
$C
|
||||
-Fp3)aT0>t%tmBEHO(0AZjFI.D\/DiVY,7bl+cQYp&F@WdY_A<Tj_>nK*!C(;$<PV,sajs((,k6
|
||||
(l0l>&9AC^Yd?[G;qJ5OFoVDYp&2;s[Hh[HU;u"]Yej1EJkleAiIp].Sc~>
|
||||
,
|
||||
1300 5434 3T ,
|
||||
1344 5435 2F ,
|
||||
1383 5434 1H ,
|
||||
1433 5435 5R ,
|
||||
1513 5434 7K ,
|
||||
1569 5435 4L ,
|
||||
1596 5435 1T ,
|
||||
1624 5435 4H ,
|
||||
1679 5414 4T ,
|
||||
3505.86 5255.6 2074.14 434.02 re
|
||||
S
|
||||
4540 5246.66 0 -196.66 S
|
||||
4540 5050 23.33 70 -46.66 0 f*
|
||||
4540 5050 23.33 70 -46.66 0 H
|
||||
S
|
||||
4173 5455 2Z ,
|
||||
4241 5455 5Z ,
|
||||
4317 5453 3D ,
|
||||
4433 5453 4O ,
|
||||
4480 5454 3T ,
|
||||
4524 5455 2F ,
|
||||
4563 5454 1H ,
|
||||
4613 5455 5R ,
|
||||
4693 5454 7K ,
|
||||
4749 5455 4L ,
|
||||
4776 5455 1T ,
|
||||
4804 5455 4H ,
|
||||
4859 5434 4T ,
|
||||
1360 5980 0 -300 S
|
||||
1360 5680 23.33 70 -46.66 0 f*
|
||||
1360 5680 23.33 70 -46.66 0 H
|
||||
S
|
||||
4540 5990 0 -300 S
|
||||
4540 5690 23.33 70 -46.66 0 f*
|
||||
4540 5690 23.33 70 -46.66 0 H
|
||||
S
|
||||
1922.93 10 2074.14 640 re
|
||||
S
|
||||
2070 856.66 0 -196.66 S
|
||||
2070 660 23.33 70 -46.66 0 f*
|
||||
2070 660 23.33 70 -46.66 0 H
|
||||
S
|
||||
2590 856.66 0 -196.66 S
|
||||
2590 660 23.33 70 -46.66 0 f*
|
||||
2590 660 23.33 70 -46.66 0 H
|
||||
S
|
||||
3050 856.66 0 -196.66 S
|
||||
3050 660 23.33 70 -46.66 0 f*
|
||||
3050 660 23.33 70 -46.66 0 H
|
||||
S
|
||||
3840 856.66 0 -196.66 S
|
||||
3840 660 23.33 70 -46.66 0 f*
|
||||
3840 660 23.33 70 -46.66 0 H
|
||||
S
|
||||
2697 293 4O ,
|
||||
2745 294 1L ,
|
||||
2789 295 2F ,
|
||||
2828 295 1T ,
|
||||
2856 294 1H ,
|
||||
2906 295 4L ,
|
||||
2933 295 1T ,
|
||||
2961 295 42 43 /7O
|
||||
$C
|
||||
3#[8j<ph$]HZ-C.D=.5gpANb5mJ"6$)h-VVhV@b\]>&9nrO:PKn*TMT42JWa~>
|
||||
,
|
||||
3005 294 1H ,
|
||||
3055 294 4X ,
|
||||
3094 295 1T ,
|
||||
3121 294 1P ,
|
||||
3171 295 4H ,
|
||||
20 w
|
||||
4000 325 630 0 S
|
||||
4630 325 -70 23.33 0 -46.66 f*
|
||||
4630 325 -70 23.33 0 -46.66 H
|
||||
S
|
||||
4788 360 2N ,
|
||||
4852 359 1P ,
|
||||
4935 360 5Z ,
|
||||
5011 335 46 100 /4S
|
||||
$C
|
||||
1[4kqmeacTrpT7QhsUMgpAXOTJ%PT-GPf/2rP,uChsUL$h>Zm;IrFcTGPf.apOBgRhfnsGVu~>
|
||||
,
|
||||
5061 360 5V ,
|
||||
cleartomark end end pagesave restore showpage
|
||||
%%PageTrailer
|
||||
%%Trailer
|
||||
%%Pages: 1
|
||||
%%EOF
|
||||
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 3.4 MiB |
|
After Width: | Height: | Size: 625 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,15 @@
|
||||
Entry point openair2/SIMULATION/USER_TOOLS/LAYER2_SIM/mac_sim.c
|
||||
|
||||
1. endless loop calling each frame/TTI
|
||||
|
||||
a) macphy_scheduler (invokes MAC/RRC/PDCP/RLC protocols and generates TX/RX commands for PHY/Emul) :
|
||||
[ see openair2/LAYER2/MAC/layer2_scheduler.c for how these are all scheduled]
|
||||
|
||||
b) emul_rx_tx() (emulates PHY and stimulates PDU transport mechanisms (ethernet or memory transfer)
|
||||
contains abstraction layer, channel simulation, etc.
|
||||
[ openair2/LAYER2/SIMULATION/PHY_EMULATION/CONTROL/phy_emulation.c ]
|
||||
b1) rx local chbch processing (i.e. from CH on the same physical machine)
|
||||
b2) rx local sach ul/dl processing
|
||||
b3) rx ethernet data (both chbch and sach ul/dl)
|
||||
b4) measurement-related stuff
|
||||
]
|
||||
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -0,0 +1,231 @@
|
||||
# Doxyfile 1.5.3
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = OpenAirInterface
|
||||
PROJECT_NUMBER = V1.0
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = example_doxy.h
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH = images/
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH = /usr/bin/dot
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
@@ -0,0 +1,149 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface 2
|
||||
Copyright(c) 1999 - 2010 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
/*! \file doxy_template.h
|
||||
* \brief explain how this block is organized, and how it works
|
||||
* \author Navid Nikaein
|
||||
* \date 2006-2010
|
||||
* \version 4.0
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \note this a note
|
||||
* \bug this is a bug
|
||||
* \warning this is a warning
|
||||
*/
|
||||
|
||||
//-----------------------------------begin group-----------------------------
|
||||
|
||||
|
||||
/** @defgroup _oai System definitions
|
||||
|
||||
|
||||
|
||||
There is different modules:
|
||||
- OAI Address
|
||||
- OAI Components
|
||||
- \ref _frame
|
||||
|
||||
The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram.
|
||||
|
||||
* \dot
|
||||
* digraph group_frame {
|
||||
* node [shape=rect, fontname=Helvetica, fontsize=8,style=filled,fillcolor=lightgrey];
|
||||
* a [ label = " address"];
|
||||
* b [ label = " component"];
|
||||
* c [ label = " frame",URL="\ref _frame"];
|
||||
* a->b;
|
||||
* a->c;
|
||||
* b->d;
|
||||
* label="Architecture"
|
||||
*
|
||||
* }
|
||||
* \enddot
|
||||
|
||||
\section _doxy Doxygen Help
|
||||
You can use the provided Doxyfile as the configuration file or alternatively run "doxygen -g Doxyfile" to generat the file.
|
||||
You need at least to set the some variables in the Doxyfile including "PROJECT_NAME","PROJECT_NUMBER","INPUT","IMAGE_PATH".
|
||||
Doxygen help and commands can be found at http://www.stack.nl/~dimitri/doxygen/commands.html#cmdprotocol
|
||||
|
||||
\section _arch Architecture
|
||||
|
||||
You need to set the IMAGE_PATH in your Doxyfile
|
||||
|
||||
\image html arch.png "Architecture"
|
||||
\image latex arch.eps "Architecture"
|
||||
|
||||
\subsection _mac MAC
|
||||
thisis the mac
|
||||
\subsection _rlc RLC
|
||||
this is the rlc
|
||||
\subsection _impl Implementation
|
||||
what about the implementation
|
||||
|
||||
|
||||
*@{*/
|
||||
|
||||
/*!\brief OAI protocol verion */
|
||||
#define OAI_PROTOCOL_Version 0x00
|
||||
/*!\brief Length in bytes of the OAI address */
|
||||
#define OAI_ADDR_LEN 6
|
||||
|
||||
/*!\brief OAI snode type */
|
||||
enum NodeType {
|
||||
/*!\brief mesh routers are */
|
||||
meshrouter = 1,
|
||||
/*!\brief relay nodes are */
|
||||
relaynode = 2,
|
||||
/*!\brief clusterheads are */
|
||||
clusterhead = 3
|
||||
};
|
||||
|
||||
|
||||
/*@}*/
|
||||
|
||||
// --------------------------end group ------------------------------
|
||||
|
||||
|
||||
//---------------------------begin group------------------------------
|
||||
/** @defgroup _frame Frame Structure
|
||||
* @ingroup _oai
|
||||
The Frame is composed of ....
|
||||
|
||||
|
||||
*@{*/
|
||||
/*! \brief the frame structure is ... */
|
||||
struct frame {
|
||||
u_short duration; /*!< \brief Duration in us (2 bytes) */
|
||||
u_char da[OAI_ADDR_LEN];/*!< \brief Destination MAC@ (OAI_ADDR_LEN bytes) */
|
||||
u_char sa[OAI_ADDR_LEN];/*!< \brief Source MAC@ (OAI_ADDR_LEN bytes)*/
|
||||
u_char body[0]; /*!< \brief Body of the frame */
|
||||
};
|
||||
/*! \brief Broadcast ID is ... */
|
||||
#define BROADCAST_ID 15
|
||||
|
||||
|
||||
/*@}*/
|
||||
|
||||
//--------------------------end group-----------------------
|
||||
|
||||
|
||||
//-----------------------begin func proto-------------------
|
||||
|
||||
/*! \fn int init(int,int)
|
||||
* \brief this function initializes and allocates memories and etc.
|
||||
* \param[in] src the memory area to copy frrm
|
||||
* \param[out] dst the memory area to copy to
|
||||
* \return 0 on success, otherwise -1
|
||||
* \note
|
||||
* @ingroup _oai
|
||||
*/
|
||||
int init(int src, int dst);
|
||||
|
||||
//-----------------------end func proto-------------------
|
||||
@@ -0,0 +1,785 @@
|
||||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: /homes/nikaeinn/templates/dev/arch.dia
|
||||
%%Creator: Dia v0.95
|
||||
%%CreationDate: Fri Dec 11 12:31:01 2009
|
||||
%%For: nikaeinn
|
||||
%%Orientation: Portrait
|
||||
%%Magnification: 1.0000
|
||||
%%BoundingBox: 0 0 355 138
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
%%BeginProlog
|
||||
[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
|
||||
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
|
||||
/two /three /four /five /six /seven /eight /nine /colon /semicolon
|
||||
/less /equal /greater /question /at /A /B /C /D /E
|
||||
/F /G /H /I /J /K /L /M /N /O
|
||||
/P /Q /R /S /T /U /V /W /X /Y
|
||||
/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
|
||||
/d /e /f /g /h /i /j /k /l /m
|
||||
/n /o /p /q /r /s /t /u /v /w
|
||||
/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
||||
/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
|
||||
/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
|
||||
/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
|
||||
/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
|
||||
/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
|
||||
/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
|
||||
/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
|
||||
/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
|
||||
/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
|
||||
/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
|
||||
/cp {closepath} bind def
|
||||
/c {curveto} bind def
|
||||
/f {fill} bind def
|
||||
/a {arc} bind def
|
||||
/ef {eofill} bind def
|
||||
/ex {exch} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth pop} bind def
|
||||
/tr {translate} bind def
|
||||
|
||||
/ellipsedict 8 dict def
|
||||
ellipsedict /mtrx matrix put
|
||||
/ellipse
|
||||
{ ellipsedict begin
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def /savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc
|
||||
0 0 1 startangle endangle arc
|
||||
savematrix setmatrix
|
||||
end
|
||||
} def
|
||||
|
||||
/mergeprocs {
|
||||
dup length
|
||||
3 -1 roll
|
||||
dup
|
||||
length
|
||||
dup
|
||||
5 1 roll
|
||||
3 -1 roll
|
||||
add
|
||||
array cvx
|
||||
dup
|
||||
3 -1 roll
|
||||
0 exch
|
||||
putinterval
|
||||
dup
|
||||
4 2 roll
|
||||
putinterval
|
||||
} bind def
|
||||
/dpi_x 300 def
|
||||
/dpi_y 300 def
|
||||
/conicto {
|
||||
/to_y exch def
|
||||
/to_x exch def
|
||||
/conic_cntrl_y exch def
|
||||
/conic_cntrl_x exch def
|
||||
currentpoint
|
||||
/p0_y exch def
|
||||
/p0_x exch def
|
||||
/p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def
|
||||
/p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def
|
||||
/p2_x p1_x to_x p0_x sub 1 3 div mul add def
|
||||
/p2_y p1_y to_y p0_y sub 1 3 div mul add def
|
||||
p1_x p1_y p2_x p2_y to_x to_y curveto
|
||||
} bind def
|
||||
/start_ol { gsave 1.1 dpi_x div dup scale} bind def
|
||||
/end_ol { closepath fill grestore } bind def
|
||||
28.346000 -28.346000 scale
|
||||
-4.400000 -8.150000 translate
|
||||
%%EndProlog
|
||||
|
||||
|
||||
1.000000 1.000000 1.000000 srgb
|
||||
n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l f
|
||||
0.100000 slw
|
||||
[] 0 sd
|
||||
[] 0 sd
|
||||
0 slj
|
||||
0.000000 0.000000 0.000000 srgb
|
||||
n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l cp s
|
||||
gsave 8.875000 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1762 3044 moveto
|
||||
1276 3044 990 2673 conicto
|
||||
704 2303 704 1663 conicto
|
||||
704 1025 990 654 conicto
|
||||
1276 284 1762 284 conicto
|
||||
2248 284 2532 654 conicto
|
||||
2816 1025 2816 1663 conicto
|
||||
2816 2303 2532 2673 conicto
|
||||
2248 3044 1762 3044 conicto
|
||||
1762 3392 moveto
|
||||
2446 3392 2855 2922 conicto
|
||||
3264 2453 3264 1664 conicto
|
||||
3264 876 2855 406 conicto
|
||||
2446 -64 1762 -64 conicto
|
||||
1077 -64 666 405 conicto
|
||||
256 874 256 1664 conicto
|
||||
256 2453 666 2922 conicto
|
||||
1077 3392 1762 3392 conicto
|
||||
end_ol grestore
|
||||
gsave 9.330083 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1536 2838 moveto
|
||||
935 1180 lineto
|
||||
2140 1180 lineto
|
||||
1536 2838 lineto
|
||||
1286 3282 moveto
|
||||
1789 3282 lineto
|
||||
3038 0 lineto
|
||||
2577 0 lineto
|
||||
2278 832 lineto
|
||||
801 832 lineto
|
||||
503 0 lineto
|
||||
35 0 lineto
|
||||
1286 3282 lineto
|
||||
end_ol grestore
|
||||
gsave 9.736483 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
448 3328 moveto
|
||||
874 3328 lineto
|
||||
874 0 lineto
|
||||
448 0 lineto
|
||||
448 3328 lineto
|
||||
end_ol grestore
|
||||
gsave 9.914283 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
end_ol grestore
|
||||
gsave 10.100550 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1536 2838 moveto
|
||||
935 1180 lineto
|
||||
2140 1180 lineto
|
||||
1536 2838 lineto
|
||||
1286 3282 moveto
|
||||
1789 3282 lineto
|
||||
3038 0 lineto
|
||||
2577 0 lineto
|
||||
2278 832 lineto
|
||||
801 832 lineto
|
||||
503 0 lineto
|
||||
35 0 lineto
|
||||
1286 3282 lineto
|
||||
end_ol grestore
|
||||
gsave 10.506950 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1842 2133 moveto
|
||||
1776 2174 1696 2193 conicto
|
||||
1616 2212 1519 2212 conicto
|
||||
1177 2212 993 1983 conicto
|
||||
810 1755 810 1328 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2129 lineto
|
||||
937 2347 1141 2453 conicto
|
||||
1345 2560 1638 2560 conicto
|
||||
1680 2560 1730 2554 conicto
|
||||
1781 2548 1842 2536 conicto
|
||||
1842 2133 lineto
|
||||
end_ol grestore
|
||||
gsave 10.752483 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2176 2404 moveto
|
||||
2176 2020 lineto
|
||||
2008 2116 1838 2164 conicto
|
||||
1669 2212 1496 2212 conicto
|
||||
1109 2212 895 1958 conicto
|
||||
682 1705 682 1248 conicto
|
||||
682 791 895 537 conicto
|
||||
1109 284 1496 284 conicto
|
||||
1669 284 1838 332 conicto
|
||||
2008 380 2176 476 conicto
|
||||
2176 97 lineto
|
||||
2009 17 1830 -23 conicto
|
||||
1652 -64 1449 -64 conicto
|
||||
902 -64 579 291 conicto
|
||||
256 646 256 1248 conicto
|
||||
256 1859 582 2209 conicto
|
||||
909 2560 1476 2560 conicto
|
||||
1660 2560 1835 2521 conicto
|
||||
2011 2482 2176 2404 conicto
|
||||
end_ol grestore
|
||||
gsave 11.074217 4.300000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2474 1509 moveto
|
||||
2474 0 lineto
|
||||
2048 0 lineto
|
||||
2048 1502 lineto
|
||||
2048 1858 1913 2035 conicto
|
||||
1778 2212 1509 2212 conicto
|
||||
1185 2212 997 1999 conicto
|
||||
810 1786 810 1419 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 3456 lineto
|
||||
810 3456 lineto
|
||||
810 2120 lineto
|
||||
954 2343 1152 2451 conicto
|
||||
1350 2560 1609 2560 conicto
|
||||
2037 2560 2255 2293 conicto
|
||||
2474 2027 2474 1509 conicto
|
||||
end_ol grestore
|
||||
1.000000 1.000000 1.000000 srgb
|
||||
n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l f
|
||||
0.100000 slw
|
||||
[] 0 sd
|
||||
[] 0 sd
|
||||
0 slj
|
||||
0.000000 0.000000 0.000000 srgb
|
||||
n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l cp s
|
||||
1.000000 1.000000 1.000000 srgb
|
||||
n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l f
|
||||
0.100000 slw
|
||||
[] 0 sd
|
||||
[] 0 sd
|
||||
0 slj
|
||||
0.000000 0.000000 0.000000 srgb
|
||||
n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l cp s
|
||||
1.000000 1.000000 1.000000 srgb
|
||||
n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l f
|
||||
0.100000 slw
|
||||
[] 0 sd
|
||||
[] 0 sd
|
||||
0 slj
|
||||
0.000000 0.000000 0.000000 srgb
|
||||
n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l cp s
|
||||
gsave 5.400000 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1536 2838 moveto
|
||||
935 1180 lineto
|
||||
2140 1180 lineto
|
||||
1536 2838 lineto
|
||||
1286 3282 moveto
|
||||
1789 3282 lineto
|
||||
3038 0 lineto
|
||||
2577 0 lineto
|
||||
2278 832 lineto
|
||||
801 832 lineto
|
||||
503 0 lineto
|
||||
35 0 lineto
|
||||
1286 3282 lineto
|
||||
end_ol grestore
|
||||
gsave 5.795817 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2048 2116 moveto
|
||||
2048 3456 lineto
|
||||
2474 3456 lineto
|
||||
2474 0 lineto
|
||||
2048 0 lineto
|
||||
2048 380 lineto
|
||||
1922 154 1727 45 conicto
|
||||
1533 -64 1261 -64 conicto
|
||||
816 -64 536 297 conicto
|
||||
256 659 256 1248 conicto
|
||||
256 1837 536 2198 conicto
|
||||
816 2560 1260 2560 conicto
|
||||
1532 2560 1726 2450 conicto
|
||||
1921 2341 2048 2116 conicto
|
||||
682 1248 moveto
|
||||
682 798 864 541 conicto
|
||||
1046 284 1364 284 conicto
|
||||
1683 284 1865 541 conicto
|
||||
2048 798 2048 1248 conicto
|
||||
2048 1699 1865 1955 conicto
|
||||
1683 2212 1364 2212 conicto
|
||||
1046 2212 864 1955 conicto
|
||||
682 1699 682 1248 conicto
|
||||
end_ol grestore
|
||||
gsave 6.176817 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2048 2116 moveto
|
||||
2048 3456 lineto
|
||||
2474 3456 lineto
|
||||
2474 0 lineto
|
||||
2048 0 lineto
|
||||
2048 380 lineto
|
||||
1922 154 1727 45 conicto
|
||||
1533 -64 1261 -64 conicto
|
||||
816 -64 536 297 conicto
|
||||
256 659 256 1248 conicto
|
||||
256 1837 536 2198 conicto
|
||||
816 2560 1260 2560 conicto
|
||||
1532 2560 1726 2450 conicto
|
||||
1921 2341 2048 2116 conicto
|
||||
682 1248 moveto
|
||||
682 798 864 541 conicto
|
||||
1046 284 1364 284 conicto
|
||||
1683 284 1865 541 conicto
|
||||
2048 798 2048 1248 conicto
|
||||
2048 1699 1865 1955 conicto
|
||||
1683 2212 1364 2212 conicto
|
||||
1046 2212 864 1955 conicto
|
||||
682 1699 682 1248 conicto
|
||||
end_ol grestore
|
||||
gsave 6.557817 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1842 2133 moveto
|
||||
1776 2174 1696 2193 conicto
|
||||
1616 2212 1519 2212 conicto
|
||||
1177 2212 993 1983 conicto
|
||||
810 1755 810 1328 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2129 lineto
|
||||
937 2347 1141 2453 conicto
|
||||
1345 2560 1638 2560 conicto
|
||||
1680 2560 1730 2554 conicto
|
||||
1781 2548 1842 2536 conicto
|
||||
1842 2133 lineto
|
||||
end_ol grestore
|
||||
gsave 6.790121 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2538 1329 moveto
|
||||
2538 1124 lineto
|
||||
682 1124 lineto
|
||||
682 714 908 499 conicto
|
||||
1134 284 1537 284 conicto
|
||||
1772 284 1991 340 conicto
|
||||
2211 396 2432 509 conicto
|
||||
2432 128 lineto
|
||||
2216 34 1988 -15 conicto
|
||||
1760 -64 1526 -64 conicto
|
||||
940 -64 598 284 conicto
|
||||
256 633 256 1226 conicto
|
||||
256 1839 582 2199 conicto
|
||||
909 2560 1463 2560 conicto
|
||||
1960 2560 2249 2229 conicto
|
||||
2538 1898 2538 1329 conicto
|
||||
2112 1472 moveto
|
||||
2112 1809 1931 2010 conicto
|
||||
1751 2212 1453 2212 conicto
|
||||
1116 2212 914 2018 conicto
|
||||
712 1824 682 1472 conicto
|
||||
2112 1472 lineto
|
||||
end_ol grestore
|
||||
gsave 7.154187 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2021 2424 moveto
|
||||
2021 2034 lineto
|
||||
1818 2123 1638 2167 conicto
|
||||
1459 2212 1267 2212 conicto
|
||||
975 2212 828 2119 conicto
|
||||
682 2026 682 1838 conicto
|
||||
682 1696 784 1615 conicto
|
||||
887 1535 1196 1461 conicto
|
||||
1327 1430 lineto
|
||||
1748 1337 1930 1166 conicto
|
||||
2112 995 2112 690 conicto
|
||||
2112 342 1839 139 conicto
|
||||
1566 -64 1089 -64 conicto
|
||||
891 -64 675 -25 conicto
|
||||
460 14 222 94 conicto
|
||||
222 519 lineto
|
||||
481 402 692 343 conicto
|
||||
903 284 1110 284 conicto
|
||||
1387 284 1536 383 conicto
|
||||
1686 482 1686 661 conicto
|
||||
1686 829 1580 917 conicto
|
||||
1475 1006 1118 1088 conicto
|
||||
985 1121 lineto
|
||||
620 1201 438 1367 conicto
|
||||
256 1533 256 1823 conicto
|
||||
256 2176 507 2368 conicto
|
||||
758 2560 1219 2560 conicto
|
||||
1448 2560 1649 2526 conicto
|
||||
1851 2492 2021 2424 conicto
|
||||
end_ol grestore
|
||||
gsave 7.458988 7.100000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2021 2424 moveto
|
||||
2021 2034 lineto
|
||||
1818 2123 1638 2167 conicto
|
||||
1459 2212 1267 2212 conicto
|
||||
975 2212 828 2119 conicto
|
||||
682 2026 682 1838 conicto
|
||||
682 1696 784 1615 conicto
|
||||
887 1535 1196 1461 conicto
|
||||
1327 1430 lineto
|
||||
1748 1337 1930 1166 conicto
|
||||
2112 995 2112 690 conicto
|
||||
2112 342 1839 139 conicto
|
||||
1566 -64 1089 -64 conicto
|
||||
891 -64 675 -25 conicto
|
||||
460 14 222 94 conicto
|
||||
222 519 lineto
|
||||
481 402 692 343 conicto
|
||||
903 284 1110 284 conicto
|
||||
1387 284 1536 383 conicto
|
||||
1686 482 1686 661 conicto
|
||||
1686 829 1580 917 conicto
|
||||
1475 1006 1118 1088 conicto
|
||||
985 1121 lineto
|
||||
620 1201 438 1367 conicto
|
||||
256 1533 256 1823 conicto
|
||||
256 2176 507 2368 conicto
|
||||
758 2560 1219 2560 conicto
|
||||
1448 2560 1649 2526 conicto
|
||||
1851 2492 2021 2424 conicto
|
||||
end_ol grestore
|
||||
gsave 9.020000 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2880 3094 moveto
|
||||
2880 2615 lineto
|
||||
2656 2831 2402 2937 conicto
|
||||
2149 3044 1864 3044 conicto
|
||||
1301 3044 1002 2689 conicto
|
||||
704 2334 704 1663 conicto
|
||||
704 993 1002 638 conicto
|
||||
1301 284 1864 284 conicto
|
||||
2149 284 2402 390 conicto
|
||||
2656 497 2880 713 conicto
|
||||
2880 238 lineto
|
||||
2649 87 2390 11 conicto
|
||||
2132 -64 1845 -64 conicto
|
||||
1106 -64 681 399 conicto
|
||||
256 863 256 1664 conicto
|
||||
256 2466 681 2929 conicto
|
||||
1106 3392 1845 3392 conicto
|
||||
2137 3392 2395 3317 conicto
|
||||
2654 3243 2880 3094 conicto
|
||||
end_ol grestore
|
||||
gsave 9.434867 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1377 2212 moveto
|
||||
1055 2212 868 1954 conicto
|
||||
682 1696 682 1248 conicto
|
||||
682 800 867 542 conicto
|
||||
1053 284 1377 284 conicto
|
||||
1697 284 1883 543 conicto
|
||||
2070 802 2070 1248 conicto
|
||||
2070 1692 1883 1952 conicto
|
||||
1697 2212 1377 2212 conicto
|
||||
1376 2560 moveto
|
||||
1899 2560 2197 2212 conicto
|
||||
2496 1864 2496 1248 conicto
|
||||
2496 635 2197 285 conicto
|
||||
1899 -64 1376 -64 conicto
|
||||
851 -64 553 285 conicto
|
||||
256 635 256 1248 conicto
|
||||
256 1864 553 2212 conicto
|
||||
851 2560 1376 2560 conicto
|
||||
end_ol grestore
|
||||
gsave 9.798933 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2339 2028 moveto
|
||||
2493 2302 2705 2431 conicto
|
||||
2918 2560 3204 2560 conicto
|
||||
3591 2560 3800 2286 conicto
|
||||
4010 2013 4010 1509 conicto
|
||||
4010 0 lineto
|
||||
3584 0 lineto
|
||||
3584 1502 lineto
|
||||
3584 1862 3460 2037 conicto
|
||||
3336 2212 3082 2212 conicto
|
||||
2771 2212 2590 1999 conicto
|
||||
2410 1786 2410 1419 conicto
|
||||
2410 0 lineto
|
||||
1984 0 lineto
|
||||
1984 1502 lineto
|
||||
1984 1865 1860 2038 conicto
|
||||
1736 2212 1477 2212 conicto
|
||||
1171 2212 990 1998 conicto
|
||||
810 1784 810 1419 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2120 lineto
|
||||
947 2344 1141 2452 conicto
|
||||
1335 2560 1602 2560 conicto
|
||||
1871 2560 2060 2423 conicto
|
||||
2249 2287 2339 2028 conicto
|
||||
end_ol grestore
|
||||
gsave 10.383133 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
810 380 moveto
|
||||
810 -960 lineto
|
||||
384 -960 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2116 lineto
|
||||
937 2339 1131 2449 conicto
|
||||
1325 2560 1595 2560 conicto
|
||||
2042 2560 2322 2198 conicto
|
||||
2602 1837 2602 1248 conicto
|
||||
2602 659 2322 297 conicto
|
||||
2043 -64 1595 -64 conicto
|
||||
1325 -64 1131 45 conicto
|
||||
938 155 810 380 conicto
|
||||
2176 1248 moveto
|
||||
2176 1699 1994 1955 conicto
|
||||
1812 2212 1493 2212 conicto
|
||||
1175 2212 992 1955 conicto
|
||||
810 1699 810 1248 conicto
|
||||
810 798 992 541 conicto
|
||||
1175 284 1493 284 conicto
|
||||
1812 284 1994 541 conicto
|
||||
2176 798 2176 1248 conicto
|
||||
end_ol grestore
|
||||
gsave 10.755667 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1377 2212 moveto
|
||||
1055 2212 868 1954 conicto
|
||||
682 1696 682 1248 conicto
|
||||
682 800 867 542 conicto
|
||||
1053 284 1377 284 conicto
|
||||
1697 284 1883 543 conicto
|
||||
2070 802 2070 1248 conicto
|
||||
2070 1692 1883 1952 conicto
|
||||
1697 2212 1377 2212 conicto
|
||||
1376 2560 moveto
|
||||
1899 2560 2197 2212 conicto
|
||||
2496 1864 2496 1248 conicto
|
||||
2496 635 2197 285 conicto
|
||||
1899 -64 1376 -64 conicto
|
||||
851 -64 553 285 conicto
|
||||
256 635 256 1248 conicto
|
||||
256 1864 553 2212 conicto
|
||||
851 2560 1376 2560 conicto
|
||||
end_ol grestore
|
||||
gsave 11.119733 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2474 1509 moveto
|
||||
2474 0 lineto
|
||||
2048 0 lineto
|
||||
2048 1502 lineto
|
||||
2048 1858 1913 2035 conicto
|
||||
1778 2212 1509 2212 conicto
|
||||
1185 2212 997 1999 conicto
|
||||
810 1786 810 1419 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2120 lineto
|
||||
954 2340 1152 2450 conicto
|
||||
1350 2560 1609 2560 conicto
|
||||
2037 2560 2255 2293 conicto
|
||||
2474 2027 2474 1509 conicto
|
||||
end_ol grestore
|
||||
gsave 11.500733 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2538 1329 moveto
|
||||
2538 1124 lineto
|
||||
682 1124 lineto
|
||||
682 714 908 499 conicto
|
||||
1134 284 1537 284 conicto
|
||||
1772 284 1991 340 conicto
|
||||
2211 396 2432 509 conicto
|
||||
2432 128 lineto
|
||||
2216 34 1988 -15 conicto
|
||||
1760 -64 1526 -64 conicto
|
||||
940 -64 598 284 conicto
|
||||
256 633 256 1226 conicto
|
||||
256 1839 582 2199 conicto
|
||||
909 2560 1463 2560 conicto
|
||||
1960 2560 2249 2229 conicto
|
||||
2538 1898 2538 1329 conicto
|
||||
2112 1472 moveto
|
||||
2112 1809 1931 2010 conicto
|
||||
1751 2212 1453 2212 conicto
|
||||
1116 2212 914 2018 conicto
|
||||
712 1824 682 1472 conicto
|
||||
2112 1472 lineto
|
||||
end_ol grestore
|
||||
gsave 11.864800 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2474 1509 moveto
|
||||
2474 0 lineto
|
||||
2048 0 lineto
|
||||
2048 1502 lineto
|
||||
2048 1858 1913 2035 conicto
|
||||
1778 2212 1509 2212 conicto
|
||||
1185 2212 997 1999 conicto
|
||||
810 1786 810 1419 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2120 lineto
|
||||
954 2340 1152 2450 conicto
|
||||
1350 2560 1609 2560 conicto
|
||||
2037 2560 2255 2293 conicto
|
||||
2474 2027 2474 1509 conicto
|
||||
end_ol grestore
|
||||
gsave 12.245800 7.095000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
832 3213 moveto
|
||||
832 2524 lineto
|
||||
1664 2524 lineto
|
||||
1664 2176 lineto
|
||||
832 2176 lineto
|
||||
832 826 lineto
|
||||
832 521 914 434 conicto
|
||||
997 348 1249 348 conicto
|
||||
1664 348 lineto
|
||||
1664 0 lineto
|
||||
1242 0 lineto
|
||||
768 0 587 179 conicto
|
||||
406 359 406 826 conicto
|
||||
406 2176 lineto
|
||||
128 2176 lineto
|
||||
128 2524 lineto
|
||||
406 2524 lineto
|
||||
406 3213 lineto
|
||||
832 3213 lineto
|
||||
end_ol grestore
|
||||
gsave 13.945000 6.995000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
448 3328 moveto
|
||||
2313 3328 lineto
|
||||
2313 2980 lineto
|
||||
874 2980 lineto
|
||||
874 1948 lineto
|
||||
2173 1948 lineto
|
||||
2173 1600 lineto
|
||||
874 1600 lineto
|
||||
874 27 lineto
|
||||
448 27 lineto
|
||||
448 3328 lineto
|
||||
end_ol grestore
|
||||
gsave 14.239614 6.995000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1842 2133 moveto
|
||||
1776 2174 1696 2193 conicto
|
||||
1616 2212 1519 2212 conicto
|
||||
1177 2212 993 1983 conicto
|
||||
810 1755 810 1328 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2129 lineto
|
||||
937 2347 1141 2453 conicto
|
||||
1345 2560 1638 2560 conicto
|
||||
1680 2560 1730 2554 conicto
|
||||
1781 2548 1842 2536 conicto
|
||||
1842 2133 lineto
|
||||
end_ol grestore
|
||||
gsave 14.485147 6.995000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
1528 1252 moveto
|
||||
1050 1252 866 1139 conicto
|
||||
682 1026 682 754 conicto
|
||||
682 538 820 411 conicto
|
||||
958 284 1196 284 conicto
|
||||
1523 284 1721 523 conicto
|
||||
1920 763 1920 1161 conicto
|
||||
1920 1252 lineto
|
||||
1528 1252 lineto
|
||||
2346 1426 moveto
|
||||
2346 0 lineto
|
||||
1920 0 lineto
|
||||
1920 383 lineto
|
||||
1785 154 1579 45 conicto
|
||||
1374 -64 1076 -64 conicto
|
||||
701 -64 478 154 conicto
|
||||
256 373 256 739 conicto
|
||||
256 1166 543 1383 conicto
|
||||
830 1600 1367 1600 conicto
|
||||
1920 1600 lineto
|
||||
1920 1639 lineto
|
||||
1920 1913 1740 2062 conicto
|
||||
1561 2212 1238 2212 conicto
|
||||
1032 2212 836 2162 conicto
|
||||
641 2113 448 2014 conicto
|
||||
448 2386 lineto
|
||||
670 2473 879 2516 conicto
|
||||
1088 2560 1285 2560 conicto
|
||||
1819 2560 2082 2279 conicto
|
||||
2346 1998 2346 1426 conicto
|
||||
end_ol grestore
|
||||
gsave 14.849214 6.995000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2339 2028 moveto
|
||||
2493 2302 2705 2431 conicto
|
||||
2918 2560 3204 2560 conicto
|
||||
3591 2560 3800 2286 conicto
|
||||
4010 2013 4010 1509 conicto
|
||||
4010 0 lineto
|
||||
3584 0 lineto
|
||||
3584 1502 lineto
|
||||
3584 1862 3460 2037 conicto
|
||||
3336 2212 3082 2212 conicto
|
||||
2771 2212 2590 1999 conicto
|
||||
2410 1786 2410 1419 conicto
|
||||
2410 0 lineto
|
||||
1984 0 lineto
|
||||
1984 1502 lineto
|
||||
1984 1865 1860 2038 conicto
|
||||
1736 2212 1477 2212 conicto
|
||||
1171 2212 990 1998 conicto
|
||||
810 1784 810 1419 conicto
|
||||
810 0 lineto
|
||||
384 0 lineto
|
||||
384 2496 lineto
|
||||
810 2496 lineto
|
||||
810 2120 lineto
|
||||
947 2344 1141 2452 conicto
|
||||
1335 2560 1602 2560 conicto
|
||||
1871 2560 2060 2423 conicto
|
||||
2249 2287 2339 2028 conicto
|
||||
end_ol grestore
|
||||
gsave 15.433414 6.995000 translate 0.035278 -0.035278 scale
|
||||
start_ol
|
||||
2538 1329 moveto
|
||||
2538 1124 lineto
|
||||
682 1124 lineto
|
||||
682 714 908 499 conicto
|
||||
1134 284 1537 284 conicto
|
||||
1772 284 1991 340 conicto
|
||||
2211 396 2432 509 conicto
|
||||
2432 128 lineto
|
||||
2216 34 1988 -15 conicto
|
||||
1760 -64 1526 -64 conicto
|
||||
940 -64 598 284 conicto
|
||||
256 633 256 1226 conicto
|
||||
256 1839 582 2199 conicto
|
||||
909 2560 1463 2560 conicto
|
||||
1960 2560 2249 2229 conicto
|
||||
2538 1898 2538 1329 conicto
|
||||
2112 1472 moveto
|
||||
2112 1809 1931 2010 conicto
|
||||
1751 2212 1453 2212 conicto
|
||||
1116 2212 914 2018 conicto
|
||||
712 1824 682 1472 conicto
|
||||
2112 1472 lineto
|
||||
end_ol grestore
|
||||
showpage
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,112 @@
|
||||
/*******************************************************************************
|
||||
|
||||
OPENAIRINTERFACE 0/1/2/3
|
||||
Copyright(c) 1999 - 2010 EURECOM
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information:
|
||||
Openair Admin <openair_admin@eurecom.fr>
|
||||
Mailing List <openair_tech@eurecom.fr>
|
||||
Forums http://forums.eurecom.fr/openairinterface
|
||||
Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file Readme.doxy
|
||||
* \brief explain how this block is organized, and how it works
|
||||
* \author Navid Nikaein
|
||||
* \date 2009
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \note This conde is under GNU GENERAL PUBLIC LICENSE, version 2, June 1991
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \warning
|
||||
*/
|
||||
|
||||
/*! \mainpage Table of contents
|
||||
|
||||
The content of this readme is the following:
|
||||
|
||||
-# What is this block about in OpenAirInterface
|
||||
-# Folders and files description
|
||||
-# Organization of the folders and their dependancies
|
||||
-# Makefile targets and how to build
|
||||
-# How to use through a tutorial: run a simple experimentation
|
||||
|
||||
|
||||
\section _block What is this block about in OpenAirInterface ?
|
||||
|
||||
|
||||
It essentially means "the hardware part" located at openair0.
|
||||
|
||||
Explain through the figures:
|
||||
\image html image.png "caption" width=3cm
|
||||
\image latex image.pdf "caption"
|
||||
|
||||
More information about ??? can be found on the Twiki:
|
||||
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
|
||||
|
||||
|
||||
\section _folders Folders and files description
|
||||
|
||||
The structure is the following:
|
||||
<table>
|
||||
<tr><td>File/Folder</td> <td> Description </td> </tr>
|
||||
</table>
|
||||
|
||||
- Folder1: Contains this and that
|
||||
- Folder2: Contains this and that
|
||||
- init.bash: A simple script file, that any user SHOULD source from its environment personal set-up script (this is typically ~/.bashrc) by adding the following lines to it:
|
||||
This is my ~/.bashrc file or equivalent export OPENAIRX=path/to/my/openairX/folder source $OPENAIRX/init.bash. The file includes variable definitions & path settings to access softwares, sources & Makefiles, software distribution in openair, and so on.
|
||||
|
||||
|
||||
YOU DEFINETELY NEED TO SOURCE THIS FILE. Description
|
||||
|
||||
\section _organization Organization of the folders and their dependancies
|
||||
|
||||
|
||||
The 3 folders have the following structures
|
||||
|
||||
- Folder1/subfolder1/: contains any ressource related to the design
|
||||
|
||||
- Folder2/subfolder2/: contains
|
||||
|
||||
- Folder2/src/
|
||||
|
||||
- Folder2/lib/
|
||||
|
||||
- Folder2/bin/
|
||||
|
||||
Explain where are the source files.
|
||||
Explain the relationship with other Blocks.
|
||||
|
||||
|
||||
\section _makefile Makefile targets and how to build
|
||||
|
||||
Explain whether you are using symbolic links or not,
|
||||
how to backup/archive
|
||||
how to generate the tags
|
||||
how to print the vars
|
||||
how to create the documentation
|
||||
|
||||
\section _howto How to use through a tutorial: run a simple experimentation
|
||||
...
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/*******************************************************************************
|
||||
|
||||
OPENAIRINTERFACE 0/1/2/3
|
||||
Copyright(c) 1999 - 2010 EURECOM
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information:
|
||||
Openair Admin <openair_admin@eurecom.fr>
|
||||
Mailing List <openair_tech@eurecom.fr>
|
||||
Forums http://forums.eurecom.fr/openairinterface
|
||||
Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*________________________OEPNAIR/OPENAIR0/________________________
|
||||
|
||||
File : Readme.txt
|
||||
Authors : navid nikaein
|
||||
Company : EURECOM
|
||||
Emails : navid.nikaein@eurecom.fr
|
||||
________________________________________________________________*/
|
||||
|
||||
|
||||
-------------------------
|
||||
Table of contents
|
||||
-------------------------
|
||||
|
||||
The content of this readme is the following:
|
||||
|
||||
1) What is this block about in OpenAirInterface
|
||||
2) Folders and files description
|
||||
3) Organization of the folders and their dependancies
|
||||
4) Makefile targets and how to build
|
||||
5) How to use through a tutorial: run a simple experimentation
|
||||
|
||||
------------------------------------------------
|
||||
1) What is this block about in OpenAirInterface ?
|
||||
-----------------------------------------------
|
||||
|
||||
|
||||
It essentially means "the hardware part" located at openair0.
|
||||
|
||||
More information about ??? can be found on the Twiki:
|
||||
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
|
||||
|
||||
-----------------------------------------
|
||||
2) Folders and files description
|
||||
-----------------------------------------
|
||||
|
||||
File/Folder Description
|
||||
----------- -----------
|
||||
|
||||
- Folder1/ contains
|
||||
|
||||
- Folder2/ contains
|
||||
|
||||
- init.bash A simple script file, that any user SHOULD source from
|
||||
its environment personal set-up script (this is typically ~/.bashrc)
|
||||
by adding the following lines to it:
|
||||
|
||||
# This is my ~/.bashrc file or equivalent
|
||||
export OPENAIRX=path/to/my/openairX/folder
|
||||
source $OPENAIRX/init.bash
|
||||
|
||||
The file includes variable definitions & path settings to
|
||||
access softwares, sources & Makefiles, software
|
||||
distribution in openair, and so on.
|
||||
|
||||
YOU DEFINETELY NEED TO SOURCE THIS FILE.
|
||||
|
||||
----------------------------------------------------
|
||||
3) Organization of the folders and their dependancies
|
||||
----------------------------------------------------
|
||||
|
||||
The 3 folders have the following structures
|
||||
|
||||
- Folder1/subfolder1/ contains any ressource related to the design
|
||||
|
||||
- Folder2/subfolder2/ contains
|
||||
|
||||
- Folder2/src/
|
||||
|
||||
- Folder2/lib/
|
||||
|
||||
- Folder2/bin/
|
||||
|
||||
Explain where are the source files.
|
||||
Explain the relationship with other Blocks.
|
||||
|
||||
|
||||
-----------------------------------------
|
||||
4) Makefile targets and how to build
|
||||
-----------------------------------------
|
||||
|
||||
Explain whether you are using symbolic links or not,
|
||||
how to backup/archive
|
||||
how to generate the tags
|
||||
how to print the vars
|
||||
how to create the documentation
|
||||
|
||||
----------------------------------------------------------------
|
||||
6) How to use through a tutorial: run a simple experimentation
|
||||
----------------------------------------------------------------
|
||||
|
||||
...
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "defs.h"
|
||||
#include "extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#ifdef Rel10
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-AreaInfo-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
int rrc_mac_config_req(u8 Mod_id,u8 eNB_flag,u8 UE_id,u8 eNB_index,
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
MeasObjectToAddMod_t **measObj,
|
||||
MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
LogicalChannelConfig_t *logicalChannelConfig,
|
||||
MeasGapConfig_t *measGapConfig,
|
||||
TDD_Config_t *tdd_Config,
|
||||
u8 *SIwindowsize,
|
||||
u16 *SIperiod,
|
||||
ARFCN_ValueEUTRA_t *ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList
|
||||
#ifdef Rel10
|
||||
,
|
||||
u8 MBMS_Flag,
|
||||
MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
PMCH_InfoList_r9_t *pmch_InfoList
|
||||
#endif
|
||||
#ifdef CBA
|
||||
,
|
||||
u8 num_active_cba_groups,
|
||||
u16 cba_rnti
|
||||
#endif
|
||||
) {
|
||||
|
||||
int i;
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
|
||||
|
||||
if (eNB_flag==0) {
|
||||
LOG_I(MAC,"[CONFIG][UE %d] Configuring MAC/PHY from eNB %d\n",Mod_id,eNB_index);
|
||||
if (tdd_Config != NULL)
|
||||
UE_mac_inst[Mod_id].tdd_Config = tdd_Config;
|
||||
}else {
|
||||
if (physicalConfigDedicated == NULL){
|
||||
LOG_I(MAC,"[CONFIG][eNB %d] Configuring MAC/PHY\n",Mod_id);
|
||||
} else{
|
||||
LOG_I(MAC,"[CONFIG][eNB %d] Configuring MAC/PHY for UE %d (%x)\n",Mod_id,UE_id,find_UE_RNTI(Mod_id,UE_id));
|
||||
}
|
||||
}
|
||||
|
||||
if ((tdd_Config!=NULL)||
|
||||
(SIwindowsize!=NULL)||
|
||||
(SIperiod!=NULL)){
|
||||
|
||||
if (eNB_flag==1)
|
||||
mac_xface->phy_config_sib1_eNB(Mod_id,tdd_Config,*SIwindowsize,*SIperiod);
|
||||
else
|
||||
mac_xface->phy_config_sib1_ue(Mod_id,eNB_index,tdd_Config,*SIwindowsize,*SIperiod);
|
||||
}
|
||||
|
||||
if (radioResourceConfigCommon) {
|
||||
if (eNB_flag==1) {
|
||||
LOG_I(MAC,"[CONFIG]SIB2/3 Contents (partial)\n");
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.n_SB = %ld\n",radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
|
||||
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.hoppingMode = %ld\n",radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.pusch_HoppingOffset = %ld\n", radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.enable64QAM = %d\n",radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.groupHoppingEnabled = %d\n",radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
|
||||
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.groupAssignmentPUSCH = %ld\n",radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
|
||||
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.sequenceHoppingEnabled = %d\n",radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
|
||||
|
||||
|
||||
LOG_I(MAC,"[CONFIG]pusch_config_common.cyclicShift = %ld\n",radioResourceConfigCommon->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
|
||||
|
||||
mac_xface->phy_config_sib2_eNB(Mod_id,radioResourceConfigCommon,ul_CarrierFreq,ul_Bandwidth,additionalSpectrumEmission,mbsfn_SubframeConfigList);
|
||||
}
|
||||
else {
|
||||
UE_mac_inst[Mod_id].radioResourceConfigCommon = radioResourceConfigCommon;
|
||||
mac_xface->phy_config_sib2_ue(Mod_id,eNB_index,radioResourceConfigCommon,ul_CarrierFreq,ul_Bandwidth,additionalSpectrumEmission,mbsfn_SubframeConfigList);
|
||||
}
|
||||
}
|
||||
// SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
|
||||
if (logicalChannelConfig!= NULL) {
|
||||
if (eNB_flag==0){
|
||||
LOG_I(MAC,"[CONFIG][UE %d] Applying RRC logicalChannelConfig from eNB%d\n",Mod_id,eNB_index);
|
||||
UE_mac_inst[Mod_id].logicalChannelConfig[logicalChannelIdentity]=logicalChannelConfig;
|
||||
UE_mac_inst[Mod_id].scheduling_info.Bj[logicalChannelIdentity]=0; // initilize the bucket for this lcid
|
||||
if (logicalChannelConfig->ul_SpecificParameters) {
|
||||
UE_mac_inst[Mod_id].scheduling_info.bucket_size[logicalChannelIdentity]=logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate *
|
||||
logicalChannelConfig->ul_SpecificParameters->bucketSizeDuration; // set the max bucket size
|
||||
UE_mac_inst[Mod_id].scheduling_info.LCGID[logicalChannelIdentity]=*logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup;
|
||||
LOG_D(MAC,"[CONFIG][UE %d] LCID %d is attached to the LCGID %d\n",Mod_id,logicalChannelIdentity,*logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup);
|
||||
} else {
|
||||
LOG_E(MAC,"[CONFIG][UE %d] LCID %d NULL ul_SpecificParameters\n",Mod_id,logicalChannelIdentity);
|
||||
mac_xface->macphy_exit("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mac_MainConfig != NULL){
|
||||
if (eNB_flag==0){
|
||||
LOG_I(MAC,"[CONFIG][UE%d] Applying RRC macMainConfig from eNB%d\n",Mod_id,eNB_index);
|
||||
UE_mac_inst[Mod_id].macConfig=mac_MainConfig;
|
||||
UE_mac_inst[Mod_id].measGapConfig=measGapConfig;
|
||||
if (mac_MainConfig->ul_SCH_Config) {
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->periodicBSR_Timer)
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicBSR_Timer = (u16) *mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
|
||||
else
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicBSR_Timer = (u16) MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity;
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->maxHARQ_Tx)
|
||||
UE_mac_inst[Mod_id].scheduling_info.maxHARQ_Tx = (u16) *mac_MainConfig->ul_SCH_Config->maxHARQ_Tx;
|
||||
else
|
||||
UE_mac_inst[Mod_id].scheduling_info.maxHARQ_Tx = (u16) MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer)
|
||||
UE_mac_inst[Mod_id].scheduling_info.retxBSR_Timer = (u16) mac_MainConfig->ul_SCH_Config->retxBSR_Timer;
|
||||
else
|
||||
UE_mac_inst[Mod_id].scheduling_info.retxBSR_Timer = (u16)MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
}
|
||||
#ifdef Rel10
|
||||
if (mac_MainConfig->sr_ProhibitTimer_r9)
|
||||
UE_mac_inst[Mod_id].scheduling_info.sr_ProhibitTimer = (u16) *mac_MainConfig->sr_ProhibitTimer_r9;
|
||||
else
|
||||
UE_mac_inst[Mod_id].scheduling_info.sr_ProhibitTimer = (u16) 0;
|
||||
#endif
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicBSR_SF = get_sf_periodicBSRTimer(UE_mac_inst[Mod_id].scheduling_info.periodicBSR_Timer);
|
||||
UE_mac_inst[Mod_id].scheduling_info.retxBSR_SF = get_sf_retxBSRTimer(UE_mac_inst[Mod_id].scheduling_info.retxBSR_Timer);
|
||||
|
||||
UE_mac_inst[Mod_id].scheduling_info.drx_config = mac_MainConfig->drx_Config;
|
||||
UE_mac_inst[Mod_id].scheduling_info.phr_config = mac_MainConfig->phr_Config;
|
||||
if (mac_MainConfig->phr_Config){
|
||||
UE_mac_inst[Mod_id].PHR_state = mac_MainConfig->phr_Config->present;
|
||||
UE_mac_inst[Mod_id].PHR_reconfigured = 1;
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicPHR_Timer = mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer;
|
||||
UE_mac_inst[Mod_id].scheduling_info.prohibitPHR_Timer = mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer;
|
||||
UE_mac_inst[Mod_id].scheduling_info.PathlossChange = mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange;
|
||||
} else {
|
||||
UE_mac_inst[Mod_id].PHR_reconfigured = 0;
|
||||
UE_mac_inst[Mod_id].PHR_state = MAC_MainConfig__phr_Config_PR_setup;
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicPHR_Timer = MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
|
||||
UE_mac_inst[Mod_id].scheduling_info.prohibitPHR_Timer = MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
|
||||
UE_mac_inst[Mod_id].scheduling_info.PathlossChange = MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
|
||||
}
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicPHR_SF = get_sf_perioidicPHR_Timer(UE_mac_inst[Mod_id].scheduling_info.periodicPHR_Timer);
|
||||
UE_mac_inst[Mod_id].scheduling_info.prohibitPHR_SF = get_sf_prohibitPHR_Timer(UE_mac_inst[Mod_id].scheduling_info.prohibitPHR_Timer);
|
||||
UE_mac_inst[Mod_id].scheduling_info.PathlossChange_db = get_db_dl_PathlossChange(UE_mac_inst[Mod_id].scheduling_info.PathlossChange);
|
||||
LOG_D(MAC,"[UE %d] config PHR : periodic %d (SF) prohibit %d (SF) pathlosschange %d (db) \n",
|
||||
Mod_id,
|
||||
UE_mac_inst[Mod_id].scheduling_info.periodicPHR_SF,
|
||||
UE_mac_inst[Mod_id].scheduling_info.prohibitPHR_SF,
|
||||
UE_mac_inst[Mod_id].scheduling_info.PathlossChange_db);
|
||||
}
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated != NULL) {
|
||||
if (eNB_flag==1){
|
||||
mac_xface->phy_config_dedicated_eNB(Mod_id,find_UE_RNTI(Mod_id,UE_id),physicalConfigDedicated);
|
||||
}else{
|
||||
mac_xface->phy_config_dedicated_ue(Mod_id,eNB_index,physicalConfigDedicated);
|
||||
UE_mac_inst[Mod_id].physicalConfigDedicated=physicalConfigDedicated; // for SR proc
|
||||
}
|
||||
}
|
||||
|
||||
if (eNB_flag == 0) {
|
||||
if (measObj!= NULL)
|
||||
if (measObj[0]!= NULL){
|
||||
UE_mac_inst[Mod_id].n_adj_cells = measObj[0]->measObject.choice.measObjectEUTRA.cellsToAddModList->list.count;
|
||||
LOG_I(MAC,"Number of adjacent cells %d\n",UE_mac_inst[Mod_id].n_adj_cells);
|
||||
for (i=0;i<UE_mac_inst[Mod_id].n_adj_cells;i++) {
|
||||
UE_mac_inst[Mod_id].adj_cell_id[i] = measObj[0]->measObject.choice.measObjectEUTRA.cellsToAddModList->list.array[i]->physCellId;
|
||||
LOG_I(MAC,"Cell %d : Nid_cell %d\n",i,UE_mac_inst[Mod_id].adj_cell_id[i]);
|
||||
}
|
||||
mac_xface->phy_config_meas_ue(Mod_id,eNB_index,UE_mac_inst[Mod_id].n_adj_cells,UE_mac_inst[Mod_id].adj_cell_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mbsfn_SubframeConfigList != NULL) {
|
||||
if (eNB_flag == 1) {
|
||||
for (i=0; i<mbsfn_SubframeConfigList->list.count; i++) {
|
||||
eNB_mac_inst[Mod_id].mbsfn_SubframeConfig[i] = mbsfn_SubframeConfigList->list.array[i];
|
||||
LOG_I(MAC, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %ld\n", i,
|
||||
eNB_mac_inst[Mod_id].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
#ifdef Rel10
|
||||
eNB_mac_inst[Mod_id].MBMS_flag = MBMS_Flag;
|
||||
#endif
|
||||
}
|
||||
else { // UE
|
||||
for (i=0; i<mbsfn_SubframeConfigList->list.count; i++) {
|
||||
LOG_I(MAC, "[UE %d] Configuring MBSFN_SubframeConfig from received SIB2 \n", Mod_id);
|
||||
UE_mac_inst[Mod_id].mbsfn_SubframeConfig[i] = mbsfn_SubframeConfigList->list.array[i];
|
||||
// LOG_I("[UE %d] MBSFN_SubframeConfig[%d] pattern is %ld\n", Mod_id,
|
||||
// UE_mac_inst[Mod_id].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Rel10
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
if (eNB_flag == 1) {
|
||||
LOG_I(MAC, "[CONFIG] Number of MBSFN Area Info in the list %d\n", mbsfn_AreaInfoList->list.count);
|
||||
for (i =0; i< mbsfn_AreaInfoList->list.count; i++) {
|
||||
eNB_mac_inst[Mod_id].mbsfn_AreaInfo[i] = mbsfn_AreaInfoList->list.array[i];
|
||||
LOG_I(MAC, "[CONFIG] MBSFN_AreaInfo[%d]: MCCH Repetition Period = %ld\n", i,
|
||||
eNB_mac_inst[Mod_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
mac_xface->phy_config_sib13_eNB(Mod_id,i,eNB_mac_inst[Mod_id].mbsfn_AreaInfo[i]->mbsfn_AreaId_r9);
|
||||
}
|
||||
}
|
||||
else { // UE
|
||||
LOG_I(MAC, "[UE %d] Configuring mbsfn_AreaInfo from received SIB13 \n", Mod_id);
|
||||
for (i =0; i< mbsfn_AreaInfoList->list.count; i++) {
|
||||
UE_mac_inst[Mod_id].mbsfn_AreaInfo[i] = mbsfn_AreaInfoList->list.array[i];
|
||||
LOG_I(MAC, "[UE %d] MBSFN_AreaInfo[%d]: MCCH Repetition Period = %ld\n",Mod_id, i,
|
||||
UE_mac_inst[Mod_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
mac_xface->phy_config_sib13_ue(Mod_id,eNB_index,i,UE_mac_inst[Mod_id].mbsfn_AreaInfo[i]->mbsfn_AreaId_r9);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (pmch_InfoList != NULL) {
|
||||
if (eNB_flag == 1) {
|
||||
LOG_I(MAC, "[CONFIG] Number of PMCH in this MBSFN Area %d\n", pmch_InfoList->list.count);
|
||||
for (i =0; i< pmch_InfoList->list.count; i++) {
|
||||
eNB_mac_inst[Mod_id].pmch_Config[i] = &pmch_InfoList->list.array[i]->pmch_Config_r9;
|
||||
|
||||
LOG_I(MAC, "[CONFIG] PMCH[%d]: This PMCH stop at subframe %ldth\n", i,
|
||||
eNB_mac_inst[Mod_id].pmch_Config[i]->sf_AllocEnd_r9);
|
||||
LOG_I(MAC, "[CONFIG] PMCH[%d]: mch_Scheduling_Period = %ld\n", i,
|
||||
eNB_mac_inst[Mod_id].pmch_Config[i]->mch_SchedulingPeriod_r9);
|
||||
LOG_I(MAC, "[CONFIG] PMCH[%d]: dataMCS = %ld\n", i,
|
||||
eNB_mac_inst[Mod_id].pmch_Config[i]->dataMCS_r9);
|
||||
|
||||
// MBMS session info list in each MCH
|
||||
// for (j=0;j< pmch_InfoList->list.array[i]->mbms_SessionInfoList_r9.list.count;j++) {
|
||||
eNB_mac_inst[Mod_id].mbms_SessionList[i] = &pmch_InfoList->list.array[i]->mbms_SessionInfoList_r9;
|
||||
LOG_I(MAC, "PMCH[%d] Number of session (MTCH) is: %d\n",i, eNB_mac_inst[Mod_id].mbms_SessionList[i]->list.count);
|
||||
// }
|
||||
}
|
||||
}
|
||||
else { // UE
|
||||
LOG_I(MAC, "[UE %d] Configuring PMCH_config from MCCH MESSAGE \n",Mod_id);
|
||||
for (i =0; i< pmch_InfoList->list.count; i++) {
|
||||
UE_mac_inst[Mod_id].pmch_Config[i] = &pmch_InfoList->list.array[i]->pmch_Config_r9;
|
||||
LOG_I(MAC, "[UE %d] PMCH[%d]: MCH_Scheduling_Period = %ld\n", Mod_id,
|
||||
UE_mac_inst[Mod_id].pmch_Config[i]->mch_SchedulingPeriod_r9);
|
||||
}
|
||||
UE_mac_inst[Mod_id].mcch_status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef CBA
|
||||
if (eNB_flag == 0){
|
||||
if (cba_rnti) {
|
||||
UE_mac_inst[Mod_id].cba_rnti[num_active_cba_groups-1] = cba_rnti;
|
||||
LOG_D(MAC,"[UE %d] configure CBA group %d RNTI %x for eNB %d (total active cba group %d)\n",
|
||||
Mod_id,Mod_id%num_active_cba_groups, cba_rnti,eNB_index,num_active_cba_groups);
|
||||
mac_xface->phy_config_cba_rnti(Mod_id,eNB_flag,eNB_index,cba_rnti,num_active_cba_groups-1, num_active_cba_groups);
|
||||
}
|
||||
}else {
|
||||
if (cba_rnti) {
|
||||
LOG_D(MAC,"[eNB %d] configure CBA RNTI for UE %d (total active cba groups %d)\n",
|
||||
Mod_id, UE_id, num_active_cba_groups);
|
||||
eNB_mac_inst[Mod_id].num_active_cba_groups=num_active_cba_groups;
|
||||
for (i=0; i < num_active_cba_groups; i ++){
|
||||
if (eNB_mac_inst[Mod_id].cba_rnti[i] != cba_rnti + i)
|
||||
eNB_mac_inst[Mod_id].cba_rnti[i] = cba_rnti + i;
|
||||
//only configure UE ids up to num_active_cba_groups
|
||||
//we use them as candidates for the transmission of dci format0)
|
||||
if (UE_id%num_active_cba_groups == i){
|
||||
mac_xface->phy_config_cba_rnti(Mod_id,eNB_flag,UE_id,cba_rnti + i,i,num_active_cba_groups );
|
||||
LOG_D(MAC,"[eNB %d] configure CBA groups %d with RNTI %x for UE %d (total active cba groups %d)\n",
|
||||
Mod_id, i, eNB_mac_inst[Mod_id].cba_rnti[i],UE_id, num_active_cba_groups);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*________________________MAC/extern.h________________________
|
||||
|
||||
Authors : Hicham Anouar, Raymond Knopp
|
||||
Company : EURECOM
|
||||
Emails : anouar@eurecom.fr, knopp@eurecom.fr
|
||||
________________________________________________________________*/
|
||||
|
||||
|
||||
#ifndef __MAC_EXTERN_H__
|
||||
#define __MAC_EXTERN_H__
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
//#include "stdio.h"
|
||||
#endif //USER_MODE
|
||||
#include "PHY/defs.h"
|
||||
#include "defs.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#ifdef PHY_EMUL
|
||||
//#include "SIMULATION/simulation_defs.h"
|
||||
#endif //PHY_EMUL
|
||||
#include "PHY_INTERFACE/defs.h"
|
||||
|
||||
extern const u32 BSR_TABLE[BSR_TABLE_SIZE];
|
||||
//extern u32 EBSR_Level[63];
|
||||
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
extern eNB_MAC_INST *eNB_mac_inst;
|
||||
extern MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
extern u8 Is_rrc_registered;
|
||||
|
||||
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
|
||||
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
|
||||
|
||||
|
||||
|
||||
//#ifndef USER_MODE
|
||||
extern MAC_xface *mac_xface;
|
||||
extern RRC_XFACE *Rrc_xface;
|
||||
|
||||
extern u8 Is_rrc_registered;
|
||||
|
||||
#ifndef PHY_EMUL
|
||||
#ifndef PHYSIM
|
||||
#define NB_INST 1
|
||||
#else
|
||||
extern unsigned char NB_INST;
|
||||
#endif
|
||||
extern unsigned char NB_eNB_INST;
|
||||
extern unsigned char NB_UE_INST;
|
||||
extern unsigned short NODE_ID[1];
|
||||
extern void* bigphys_malloc(int);
|
||||
#else
|
||||
extern EMULATION_VARS *Emul_vars;
|
||||
#endif //PHY_EMUL
|
||||
|
||||
|
||||
extern u32 RRC_CONNECTION_FLAG;
|
||||
|
||||
|
||||
extern DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
|
||||
|
||||
extern DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
|
||||
extern DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
|
||||
extern DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
|
||||
extern DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
extern DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
|
||||
extern DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
extern DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
|
||||
extern DCI1A_5MHz_FDD_t RA_alloc_pdu_fdd;
|
||||
extern DCI1A_5MHz_FDD_t BCCH_alloc_pdu_fdd;
|
||||
|
||||
extern DCI1A_5MHz_FDD_t CCCH_alloc_pdu_fdd;
|
||||
extern DCI1_5MHz_FDD_t DLSCH_alloc_pdu_fdd;
|
||||
|
||||
extern DCI2_5MHz_2A_L10PRB_TDD_t DLSCH_alloc_pdu1;
|
||||
extern DCI2_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2;
|
||||
extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
|
||||
|
||||
#endif //DEF_H
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2010 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file l1_helper.c
|
||||
* \brief phy helper function
|
||||
* \author Raymond Knopp
|
||||
* \date 2012
|
||||
* \version 0.5
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
|
||||
s8 get_Po_NOMINAL_PUSCH(u8 Mod_id) {
|
||||
RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
|
||||
|
||||
if (UE_mac_inst[Mod_id].radioResourceConfigCommon)
|
||||
rach_ConfigCommon = &UE_mac_inst[Mod_id].radioResourceConfigCommon->rach_ConfigCommon;
|
||||
else {
|
||||
LOG_E(MAC,"[UE %d] FATAL radioResourceConfigCommon is NULL !!!\n",Mod_id);
|
||||
mac_xface->macphy_exit("");
|
||||
}
|
||||
|
||||
return(-120 + (rach_ConfigCommon->powerRampingParameters.preambleInitialReceivedTargetPower<<1) +
|
||||
get_DELTA_PREAMBLE(Mod_id));
|
||||
}
|
||||
|
||||
s8 get_deltaP_rampup(u8 Mod_id) {
|
||||
|
||||
LOG_D(MAC,"[PUSCH]%d dB\n",UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER<<1);
|
||||
return((s8)(UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER<<1));
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
#define UL_RB_ALLOC mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,0,24)
|
||||
#define BCCH_RB_ALLOC mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,0,4)
|
||||
#define RA_RB_ALLOC mac_xface->computeRIV(mac_xface->lte_frame_parms->N_RB_UL,0,4)
|
||||
#define DLSCH_RB_ALLOC 0x1fff
|
||||
#include "extern.h"
|
||||
|
||||
|
||||
void init_transport_channels(unsigned char transmission_mode) {
|
||||
|
||||
// init DCI structures for testing
|
||||
|
||||
UL_alloc_pdu.type = 0;
|
||||
UL_alloc_pdu.hopping = 0;
|
||||
UL_alloc_pdu.rballoc = UL_RB_ALLOC;
|
||||
UL_alloc_pdu.mcs = 2;
|
||||
UL_alloc_pdu.ndi = 1;
|
||||
UL_alloc_pdu.TPC = 0;
|
||||
UL_alloc_pdu.cqi_req = 1;
|
||||
|
||||
|
||||
BCCH_alloc_pdu.type = 1;
|
||||
BCCH_alloc_pdu.vrb_type = 0;
|
||||
BCCH_alloc_pdu.rballoc = BCCH_RB_ALLOC;
|
||||
BCCH_alloc_pdu.ndi = 1;
|
||||
BCCH_alloc_pdu.rv = 1;
|
||||
BCCH_alloc_pdu.mcs = 1;
|
||||
BCCH_alloc_pdu.harq_pid = 0;
|
||||
BCCH_alloc_pdu.TPC = 1; // set to 3 PRB
|
||||
|
||||
// for FDD mode
|
||||
BCCH_alloc_pdu_fdd.type = 1;
|
||||
BCCH_alloc_pdu_fdd.vrb_type = 0;
|
||||
BCCH_alloc_pdu_fdd.rballoc = BCCH_RB_ALLOC;
|
||||
BCCH_alloc_pdu_fdd.ndi = 1;
|
||||
BCCH_alloc_pdu_fdd.rv = 1;
|
||||
BCCH_alloc_pdu_fdd.mcs = 1;
|
||||
BCCH_alloc_pdu_fdd.harq_pid = 0;
|
||||
BCCH_alloc_pdu_fdd.TPC = 1; // set to 3 PRB
|
||||
|
||||
DLSCH_alloc_pdu1A.type = 1;
|
||||
DLSCH_alloc_pdu1A.vrb_type = 0;
|
||||
DLSCH_alloc_pdu1A.rballoc = BCCH_RB_ALLOC;
|
||||
DLSCH_alloc_pdu1A.ndi = 1;
|
||||
DLSCH_alloc_pdu1A.rv = 1;
|
||||
DLSCH_alloc_pdu1A.mcs = 2;
|
||||
DLSCH_alloc_pdu1A.harq_pid = 0;
|
||||
DLSCH_alloc_pdu1A.TPC = 1; // set to 3 PRB
|
||||
|
||||
DLSCH_alloc_pdu1A_fdd.type = 1;
|
||||
DLSCH_alloc_pdu1A_fdd.vrb_type = 0;
|
||||
DLSCH_alloc_pdu1A_fdd.rballoc = BCCH_RB_ALLOC;
|
||||
DLSCH_alloc_pdu1A_fdd.ndi = 1;
|
||||
DLSCH_alloc_pdu1A_fdd.rv = 1;
|
||||
DLSCH_alloc_pdu1A_fdd.mcs = 2;
|
||||
DLSCH_alloc_pdu1A_fdd.harq_pid = 0;
|
||||
DLSCH_alloc_pdu1A_fdd.TPC = 1; // set to 3 PRB
|
||||
|
||||
RA_alloc_pdu.type = 1;
|
||||
RA_alloc_pdu.vrb_type = 0;
|
||||
RA_alloc_pdu.rballoc = RA_RB_ALLOC;
|
||||
RA_alloc_pdu.ndi = 1;
|
||||
RA_alloc_pdu.rv = 0;
|
||||
RA_alloc_pdu.mcs = 0;
|
||||
RA_alloc_pdu.harq_pid = 0;
|
||||
RA_alloc_pdu.TPC = 1;
|
||||
|
||||
RA_alloc_pdu_fdd.type = 1;
|
||||
RA_alloc_pdu_fdd.vrb_type = 0;
|
||||
RA_alloc_pdu_fdd.rballoc = RA_RB_ALLOC;
|
||||
RA_alloc_pdu_fdd.ndi = 1;
|
||||
RA_alloc_pdu_fdd.rv = 1;
|
||||
RA_alloc_pdu_fdd.mcs = 1;
|
||||
RA_alloc_pdu_fdd.harq_pid = 0;
|
||||
RA_alloc_pdu_fdd.TPC = 1;
|
||||
|
||||
|
||||
DLSCH_alloc_pdu1.rballoc = 0xf;
|
||||
DLSCH_alloc_pdu1.TPC = 0;
|
||||
DLSCH_alloc_pdu1.dai = 0;
|
||||
DLSCH_alloc_pdu1.harq_pid = 0;
|
||||
DLSCH_alloc_pdu1.tb_swap = 0;
|
||||
DLSCH_alloc_pdu1.mcs1 = 4;
|
||||
DLSCH_alloc_pdu1.ndi1 = 1;
|
||||
DLSCH_alloc_pdu1.rv1 = 0;
|
||||
// Forget second codeword
|
||||
if (transmission_mode == 6)
|
||||
DLSCH_alloc_pdu1.tpmi = 5; // PUSCH_PRECODING0
|
||||
else
|
||||
DLSCH_alloc_pdu1.tpmi = 0;
|
||||
|
||||
DLSCH_alloc_pdu2.rah = 0;
|
||||
DLSCH_alloc_pdu2.rballoc = DLSCH_RB_ALLOC;
|
||||
DLSCH_alloc_pdu2.TPC = 0;
|
||||
DLSCH_alloc_pdu2.dai = 0;
|
||||
DLSCH_alloc_pdu2.harq_pid = 0;
|
||||
DLSCH_alloc_pdu2.tb_swap = 0;
|
||||
DLSCH_alloc_pdu2.mcs1 = 4;
|
||||
DLSCH_alloc_pdu2.ndi1 = 1;
|
||||
DLSCH_alloc_pdu2.rv1 = 0;
|
||||
// Forget second codeword
|
||||
if (transmission_mode == 6)
|
||||
DLSCH_alloc_pdu2.tpmi = 5; // PUSCH_PRECODING0
|
||||
else
|
||||
DLSCH_alloc_pdu2.tpmi = 0;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,445 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2010 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file main.c
|
||||
* \brief top init of Layer 2
|
||||
* \author Raymond Knopp and Navid Nikaein
|
||||
* \date 2011
|
||||
* \version 0.5
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include "LAYER2/register.h"
|
||||
#else
|
||||
#ifdef KERNEL2_6
|
||||
//#include <linux/config.h>
|
||||
#include <linux/slab.h>
|
||||
#endif
|
||||
|
||||
#ifdef KERNEL2_4
|
||||
#include <linux/malloc.h>
|
||||
#include <linux/wrapper.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif //USER_MODE
|
||||
|
||||
#include "defs.h"
|
||||
#include "extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "PHY_INTERFACE/defs.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "SCHED/defs.h"
|
||||
#include "LAYER2/PDCP/pdcp.h"
|
||||
#include "RRC/LITE/defs.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#ifdef PHY_EMUL
|
||||
#include "SIMULATION/simulation_defs.h"
|
||||
#endif //PHY_EMUL
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
|
||||
//#ifdef BIGPHYSAREA
|
||||
//extern void *bigphys_malloc(int);
|
||||
//#endif
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
void dl_phy_sync_success(unsigned char Mod_id,
|
||||
u32 frame,
|
||||
unsigned char eNB_index,
|
||||
u8 first_sync){ //init as MR
|
||||
/***********************************************************************/
|
||||
// msg("[MAC]Node %d, PHY SYNC to eNB_index %d\n",NODE_ID[Mod_id],eNB_index);
|
||||
if (first_sync==1) {
|
||||
if( (layer2_init_UE(Mod_id)==-1) ||
|
||||
(openair_rrc_ue_init(Mod_id,eNB_index)==-1) ) {
|
||||
//(openair_rrc_lite_ue_init(Mod_id,eNB_index)==-1) ) {
|
||||
// Mac_rlc_xface->Is_cluster_head[Mod_id]=2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mac_in_sync_ind(Mod_id,frame,eNB_index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
void mrbch_phy_sync_failure(u8 Mod_id, u32 frame, u8 Free_ch_index){//init as CH
|
||||
/***********************************************************************/
|
||||
LOG_I(MAC,"FRAME %d: Node %d, NO PHY SYNC to master\n",frame,Mod_id);
|
||||
//if((layer2_init_eNB(Mod_id, Free_ch_index)==-1) || ( openair_rrc_lite_eNB_init(Mod_id)==-1)){
|
||||
if((layer2_init_eNB(Mod_id, Free_ch_index)==-1) || ( openair_rrc_eNB_init(Mod_id)==-1)){
|
||||
// Mac_rlc_xface->Is_cluster_head[Mod_id]=2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
char layer2_init_eNB(unsigned char Mod_id, unsigned char eNB_index){
|
||||
/***********************************************************************/
|
||||
|
||||
Mac_rlc_xface->Is_cluster_head[Mod_id]=1;
|
||||
|
||||
// msg("\nMAC: INIT eNB %d Successful \n\n",Mod_id);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
char layer2_init_UE(unsigned char Mod_id){
|
||||
/***********************************************************************/
|
||||
Mac_rlc_xface->Is_cluster_head[NB_eNB_INST + Mod_id]=0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
void mac_UE_out_of_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index){
|
||||
/***********************************************************************/
|
||||
|
||||
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frame, eNB_index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
int mac_top_init(int eMBMS_active, u8 cba_group_active){
|
||||
/***********************************************************************/
|
||||
unsigned char Mod_id,i,j;
|
||||
RA_TEMPLATE *RA_template;
|
||||
UE_TEMPLATE *UE_template;
|
||||
|
||||
LOG_I(MAC,"[MAIN] Init function start:Nb_UE_INST=%d\n",NB_UE_INST);
|
||||
if (NB_UE_INST>0) {
|
||||
UE_mac_inst = (UE_MAC_INST*)malloc16(NB_UE_INST*sizeof(UE_MAC_INST));
|
||||
if (UE_mac_inst == NULL) {
|
||||
LOG_C(MAC,"[MAIN] Can't ALLOCATE %d Bytes for %d UE_MAC_INST with size %d \n",NB_UE_INST*sizeof(UE_MAC_INST),NB_UE_INST,sizeof(UE_MAC_INST));
|
||||
mac_xface->macphy_exit("[MAC][MAIN] not enough memory for UEs \n");
|
||||
}
|
||||
LOG_D(MAC,"[MAIN] ALLOCATE %d Bytes for %d UE_MAC_INST @ %p\n",NB_UE_INST*sizeof(UE_MAC_INST),NB_UE_INST,UE_mac_inst);
|
||||
bzero(UE_mac_inst,NB_UE_INST*sizeof(UE_MAC_INST));
|
||||
ue_init_mac();
|
||||
}
|
||||
else
|
||||
UE_mac_inst = NULL;
|
||||
|
||||
LOG_I(MAC,"[MAIN] Init function start:Nb_eNB_INST=%d\n",NB_eNB_INST);
|
||||
if (NB_eNB_INST>0) {
|
||||
eNB_mac_inst = (eNB_MAC_INST*)malloc16(NB_eNB_INST*sizeof(eNB_MAC_INST));
|
||||
if (eNB_mac_inst == NULL){
|
||||
LOG_D(MAC,"[MAIN] can't ALLOCATE %d Bytes for %d eNB_MAC_INST with size %d \n",NB_eNB_INST*sizeof(eNB_MAC_INST),NB_eNB_INST,sizeof(eNB_MAC_INST));
|
||||
mac_xface->macphy_exit("[MAC][MAIN] not enough memory for eNB \n");
|
||||
}
|
||||
LOG_D(MAC,"[MAIN] ALLOCATE %d Bytes for %d eNB_MAC_INST @ %p\n",NB_eNB_INST*sizeof(eNB_MAC_INST),NB_eNB_INST,eNB_mac_inst);
|
||||
bzero(eNB_mac_inst,NB_eNB_INST*sizeof(eNB_MAC_INST));
|
||||
}
|
||||
else
|
||||
eNB_mac_inst = NULL;
|
||||
|
||||
for(Mod_id=0;Mod_id<NB_eNB_INST;Mod_id++){
|
||||
|
||||
#ifdef PHY_EMUL
|
||||
Mac_rlc_xface->Is_cluster_head[Mod_id]=2;//0: MR, 1: CH, 2: not CH neither MR
|
||||
#endif
|
||||
#ifdef Rel10
|
||||
int n;
|
||||
for (n=0;n<4096;n++)
|
||||
eNB_mac_inst[Mod_id].MCH_pdu.payload[n] = taus();
|
||||
// Mac_rlc_xface->Node_id[Mod_id]=NODE_ID[Mod_id];
|
||||
#endif
|
||||
}
|
||||
// Mac_rlc_xface->frame=Mac_rlc_xface->frame;
|
||||
|
||||
|
||||
if (Is_rrc_registered == 1){
|
||||
LOG_I(MAC,"[MAIN] calling RRC\n");
|
||||
#ifndef CELLULAR //nothing to be done yet for cellular
|
||||
openair_rrc_top_init(eMBMS_active, cba_group_active);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
LOG_I(MAC,"[MAIN] Running without an RRC\n");
|
||||
}
|
||||
#ifndef USER_MODE
|
||||
#ifndef PHY_EMUL
|
||||
LOG_I(MAC,"[MAIN] add openair2 proc\n");
|
||||
//// add_openair2_stats();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
init_transport_channels(2);
|
||||
|
||||
// Set up DCIs for TDD 5MHz Config 1..6
|
||||
|
||||
for (i=0;i<NB_eNB_INST;i++) {
|
||||
LOG_D(MAC,"[MAIN][eNB %d] initializing RA_template\n",i);
|
||||
LOG_D(MAC, "[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]\n", i);
|
||||
|
||||
RA_template = (RA_TEMPLATE *)&eNB_mac_inst[i].RA_template[0];
|
||||
for (j=0;j<NB_RA_PROC_MAX;j++) {
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD) {
|
||||
memcpy((void *)&RA_template[j].RA_alloc_pdu1[0],(void *)&RA_alloc_pdu,sizeof(DCI1A_5MHz_TDD_1_6_t));
|
||||
memcpy((void *)&RA_template[j].RA_alloc_pdu2[0],(void *)&DLSCH_alloc_pdu1A,sizeof(DCI1A_5MHz_TDD_1_6_t));
|
||||
RA_template[j].RA_dci_size_bytes1 = sizeof(DCI1A_5MHz_TDD_1_6_t);
|
||||
RA_template[j].RA_dci_size_bytes2 = sizeof(DCI1A_5MHz_TDD_1_6_t);
|
||||
RA_template[j].RA_dci_size_bits1 = sizeof_DCI1A_5MHz_TDD_1_6_t;
|
||||
RA_template[j].RA_dci_size_bits2 = sizeof_DCI1A_5MHz_TDD_1_6_t;
|
||||
}
|
||||
else {
|
||||
memcpy((void *)&RA_template[j].RA_alloc_pdu1[0],(void *)&RA_alloc_pdu_fdd,sizeof(DCI1A_5MHz_FDD_t));
|
||||
memcpy((void *)&RA_template[j].RA_alloc_pdu2[0],(void *)&DLSCH_alloc_pdu1A_fdd,sizeof(DCI1A_5MHz_FDD_t));
|
||||
RA_template[j].RA_dci_size_bytes1 = sizeof(DCI1A_5MHz_FDD_t);
|
||||
RA_template[j].RA_dci_size_bytes2 = sizeof(DCI1A_5MHz_FDD_t);
|
||||
RA_template[j].RA_dci_size_bits1 = sizeof_DCI1A_5MHz_FDD_t;
|
||||
RA_template[j].RA_dci_size_bits2 = sizeof_DCI1A_5MHz_FDD_t;
|
||||
}
|
||||
RA_template[j].RA_dci_fmt1 = format1A;
|
||||
RA_template[j].RA_dci_fmt2 = format1A;
|
||||
}
|
||||
|
||||
memset (&eNB_mac_inst[i].eNB_stats,0,sizeof(eNB_STATS));
|
||||
UE_template = (UE_TEMPLATE *)&eNB_mac_inst[i].UE_template[0];
|
||||
for (j=0;j<NUMBER_OF_UE_MAX;j++) {
|
||||
UE_template[j].rnti=0;
|
||||
// initiallize the eNB to UE statistics
|
||||
memset (&eNB_mac_inst[i].eNB_UE_stats[j],0,sizeof(eNB_UE_STATS));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//ICIC init param
|
||||
#ifdef ICIC
|
||||
SB_size=mac_xface->get_SB_size(mac_xface->lte_frame_parms->N_RB_DL);
|
||||
|
||||
srand (time(NULL));
|
||||
|
||||
for(j=0;j<NB_eNB_INST;j++){
|
||||
eNB_mac_inst[j].sbmap_conf.first_subframe=0;
|
||||
eNB_mac_inst[j].sbmap_conf.periodicity=10;
|
||||
eNB_mac_inst[j].sbmap_conf.sb_size=SB_size;
|
||||
eNB_mac_inst[j].sbmap_conf.nb_active_sb=1;
|
||||
for(i=0;i<NUMBER_OF_SUBBANDS;i++)
|
||||
eNB_mac_inst[j].sbmap_conf.sbmap[i]=1;
|
||||
|
||||
eNB_mac_inst[j].sbmap_conf.sbmap[rand()%NUMBER_OF_SUBBANDS]=0;
|
||||
|
||||
}
|
||||
#endif
|
||||
//end ALU's algo
|
||||
|
||||
LOG_I(MAC,"[MAIN][INIT] Init function finished\n");
|
||||
|
||||
return(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
int mac_init_global_param(void){
|
||||
/***********************************************************************/
|
||||
|
||||
Is_rrc_registered=0;
|
||||
Mac_rlc_xface = NULL;
|
||||
LOG_I(MAC,"[MAIN] CALLING RLC_MODULE_INIT...\n");
|
||||
|
||||
if (rlc_module_init()!=0)
|
||||
return(-1);
|
||||
|
||||
LOG_I(MAC,"[MAIN] RLC_MODULE_INIT OK, malloc16 for mac_rlc_xface...\n");
|
||||
|
||||
Mac_rlc_xface = (MAC_RLC_XFACE*)malloc16(sizeof(MAC_RLC_XFACE));
|
||||
bzero(Mac_rlc_xface,sizeof(MAC_RLC_XFACE));
|
||||
|
||||
if(Mac_rlc_xface == NULL){
|
||||
LOG_E(MAC,"[MAIN] FATAL EROOR: Could not allocate memory for Mac_rlc_xface !!!\n");
|
||||
return (-1);
|
||||
|
||||
}
|
||||
|
||||
LOG_I(MAC,"[MAIN] malloc16 OK, mac_rlc_xface @ %p\n",(void *)Mac_rlc_xface);
|
||||
|
||||
// mac_xface->macphy_data_ind=macphy_data_ind;
|
||||
mac_xface->mrbch_phy_sync_failure=mrbch_phy_sync_failure;
|
||||
mac_xface->dl_phy_sync_success=dl_phy_sync_success;
|
||||
mac_xface->out_of_sync_ind=mac_out_of_sync_ind;
|
||||
|
||||
// Mac_rlc_xface->macphy_exit= mac_xface->macphy_exit;
|
||||
// Mac_rlc_xface->frame = 0;
|
||||
// Mac_rlc_xface->mac_config_req=mac_config_req;
|
||||
// Mac_rlc_xface->mac_meas_req=mac_meas_req;
|
||||
// Mac_rlc_xface->rrc_rlc_config_req=rrc_rlc_config_req;
|
||||
// Mac_rlc_xface->rrc_rlc_data_req=rrc_rlc_data_req;
|
||||
// Mac_rlc_xface->rrc_rlc_register_rrc=rrc_rlc_register_rrc;
|
||||
|
||||
// Mac_rlc_xface->rrc_mac_config_req=rrc_mac_config_req;
|
||||
|
||||
// LOG_I(MAC,"[MAIN] INIT_GLOBAL_PARAM: Mac_rlc_xface=%p,rrc_rlc_register_rrc =%p\n",Mac_rlc_xface,Mac_rlc_xface->rrc_rlc_register_rrc);
|
||||
|
||||
// Mac_rlc_xface->mac_rlc_data_req=mac_rlc_data_req;
|
||||
// Mac_rlc_xface->mac_rlc_data_ind=mac_rlc_data_ind;
|
||||
// Mac_rlc_xface->mac_rlc_status_ind=mac_rlc_status_ind;
|
||||
// Mac_rlc_xface->pdcp_data_req=pdcp_data_req;
|
||||
// Mac_rlc_xface->mrbch_phy_sync_failure=mrbch_phy_sync_failure;
|
||||
// Mac_rlc_xface->dl_phy_sync_success=dl_phy_sync_success;
|
||||
|
||||
LOG_I(MAC,"[MAIN] RLC interface setup and init\n");
|
||||
rrc_init_global_param();
|
||||
Is_rrc_registered=1;
|
||||
#ifdef USER_MODE
|
||||
pdcp_layer_init ();
|
||||
#else
|
||||
pdcp_module_init ();
|
||||
#endif
|
||||
|
||||
LOG_I(MAC,"[MAIN] Init Global Param Done\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
void mac_top_cleanup(void){
|
||||
/***********************************************************************/
|
||||
#ifndef USER_MODE
|
||||
pdcp_module_cleanup ();
|
||||
#endif
|
||||
if (NB_UE_INST>0)
|
||||
free (UE_mac_inst);
|
||||
if (NB_eNB_INST>0)
|
||||
free(eNB_mac_inst);
|
||||
free( Mac_rlc_xface);
|
||||
}
|
||||
|
||||
int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, u8 cba_group_active) {
|
||||
|
||||
|
||||
|
||||
LOG_I(MAC,"[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
|
||||
// NB_NODE=2;
|
||||
// NB_INST=2;
|
||||
|
||||
|
||||
mac_init_global_param();
|
||||
|
||||
|
||||
mac_xface->macphy_init=(void (*)(void))mac_top_init;
|
||||
#ifndef USER_MODE
|
||||
mac_xface->macphy_exit = openair_sched_exit;
|
||||
#else
|
||||
mac_xface->macphy_exit=(void (*)(const char*)) exit;
|
||||
#endif
|
||||
LOG_I(MAC,"[MAIN] init eNB MAC functions \n");
|
||||
mac_xface->eNB_dlsch_ulsch_scheduler = eNB_dlsch_ulsch_scheduler;
|
||||
mac_xface->get_dci_sdu = get_dci_sdu;
|
||||
mac_xface->fill_rar = fill_rar;
|
||||
mac_xface->terminate_ra_proc = terminate_ra_proc;
|
||||
mac_xface->initiate_ra_proc = initiate_ra_proc;
|
||||
mac_xface->cancel_ra_proc = cancel_ra_proc;
|
||||
mac_xface->SR_indication = SR_indication;
|
||||
mac_xface->rx_sdu = rx_sdu;
|
||||
mac_xface->get_dlsch_sdu = get_dlsch_sdu;
|
||||
mac_xface->get_eNB_UE_stats = get_eNB_UE_stats;
|
||||
mac_xface->get_transmission_mode = get_transmission_mode;
|
||||
mac_xface->get_rballoc = get_rballoc;
|
||||
mac_xface->get_nb_rb = conv_nprb;
|
||||
mac_xface->get_SB_size = Get_SB_size;
|
||||
mac_xface->get_subframe_direction = get_subframe_direction;
|
||||
mac_xface->Msg3_transmitted = Msg3_tx;
|
||||
mac_xface->Msg1_transmitted = Msg1_tx;
|
||||
mac_xface->ra_failed = ra_failed;
|
||||
mac_xface->ra_succeeded = ra_succeeded;
|
||||
|
||||
LOG_I(MAC,"[MAIN] init UE MAC functions \n");
|
||||
mac_xface->ue_decode_si = ue_decode_si;
|
||||
mac_xface->ue_send_sdu = ue_send_sdu;
|
||||
#ifdef Rel10
|
||||
mac_xface->ue_send_mch_sdu = ue_send_mch_sdu;
|
||||
mac_xface->ue_query_mch = ue_query_mch;
|
||||
#endif
|
||||
mac_xface->ue_get_SR = ue_get_SR;
|
||||
mac_xface->ue_get_sdu = ue_get_sdu;
|
||||
mac_xface->ue_get_rach = ue_get_rach;
|
||||
mac_xface->ue_process_rar = ue_process_rar;
|
||||
mac_xface->ue_scheduler = ue_scheduler;
|
||||
mac_xface->process_timing_advance = process_timing_advance;
|
||||
|
||||
|
||||
LOG_I(MAC,"[MAIN] PHY Frame configuration \n");
|
||||
mac_xface->lte_frame_parms = frame_parms;
|
||||
|
||||
mac_xface->get_ue_active_harq_pid = get_ue_active_harq_pid;
|
||||
mac_xface->get_PL = get_PL;
|
||||
mac_xface->get_Po_NOMINAL_PUSCH = get_Po_NOMINAL_PUSCH;
|
||||
mac_xface->get_num_prach_tdd = get_num_prach_tdd;
|
||||
mac_xface->get_fid_prach_tdd = get_fid_prach_tdd;
|
||||
mac_xface->get_deltaP_rampup = get_deltaP_rampup;
|
||||
mac_xface->computeRIV = computeRIV;
|
||||
mac_xface->get_TBS_DL = get_TBS_DL;
|
||||
mac_xface->get_TBS_UL = get_TBS_UL;
|
||||
mac_xface->get_nCCE_max = get_nCCE_max;
|
||||
mac_xface->get_ue_mode = get_ue_mode;
|
||||
mac_xface->phy_config_sib1_eNB = phy_config_sib1_eNB;
|
||||
mac_xface->phy_config_sib1_ue = phy_config_sib1_ue;
|
||||
|
||||
mac_xface->phy_config_sib2_eNB = phy_config_sib2_eNB;
|
||||
mac_xface->phy_config_sib2_ue = phy_config_sib2_ue;
|
||||
|
||||
#ifdef Rel10
|
||||
mac_xface->phy_config_sib13_eNB = phy_config_sib13_eNB;
|
||||
mac_xface->phy_config_sib13_ue = phy_config_sib13_ue;
|
||||
#endif
|
||||
#ifdef CBA
|
||||
mac_xface->phy_config_cba_rnti = phy_config_cba_rnti ;
|
||||
#endif
|
||||
mac_xface->phy_config_meas_ue = phy_config_meas_ue;
|
||||
|
||||
mac_xface->phy_config_dedicated_eNB = phy_config_dedicated_eNB;
|
||||
mac_xface->phy_config_dedicated_ue = phy_config_dedicated_ue;
|
||||
|
||||
#ifdef Rel10
|
||||
mac_xface->get_mch_sdu = get_mch_sdu;
|
||||
#endif
|
||||
|
||||
mac_xface->get_PHR = get_PHR;
|
||||
LOG_D(MAC,"[MAIN] ALL INIT OK\n");
|
||||
|
||||
mac_xface->macphy_init(eMBMS_active,cba_group_active);
|
||||
|
||||
//Mac_rlc_xface->Is_cluster_head[0] = 1;
|
||||
//Mac_rlc_xface->Is_cluster_head[1] = 0;
|
||||
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
/*******************************************************************************
|
||||
|
||||
# Eurecom OpenAirInterface
|
||||
# Copyright(c) 1999 - 2013 Eurecom
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms and conditions of the GNU General Public License,
|
||||
# version 2, as published by the Free Software Foundation.
|
||||
|
||||
# This program is distributed in the hope it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
# The full GNU General Public License is included in this distribution in
|
||||
# the file called "COPYING".
|
||||
|
||||
# Contact Information
|
||||
# Openair Admin: openair_admin@eurecom.fr
|
||||
# Openair Tech : openair_tech@eurecom.fr
|
||||
# Forums : http://forums.eurecom.fsr/openairinterface
|
||||
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
|
||||
|
||||
#*****************************************************************************
|
||||
|
||||
# \file openair2_proc.c
|
||||
# \brief
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _mac
|
||||
*/
|
||||
|
||||
#ifndef USER_MODE
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
#endif
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
//#include "RRC/LITE/extern.h"
|
||||
//#include "LAYER2/PDCP/pdcp.h"
|
||||
|
||||
#ifndef USER_MODE
|
||||
static int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
|
||||
#else
|
||||
int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
|
||||
#endif
|
||||
{
|
||||
|
||||
int len = 0,fg,Overhead, Sign;
|
||||
unsigned int i,j,k,kk;
|
||||
unsigned int ue_id, eNB_id;
|
||||
unsigned int Mod_id = 0,CH_index;
|
||||
unsigned int stat_tx_pdcp_sdu;
|
||||
unsigned int stat_tx_pdcp_bytes;
|
||||
unsigned int stat_tx_pdcp_sdu_discarded;
|
||||
unsigned int stat_tx_pdcp_bytes_discarded;
|
||||
unsigned int stat_tx_data_pdu;
|
||||
unsigned int stat_tx_data_bytes;
|
||||
unsigned int stat_tx_retransmit_pdu_by_status;
|
||||
unsigned int stat_tx_retransmit_bytes_by_status;
|
||||
unsigned int stat_tx_retransmit_pdu;
|
||||
unsigned int stat_tx_retransmit_bytes;
|
||||
unsigned int stat_tx_control_pdu;
|
||||
unsigned int stat_tx_control_bytes;
|
||||
unsigned int stat_rx_pdcp_sdu;
|
||||
unsigned int stat_rx_pdcp_bytes;
|
||||
unsigned int stat_rx_data_pdus_duplicate;
|
||||
unsigned int stat_rx_data_bytes_duplicate;
|
||||
unsigned int stat_rx_data_pdu;
|
||||
unsigned int stat_rx_data_bytes;
|
||||
unsigned int stat_rx_data_pdu_dropped;
|
||||
unsigned int stat_rx_data_bytes_dropped;
|
||||
unsigned int stat_rx_data_pdu_out_of_window;
|
||||
unsigned int stat_rx_data_bytes_out_of_window;
|
||||
unsigned int stat_rx_control_pdu;
|
||||
unsigned int stat_rx_control_bytes;
|
||||
unsigned int stat_timer_reordering_timed_out;
|
||||
unsigned int stat_timer_poll_retransmit_timed_out;
|
||||
unsigned int stat_timer_status_prohibit_timed_out;
|
||||
|
||||
// UE part
|
||||
for (ue_id=0;ue_id<NUM_UE_INST;ue_id++){
|
||||
// mod_id used for PDCP and RLC
|
||||
Mod_id = NB_eNB_INST + ue_id ;
|
||||
|
||||
len+=sprintf(&buffer[len],"UE TTI: %d\n",UE_mac_inst[ue_id].frame);
|
||||
|
||||
for (enb_id= 0; enb_id <NUM_eNB_INST;enb_id++) {
|
||||
|
||||
switch (mac_get_rrc_status(eNB_id,0,ue_id) > RRC_CONNECTED) {
|
||||
case RRC_RECONFIGURED :
|
||||
case RRC_CONNECTED:
|
||||
case RRC_SI_RECEIVED:
|
||||
case RRC_IDLE:
|
||||
break;
|
||||
|
||||
if (mac_get_rrc_status(eNB_id,0,ue_id) > RRC_CONNECTED) {
|
||||
// if (UE_mac_inst[ue_id].Dcch_lchan[CH_index].Active==1) {
|
||||
len+=sprintf(&buffer[len],"eNB %d: Wideband SINR %d dB---\n",
|
||||
CH_index,UE_mac_inst[Mod_id].Def_meas[CH_index].Wideband_sinr);
|
||||
len+=sprintf(&buffer[len],"CH %d: Subband SINR (dB) :",
|
||||
CH_index);
|
||||
for (fg=0;fg<NUMBER_OF_MEASUREMENT_SUBBANDS;fg++)
|
||||
len+=sprintf(&buffer[len],"%d ",UE_mac_inst[Mod_id].Def_meas[CH_index].Sinr_meas[0][fg]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
|
||||
|
||||
len+=sprintf(&buffer[len],"BCCH %d, NB_RX_MAC = %d (%d errors)\n",
|
||||
UE_mac_inst[Mod_id].Bcch_lchan[CH_index].Lchan_info.Lchan_id.Index,
|
||||
UE_mac_inst[Mod_id].Bcch_lchan[CH_index].Lchan_info.NB_RX,
|
||||
UE_mac_inst[Mod_id].Bcch_lchan[CH_index].Lchan_info.NB_RX_ERRORS);
|
||||
|
||||
|
||||
|
||||
len+=sprintf(&buffer[len],"CCCH %d, NB_RX_MAC = %d (%d errors)\n",
|
||||
UE_mac_inst[Mod_id].Ccch_lchan[CH_index].Lchan_info.Lchan_id.Index,
|
||||
UE_mac_inst[Mod_id].Ccch_lchan[CH_index].Lchan_info.NB_RX,
|
||||
UE_mac_inst[Mod_id].Ccch_lchan[CH_index].Lchan_info.NB_RX_ERRORS);
|
||||
|
||||
|
||||
len+=sprintf(&buffer[len],"LCHAN %d (DCCH), NB_TX_MAC = %d (%d bits/TTI, %d kbits/sec), NB_RX_MAC = %d (%d errors)\n",
|
||||
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.Lchan_id.Index,
|
||||
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.NB_TX,
|
||||
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.output_rate,
|
||||
(10*UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.output_rate)>>5,
|
||||
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.NB_RX,
|
||||
UE_mac_inst[Mod_id].Dcch_lchan[CH_index].Lchan_info.NB_RX_ERRORS);
|
||||
|
||||
for(i=1;i<NB_RAB_MAX;i++){
|
||||
if (UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Active==1) {
|
||||
Overhead=UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.output_rate - Pdcp_stats_tx_rate[k][CH_index][i];
|
||||
if(Overhead<0){
|
||||
Overhead=-Overhead;
|
||||
Sign=-1;
|
||||
}
|
||||
else Sign=1;
|
||||
len+=sprintf(&buffer[len],"[PDCP]LCHAN %d: NB_TX = %d ,Tx_rate =(%d bits/TTI ,%d Kbits/s), NB_RX = %d ,Rx_rate =(%d bits/TTI ,%d Kbits/s) , LAYER2 TX OVERHEAD: %d Kbits/s\n",
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
Pdcp_stats_tx[k][CH_index][i],
|
||||
Pdcp_stats_tx_rate[k][CH_index][i],
|
||||
(10*Pdcp_stats_tx_rate[k][CH_index][i])>>5,
|
||||
Pdcp_stats_rx[k][CH_index][i],
|
||||
Pdcp_stats_rx_rate[k][CH_index][i],
|
||||
(10*Pdcp_stats_rx_rate[k][CH_index][i])>>5,
|
||||
Sign*(10*Overhead)>>5);
|
||||
|
||||
|
||||
int status = rlc_stat_req (k,
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
&stat_tx_pdcp_sdu,
|
||||
&stat_tx_pdcp_bytes,
|
||||
&stat_tx_pdcp_sdu_discarded,
|
||||
&stat_tx_pdcp_bytes_discarded,
|
||||
&stat_tx_data_pdu,
|
||||
&stat_tx_data_bytes,
|
||||
&stat_tx_retransmit_pdu_by_status,
|
||||
&stat_tx_retransmit_bytes_by_status,
|
||||
&stat_tx_retransmit_pdu,
|
||||
&stat_tx_retransmit_bytes,
|
||||
&stat_tx_control_pdu,
|
||||
&stat_tx_control_bytes,
|
||||
&stat_rx_pdcp_sdu,
|
||||
&stat_rx_pdcp_bytes,
|
||||
&stat_rx_data_pdus_duplicate,
|
||||
&stat_rx_data_bytes_duplicate,
|
||||
&stat_rx_data_pdu,
|
||||
&stat_rx_data_bytes,
|
||||
&stat_rx_data_pdu_dropped,
|
||||
&stat_rx_data_bytes_dropped,
|
||||
&stat_rx_data_pdu_out_of_window,
|
||||
&stat_rx_data_bytes_out_of_window,
|
||||
&stat_rx_control_pdu,
|
||||
&stat_rx_control_bytes,
|
||||
&stat_timer_reordering_timed_out,
|
||||
&stat_timer_poll_retransmit_timed_out,
|
||||
&stat_timer_status_prohibit_timed_out) ;
|
||||
|
||||
if (status == RLC_OP_STATUS_OK) {
|
||||
len+=sprintf(&buffer[len],"RLC LCHAN %d, NB_SDU_TO_TX = %d\tNB_SDU_DISC %d\tNB_RX_SDU %d\n",
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
tx_pdcp_sdu,
|
||||
tx_pdcp_sdu_discarded,
|
||||
rx_sdu);
|
||||
len+=sprintf(&buffer[len],"RLC LCHAN %d, NB_TB_TX_DATA = %d\tNB_TB_TX_CONTROL %d\tNB_TX_TB_RETRANS %d",
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
tx_data_pdu,
|
||||
tx_control_pdu,
|
||||
tx_retransmit_pdu);
|
||||
len+=sprintf(&buffer[len],"\tRLC LCHAN %d, NB_TX_TB_RETRANS_BY_STATUS = %d\tNB_TX_TB_RETRANS_PADD %d\n",
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
tx_retransmit_pdu_by_status,
|
||||
tx_retransmit_pdu_unblock);
|
||||
len+=sprintf(&buffer[len],"RLC LCHAN %d, NB_RX_DATA = %d\tNB_RX_TB_OUT_WIN %d\tNB_RX_TB_CORRUPT %d\n",
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
rx_data_pdu,
|
||||
rx_data_pdu_out_of_window,
|
||||
rx_error_pdu);
|
||||
}
|
||||
|
||||
len+=sprintf(&buffer[len],"[MAC]: LCHAN %d, NB_TX_MAC = %d (%d bits/TTI, %d kbits/s), NB_RX_MAC = %d (%d errors)\n",
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.Lchan_id.Index,
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_TX,
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.output_rate,
|
||||
(10*UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.output_rate)>>5,
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX,
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX_ERRORS);
|
||||
len+=sprintf(&buffer[len]," TX per TB: ");
|
||||
for(kk=0;kk<MAX_NUMBER_TB_PER_LCHAN/2;kk++)
|
||||
len+=sprintf(&buffer[len],"%d . ",UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_TX_TB[kk]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
len+=sprintf(&buffer[len]," RXerr per TB: ");
|
||||
for(kk=0;kk<MAX_NUMBER_TB_PER_LCHAN/2;kk++)
|
||||
len+=sprintf(&buffer[len],"%d/%d . ",UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX_ERRORS_TB[kk],
|
||||
UE_mac_inst[Mod_id].Dtch_lchan[i][CH_index].Lchan_info.NB_RX_TB[kk]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //PHY_EMUL_ONE_MACHINE
|
||||
}
|
||||
|
||||
else if(Mac_rlc_xface->Is_cluster_head[k] ==1){
|
||||
|
||||
Mod_id=k;
|
||||
len+=sprintf(&buffer[len],"-------------------------------------------------------------------CH %d: TTI: %d------------------------------------------------------------------\n",
|
||||
NODE_ID[Mod_id],Mac_rlc_xface->frame);
|
||||
|
||||
for(i=1;i<=NB_CNX_CH;i++){
|
||||
if (CH_mac_inst[Mod_id].Dcch_lchan[i].Active==1) {
|
||||
len+=sprintf(&buffer[len],"\nMR index %d: DL SINR (feedback) %d dB, CQI: %s\n\n",
|
||||
i,//CH_rrc_inst[Mod_id].Info.UE_list[i].L2_id[0],
|
||||
CH_mac_inst[Mod_id].Def_meas[i].Wideband_sinr);
|
||||
//print_cqi(CH_mac_inst[Mod_id].Def_meas[i].cqi));
|
||||
|
||||
len+=sprintf(&buffer[len],"[MAC] LCHAN %d (DCCH), NB_TX_MAC= %d (%d bits/TTI, %d kbits/s), NB_RX_MAC= %d (errors %d, sacch errors %d, sach errors %d, sach_missing %d)\n\n",
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.Lchan_id.Index,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_TX,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.output_rate,
|
||||
(10*CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.output_rate)>>5,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_ERRORS,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_SACCH_ERRORS,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_SACH_ERRORS,
|
||||
CH_mac_inst[Mod_id].Dcch_lchan[i].Lchan_info.NB_RX_SACH_MISSING);
|
||||
|
||||
for(j=0;j<NB_RAB_MAX;j++){
|
||||
if (CH_mac_inst[Mod_id].Dtch_lchan[j][i].Active==1){
|
||||
Overhead=CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.output_rate - Pdcp_stats_tx_rate[k][i][j];
|
||||
if(Overhead<0){
|
||||
Overhead=-Overhead;
|
||||
Sign=-1;
|
||||
}
|
||||
else Sign=1;
|
||||
len+=sprintf(&buffer[len],"[PDCP]LCHAN %d: NB_TX = %d ,Tx_rate =(%d bits/TTI ,%d Kbits/s), NB_RX = %d ,Rx_rate =(%d bits/TTI ,%d Kbits/s), LAYER2 TX OVERHEAD= %d Kbits/s\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
Pdcp_stats_tx[k][i][j],
|
||||
Pdcp_stats_tx_rate[k][i][j],
|
||||
(10*Pdcp_stats_tx_rate[k][i][j])>>5,
|
||||
Pdcp_stats_rx[k][i][j],
|
||||
Pdcp_stats_rx_rate[k][i][j],
|
||||
(10*Pdcp_stats_rx_rate[k][i][j])>>5,
|
||||
Sign*(10*Overhead)>>5);
|
||||
int status = rlc_stat_req (k,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
&tx_pdcp_sdu,
|
||||
&tx_pdcp_sdu_discarded,
|
||||
&tx_retransmit_pdu_unblock,
|
||||
&tx_retransmit_pdu_by_status,
|
||||
&tx_retransmit_pdu,
|
||||
&tx_data_pdu,
|
||||
&tx_control_pdu,
|
||||
&rx_sdu,
|
||||
&rx_error_pdu,
|
||||
&rx_data_pdu,
|
||||
&rx_data_pdu_out_of_window,
|
||||
&rx_control_pdu) ;
|
||||
/*
|
||||
if (status == RLC_OP_STATUS_OK) {
|
||||
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_SDU_TO_TX = %d\tNB_SDU_DISC %d\tNB_RX_SDU %d\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
tx_pdcp_sdu,
|
||||
tx_pdcp_sdu_discarded,
|
||||
rx_sdu);
|
||||
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_TB_TX_DATA = %d\tNB_TB_TX_CONTROL %d\tNB_TX_TB_RETRANS %\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
tx_data_pdu,
|
||||
tx_control_pdu,
|
||||
tx_retransmit_pdu);
|
||||
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_TX_TB_RETRANS_BY_STATUS = %d\tNB_TX_TB_RETRANS_PADD %d\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
tx_retransmit_pdu_by_status,
|
||||
tx_retransmit_pdu_unblock);
|
||||
len+=sprintf(&buffer[len],"\t[RLC] LCHAN %d, NB_RX_DATA = %d\tNB_RX_TB_OUT_WIN %d\tNB_RX_TB_CORRUPT %d\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
rx_data_pdu,
|
||||
rx_data_pdu_out_of_window,
|
||||
rx_error_pdu);
|
||||
}
|
||||
*/
|
||||
len+=sprintf(&buffer[len],"[MAC]LCHAN %d (CNX %d,RAB %d), NB_TX_MAC= %d (%d bits/TTI, %d kbit/s), NB_RX_MAC= %d (errors %d, sacch_errors %d, sach_errors %d, sach_missing %d)\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Lchan_id.Index,
|
||||
i,j,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_TX,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.output_rate,
|
||||
(10*CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.output_rate)>>5,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_ERRORS,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_SACCH_ERRORS,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_SACH_ERRORS,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_SACH_MISSING);
|
||||
len+=sprintf(&buffer[len],"[MAC][SCHEDULER] TX Arrival Rate %d, TX Service Rate %d, RX Arrival rate %d, RX Service rate %d, NB_BW_REQ_RX %d\n\n",
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Arrival_rate,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Tx_rate,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Req_rate,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.Rx_rate,
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_BW_REQ_RX);
|
||||
|
||||
/*
|
||||
len+=sprintf(&buffer[len]," TX per TB: ");
|
||||
for(kk=0;kk<MAX_NUMBER_TB_PER_LCHAN/2;kk++)
|
||||
len+=sprintf(&buffer[len],"%d.",CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_TX_TB[kk]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
len+=sprintf(&buffer[len]," RXerr per TB: ");
|
||||
for(kk=0;kk<MAX_NUMBER_TB_PER_LCHAN/2;kk++)
|
||||
len+=sprintf(&buffer[len],"%d/%d . ",CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_ERRORS_TB[kk],
|
||||
CH_mac_inst[Mod_id].Dtch_lchan[j][i].Lchan_info.NB_RX_TB[kk]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
#ifndef USER_MODE
|
||||
static struct proc_dir_entry *proc_openair2_root;
|
||||
/*
|
||||
* Initialize the module and add the /proc file.
|
||||
*/
|
||||
int add_openair2_stats()
|
||||
{
|
||||
//#ifdef KERNEL_VERSION_GREATER_THAN_2629
|
||||
struct proc_dir_entry *pde;
|
||||
//#endif
|
||||
|
||||
proc_openair2_root = proc_mkdir("openair2",0);
|
||||
//#ifdef KERNEL_VERSION_GREATER_THAN_2629
|
||||
// pde = proc_create_entry("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root);
|
||||
pde = create_proc_read_entry("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root, (read_proc_t*)&openair2_stats_read, NULL);
|
||||
if (!pde)
|
||||
printk("[OPENAIR][ERROR] can't create proc entry !\n");
|
||||
//#else
|
||||
//create_proc_info_entry("lchan_stats", S_IFREG | S_IRUGO, proc_openair2_root, openair2_stats_read);
|
||||
//#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Unregister the file when the module is closed.
|
||||
*/
|
||||
void remove_openair2_stats()
|
||||
{
|
||||
|
||||
if (proc_openair2_root) {
|
||||
printk("[OPENAIR][CLEANUP] Removing openair proc entry\n");
|
||||
remove_proc_entry("lchan_stats", proc_openair2_root);
|
||||
//#ifdef KERNEL_VERSION_GREATER_THAN_2629
|
||||
|
||||
//#else
|
||||
remove_proc_entry("openair2",NULL);
|
||||
//#endif;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,702 @@
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2010 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file pre_processor.c
|
||||
* \brief procedures related to UE
|
||||
* \author Ankit Bhamri
|
||||
* \date 2013
|
||||
* \version 0.1
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/extern.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/defs.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/from_grlib_softregs.h"
|
||||
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
|
||||
|
||||
|
||||
#define DEBUG_eNB_SCHEDULER 1
|
||||
#define DEBUG_HEADER_PARSING 1
|
||||
//#define DEBUG_PACKET_TRACE 1
|
||||
|
||||
//#define ICIC 0
|
||||
|
||||
/*
|
||||
#ifndef USER_MODE
|
||||
#define msg debug_msg
|
||||
#endif
|
||||
*/
|
||||
|
||||
extern inline unsigned int taus(void);
|
||||
|
||||
|
||||
|
||||
// This function stores the downlink buffer for all the logical channels
|
||||
void store_dlsch_buffer (unsigned char Mod_id,
|
||||
u32 frame,
|
||||
unsigned char subframe){
|
||||
|
||||
|
||||
unsigned char next_ue;
|
||||
u16 rnti,i=0;
|
||||
LTE_eNB_UE_stats* eNB_UE_stats;
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
unsigned char UE_id,granted_UEs;
|
||||
|
||||
granted_UEs = find_dlgranted_UEs(Mod_id);
|
||||
|
||||
for (UE_id=0;UE_id<granted_UEs;UE_id++){
|
||||
eNB_mac_inst[Mod_id].UE_template[UE_id].dl_buffer_total = 0;
|
||||
for(i=0;i< MAX_NUM_LCID; i++)
|
||||
eNB_mac_inst[Mod_id].UE_template[UE_id].dl_buffer_info[i]=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (UE_id=0;UE_id<granted_UEs;UE_id++) {
|
||||
|
||||
next_ue = UE_id;
|
||||
rnti = find_UE_RNTI(Mod_id,next_ue);
|
||||
if (rnti == 0)
|
||||
continue;
|
||||
|
||||
for(i=0;i< MAX_NUM_LCID; i++){ // loop over all the logical channels
|
||||
|
||||
rlc_status = mac_rlc_status_ind(Mod_id,frame,1,RLC_MBMS_NO,i+(NB_RB_MAX*next_ue),0 );
|
||||
eNB_mac_inst[Mod_id].UE_template[next_ue].dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
|
||||
|
||||
eNB_mac_inst[Mod_id].UE_template[next_ue].dl_buffer_total = eNB_mac_inst[Mod_id].UE_template[next_ue].dl_buffer_total + eNB_mac_inst[Mod_id].UE_template[next_ue].dl_buffer_info[i];//storing the total dlsch buffer
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This function returns the estimated number of RBs required by each UE for downlink scheduling
|
||||
void assign_rbs_required (unsigned char Mod_id,
|
||||
u32 frame,
|
||||
unsigned char subframe,
|
||||
u16 *nb_rbs_required){
|
||||
|
||||
|
||||
unsigned char next_ue,harq_pid=0,round=0;
|
||||
u16 rnti,TBS = 0;
|
||||
LTE_eNB_UE_stats* eNB_UE_stats;
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
unsigned char UE_id,granted_UEs,i=0;
|
||||
|
||||
|
||||
granted_UEs = find_dlgranted_UEs(Mod_id);
|
||||
|
||||
for (UE_id=0;UE_id<granted_UEs;UE_id++){
|
||||
nb_rbs_required[UE_id] = 0; //initialization
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (UE_id=0;UE_id<granted_UEs;UE_id++) {
|
||||
|
||||
next_ue = UE_id;
|
||||
rnti = find_UE_RNTI(Mod_id,next_ue);
|
||||
if (rnti == 0)
|
||||
continue;
|
||||
|
||||
eNB_UE_stats = mac_xface->get_eNB_UE_stats(Mod_id,rnti);
|
||||
//if(eNB_UE_stats == NULL)
|
||||
//continue;
|
||||
|
||||
|
||||
switch(eNB_UE_stats->DL_cqi[0])
|
||||
{
|
||||
case 0:
|
||||
eNB_UE_stats->dlsch_mcs1 = 0;
|
||||
break;
|
||||
case 1:
|
||||
eNB_UE_stats->dlsch_mcs1 = 0;
|
||||
break;
|
||||
case 2:
|
||||
eNB_UE_stats->dlsch_mcs1 = 0;
|
||||
break;
|
||||
case 3:
|
||||
eNB_UE_stats->dlsch_mcs1 = 2;
|
||||
break;
|
||||
case 4:
|
||||
eNB_UE_stats->dlsch_mcs1 = 4;
|
||||
break;
|
||||
case 5:
|
||||
eNB_UE_stats->dlsch_mcs1 = 6;
|
||||
break;
|
||||
case 6:
|
||||
eNB_UE_stats->dlsch_mcs1 = 8;
|
||||
break;
|
||||
case 7:
|
||||
eNB_UE_stats->dlsch_mcs1 = 11;
|
||||
break;
|
||||
case 8:
|
||||
eNB_UE_stats->dlsch_mcs1 = 13;
|
||||
break;
|
||||
case 9:
|
||||
eNB_UE_stats->dlsch_mcs1 = 16;
|
||||
break;
|
||||
case 10:
|
||||
eNB_UE_stats->dlsch_mcs1 = 18;
|
||||
break;
|
||||
case 11:
|
||||
eNB_UE_stats->dlsch_mcs1 = 20;
|
||||
break;
|
||||
case 12:
|
||||
eNB_UE_stats->dlsch_mcs1 = 22;
|
||||
break;
|
||||
case 13:
|
||||
eNB_UE_stats->dlsch_mcs1 = 22;//25
|
||||
break;
|
||||
case 14:
|
||||
eNB_UE_stats->dlsch_mcs1 = 22;//27
|
||||
break;
|
||||
case 15:
|
||||
eNB_UE_stats->dlsch_mcs1 = 22;//28
|
||||
break;
|
||||
default:
|
||||
printf("Invalid CQI");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue) < RRC_RECONFIGURED)){
|
||||
nb_rbs_required[next_ue] = mac_xface->lte_frame_parms->N_RB_DL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (eNB_mac_inst[Mod_id].UE_template[next_ue].dl_buffer_total> 0) {
|
||||
|
||||
if (eNB_UE_stats->dlsch_mcs1==0) nb_rbs_required[next_ue] = 4; // don't let the TBS get too small
|
||||
else nb_rbs_required[next_ue] = 2;
|
||||
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats->dlsch_mcs1,nb_rbs_required[next_ue]);
|
||||
|
||||
while (TBS < eNB_mac_inst[Mod_id].UE_template[next_ue].dl_buffer_total) {
|
||||
nb_rbs_required[next_ue] += 2;
|
||||
if (nb_rbs_required[next_ue]>mac_xface->lte_frame_parms->N_RB_DL) {
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats->dlsch_mcs1,mac_xface->lte_frame_parms->N_RB_DL);
|
||||
nb_rbs_required[next_ue] = mac_xface->lte_frame_parms->N_RB_DL;// calculating required number of RBs for each UE
|
||||
break;
|
||||
}
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats->dlsch_mcs1,nb_rbs_required[next_ue]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// This fuction sorts the UE in order their dlsch buffer and CQI
|
||||
void sort_UEs (unsigned char Mod_id,
|
||||
unsigned char subframe,
|
||||
u16 *UE_id_sorted){
|
||||
|
||||
unsigned char next_ue1,next_ue2,round1=0,round2=0,harq_pid1=0,harq_pid2=0;
|
||||
u16 UE_id,granted_UEs,i=0,ii=0,j=0,rnti1,rnti2;
|
||||
LTE_eNB_UE_stats* eNB_UE_stats1;
|
||||
LTE_eNB_UE_stats* eNB_UE_stats2;
|
||||
|
||||
|
||||
granted_UEs = find_dlgranted_UEs(Mod_id);
|
||||
|
||||
|
||||
for (UE_id=0;UE_id<granted_UEs;UE_id++) {
|
||||
UE_id_sorted[i] = UE_id;
|
||||
i++;
|
||||
}
|
||||
|
||||
for(i=0; i < granted_UEs;i++){
|
||||
|
||||
next_ue1 = UE_id_sorted[i];
|
||||
|
||||
rnti1 = find_UE_RNTI(Mod_id,next_ue1);
|
||||
if(rnti1 == 0)
|
||||
continue;
|
||||
|
||||
|
||||
eNB_UE_stats1 = mac_xface->get_eNB_UE_stats(Mod_id,rnti1);
|
||||
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti1,subframe,&harq_pid1,&round1,0);
|
||||
|
||||
|
||||
for(ii=i+1;ii<granted_UEs;ii++){
|
||||
|
||||
next_ue2 = UE_id_sorted[ii];
|
||||
|
||||
rnti2 = find_UE_RNTI(Mod_id,next_ue2);
|
||||
if(rnti2 == 0)
|
||||
continue;
|
||||
|
||||
eNB_UE_stats2 = mac_xface->get_eNB_UE_stats(Mod_id,rnti2);
|
||||
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0);
|
||||
|
||||
if(round2 > round1){
|
||||
UE_id_sorted[i] = next_ue2;
|
||||
UE_id_sorted[ii] = next_ue1;
|
||||
}
|
||||
else if (round2 == round1){
|
||||
for(j=0;j<MAX_NUM_LCID;j++){
|
||||
|
||||
if(eNB_mac_inst[Mod_id].UE_template[next_ue1].dl_buffer_info[j] < eNB_mac_inst[Mod_id].UE_template[next_ue2].dl_buffer_info[j]){
|
||||
UE_id_sorted[i] = next_ue2;
|
||||
UE_id_sorted[ii] = next_ue1;
|
||||
break;
|
||||
}
|
||||
else if((j == MAX_NUM_LCID-1))
|
||||
{
|
||||
if(eNB_UE_stats1->DL_cqi[0] < eNB_UE_stats2->DL_cqi[0]){
|
||||
UE_id_sorted[i] = next_ue2;
|
||||
UE_id_sorted[ii] = next_ue1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done
|
||||
void dlsch_scheduler_pre_processor (unsigned char Mod_id,
|
||||
u32 frame,
|
||||
unsigned char subframe,
|
||||
u8 *dl_pow_off,
|
||||
u16 *pre_nb_available_rbs,
|
||||
unsigned char rballoc_sub_UE[256][mac_xface->lte_frame_parms->N_RBGS]){
|
||||
|
||||
unsigned char next_ue,next_ue1,next_ue2,rballoc_sub[mac_xface->lte_frame_parms->N_RBGS],harq_pid=0,harq_pid1=0,harq_pid2=0,round=0,round1=0,round2=0,total_ue_count=0;
|
||||
unsigned char MIMO_mode_indicator[mac_xface->lte_frame_parms->N_RBGS];
|
||||
u16 UE_id,UE_id_sorted[256],granted_UEs,i,ii,j,nb_rbs_required[256],nb_rbs_required_remaining[256],nb_rbs_required_remaining_1[256],i1,i2,i3,r1=0,average_rbs_per_user=0;
|
||||
u16 rnti,rnti1,rnti2;
|
||||
LTE_eNB_UE_stats* eNB_UE_stats1;
|
||||
LTE_eNB_UE_stats* eNB_UE_stats2;
|
||||
u16 min_rb_unit=2;
|
||||
|
||||
granted_UEs = find_dlgranted_UEs(Mod_id);
|
||||
|
||||
|
||||
for(i=0;i<256;i++){
|
||||
nb_rbs_required[i] = 0;
|
||||
UE_id_sorted[i] = i;
|
||||
dl_pow_off[i] =2;
|
||||
pre_nb_available_rbs[i] = 0;
|
||||
nb_rbs_required_remaining[i] = 0;
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++)
|
||||
{
|
||||
MIMO_mode_indicator[j] = 2;
|
||||
rballoc_sub[j] = 0;
|
||||
rballoc_sub_UE[i][j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//printf("SUCCESS %d",mac_xface->lte_frame_parms->N_RBGS);
|
||||
//exit(-1);
|
||||
// Store the DLSCH buffer for each logical channel
|
||||
store_dlsch_buffer (Mod_id,frame,subframe);
|
||||
|
||||
|
||||
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
|
||||
assign_rbs_required (Mod_id,frame,subframe,nb_rbs_required);
|
||||
|
||||
// Sorts the user on the basis of dlsch logical channel buffer and CQI
|
||||
sort_UEs (Mod_id,subframe,UE_id_sorted);
|
||||
//printf ("Frame:%d,SUCCESS %d[%d] %d[%d]\n",frame,UE_id_sorted[0],nb_rbs_required[UE_id_sorted[0]],UE_id_sorted[1],nb_rbs_required[UE_id_sorted[1]]);
|
||||
|
||||
for (i=0;i<granted_UEs;i++){
|
||||
rnti = find_UE_RNTI(Mod_id,i);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti,subframe,&harq_pid,&round,0);
|
||||
if(round>0)
|
||||
nb_rbs_required[i] = eNB_mac_inst[Mod_id].UE_template[i].nb_rb[harq_pid];
|
||||
//nb_rbs_required_remaining[i] = nb_rbs_required[i];
|
||||
if(nb_rbs_required[i] > 0)
|
||||
total_ue_count = total_ue_count + 1;
|
||||
}
|
||||
// hypotetical assignement
|
||||
if((total_ue_count > 0) && ( min_rb_unit * total_ue_count <= mac_xface->lte_frame_parms->N_RB_DL ) )
|
||||
average_rbs_per_user = (u16) ceil(mac_xface->lte_frame_parms->N_RB_DL/total_ue_count);
|
||||
else
|
||||
average_rbs_per_user = min_rb_unit;
|
||||
|
||||
for(i=0;i<granted_UEs;i++){
|
||||
// control channel
|
||||
if (mac_get_rrc_status(Mod_id,1,i) < RRC_RECONFIGURED)
|
||||
nb_rbs_required_remaining_1[i] = nb_rbs_required[i];
|
||||
else
|
||||
nb_rbs_required_remaining_1[i] = cmin(average_rbs_per_user,nb_rbs_required[i]);
|
||||
}
|
||||
|
||||
|
||||
//Allocation to UEs is done in 2 rounds,
|
||||
// 1st round: average number of RBs allocated to each UE
|
||||
// 2nd round: remaining RBs are allocated to high priority UEs
|
||||
for(r1=0;r1<2;r1++){
|
||||
|
||||
for(i=0; i<granted_UEs;i++)
|
||||
{
|
||||
if(r1 == 0)
|
||||
nb_rbs_required_remaining[i] = nb_rbs_required_remaining_1[i];
|
||||
else // rb required based only on the buffer - rb allloctaed in the 1st round + extra reaming rb form the 1st round
|
||||
nb_rbs_required_remaining[i] = nb_rbs_required[i]-nb_rbs_required_remaining_1[i]+nb_rbs_required_remaining[i];
|
||||
}
|
||||
// retransmission in control channels
|
||||
for (i = 0 ;i<granted_UEs; i++){
|
||||
|
||||
next_ue = UE_id_sorted[i];
|
||||
rnti = find_UE_RNTI(Mod_id,next_ue);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti,subframe,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue) < RRC_RECONFIGURED) && (round >0)) {
|
||||
|
||||
|
||||
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++){
|
||||
|
||||
if((rballoc_sub[j] == 0) && (rballoc_sub_UE[next_ue][j] == 0) && (nb_rbs_required_remaining[next_ue]>0)){
|
||||
|
||||
rballoc_sub[j] = 1;
|
||||
rballoc_sub_UE[next_ue][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[j] = 1;
|
||||
|
||||
if(mac_xface->get_transmission_mode(Mod_id,rnti)==5)
|
||||
dl_pow_off[next_ue] = 1;
|
||||
// if the total rb is odd
|
||||
if((j == mac_xface->lte_frame_parms->N_RBGS-1) && (mac_xface->lte_frame_parms->N_RB_DL%2 == 1)){
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 1;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - min_rb_unit;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + min_rb_unit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// retransmission in data channels
|
||||
for (i = 0 ;i<granted_UEs; i++){
|
||||
|
||||
next_ue = UE_id_sorted[i];
|
||||
rnti = find_UE_RNTI(Mod_id,next_ue);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti,subframe,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue) >= RRC_RECONFIGURED) && (round > 0)) {
|
||||
|
||||
|
||||
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++){
|
||||
|
||||
if((rballoc_sub[j] == 0) && (rballoc_sub_UE[next_ue][j] == 0) && (nb_rbs_required_remaining[next_ue]>0)){
|
||||
|
||||
rballoc_sub[j] = 1;
|
||||
rballoc_sub_UE[next_ue][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[j] = 1;
|
||||
|
||||
if(mac_xface->get_transmission_mode(Mod_id,rnti)==5)
|
||||
dl_pow_off[next_ue] = 1;
|
||||
|
||||
if((j == mac_xface->lte_frame_parms->N_RBGS-1) && (mac_xface->lte_frame_parms->N_RB_DL%2 == 1)){
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 1;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 2;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// control channel in the 1st transmission
|
||||
for (i = 0 ;i<granted_UEs; i++){
|
||||
|
||||
next_ue = UE_id_sorted[i];
|
||||
rnti = find_UE_RNTI(Mod_id,next_ue);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti,subframe,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue) < RRC_RECONFIGURED) && (round == 0)) {
|
||||
|
||||
|
||||
|
||||
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++){
|
||||
|
||||
if((rballoc_sub[j] == 0) && (rballoc_sub_UE[next_ue][j] == 0) && (nb_rbs_required_remaining[next_ue]>0)){
|
||||
|
||||
rballoc_sub[j] = 1;
|
||||
rballoc_sub_UE[next_ue][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[j] = 1;
|
||||
|
||||
if(mac_xface->get_transmission_mode(Mod_id,rnti)==5)
|
||||
dl_pow_off[next_ue] = 1;
|
||||
|
||||
if((j == mac_xface->lte_frame_parms->N_RBGS-1) && (mac_xface->lte_frame_parms->N_RB_DL%2 == 1)){
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 1;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 2;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// data chanel TM5
|
||||
for (i = 0 ;i<granted_UEs; i++){
|
||||
|
||||
|
||||
next_ue1 = UE_id_sorted[i];
|
||||
rnti1 = find_UE_RNTI(Mod_id,next_ue1);
|
||||
if(rnti1 == 0)
|
||||
continue;
|
||||
|
||||
eNB_UE_stats1 = mac_xface->get_eNB_UE_stats(Mod_id,rnti1);
|
||||
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti1,subframe,&harq_pid1,&round1,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue1) >= RRC_RECONFIGURED) && (round1==0) && (mac_xface->get_transmission_mode(Mod_id,rnti1)==5) && (dl_pow_off[next_ue1] != 1)) {
|
||||
|
||||
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j+=2){
|
||||
|
||||
if((((j == (mac_xface->lte_frame_parms->N_RBGS-1))&& (rballoc_sub[j] == 0) && (rballoc_sub_UE[next_ue1][j] == 0)) || ((j < (mac_xface->lte_frame_parms->N_RBGS-1)) && (rballoc_sub[j+1] == 0) && (rballoc_sub_UE[next_ue1][j+1] == 0))) && (nb_rbs_required_remaining[next_ue1]>0)){
|
||||
|
||||
for (ii = i+1;ii < granted_UEs;ii++) {
|
||||
|
||||
next_ue2 = UE_id_sorted[ii];
|
||||
rnti2 = find_UE_RNTI(Mod_id,next_ue2);
|
||||
if(rnti2 == 0)
|
||||
continue;
|
||||
|
||||
eNB_UE_stats2 = mac_xface->get_eNB_UE_stats(Mod_id,rnti2);
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti2,subframe,&harq_pid2,&round2,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue2) >= RRC_RECONFIGURED) && (round2==0) && (mac_xface->get_transmission_mode(Mod_id,rnti2)==5) && (dl_pow_off[next_ue2] != 1)) {
|
||||
|
||||
if((((j == (mac_xface->lte_frame_parms->N_RBGS-1)) && (rballoc_sub_UE[next_ue2][j] == 0)) || ((j < (mac_xface->lte_frame_parms->N_RBGS-1)) && (rballoc_sub_UE[next_ue2][j+1] == 0))) && (nb_rbs_required_remaining[next_ue2]>0)){
|
||||
|
||||
if((((eNB_UE_stats2->DL_pmi_single^eNB_UE_stats1->DL_pmi_single)<<(14-j))&0xc000)== 0x4000){ //MU-MIMO only for 25 RBs configuration
|
||||
|
||||
rballoc_sub[j] = 1;
|
||||
rballoc_sub_UE[next_ue1][j] = 1;
|
||||
rballoc_sub_UE[next_ue2][j] = 1;
|
||||
MIMO_mode_indicator[j] = 0;
|
||||
|
||||
if (j< mac_xface->lte_frame_parms->N_RBGS-1) {
|
||||
rballoc_sub[j+1] = 1;
|
||||
rballoc_sub_UE[next_ue1][j+1] = 1;
|
||||
rballoc_sub_UE[next_ue2][j+1] = 1;
|
||||
MIMO_mode_indicator[j+1] = 0;
|
||||
}
|
||||
|
||||
dl_pow_off[next_ue1] = 0;
|
||||
dl_pow_off[next_ue2] = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
if((j == mac_xface->lte_frame_parms->N_RBGS-1) && (mac_xface->lte_frame_parms->N_RB_DL%2 == 1)){
|
||||
nb_rbs_required_remaining[next_ue1] = nb_rbs_required_remaining[next_ue1] - 1;
|
||||
pre_nb_available_rbs[next_ue1] = pre_nb_available_rbs[next_ue1] + 1;
|
||||
nb_rbs_required_remaining[next_ue2] = nb_rbs_required_remaining[next_ue2] - 1;
|
||||
pre_nb_available_rbs[next_ue2] = pre_nb_available_rbs[next_ue2] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb_rbs_required_remaining[next_ue1] = nb_rbs_required_remaining[next_ue1] - 4;
|
||||
pre_nb_available_rbs[next_ue1] = pre_nb_available_rbs[next_ue1] + 4;
|
||||
nb_rbs_required_remaining[next_ue2] = nb_rbs_required_remaining[next_ue2] - 4;
|
||||
pre_nb_available_rbs[next_ue2] = pre_nb_available_rbs[next_ue2] + 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// data channel for all TM
|
||||
for (i = 0;i<granted_UEs; i++){
|
||||
|
||||
next_ue = UE_id_sorted[i];
|
||||
rnti = find_UE_RNTI(Mod_id,next_ue);
|
||||
if (rnti == 0)
|
||||
continue;
|
||||
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,rnti,subframe,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,next_ue) >= RRC_RECONFIGURED) && (round==0)) {
|
||||
|
||||
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++){
|
||||
|
||||
if((rballoc_sub[j] == 0) && (rballoc_sub_UE[next_ue][j] == 0) && (nb_rbs_required_remaining[next_ue]>0)){
|
||||
|
||||
|
||||
switch (mac_xface->get_transmission_mode(Mod_id,rnti)) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
rballoc_sub[j] = 1;
|
||||
rballoc_sub_UE[next_ue][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[j] = 1;
|
||||
|
||||
if((j == mac_xface->lte_frame_parms->N_RBGS-1) && (mac_xface->lte_frame_parms->N_RB_DL%2 == 1)){
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 1;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 2;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 2;
|
||||
}
|
||||
|
||||
break;
|
||||
case 5:
|
||||
if (dl_pow_off[next_ue] != 0){
|
||||
|
||||
dl_pow_off[next_ue] = 1;
|
||||
|
||||
rballoc_sub[j] = 1;
|
||||
rballoc_sub_UE[next_ue][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[j] = 1;
|
||||
|
||||
if((j == mac_xface->lte_frame_parms->N_RBGS-1) && (mac_xface->lte_frame_parms->N_RB_DL%2 == 1)){
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 1;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nb_rbs_required_remaining[next_ue] = nb_rbs_required_remaining[next_ue] - 2;
|
||||
pre_nb_available_rbs[next_ue] = pre_nb_available_rbs[next_ue] + 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
i1=0;
|
||||
i2=0;
|
||||
i3=0;
|
||||
for (j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++){
|
||||
if(MIMO_mode_indicator[j] == 2)
|
||||
i1 = i1+1;
|
||||
else if(MIMO_mode_indicator[j] == 1)
|
||||
i2 = i2+1;
|
||||
else if(MIMO_mode_indicator[j] == 0)
|
||||
i3 = i3+1;
|
||||
}
|
||||
|
||||
|
||||
if((i1 < mac_xface->lte_frame_parms->N_RBGS) && (i2>0) && (i3==0))
|
||||
PHY_vars_eNB_g[Mod_id]->check_for_SUMIMO_transmissions = PHY_vars_eNB_g[Mod_id]->check_for_SUMIMO_transmissions + 1;
|
||||
|
||||
if(i3 == mac_xface->lte_frame_parms->N_RBGS && i1==0 && i2==0)
|
||||
PHY_vars_eNB_g[Mod_id]->FULL_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id]->FULL_MUMIMO_transmissions + 1;
|
||||
|
||||
if((i1 < mac_xface->lte_frame_parms->N_RBGS) && (i3 > 0))
|
||||
PHY_vars_eNB_g[Mod_id]->check_for_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id]->check_for_MUMIMO_transmissions + 1;
|
||||
|
||||
PHY_vars_eNB_g[Mod_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id]->check_for_total_transmissions + 1;
|
||||
|
||||
|
||||
|
||||
|
||||
for(UE_id=0;UE_id<granted_UEs;UE_id++){
|
||||
//PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].dl_pow_off = dl_pow_off[UE_id];
|
||||
LOG_D(PHY,"******************Scheduling Information for UE%d ************************\n",UE_id);
|
||||
LOG_D(PHY,"dl power offset UE%d = %d \n",UE_id,dl_pow_off[UE_id]);
|
||||
LOG_D(PHY,"***********RB Alloc for every subband for UE%d ***********\n",UE_id);
|
||||
for(j=0;j<mac_xface->lte_frame_parms->N_RBGS;j++){
|
||||
//PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].rballoc_sub[i] = rballoc_sub_UE[UE_id][i];
|
||||
LOG_D(PHY,"RB Alloc for UE%d and Subband%d = %d\n",UE_id,j,rballoc_sub_UE[UE_id][j]);
|
||||
}
|
||||
//PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].pre_nb_available_rbs = pre_nb_available_rbs[UE_id];
|
||||
LOG_D(PHY,"Total RBs allocated for UE%d = %d\n",UE_id,pre_nb_available_rbs[UE_id]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2011 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file openair2/LAYER2/MAC/ra_procedures.c
|
||||
* \brief Routines for UE MAC-layer Random-access procedures (36.321) V8.6 2009-03
|
||||
* \author R. Knopp
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "extern.h"
|
||||
#include "defs.h"
|
||||
#include "PHY_INTERFACE/defs.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
#ifdef PHY_EMUL
|
||||
#include "SIMULATION/simulation_defs.h"
|
||||
#endif
|
||||
|
||||
extern inline unsigned int taus(void);
|
||||
|
||||
s8 get_DELTA_PREAMBLE(u8 Mod_id) {
|
||||
|
||||
u8 prachConfigIndex = UE_mac_inst[Mod_id].radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex;
|
||||
u8 preambleformat;
|
||||
|
||||
if (UE_mac_inst[Mod_id].tdd_Config) { // TDD
|
||||
if (prachConfigIndex < 20)
|
||||
preambleformat = 0;
|
||||
else if (prachConfigIndex < 30)
|
||||
preambleformat = 1;
|
||||
else if (prachConfigIndex < 40)
|
||||
preambleformat = 2;
|
||||
else if (prachConfigIndex < 48)
|
||||
preambleformat = 3;
|
||||
else
|
||||
preambleformat = 4;
|
||||
}
|
||||
else { // FDD
|
||||
preambleformat = prachConfigIndex>>2;
|
||||
}
|
||||
switch (preambleformat) {
|
||||
case 0:
|
||||
case 1:
|
||||
return(0);
|
||||
case 2:
|
||||
case 3:
|
||||
return(-3);
|
||||
case 4:
|
||||
return(8);
|
||||
default:
|
||||
LOG_E(MAC,"[UE %d] ue_procedures.c: FATAL, Illegal preambleformat %d, prachConfigIndex %d\n",
|
||||
Mod_id,
|
||||
preambleformat,prachConfigIndex);
|
||||
mac_xface->macphy_exit("");
|
||||
return(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// This routine implements Section 5.1.2 (Random Access Resource Selection) from 36.321
|
||||
void get_prach_resources(u8 Mod_id,
|
||||
u8 eNB_index,
|
||||
u8 t_id,
|
||||
u8 first_Msg3,
|
||||
RACH_ConfigDedicated_t *rach_ConfigDedicated) {
|
||||
|
||||
u8 Msg3_size = UE_mac_inst[Mod_id].RA_Msg3_size;
|
||||
PRACH_RESOURCES_t *prach_resources = &UE_mac_inst[Mod_id].RA_prach_resources;
|
||||
RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
|
||||
u8 noGroupB = 0;
|
||||
u8 f_id = 0,num_prach=0;
|
||||
|
||||
if (UE_mac_inst[Mod_id].radioResourceConfigCommon)
|
||||
rach_ConfigCommon = &UE_mac_inst[Mod_id].radioResourceConfigCommon->rach_ConfigCommon;
|
||||
else {
|
||||
LOG_E(MAC,"[UE %d] FATAL radioResourceConfigCommon is NULL !!!\n",Mod_id);
|
||||
mac_xface->macphy_exit("");
|
||||
}
|
||||
|
||||
if (rach_ConfigDedicated) { // This is for network controlled Mobility, later
|
||||
if (rach_ConfigDedicated->ra_PRACH_MaskIndex != 0) {
|
||||
prach_resources->ra_PreambleIndex = rach_ConfigDedicated->ra_PreambleIndex;
|
||||
prach_resources->ra_RACH_MaskIndex = rach_ConfigDedicated->ra_PRACH_MaskIndex;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!rach_ConfigCommon->preambleInfo.preamblesGroupAConfig) {
|
||||
noGroupB = 1;
|
||||
|
||||
}
|
||||
else {
|
||||
if (rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA ==
|
||||
rach_ConfigCommon->preambleInfo.numberOfRA_Preambles)
|
||||
noGroupB = 1;
|
||||
}
|
||||
|
||||
if (first_Msg3 == 1) {
|
||||
if (noGroupB == 1) {
|
||||
// use Group A procedure
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex = (taus())&0x3f;
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_RACH_MaskIndex = 0;
|
||||
UE_mac_inst[Mod_id].RA_usedGroupA = 1;
|
||||
}
|
||||
else if ((Msg3_size < rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->messageSizeGroupA) ||
|
||||
(mac_xface->get_PL(Mod_id,eNB_index) > UE_mac_inst[Mod_id].RA_maxPL)) {
|
||||
// use Group A procedure
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex = (taus())%rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA;
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_RACH_MaskIndex = 0;
|
||||
UE_mac_inst[Mod_id].RA_usedGroupA = 1;
|
||||
}
|
||||
else { // use Group B
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex =
|
||||
rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA +
|
||||
(taus())%(rach_ConfigCommon->preambleInfo.numberOfRA_Preambles -
|
||||
rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA);
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_RACH_MaskIndex = 0;
|
||||
UE_mac_inst[Mod_id].RA_usedGroupA = 0;
|
||||
}
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER = get_Po_NOMINAL_PUSCH(Mod_id);
|
||||
}
|
||||
else { // Msg3 is being retransmitted
|
||||
if (UE_mac_inst[Mod_id].RA_usedGroupA == 1) {
|
||||
if (rach_ConfigCommon->preambleInfo.preamblesGroupAConfig)
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex = (taus())%rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA;
|
||||
else
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex = (taus())&0x3f;
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_RACH_MaskIndex = 0;
|
||||
}
|
||||
else {
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex =
|
||||
rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA +
|
||||
(taus())%(rach_ConfigCommon->preambleInfo.numberOfRA_Preambles -
|
||||
rach_ConfigCommon->preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA);
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_RACH_MaskIndex = 0;
|
||||
}
|
||||
}
|
||||
// choose random PRACH resource in TDD
|
||||
if (UE_mac_inst[Mod_id].tdd_Config) {
|
||||
num_prach = mac_xface->get_num_prach_tdd(mac_xface->lte_frame_parms);
|
||||
if ((num_prach>0) && (num_prach<6))
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_TDD_map_index = (taus()%num_prach);
|
||||
f_id = mac_xface->get_fid_prach_tdd(mac_xface->lte_frame_parms,
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_TDD_map_index);
|
||||
}
|
||||
|
||||
// choose RA-RNTI
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_RNTI = 1 + t_id + 10*f_id;
|
||||
}
|
||||
|
||||
void Msg1_tx(u8 Mod_id,u32 frame, u8 eNB_id) {
|
||||
|
||||
// start contention resolution timer
|
||||
UE_mac_inst[Mod_id].RA_attempt_number++;
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
if (oai_emulation.info.opt_enabled) {
|
||||
trace_pdu(0, NULL, 0, Mod_id, 3, UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex,
|
||||
UE_mac_inst[Mod_id].subframe, 0, UE_mac_inst[Mod_id].RA_attempt_number);
|
||||
LOG_D(OPT,"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
|
||||
Mod_id, frame, 1, UE_mac_inst[Mod_id].RA_Msg3_size);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void Msg3_tx(u8 Mod_id,u32 frame, u8 eNB_id) {
|
||||
|
||||
// start contention resolution timer
|
||||
LOG_I(MAC,"[UE %d][RAPROC] Frame %d : Msg3_tx: Setting contention resolution timer\n",Mod_id,frame);
|
||||
UE_mac_inst[Mod_id].RA_contention_resolution_cnt = 0;
|
||||
UE_mac_inst[Mod_id].RA_contention_resolution_timer_active = 1;
|
||||
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
if (oai_emulation.info.opt_enabled) { // msg3
|
||||
trace_pdu(0, &UE_mac_inst[Mod_id].CCCH_pdu.payload[0], UE_mac_inst[Mod_id].RA_Msg3_size,
|
||||
Mod_id, 3, UE_mac_inst[Mod_id].crnti, UE_mac_inst[Mod_id].subframe, 0, 0);
|
||||
LOG_D(OPT,"[UE %d][RAPROC] MSG3 Frame %d trace pdu Preamble %d with size %d\n",
|
||||
Mod_id, frame, UE_mac_inst[Mod_id].crnti /*UE_mac_inst[Mod_id].RA_prach_resources.ra_PreambleIndex*/, UE_mac_inst[Mod_id].RA_Msg3_size);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){
|
||||
|
||||
|
||||
u8 Size=0;
|
||||
UE_MODE_t UE_mode = mac_xface->get_ue_mode(Mod_id,eNB_index);
|
||||
u8 lcid = CCCH;
|
||||
u16 Size16;
|
||||
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
|
||||
s32 frame_diff=0;
|
||||
|
||||
|
||||
if (UE_mode == PRACH) {
|
||||
if (UE_mac_inst[Mod_id].radioResourceConfigCommon)
|
||||
rach_ConfigCommon = &UE_mac_inst[Mod_id].radioResourceConfigCommon->rach_ConfigCommon;
|
||||
else {
|
||||
return(NULL);
|
||||
}
|
||||
if (Is_rrc_registered == 1) {
|
||||
|
||||
if (UE_mac_inst[Mod_id].RA_active == 0) {
|
||||
// check if RRC is ready to initiate the RA procedure
|
||||
Size = mac_rrc_data_req(Mod_id,
|
||||
frame,
|
||||
CCCH,1,
|
||||
(char*)&UE_mac_inst[Mod_id].CCCH_pdu.payload[sizeof(SCH_SUBHEADER_SHORT)+1],0,
|
||||
eNB_index);
|
||||
Size16 = (u16)Size;
|
||||
|
||||
// LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",Mod_id,frame,Size);
|
||||
LOG_D(RRC, "[MSC_MSG][FRAME %05d][RRC_UE][MOD %02d][][--- MAC_DATA_REQ (RRCConnectionRequest eNB %d) --->][MAC_UE][MOD %02d][]\n",
|
||||
frame, Mod_id, eNB_index, Mod_id);
|
||||
LOG_D(MAC,"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes\n",Mod_id,frame,Size);
|
||||
|
||||
if (Size>0) {
|
||||
|
||||
|
||||
|
||||
UE_mac_inst[Mod_id].RA_active = 1;
|
||||
UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER = 1;
|
||||
UE_mac_inst[Mod_id].RA_Msg3_size = Size+sizeof(SCH_SUBHEADER_SHORT)+sizeof(SCH_SUBHEADER_SHORT);
|
||||
UE_mac_inst[Mod_id].RA_prachMaskIndex = 0;
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.Msg3 = UE_mac_inst[Mod_id].CCCH_pdu.payload;
|
||||
UE_mac_inst[Mod_id].RA_backoff_cnt = 0; // add the backoff condition here if we have it from a previous RA reponse which failed (i.e. backoff indicator)
|
||||
if (rach_ConfigCommon) {
|
||||
UE_mac_inst[Mod_id].RA_window_cnt = 2+ rach_ConfigCommon->ra_SupervisionInfo.ra_ResponseWindowSize;
|
||||
if (UE_mac_inst[Mod_id].RA_window_cnt == 9)
|
||||
UE_mac_inst[Mod_id].RA_window_cnt = 10; // Note: 9 subframe window doesn't exist, after 8 is 10!
|
||||
}
|
||||
else {
|
||||
LOG_D(MAC,"[UE %d] FATAL Frame %d: rach_ConfigCommon is NULL !!!\n",Mod_id,frame);
|
||||
mac_xface->macphy_exit("");
|
||||
}
|
||||
UE_mac_inst[Mod_id].RA_tx_frame = frame;
|
||||
UE_mac_inst[Mod_id].RA_tx_subframe = subframe;
|
||||
UE_mac_inst[Mod_id].RA_backoff_frame = frame;
|
||||
UE_mac_inst[Mod_id].RA_backoff_subframe = subframe;
|
||||
// Fill in preamble and PRACH resource
|
||||
get_prach_resources(Mod_id,eNB_index,subframe,1,NULL);
|
||||
|
||||
generate_ulsch_header((u8*)&UE_mac_inst[Mod_id].CCCH_pdu.payload[0], // mac header
|
||||
1, // num sdus
|
||||
0, // short pading
|
||||
&Size16, // sdu length
|
||||
&lcid, // sdu lcid
|
||||
NULL, // power headroom
|
||||
NULL, // crnti
|
||||
NULL, // truncated bsr
|
||||
NULL, // short bsr
|
||||
NULL, // long_bsr
|
||||
1); //post_padding
|
||||
|
||||
return(&UE_mac_inst[Mod_id].RA_prach_resources);
|
||||
}
|
||||
}
|
||||
else { // RACH is active
|
||||
LOG_D(MAC,"[MAC][UE %d][RAPROC] frame %d, subframe %d: RA Active, window cnt %d (RA_tx_frame %d, RA_tx_subframe %d)\n",Mod_id,
|
||||
frame,subframe,UE_mac_inst[Mod_id].RA_window_cnt,
|
||||
UE_mac_inst[Mod_id].RA_tx_frame,UE_mac_inst[Mod_id].RA_tx_subframe);
|
||||
// compute backoff parameters
|
||||
if (UE_mac_inst[Mod_id].RA_backoff_cnt>0) {
|
||||
frame_diff = (s32)frame - UE_mac_inst[Mod_id].RA_backoff_frame;
|
||||
if (frame_diff < 0)
|
||||
frame_diff = -frame_diff;
|
||||
UE_mac_inst[Mod_id].RA_backoff_cnt -= ((10*frame_diff) + (subframe-UE_mac_inst[Mod_id].RA_backoff_subframe));
|
||||
|
||||
UE_mac_inst[Mod_id].RA_backoff_frame = frame;
|
||||
UE_mac_inst[Mod_id].RA_backoff_subframe = subframe;
|
||||
}
|
||||
// compute RA window parameters
|
||||
if (UE_mac_inst[Mod_id].RA_window_cnt>0) {
|
||||
frame_diff = (s32)frame - UE_mac_inst[Mod_id].RA_tx_frame;
|
||||
if (frame_diff < 0)
|
||||
frame_diff = -frame_diff;
|
||||
UE_mac_inst[Mod_id].RA_window_cnt -= ((10*frame_diff) + (subframe-UE_mac_inst[Mod_id].RA_tx_subframe));
|
||||
LOG_D(MAC,"[MAC][UE %d][RAPROC] frame %d, subframe %d: RA Active, adjusted window cnt %d\n",Mod_id,
|
||||
frame,subframe,UE_mac_inst[Mod_id].RA_window_cnt);
|
||||
}
|
||||
if ((UE_mac_inst[Mod_id].RA_window_cnt<=0) &&
|
||||
(UE_mac_inst[Mod_id].RA_backoff_cnt<=0)) {
|
||||
|
||||
UE_mac_inst[Mod_id].RA_tx_frame = frame;
|
||||
UE_mac_inst[Mod_id].RA_tx_subframe = subframe;
|
||||
UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER++;
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER += (rach_ConfigCommon->powerRampingParameters.powerRampingStep<<1); // 2dB increments in ASN.1 definition
|
||||
if (UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER == rach_ConfigCommon->ra_SupervisionInfo.preambleTransMax) {
|
||||
LOG_D(MAC,"[UE %d] Frame %d: Maximum number of RACH attempts (%d)\n",Mod_id,frame,rach_ConfigCommon->ra_SupervisionInfo.preambleTransMax);
|
||||
// send message to RRC
|
||||
UE_mac_inst[Mod_id].RA_PREAMBLE_TRANSMISSION_COUNTER=1;
|
||||
UE_mac_inst[Mod_id].RA_prach_resources.ra_PREAMBLE_RECEIVED_TARGET_POWER = get_Po_NOMINAL_PUSCH(Mod_id);
|
||||
}
|
||||
UE_mac_inst[Mod_id].RA_window_cnt = 2+ rach_ConfigCommon->ra_SupervisionInfo.ra_ResponseWindowSize;
|
||||
UE_mac_inst[Mod_id].RA_backoff_cnt = 0;
|
||||
|
||||
// Fill in preamble and PRACH resource
|
||||
get_prach_resources(Mod_id,eNB_index,subframe,0,NULL);
|
||||
return(&UE_mac_inst[Mod_id].RA_prach_resources);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (UE_mode == PUSCH) {
|
||||
LOG_D(MAC,"[UE %d] FATAL: Should not have checked for RACH in PUSCH yet ...",Mod_id);
|
||||
mac_xface->macphy_exit("");
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2010 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file rar_tools.c
|
||||
* \brief random access tools
|
||||
* \author Raymond Knopp
|
||||
* \date 2011
|
||||
* \version 0.5
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "extern.h"
|
||||
#include "MAC_INTERFACE/defs.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
#include "SIMULATION/TOOLS/defs.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "OCG.h"
|
||||
#include "OCG_extern.h"
|
||||
|
||||
#define DEBUG_RAR
|
||||
|
||||
extern unsigned int localRIV2alloc_LUT25[512];
|
||||
extern unsigned int distRIV2alloc_LUT25[512];
|
||||
extern unsigned short RIV2nb_rb_LUT25[512];
|
||||
extern unsigned short RIV2first_rb_LUT25[512];
|
||||
|
||||
extern inline unsigned int taus(void);
|
||||
|
||||
unsigned short fill_rar(u8 Mod_id,
|
||||
u32 frame,
|
||||
u8 *dlsch_buffer,
|
||||
u16 N_RB_UL,
|
||||
u8 input_buffer_length) {
|
||||
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer;
|
||||
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
|
||||
uint8_t *rar = (uint8_t *)(dlsch_buffer+1);
|
||||
int i,ra_idx;
|
||||
uint16_t rballoc;
|
||||
uint8_t mcs,TPC,cqi_req,ULdelay,cqireq;
|
||||
|
||||
for (i=0;i<NB_RA_PROC_MAX;i++) {
|
||||
if (eNB_mac_inst[Mod_id].RA_template[i].generate_rar == 1) {
|
||||
ra_idx=i;
|
||||
eNB_mac_inst[Mod_id].RA_template[i].generate_rar = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// subheader fixed
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = eNB_mac_inst[Mod_id].RA_template[ra_idx].preamble_index; // Respond to Preamble 0 only for the moment
|
||||
/*
|
||||
rar->R = 0;
|
||||
rar->Timing_Advance_Command = eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset/4;
|
||||
rar->hopping_flag = 0;
|
||||
rar->rb_alloc = mac_xface->computeRIV(N_RB_UL,12,2); // 2 RB
|
||||
rar->mcs = 2; // mcs 2
|
||||
rar->TPC = 4; // 2 dB power adjustment
|
||||
rar->UL_delay = 0;
|
||||
rar->cqi_req = 1;
|
||||
rar->t_crnti = eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti;
|
||||
*/
|
||||
rar[4] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti>>8);
|
||||
rar[5] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti&0xff);
|
||||
rar[0] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset>>(2+4)); // 7 MSBs of timing advance + divide by 4
|
||||
rar[1] = (uint8_t)(eNB_mac_inst[Mod_id].RA_template[ra_idx].timing_offset<<(4-2))&0xf0; // 4 LSBs of timing advance + divide by 4
|
||||
rballoc = mac_xface->computeRIV(N_RB_UL,1,1); // first PRB only for UL Grant
|
||||
rar[1] |= (rballoc>>7)&7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
|
||||
rar[2] = ((uint8_t)(rballoc&0xff))<<1; // 7 LSBs of rballoc
|
||||
mcs = 10;
|
||||
TPC = 4;
|
||||
ULdelay = 0;
|
||||
cqireq = 0;
|
||||
rar[2] |= ((mcs&0xf)>>3); // mcs 10
|
||||
rar[3] = (((mcs&0xff)<<5)) | ((TPC&7)<<2) | ((ULdelay&1)<<1) | (cqireq&1);
|
||||
|
||||
LOG_I(MAC,"[eNB %d][RAPROC] Frame %d Generating RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for CRNTI %x,preamble %d/%d\n",Mod_id,frame,
|
||||
*(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5],
|
||||
eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti,
|
||||
rarh->RAPID,eNB_mac_inst[Mod_id].RA_template[0].preamble_index);
|
||||
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
if (oai_emulation.info.opt_enabled){
|
||||
trace_pdu(1, dlsch_buffer, input_buffer_length, Mod_id, 2, 1,
|
||||
eNB_mac_inst[Mod_id].subframe, 0, 0);
|
||||
LOG_I(OPT,"[eNB %d][RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
||||
Mod_id, frame, eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti,
|
||||
rarh->RAPID, input_buffer_length);
|
||||
}
|
||||
#endif
|
||||
return(eNB_mac_inst[Mod_id].RA_template[ra_idx].rnti);
|
||||
}
|
||||
|
||||
uint16_t ue_process_rar(u8 Mod_id, u32 frame, u8 *dlsch_buffer,u16 *t_crnti,u8 preamble_index) {
|
||||
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer;
|
||||
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
|
||||
uint8_t *rar = (uint8_t *)(dlsch_buffer+1);
|
||||
|
||||
LOG_I(MAC,"[eNB %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",Mod_id,frame,
|
||||
*(uint8_t*)rarh,rar[0],rar[1],rar[2],rar[3],rar[4],rar[5],
|
||||
rarh->RAPID,preamble_index);
|
||||
#ifdef DEBUG_RAR
|
||||
LOG_D(MAC,"[UE %d][RAPROC] rarh->E %d\n",Mod_id,rarh->E);
|
||||
LOG_D(MAC,"[UE %d][RAPROC] rarh->T %d\n",Mod_id,rarh->T);
|
||||
LOG_D(MAC,"[UE %d][RAPROC] rarh->RAPID %d\n",Mod_id,rarh->RAPID);
|
||||
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",Mod_id,rar->R);
|
||||
LOG_I(MAC,"[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",Mod_id,(((uint16_t)(rar[0]&0x7f))<<4) + (rar[1]>>4));
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",Mod_id,rar->hopping_flag);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",Mod_id,rar->rb_alloc);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",Mod_id,rar->mcs);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",Mod_id,rar->TPC);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",Mod_id,rar->UL_delay);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",Mod_id,rar->cqi_req);
|
||||
LOG_I(MAC,"[UE %d][RAPROC] rar->t_crnti %x\n",Mod_id,(uint16_t)rar[5]+(rar[4]<<8));
|
||||
#endif
|
||||
|
||||
|
||||
if (preamble_index == rarh->RAPID) {
|
||||
*t_crnti = (uint16_t)rar[5]+(rar[4]<<8);//rar->t_crnti;
|
||||
UE_mac_inst[Mod_id].crnti = *t_crnti;//rar->t_crnti;
|
||||
//return(rar->Timing_Advance_Command);
|
||||
return((((uint16_t)(rar[0]&0x7f))<<4) + (rar[1]>>4));
|
||||
}
|
||||
else {
|
||||
UE_mac_inst[Mod_id].crnti=0;
|
||||
return(0xffff);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2013 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
/*! \file vars.h
|
||||
* \brief mac vars
|
||||
* \author Raymond Knopp, Navid Nikaein
|
||||
* \date 2012
|
||||
* \version 1.0
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MAC_VARS_H__
|
||||
#define __MAC_VARS_H__
|
||||
#ifdef USER_MODE
|
||||
//#include "stdio.h"
|
||||
#endif //USER_MODE
|
||||
#include "PHY/defs.h"
|
||||
#include "defs.h"
|
||||
#include "PHY_INTERFACE/defs.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
const u32 BSR_TABLE[BSR_TABLE_SIZE]={0,10,12,14,17,19,22,26,31,36,42,49,57,67,78,91,
|
||||
105,125,146,171,200,234,274,321,376,440,515,603,706,826,967,1132,
|
||||
1326,1552,1817,2127,2490,2915,3413,3995,4677,5467,6411,7505,8787,10287,12043,14099,
|
||||
16507,19325,22624,26487,31009,36304,42502,49759,58255,68201,79846,93479,109439, 128125,150000, 300000};
|
||||
|
||||
//u32 EBSR_Level[63]={0,10,13,16,19,23,29,35,43,53,65,80,98,120,147,181};
|
||||
|
||||
|
||||
u32 RRC_CONNECTION_FLAG;
|
||||
|
||||
UE_MAC_INST *UE_mac_inst; //[NB_MODULE_MAX];
|
||||
eNB_MAC_INST *eNB_mac_inst; //[NB_MODULE_MAX];
|
||||
MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
|
||||
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
|
||||
|
||||
/*
|
||||
#ifndef USER_MODE
|
||||
RRC_XFACE *Rrc_xface;
|
||||
MAC_xface *mac_xface;
|
||||
#else
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#endif
|
||||
*/
|
||||
|
||||
u8 Is_rrc_registered;
|
||||
|
||||
#ifdef OPENAIR2
|
||||
unsigned char NB_eNB_INST=0;
|
||||
unsigned char NB_UE_INST=0;
|
||||
unsigned char NB_INST=0;
|
||||
#endif
|
||||
|
||||
|
||||
DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
|
||||
|
||||
DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
|
||||
DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
|
||||
DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
|
||||
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
#ifdef Rel10
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
#endif
|
||||
|
||||
DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
|
||||
DCI1A_5MHz_FDD_t RA_alloc_pdu_fdd;
|
||||
DCI1A_5MHz_FDD_t BCCH_alloc_pdu_fdd;
|
||||
|
||||
DCI1A_5MHz_FDD_t CCCH_alloc_pdu_fdd;
|
||||
DCI1_5MHz_FDD_t DLSCH_alloc_pdu_fdd;
|
||||
|
||||
DCI2_5MHz_2A_L10PRB_TDD_t DLSCH_alloc_pdu1;
|
||||
DCI2_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2;
|
||||
|
||||
DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
#/*________________________Makefile________________________
|
||||
|
||||
# Authors : Hicham Anouar, Lionel Gauthier, Raymond Knopp
|
||||
# Company : EURECOM
|
||||
# Emails : anouar@eurecom.fr, lionel.gauthier@eurecom.fr, knopp@eurecom.fr
|
||||
#________________________________________________________________*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CCC = gcc
|
||||
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
|
||||
export KERNEL_MAIN_TYPE
|
||||
|
||||
SUBVERSION=$(shell echo `grep '^SUBLEVEL =' /usr/src/linux/Makefile | sed -e 's, ,,g' | sed -e 's/SUBLEVEL=//'`)
|
||||
IS_KERNEL_SUBVERSION_GREATER_THAN_20=$(shell if [ $(SUBVERSION) -ge 20 ] ; then echo true ; fi)
|
||||
IS_KERNEL_SUBVERSION_GREATER_THAN_29=$(shell if [ $(SUBVERSION) -ge 29 ] ; then echo true ; fi)
|
||||
GT2629= $(if $(IS_KERNEL_SUBVERSION_GREATER_THAN_29),-DKERNEL_VERSION_GREATER_THAN_2629=1)
|
||||
KERNEL_ARCH=$(shell echo `uname -m`)
|
||||
SET_REGPARM=$(shell if [ $(KERNEL_ARCH) = 'i686' -a $(SUBVERSION) -ge 20 ]; then echo true ; fi)
|
||||
SET_X64=$(shell if [ $(KERNEL_ARCH) = 'x86_64' -a $(SUBVERSION) -ge 20 ]; then echo true ; fi)
|
||||
ifdef RTAI
|
||||
# Get the RTAI variables
|
||||
CCC = $(shell rtai-config --cc)
|
||||
RTAI_SUBVERSION=$(shell rtai-config --version | sed -e 's/^..\(.\).*$$/\1/')
|
||||
IS_RTAI_SUBVERSION_LESS_THAN_FIVE=$(shell if [ $(RTAI_SUBVERSION) -lt 5 ] ; then echo true ; fi)
|
||||
|
||||
EXTRA_CFLAGS = $(shell rtai-config --module-cflags) -g -DRTAI_ENABLED -DPC_TARGET -Wall -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX -DMAC_CONTEXT -I/usr/include $(if $(SET_REGPARM),-mregparm=3 -fno-stack-protector -mpreferred-stack-boundary=4,) $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################
|
||||
# SOURCE FOLDERS
|
||||
####################################################
|
||||
|
||||
|
||||
COMMON_DIR = ../COMMON
|
||||
AS_RLC_UM_DIR = RLC/UM_v6.1.0_LITE
|
||||
AS_RLC_AM_DIR = RLC/AM
|
||||
AS_RLC_TM_DIR = RLC/TM
|
||||
AS_RLC_DIR = RLC
|
||||
AS_PDCP_DIR = PDCP_v10.1.0
|
||||
AS_MEM_DIR = ../UTIL/MEM
|
||||
AS_LIST_DIR = ../UTIL/LISTS
|
||||
AS_FIFO_DIR = ../UTIL/FIFO
|
||||
AS_MATH_DIR = ../UTIL/MATH
|
||||
AS_TIMER_DIR = ../UTIL/TIMER
|
||||
PHY_INTERFACE_DIR = ../PHY_INTERFACE
|
||||
|
||||
export AS_RLC_UM_DIR
|
||||
export AS_RLC_AM_DIR
|
||||
export AS_RLC_TM_DIR
|
||||
export AS_RLC_DIR
|
||||
export AS_PDCP_DIR
|
||||
export AS_MPLS_DIR
|
||||
export AS_MEM_DIR
|
||||
export AS_LIST_DIR
|
||||
export AS_FIFO_DIR
|
||||
export AS_MATH_DIR
|
||||
export AS_TIMER_DIR
|
||||
export AS_RRM_CONFIG_DIR
|
||||
|
||||
|
||||
|
||||
obj-m += openair_l2.o
|
||||
|
||||
|
||||
|
||||
|
||||
openair_l2-objs += layer2_top.o MAC/layer2_scheduler.o MAC/main.o MAC/nodeb_control_plane_procedures.o MAC/ue_scheduler.o MAC/nodeb_scheduler.o MAC/ue_control_plane_procedures.o MAC/lchan_interface.o MAC/utils.o MAC/openair2_proc.o
|
||||
|
||||
openair_l2-objs += register.o
|
||||
|
||||
|
||||
|
||||
openair_l2-objs += $(AS_LIST_DIR)/list.o
|
||||
openair_l2-objs += $(AS_LIST_DIR)/list2.o
|
||||
|
||||
openair_l2-objs += $(AS_TIMER_DIR)/umts_timer.o
|
||||
|
||||
openair_l2-objs += $(AS_PDCP_DIR)/pdcp.o
|
||||
openair_l2-objs += $(AS_PDCP_DIR)/pdcp_fifo.o
|
||||
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_segment.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_fsm.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_mux.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_retrans.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_util.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_mac_status.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_demux.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_receiver.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_reassembly.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_discard_rx.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_control_primitives.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_reset.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_status.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_timers.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_discard_notif.o
|
||||
openair_l2-objs += $(AS_RLC_AM_DIR)/rlc_am_discard_tx.o
|
||||
|
||||
openair_l2-objs += $(AS_RLC_TM_DIR)/rlc_tm.o
|
||||
openair_l2-objs += $(AS_RLC_TM_DIR)/rlc_tm_control_primitives.o
|
||||
openair_l2-objs += $(AS_RLC_TM_DIR)/rlc_tm_fsm.o
|
||||
openair_l2-objs += $(AS_RLC_TM_DIR)/rlc_tm_segment.o
|
||||
openair_l2-objs += $(AS_RLC_TM_DIR)/rlc_tm_reassembly.o
|
||||
|
||||
openair_l2-objs += $(AS_RLC_UM_DIR)/rlc_um.o
|
||||
openair_l2-objs += $(AS_RLC_UM_DIR)/rlc_um_fsm.o
|
||||
openair_l2-objs += $(AS_RLC_UM_DIR)/rlc_um_control_primitives.o
|
||||
openair_l2-objs += $(AS_RLC_UM_DIR)/rlc_um_segment.o
|
||||
openair_l2-objs += $(AS_RLC_UM_DIR)/rlc_um_reassembly.o
|
||||
openair_l2-objs += $(AS_RLC_UM_DIR)/rlc_um_receiver.o
|
||||
|
||||
openair_l2-objs += $(AS_RLC_DIR)/rlc_mac.o
|
||||
openair_l2-objs += $(AS_RLC_DIR)/rlc.o
|
||||
openair_l2-objs += $(AS_RLC_DIR)/rlc_rrc.o
|
||||
openair_l2-objs += $(AS_RLC_DIR)/rlc_mpls.o
|
||||
|
||||
|
||||
openair_l2-objs += $(AS_MATH_DIR)/random.o
|
||||
openair_l2-objs += $(AS_MATH_DIR)/crc_byte.o
|
||||
|
||||
openair_l2-objs += $(AS_MEM_DIR)/mem_block.o
|
||||
|
||||
|
||||
openair_l2-objs += $(PHY_INTERFACE_DIR)/mac_phy_primitives.o
|
||||
|
||||
|
||||
ifdef MASTER
|
||||
EXTRA_CFLAGS += -DNODE_RG
|
||||
else
|
||||
EXTRA_CFLAGS += -DNODE_MT
|
||||
endif
|
||||
|
||||
|
||||
ifdef NO_RRM
|
||||
EXTRA_CFLAGS += -DNO_RRM
|
||||
else
|
||||
ifndef USER_MODE
|
||||
EXTRA_CFLAGS += -DRRC_RRM_FIFOS_XFACE
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
CCC=gcc
|
||||
|
||||
ifdef PHYEMUL
|
||||
EXTRA_CFLAGS += -DPHY_EMUL
|
||||
else
|
||||
EXTRA_CFLAGS += -I$(OPENAIR1_DIR) -DOPENAIR1 -DOPENAIR2
|
||||
endif
|
||||
|
||||
#--------------------------------------------------------
|
||||
EXTRA_CFLAGS += -DKERNEL$(KERNEL_MAIN_TYPE) -DBIGPHYSAREA #-DNO_RRM -DRRC_RRM_XFACE -DRRC_RRM_FIFOS_XFACE
|
||||
|
||||
|
||||
EXTRA_CFLAGS += -Wall -Wstrict-prototypes $(if $(SET_X64),-DARCH_64,) $(if $(SET_X64),-mcmodel=kernel,) $(if $(SET_X64),-m64,) -fno-common -fno-strict-aliasing -pipe -freg-struct-return -ffreestanding -maccumulate-outgoing-args -funroll-loops -mmmx -msse -msse2 -fomit-frame-pointer -nostdinc -DMODULE -D_LOOSE_KERNEL_NAMES -O2 $(GT2629)
|
||||
|
||||
|
||||
EXTRA_CFLAGS += -I$(OPENAIR2_DIR)/COMMON -I$(OPENAIR2_DIR)/PHY_INTERFACE -I$(OPENAIR2_DIR)/UTIL/TIMER -I$(OPENAIR2_DIR)/UTIL/MATH -I$(OPENAIR2_DIR)/UTIL/LISTS -I$(OPENAIR2_DIR)/UTIL/MEM -I$(OPENAIR2_DIR)/LAYER2/RLC -I$(OPENAIR2_DIR)/LAYER2/RLC/UM_v6.1.0_LITE -I$(OPENAIR2_DIR)/LAYER2/RLC/TM -I$(OPENAIR2_DIR)/LAYER2/RLC/AM -I$(OPENAIR2_DIR)/LAYER2/PDCP -I$(OPENAIR2_DIR) -I$(OPENAIR3_DIR)/MESH -I$(OPENAIR3_DIR)/MESH/RRM
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
ifeq ($(OPENAIR2),1)
|
||||
EXTRA_CFLAGS += -DOPENAIR2
|
||||
endif
|
||||
EXTRA_CFLAGS += -DASSERT
|
||||
EXTRA_CFLAGS += -DNO_RRM
|
||||
|
||||
COMMON_DIR = $(OPENAIR2_TOP)/COMMON
|
||||
L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE
|
||||
#RLC_UM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/UM_v6.1.0_LITE
|
||||
RLC_UM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/UM_v9.3.0
|
||||
RLC_AM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/AM_v9.3.0
|
||||
#RLC_TM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/TM
|
||||
RLC_TM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/TM_v9.3.0
|
||||
RLC_DIR = $(OPENAIR2_TOP)/LAYER2/RLC
|
||||
PDCP_DIR = $(OPENAIR2_TOP)/LAYER2/PDCP_v10.1.0
|
||||
PHY_INTERFACE_DIR = $(OPENAIR2_TOP)/PHY_INTERFACE
|
||||
RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE
|
||||
L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE
|
||||
MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC
|
||||
RRC_CELL_DIR = $(OPENAIR2_TOP)/RRC/CELLULAR
|
||||
|
||||
SOURCES_L2 +=$(OPENAIR2_TOP)/LAYER2/openair2_proc.c
|
||||
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_fifo.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_sequence_manager.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_primitives.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_util.c
|
||||
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_init.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_timer_poll_retransmit.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_timer_reordering.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_timer_status_prohibit.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_segment.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_segments_holes.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_in_sdu.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_receiver.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_retransmit.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_windows.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_rx_list.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_reassembly.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_status_report.c
|
||||
|
||||
|
||||
SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm.c
|
||||
SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm_init.c
|
||||
#SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm_control_primitives.c
|
||||
#SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm_fsm.c
|
||||
#SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm_segment.c
|
||||
#SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm_reassembly.c
|
||||
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_fsm.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_control_primitives.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_segment.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_reassembly.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_receiver.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_dar.c
|
||||
|
||||
ifeq ($(OPENAIR_EMU),1)
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_very_simple_test.c
|
||||
endif
|
||||
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc_mac.c
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc.c
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc_rrc.c
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc_mpls.c
|
||||
|
||||
RRC_OBJS = $(RRC_DIR)/rrc_UE.o $(RRC_DIR)/rrc_eNB.o $(RRC_DIR)/rrc_common.o $(RRC_DIR)/L2_interface.o
|
||||
|
||||
MAC_OBJS = $(MAC_DIR)/lte_transport_init.o
|
||||
MAC_OBJS += $(MAC_DIR)/main.o
|
||||
MAC_OBJS += $(MAC_DIR)/ue_procedures.o
|
||||
MAC_OBJS += $(MAC_DIR)/ra_procedures.o
|
||||
MAC_OBJS += $(MAC_DIR)/l1_helpers.o
|
||||
MAC_OBJS += $(MAC_DIR)/rar_tools.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler.o
|
||||
MAC_OBJS += $(MAC_DIR)/config.o
|
||||
|
||||
L2_INTERFACE_OBJS = $(L2_INTERFACE_DIR)/openair_rrc_L2_interface.o
|
||||
|
||||
L2_OBJS=$(addsuffix .o,$(basename $(SOURCES_L2))) $(PHY_INTERFACE_OBJS) $(MAC_OBJS) $(L2_INTERFACE_OBJS)
|
||||
#$(OPT_OBJS)
|
||||
|
||||
L2_incl = -I$(OPENAIR2_TOP) -I$(COMMON_DIR) -I$(RLC_DIR) -I$(RLC_AM_DIR) -I$(RLC_UM_DIR) -I$(RLC_TM_DIR) -I$(PDCP_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/LITE/MESSAGES -I$(OPENAIR3)/MESH/RRM
|
||||
|
||||
|
||||
ifeq ($(rrc_cellular),1)
|
||||
include $(RRC_CELL_DIR)/Makefile.inc
|
||||
L2_OBJS += $(RRC_CELLULAR_OBJS)
|
||||
L2_incl += -I$(OPENAIR2_TOP)/RRC/CELLULAR
|
||||
EXTRA_CFLAGS += -DRRC_CELLULAR -DCELLULAR
|
||||
else
|
||||
L2_OBJS += $(RRC_OBJS)
|
||||
L2_incl += -I$(OPENAIR2_TOP)/RRC/LITE
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,346 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2011 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file pdcp.c
|
||||
* \brief pdcp interface with RLC
|
||||
* \author Lionel GAUTHIER and Navid Nikaein
|
||||
* \date 2009
|
||||
* \version 0.5
|
||||
|
||||
*/
|
||||
|
||||
#define PDCP_C
|
||||
//#include "rtos_header.h"
|
||||
#ifndef USER_MODE
|
||||
#include <rtai_fifos.h>
|
||||
#endif
|
||||
#include "pdcp.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
|
||||
//#include "mpls.h"
|
||||
//#include "w3g4free_extern.h"
|
||||
|
||||
#define PDCP_DATA_REQ_DEBUG 1
|
||||
#define PDCP_DATA_IND_DEBUG 1
|
||||
|
||||
//#define IDROMEL_NEMO 1
|
||||
|
||||
extern rlc_op_status_t rlc_data_req (module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, mem_block_t*);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_data_req (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, char* sduP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
mem_block_t *new_sdu = NULL;
|
||||
// int i;
|
||||
|
||||
if ((data_sizeP > 0)) {
|
||||
if(data_sizeP > MAX_IP_PACKET_SIZE){
|
||||
msg("[PDCP] REQ FOR SIZE %d !!!Abort\n",data_sizeP);
|
||||
mac_xface->macphy_exit("");
|
||||
}
|
||||
new_sdu = get_free_mem_block (data_sizeP);
|
||||
if (new_sdu) {
|
||||
|
||||
|
||||
#ifdef PDCP_DATA_REQ_DEBUG
|
||||
msg("[PDCP] TTI %d, INST %d: PDCP_DATA_REQ size %d RAB %d:\n",Mac_rlc_xface->frame,module_idP,data_sizeP,rab_idP);
|
||||
|
||||
// for (i=0;i<20;i++)
|
||||
// msg("%02X.",((unsigned char*)sduP)[i]);
|
||||
// msg("\n");
|
||||
#endif //PDCP_DATA_REQ_DEBUG
|
||||
// PROCESS OF DECOMPRESSION HERE:
|
||||
memcpy (&new_sdu->data[0], sduP, data_sizeP);
|
||||
|
||||
rlc_data_req(module_idP, rab_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, data_sizeP, new_sdu);
|
||||
if(Mac_rlc_xface->Is_cluster_head[module_idP]==1){
|
||||
Pdcp_stats_tx[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]++;
|
||||
Pdcp_stats_tx_bytes[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]+=data_sizeP;
|
||||
}
|
||||
else{
|
||||
Pdcp_stats_tx[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]++;
|
||||
Pdcp_stats_tx_bytes[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]+=data_sizeP;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
msg("[PDCP][RAB %d][ERROR] PDCP_DATA_REQ OUT OF MEMORY\n", rab_idP);
|
||||
}
|
||||
// free_mem_block (sduP);
|
||||
|
||||
} else {
|
||||
msg("[PDCP][RAB %d][ERROR] PDCP_DATA_REQ SDU SIZE %d\n", rab_idP, data_sizeP);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block_t *new_sdu = NULL;
|
||||
int i;
|
||||
|
||||
if ((data_sizeP > 0)) {
|
||||
|
||||
// if(Mac_rlc_xface->Is_cluster_head[0]==1 && Mac_rlc_xface->frame%10==0)
|
||||
//msg("[PDCP][RAB %d][INST %d] PDCP_DATA_IND size %d\n", rab_idP,module_idP,data_sizeP);
|
||||
|
||||
#ifdef PDCP_DATA_IND_DEBUG
|
||||
msg("[PDCP][RAB %d][INST %d] TTI %d PDCP_DATA_IND size %d\n",
|
||||
rab_idP,module_idP,Mac_rlc_xface->frame,data_sizeP);
|
||||
|
||||
for (i=0;i<20;i++)
|
||||
msg("%02X.",(unsigned char)sduP->data[i]);
|
||||
msg("\n");
|
||||
|
||||
#endif //PDCP_DATA_IND_DEBUG
|
||||
|
||||
new_sdu = get_free_mem_block (data_sizeP + sizeof (pdcp_data_ind_header_t));
|
||||
|
||||
if (new_sdu) {
|
||||
memset (new_sdu->data, 0, sizeof (pdcp_data_ind_header_t));
|
||||
((pdcp_data_ind_header_t *) new_sdu->data)->rb_id = rab_idP;
|
||||
((pdcp_data_ind_header_t *) new_sdu->data)->data_size = data_sizeP;
|
||||
|
||||
// Here there is no virtualization possible
|
||||
#ifdef IDROMEL_NEMO
|
||||
if (Mac_rlc_xface->Is_cluster_head[module_idP] == 0)
|
||||
((pdcp_data_ind_header_t *) new_sdu->data)->inst = rab_idP/8;
|
||||
else
|
||||
((pdcp_data_ind_header_t *) new_sdu->data)->inst = 0;
|
||||
|
||||
#else
|
||||
((pdcp_data_ind_header_t *) new_sdu->data)->inst = module_idP;
|
||||
#endif
|
||||
|
||||
// PROCESS OF DECOMPRESSION HERE:
|
||||
memcpy (&new_sdu->data[sizeof (pdcp_data_ind_header_t)], &sduP->data[0], data_sizeP);
|
||||
list_add_tail_eurecom (new_sdu, &pdcp_sdu_list);
|
||||
if(Mac_rlc_xface->Is_cluster_head[module_idP]==1){
|
||||
Pdcp_stats_rx[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]++;
|
||||
Pdcp_stats_rx_bytes[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]+=data_sizeP;
|
||||
}
|
||||
else{
|
||||
Pdcp_stats_rx[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]++;
|
||||
Pdcp_stats_rx_bytes[module_idP][(rab_idP & RAB_OFFSET2 )>> RAB_SHIFT2][(rab_idP & RAB_OFFSET)-DTCH]+=data_sizeP;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free_mem_block (sduP);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_run (void)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
// NAS -> PDCP traffic
|
||||
|
||||
#ifndef NAS_NETLINK
|
||||
#ifdef USER_MODE
|
||||
//#define PDCP_DUMMY_BUFFER_SIZE 38
|
||||
// unsigned char pdcp_dummy_buffer[PDCP_DUMMY_BUFFER_SIZE];
|
||||
|
||||
|
||||
//msg("[PDCP] PDCP Run Id %d\n",modId);
|
||||
|
||||
|
||||
/*
|
||||
if(Mac_rlc_xface->frame %1 == 0 && (Mac_rlc_xface->frame > 30)) {
|
||||
if (Mac_rlc_xface->Is_cluster_head[0] ==0){
|
||||
pdcp_data_req(0,5,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
pdcp_data_req(0,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
|
||||
// pdcp_data_req(0,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
// pdcp_data_req(3,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
//pdcp_data_req(4,4,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
}
|
||||
// if (Mac_rlc_xface->Is_cluster_head[modId] == 1 && Mac_rlc_xface->frame %20 == 0) {
|
||||
else{
|
||||
pdcp_data_req(0,20,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
pdcp_data_req(0,21,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
pdcp_data_req(0,12,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
pdcp_data_req(0,13,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
|
||||
//pdcp_data_req(0,20,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
}
|
||||
// pdcp_data_req(0,28,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
// pdcp_data_req(0,36,PDCP_DUMMY_BUFFER_SIZE,pdcp_dummy_buffer);
|
||||
|
||||
}*/
|
||||
|
||||
#endif
|
||||
#endif
|
||||
unsigned int diff,i,k,j;
|
||||
if((Mac_rlc_xface->frame%128)==0) {
|
||||
// for(i=0;i<NB_INST;i++)
|
||||
for(i=0;i<NB_UE_INST;i++)
|
||||
for (j=0;j<NB_CNX_CH;j++)
|
||||
for(k=0;k<NB_RAB_MAX;k++){
|
||||
diff = Pdcp_stats_tx_bytes[i][j][k];
|
||||
Pdcp_stats_tx_bytes[i][j][k]=0;
|
||||
Pdcp_stats_tx_rate[i][j][k] = (diff*8)>>7;// (Pdcp_stats_tx_rate[i][k]*1+(7*diff*8)>>7)/8;
|
||||
|
||||
|
||||
diff = Pdcp_stats_rx_bytes[i][j][k];
|
||||
Pdcp_stats_rx_bytes[i][j][k]=0;
|
||||
Pdcp_stats_rx_rate[i][j][k] =(diff*8)>>7;//(Pdcp_stats_rx_rate[i][k]*1 + (7*diff*8)>>7)/8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// printf("[PDCP]Read sdus from NAS\n");
|
||||
pdcp_fifo_read_input_sdus();
|
||||
// PDCP -> NAS traffic
|
||||
pdcp_fifo_flush_sdus();
|
||||
|
||||
/*printf("PDCP TTI %d\n", Mac_rlc_xface->frame);
|
||||
for (i = 0; i < 3; i++) {
|
||||
printf("[RLC_RRC][MOD ID %d] AM:", i);
|
||||
for (j = 0; j < RLC_MAX_NUM_INSTANCES_RLC_AM; j++) {
|
||||
printf("%d", rlc[i].m_rlc_am_array[j].allocation);
|
||||
}
|
||||
printf("\n[RLC_RRC][MOD ID %d] UM:", i);
|
||||
for (j = 0; j < RLC_MAX_NUM_INSTANCES_RLC_UM; j++) {
|
||||
printf("%d", rlc[i].m_rlc_um_array[j].allocation);
|
||||
}
|
||||
printf("\n");
|
||||
}*/
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_config_req (module_id_t module_idP, rb_id_t rab_idP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
//msg ("[PDCP] pdcp_confiq_req()\n");
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_config_release (module_id_t module_idP, rb_id_t rab_idP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
//msg ("[PDCP] pdcp_config_release()\n");
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
pdcp_module_init ()
|
||||
{
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef USER_MODE
|
||||
int ret;
|
||||
|
||||
ret=rtf_create(PDCP2NAS_FIFO,32768);
|
||||
|
||||
if (ret < 0) {
|
||||
printk("[openair][MAC][INIT] Cannot create PDCP2NAS fifo %d (ERROR %d)\n",PDCP2NAS_FIFO,ret);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
else{
|
||||
printk("[openair][MAC][INIT] Created PDCP2NAS fifo %d\n",PDCP2NAS_FIFO);
|
||||
rtf_reset(PDCP2NAS_FIFO);
|
||||
}
|
||||
|
||||
ret=rtf_create(NAS2PDCP_FIFO,32768);
|
||||
|
||||
if (ret < 0) {
|
||||
printk("[openair][MAC][INIT] Cannot create NAS2PDCP fifo %d (ERROR %d)\n",NAS2PDCP_FIFO,ret);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
else{
|
||||
printk("[openair][MAC][INIT] Created NAS2PDCP fifo %d\n",NAS2PDCP_FIFO);
|
||||
rtf_reset(NAS2PDCP_FIFO);
|
||||
}
|
||||
|
||||
pdcp_2_nas_irq = 0;
|
||||
pdcp_input_sdu_remaining_size_to_read=0;
|
||||
pdcp_input_sdu_size_read=0;
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_module_cleanup ()
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
#ifndef USER_MODE
|
||||
rtf_destroy(NAS2PDCP_FIFO);
|
||||
rtf_destroy(PDCP2NAS_FIFO);
|
||||
#endif
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_layer_init ()
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
unsigned int i,j,k;
|
||||
list_init (&pdcp_sdu_list, NULL);
|
||||
|
||||
msg("[PDCP] pdcp_layer_init \n ");
|
||||
pdcp_output_sdu_bytes_to_write=0;
|
||||
pdcp_output_header_bytes_to_write=0;
|
||||
pdcp_input_sdu_remaining_size_to_read=0;
|
||||
// for (i=0;i<NB_INST;i++)
|
||||
for (i=0;i<NB_UE_INST;i++)
|
||||
for (k=0;k<NB_CNX_CH;k++)
|
||||
for(j=0;j<NB_RAB_MAX;j++){
|
||||
Pdcp_stats_tx[i][k][j]=0;
|
||||
Pdcp_stats_tx_bytes[i][k][j]=0;
|
||||
Pdcp_stats_tx_bytes_last[i][k][j]=0;
|
||||
Pdcp_stats_tx_rate[i][k][j]=0;
|
||||
|
||||
Pdcp_stats_rx[i][k][j]=0;
|
||||
Pdcp_stats_rx_bytes[i][k][j]=0;
|
||||
Pdcp_stats_rx_bytes_last[i][k][j]=0;
|
||||
Pdcp_stats_rx_rate[i][k][j]=0;
|
||||
}
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
pdcp_layer_cleanup ()
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
list_free (&pdcp_sdu_list);
|
||||
}
|
||||
|
||||
#ifndef USER_MODE
|
||||
EXPORT_SYMBOL(pdcp_2_nas_irq);
|
||||
#endif //USER_MODE
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
pdcp.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PDCP_H__
|
||||
# define __PDCP_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef PDCP_C
|
||||
# define private_pdcp(x) x
|
||||
# define protected_pdcp(x) x
|
||||
# define public_pdcp(x) x
|
||||
# else
|
||||
# define private_pdcp(x)
|
||||
# define public_pdcp(x) extern x
|
||||
# ifdef PDCP_FIFO_C
|
||||
# define protected_pdcp(x) extern x
|
||||
# else
|
||||
# define protected_pdcp(x)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef PDCP_FIFO_C
|
||||
# define private_pdcp_fifo(x) x
|
||||
# define protected_pdcp_fifo(x) x
|
||||
# define public_pdcp_fifo(x) x
|
||||
# else
|
||||
# define private_pdcp_fifo(x)
|
||||
# define public_pdcp_fifo(x) extern x
|
||||
# ifdef PDCP_C
|
||||
# define protected_pdcp_fifo(x) extern x
|
||||
# else
|
||||
# define protected_pdcp_fifo(x)
|
||||
# endif
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef NON_ACCESS_STRATUM
|
||||
//#include "rtos_header.h"
|
||||
//#include "openair_defs.h"
|
||||
//#include "platform_types.h"
|
||||
//#include "platform_constants.h"
|
||||
#include "UTIL/MEM/mem_block.h"
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#endif //NON_ACCESS_STRATUM
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
public_pdcp(unsigned int Pdcp_stats_tx[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_tx_bytes[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_tx_bytes_last[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_tx_rate[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx_bytes[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx_bytes_last[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx_rate[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
|
||||
public_pdcp(void pdcp_data_req (module_id_t, rb_id_t, sdu_size_t, char*);)
|
||||
public_pdcp(void pdcp_data_ind (module_id_t, rb_id_t, sdu_size_t, mem_block_t*);)
|
||||
public_pdcp(void pdcp_config_req (module_id_t, rb_id_t);)
|
||||
public_pdcp(void pdcp_config_release (module_id_t, rb_id_t);)
|
||||
|
||||
|
||||
public_pdcp(void pdcp_run (void);)
|
||||
public_pdcp(int pdcp_module_init ();)
|
||||
public_pdcp(void pdcp_module_cleanup ();)
|
||||
public_pdcp(void pdcp_layer_init ();)
|
||||
public_pdcp(void pdcp_layer_cleanup ();)
|
||||
|
||||
#define PDCP2NAS_FIFO 21
|
||||
#define NAS2PDCP_FIFO 22
|
||||
|
||||
protected_pdcp_fifo(int pdcp_fifo_flush_sdus ();)
|
||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus_remaining_bytes ();)
|
||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus();)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef struct pdcp_data_req_header_t {
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t data_size;
|
||||
int inst;
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_t {
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t data_size;
|
||||
int inst;
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
typedef struct pdcp_t {
|
||||
char allocation;
|
||||
// here ROHC variables for header compression/decompression
|
||||
} pdcp_t;
|
||||
protected_pdcp(signed int pdcp_2_nas_irq;)
|
||||
protected_pdcp(pdcp_t pdcp_array[MAX_MODULES][MAX_RAB];)
|
||||
protected_pdcp(sdu_size_t pdcp_output_sdu_bytes_to_write;)
|
||||
protected_pdcp(sdu_size_t pdcp_output_header_bytes_to_write;)
|
||||
protected_pdcp(list_t pdcp_sdu_list;)
|
||||
protected_pdcp(int pdcp_sent_a_sdu;)
|
||||
protected_pdcp(pdcp_data_req_header_t pdcp_input_header;)
|
||||
protected_pdcp(char pdcp_input_sdu_buffer[MAX_IP_PACKET_SIZE];)
|
||||
protected_pdcp(sdu_size_t pdcp_input_index_header;)
|
||||
protected_pdcp(sdu_size_t pdcp_input_sdu_size_read;)
|
||||
protected_pdcp(sdu_size_t pdcp_input_sdu_remaining_size_to_read;)
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
/***************************************************************************
|
||||
pdcp_control_primitives.c
|
||||
-------------------
|
||||
begin : Mon Dec 10 2001
|
||||
copyright : (C) 2001 by EURECOM
|
||||
email : Lionel.Gauthier@eurecom.fr
|
||||
-------------------
|
||||
description
|
||||
This file contains the functions used for configuration of pdcp
|
||||
|
||||
***************************************************************************/
|
||||
#include "rtos_header.h"
|
||||
#include "platform.h"
|
||||
#include "protocol_vars_extern.h"
|
||||
#include "print.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "rlc.h"
|
||||
#include "pdcp.h"
|
||||
#include "debug_l2.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
configure_pdcp_req (struct pdcp_entity *pdcpP, void *rlcP, u8 rlc_sap_typeP, u8 header_compression_typeP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block *mb;
|
||||
|
||||
mb = get_free_mem_block (sizeof (struct cpdcp_primitive));
|
||||
((struct cpdcp_primitive *) mb->data)->type = CPDCP_CONFIG_REQ;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.rlc_sap = rlcP;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.rlc_type_sap = rlc_sap_typeP;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.header_compression_type = header_compression_typeP;
|
||||
send_pdcp_control_primitive (pdcpP, mb);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/***************************************************************************
|
||||
pdcp_control_primitives_proto_extern.h
|
||||
-------------------
|
||||
begin : Mon Dec 10 2001
|
||||
copyright : (C) 2001 by EURECOM
|
||||
email : Lionel.Gauthier@eurecom.fr
|
||||
-------------------
|
||||
description
|
||||
This file contains the prototypes of functions used for configuration of pdcp
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef PDCP_CONTROL_PRIMITIVES_PROTO_EXTERN_H
|
||||
# define PDCP_CONTROL_PRIMITIVES_PROTO_EXTERN_H
|
||||
# include "pdcp.h"
|
||||
void rrc_configure_pdcp (struct pdcp_entity *pdcpP, void *rlcP, u8 rlc_sap_typeP, u8 header_compression_typeP);
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
pdcp_entity.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PDCP_ENTITY_H__
|
||||
# define __PDCP_ENTITY_H__
|
||||
|
||||
# include "list.h"
|
||||
|
||||
|
||||
struct pdcp_entity {
|
||||
unsigned short id; // for resource management purpose
|
||||
unsigned char allocation;
|
||||
void *rlc_sap;
|
||||
//-----------------------------
|
||||
// C-SAP
|
||||
//-----------------------------
|
||||
list c_sap;
|
||||
//-----------------------------
|
||||
// tranmission
|
||||
//-----------------------------
|
||||
list input_sdu_list;
|
||||
void *rlc;
|
||||
//-----------------------------
|
||||
// receiver
|
||||
//-----------------------------
|
||||
//struct list output_sdu_list;
|
||||
|
||||
#ifdef ROHC
|
||||
void (*pdcp_process_input_sdus) (struct pdcp_entity *pdcpP, u16 data_sizeP, mem_block * sduP);
|
||||
#else
|
||||
void (*pdcp_process_input_sdus) (struct pdcp_entity *pdcpP);
|
||||
#endif
|
||||
|
||||
unsigned char rb_id; // for traces
|
||||
unsigned char rlc_type_sap; // am, um, tr
|
||||
|
||||
struct rb_dispatcher *rb_dispatch;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,472 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2011 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file pdcp_fifo.c
|
||||
* \brief pdcp interface with linux IP interface
|
||||
* \author Lionel GAUTHIER and Navid Nikaein
|
||||
* \date 2009
|
||||
* \version 0.5
|
||||
* \warning This component can be runned only in user-space
|
||||
* @ingroup pdcp
|
||||
|
||||
*/
|
||||
|
||||
#define PDCP_FIFO_C
|
||||
#include "pdcp.h"
|
||||
#ifdef USER_MODE
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define rtf_put write
|
||||
#define rtf_get read
|
||||
|
||||
#else
|
||||
#include <rtai_fifos.h>
|
||||
#endif //USER_MODE
|
||||
|
||||
|
||||
#include "../MAC/extern.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/extern.h"
|
||||
|
||||
#define PDCP_DEBUG 1
|
||||
|
||||
//#define IDROMEL_NEMO 1
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OCG/OCG_extern.h"
|
||||
#endif
|
||||
|
||||
#ifdef NAS_NETLINK
|
||||
|
||||
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <linux/netlink.h>
|
||||
|
||||
|
||||
|
||||
extern struct sockaddr_nl nas_src_addr, nas_dest_addr;
|
||||
extern struct nlmsghdr *nas_nlh;
|
||||
extern struct iovec nas_iov;
|
||||
extern int nas_sock_fd;
|
||||
extern struct msghdr nas_msg;
|
||||
|
||||
#define MAX_PAYLOAD 1600 /* maximum payload size*/
|
||||
|
||||
unsigned char pdcp_read_state = 0;
|
||||
|
||||
char pdcp_read_payload[MAX_PAYLOAD];
|
||||
#endif
|
||||
pdcp_data_req_header_t pdcp_read_header;
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
pdcp_fifo_flush_sdus ()
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
mem_block_t *sdu = list_get_head (&pdcp_sdu_list);
|
||||
int bytes_wrote = 0;
|
||||
int pdcp_nb_sdu_sent = 0;
|
||||
u8 cont = 1;
|
||||
int ret;
|
||||
|
||||
|
||||
while ((sdu) && (cont)) {
|
||||
|
||||
#ifdef USER_MODE
|
||||
// asjust the instance id when passing sdu to IP
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst = (((pdcp_data_ind_header_t *)(sdu->data))->inst >= NB_eNB_INST) ?
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst - NB_eNB_INST +oai_emulation.info.nb_enb_local - oai_emulation.info.first_ue_local :// UE
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst - oai_emulation.info.first_ue_local; // ENB
|
||||
#else
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst = 0;
|
||||
#endif
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP][INFO] PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
|
||||
Mac_rlc_xface->frame,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->data_size,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
|
||||
cont = 0;
|
||||
|
||||
if (!pdcp_output_sdu_bytes_to_write) {
|
||||
if (!pdcp_output_header_bytes_to_write) {
|
||||
pdcp_output_header_bytes_to_write = sizeof (pdcp_data_ind_header_t);
|
||||
}
|
||||
|
||||
#ifndef USER_MODE
|
||||
bytes_wrote = rtf_put (PDCP2NAS_FIFO,
|
||||
&(((u8 *) sdu->data)[sizeof (pdcp_data_ind_header_t) - pdcp_output_header_bytes_to_write]),
|
||||
pdcp_output_header_bytes_to_write);
|
||||
|
||||
#else
|
||||
#ifdef NAS_NETLINK
|
||||
#ifdef LINUX
|
||||
memcpy(NLMSG_DATA(nas_nlh), &(((u8 *) sdu->data)[sizeof (pdcp_data_ind_header_t) - pdcp_output_header_bytes_to_write]),
|
||||
pdcp_output_header_bytes_to_write);
|
||||
nas_nlh->nlmsg_len = pdcp_output_header_bytes_to_write;
|
||||
#endif //LINUX
|
||||
#endif //NAS_NETLINK
|
||||
|
||||
bytes_wrote = pdcp_output_header_bytes_to_write;
|
||||
#endif //USER_MODE
|
||||
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP][INFO] TTI %d Sent %d Bytes of header to Nas_mesh\n",
|
||||
Mac_rlc_xface->frame,
|
||||
bytes_wrote);
|
||||
#endif //PDCP_DEBUG
|
||||
|
||||
if (bytes_wrote > 0) {
|
||||
pdcp_output_header_bytes_to_write = pdcp_output_header_bytes_to_write - bytes_wrote;
|
||||
|
||||
if (!pdcp_output_header_bytes_to_write) { // continue with sdu
|
||||
|
||||
pdcp_output_sdu_bytes_to_write = ((pdcp_data_ind_header_t *) sdu->data)->data_size;
|
||||
|
||||
#ifndef USER_MODE
|
||||
bytes_wrote = rtf_put (PDCP2NAS_FIFO, &(sdu->data[sizeof (pdcp_data_ind_header_t)]), pdcp_output_sdu_bytes_to_write);
|
||||
#else
|
||||
|
||||
#ifdef NAS_NETLINK
|
||||
#ifdef LINUX
|
||||
memcpy(NLMSG_DATA(nas_nlh)+sizeof(pdcp_data_ind_header_t), &(sdu->data[sizeof (pdcp_data_ind_header_t)]), pdcp_output_sdu_bytes_to_write);
|
||||
nas_nlh->nlmsg_len += pdcp_output_sdu_bytes_to_write;
|
||||
ret = sendmsg(nas_sock_fd,&nas_msg,0);
|
||||
if (ret<0) {
|
||||
msg("[PDCP_FIFOS] sendmsg returns %d\n",ret);
|
||||
perror("error code:");
|
||||
mac_xface->macphy_exit("");
|
||||
break;
|
||||
}
|
||||
#endif // LINUX
|
||||
#endif //NAS_NETLINK
|
||||
bytes_wrote= pdcp_output_sdu_bytes_to_write;
|
||||
#endif // USER_MODE
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP][INFO] PDCP->IP TTI %d INST %d: Sent %d Bytes of data from rab %d to Nas_mesh\n",
|
||||
Mac_rlc_xface->frame,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst,
|
||||
bytes_wrote,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
if (bytes_wrote > 0) {
|
||||
pdcp_output_sdu_bytes_to_write -= bytes_wrote;
|
||||
|
||||
if (!pdcp_output_sdu_bytes_to_write) { // OK finish with this SDU
|
||||
// msg("rb sent a sdu qos_sap %d\n",sapiP);
|
||||
|
||||
list_remove_head (&pdcp_sdu_list);
|
||||
free_mem_block (sdu);
|
||||
cont = 1;
|
||||
pdcp_nb_sdu_sent += 1;
|
||||
sdu = list_get_head (&pdcp_sdu_list);
|
||||
}
|
||||
} else {
|
||||
msg ("[PDCP] RADIO->IP SEND SDU CONGESTION!\n");
|
||||
}
|
||||
} else {
|
||||
msg ("[PDCP] RADIO->IP SEND SDU CONGESTION!\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// continue writing sdu
|
||||
#ifndef USER_MODE
|
||||
bytes_wrote = rtf_put (PDCP2NAS_FIFO,
|
||||
(u8 *) (&(sdu->data[sizeof (pdcp_data_ind_header_t) + ((pdcp_data_ind_header_t *) sdu->data)->data_size - pdcp_output_sdu_bytes_to_write])),
|
||||
pdcp_output_sdu_bytes_to_write);
|
||||
#else // USER_MODE
|
||||
bytes_wrote = pdcp_output_sdu_bytes_to_write;
|
||||
#endif // USER_MODE
|
||||
|
||||
if (bytes_wrote > 0) {
|
||||
pdcp_output_sdu_bytes_to_write -= bytes_wrote;
|
||||
|
||||
if (!pdcp_output_sdu_bytes_to_write) { // OK finish with this SDU
|
||||
//PRINT_RB_SEND_OUTPUT_SDU ("[PDCP] RADIO->IP SEND SDU\n");
|
||||
list_remove_head (&pdcp_sdu_list);
|
||||
free_mem_block (sdu);
|
||||
cont = 1;
|
||||
pdcp_nb_sdu_sent += 1;
|
||||
sdu = list_get_head (&pdcp_sdu_list);
|
||||
// msg("rb sent a sdu from rab\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef USER_MODE
|
||||
if ((pdcp_nb_sdu_sent)) {
|
||||
if ((pdcp_2_nas_irq > 0)) {
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP][INFO] TTI %d : Trigger NAS RX interrupt\n",
|
||||
Mac_rlc_xface->frame);
|
||||
#endif //PDCP_DEBUG
|
||||
|
||||
rt_pend_linux_srq (pdcp_2_nas_irq);
|
||||
} else {
|
||||
msg ("[PDCP] TTI %d: ERROR IF IP STACK WANTED : NOTIF PACKET(S) pdcp_2_nas_irq not initialized : %d\n",
|
||||
Mac_rlc_xface->frame,
|
||||
pdcp_2_nas_irq);
|
||||
}
|
||||
}
|
||||
#endif //USER_MODE
|
||||
|
||||
return pdcp_nb_sdu_sent;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* returns a positive value if whole bytes that had to be read were read
|
||||
* returns zero value if whole bytes that had to be read were not read at all
|
||||
* returns a negative value if an error was encountered while reading the rt fifo
|
||||
*/
|
||||
int
|
||||
pdcp_fifo_read_input_sdus_remaining_bytes ()
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
sdu_size_t bytes_read=0;
|
||||
// if remaining bytes to read
|
||||
|
||||
|
||||
|
||||
if (pdcp_input_sdu_remaining_size_to_read > 0) {
|
||||
|
||||
// printk("[PDCP][INFO] read_input_sdus pdcp_input_sdu_remaining_size_to_read = %d \n", pdcp_input_sdu_remaining_size_to_read);
|
||||
bytes_read = rtf_get (NAS2PDCP_FIFO,
|
||||
&(pdcp_input_sdu_buffer[pdcp_input_sdu_size_read]),
|
||||
pdcp_input_sdu_remaining_size_to_read);
|
||||
|
||||
//printk("[PDCP][INFO] read fifo returned %d \n", bytes_read);
|
||||
if (bytes_read > 0) {
|
||||
|
||||
//msg("[PDCP_FIFOS] Read %d remaining Bytes of data from Nas_mesh\n",bytes_read);
|
||||
|
||||
pdcp_input_sdu_remaining_size_to_read = pdcp_input_sdu_remaining_size_to_read - bytes_read;
|
||||
pdcp_input_sdu_size_read = pdcp_input_sdu_size_read + bytes_read;
|
||||
|
||||
if (pdcp_input_sdu_remaining_size_to_read != 0) {
|
||||
return 0;
|
||||
} else {
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP][INFO] TTI %d: IP->RADIO RECEIVED COMPLETE SDU size %d inst %d rb %d\n",
|
||||
Mac_rlc_xface->frame,
|
||||
pdcp_input_sdu_size_read,
|
||||
pdcp_input_header.inst,
|
||||
pdcp_input_header.rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
pdcp_input_sdu_size_read = 0;
|
||||
#ifdef IDROMEL_NEMO
|
||||
pdcp_read_header.inst = 0;
|
||||
#endif
|
||||
pdcp_data_req (pdcp_input_header.inst,
|
||||
pdcp_input_header.rb_id,
|
||||
pdcp_input_header.data_size,
|
||||
pdcp_input_sdu_buffer);
|
||||
|
||||
// not necessary
|
||||
//memset(pdcp_input_sdu_buffer, 0, MAX_IP_PACKET_SIZE);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
return bytes_read;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifndef NAS_NETLINK
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
pdcp_fifo_read_input_sdus ()
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
int cont;
|
||||
int bytes_read;
|
||||
|
||||
// if remaining bytes to read
|
||||
if (pdcp_fifo_read_input_sdus_remaining_bytes () > 0) {
|
||||
|
||||
// all bytes that had to be read for a SDU were read
|
||||
// if not overflow of list, try to get new sdus from rt fifo
|
||||
cont = 1;
|
||||
|
||||
while (cont > 0) {
|
||||
|
||||
bytes_read = rtf_get (NAS2PDCP_FIFO,
|
||||
&(((u8 *) & pdcp_input_header)[pdcp_input_index_header]),
|
||||
sizeof (pdcp_data_req_header_t) - pdcp_input_index_header);
|
||||
|
||||
|
||||
if (bytes_read > 0) {
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP_FIFOS] TTI %d Read %d Bytes of data (header %d) from Nas_mesh\n",
|
||||
Mac_rlc_xface->frame,
|
||||
bytes_read,
|
||||
sizeof(pdcp_data_req_header_t));
|
||||
#endif // PDCP_DEBUG
|
||||
pdcp_input_index_header += bytes_read;
|
||||
|
||||
if (pdcp_input_index_header == sizeof (pdcp_data_req_header_t)) {
|
||||
#ifdef PDCP_DEBUG
|
||||
msg("[PDCP] TTI %d IP->RADIO READ HEADER sdu size %d\n",
|
||||
Mac_rlc_xface->frame,
|
||||
pdcp_input_header.data_size);
|
||||
#endif //PDCP_DEBUG
|
||||
pdcp_input_index_header = 0;
|
||||
if(pdcp_input_header.data_size<0){
|
||||
msg("[PDCP][FATAL ERROR] READ_FIFO: DATA_SIZE %d < 0\n",pdcp_input_header.data_size);
|
||||
|
||||
mac_xface->macphy_exit("");
|
||||
return 0;
|
||||
}
|
||||
pdcp_input_sdu_remaining_size_to_read = pdcp_input_header.data_size;
|
||||
pdcp_input_sdu_size_read = 0;
|
||||
// we know the size of the sdu, so read the sdu;
|
||||
cont = pdcp_fifo_read_input_sdus_remaining_bytes ();
|
||||
} else {
|
||||
cont = 0;
|
||||
}
|
||||
// error while reading rt fifo
|
||||
} else {
|
||||
cont = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else //NAS_NETLINK
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
pdcp_fifo_read_input_sdus ()
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
int cont;
|
||||
int bytes_read;
|
||||
int len;
|
||||
|
||||
|
||||
|
||||
if (pdcp_read_state == 0) {
|
||||
|
||||
#ifdef LINUX
|
||||
len = recvmsg(nas_sock_fd, &nas_msg, 0);
|
||||
#else
|
||||
len = -1;
|
||||
#endif
|
||||
|
||||
if (len<0) {
|
||||
// printf("[PDCP][NETLINK %d] nothing in pdcp NAS socket\n", nas_sock_fd);
|
||||
}
|
||||
else {
|
||||
#ifdef PDCP_DEBUG
|
||||
#ifdef LINUX
|
||||
printf("[PDCP][NETLINK] Received socket with length %d (nlmsg_len = %d)\n",len,nas_nlh->nlmsg_len-sizeof(struct nlmsghdr));
|
||||
#endif PDCP_DEBUG
|
||||
#ifdef PDCP_DEBUG
|
||||
printf("[PDCP][NETLINK] nlmsg_len = %d (%d,%d)\n",nas_nlh->nlmsg_len,
|
||||
sizeof(pdcp_data_req_header_t),
|
||||
sizeof(struct nlmsghdr));
|
||||
#endif LINUX
|
||||
#endif PDCP_DEBUG
|
||||
}
|
||||
#ifdef LINUX
|
||||
if (nas_nlh->nlmsg_len == sizeof (pdcp_data_req_header_t) + sizeof(struct nlmsghdr)) {
|
||||
|
||||
pdcp_read_state = 1; //get
|
||||
memcpy((void *)&pdcp_read_header,
|
||||
(void *)NLMSG_DATA(nas_nlh),
|
||||
sizeof(pdcp_data_req_header_t));
|
||||
}
|
||||
#else //LINUX
|
||||
pdcp_read_state = 1;
|
||||
#endif //LINUX
|
||||
}
|
||||
|
||||
if (pdcp_read_state == 1) {
|
||||
|
||||
#ifdef LINUX
|
||||
len = recvmsg(nas_sock_fd, &nas_msg, 0);
|
||||
#else
|
||||
len = -1;
|
||||
#endif //LINUX
|
||||
|
||||
if (len<0) {
|
||||
// nothing in pdcp NAS socket
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
pdcp_read_state = 0;
|
||||
// print_active_requests()
|
||||
|
||||
#ifdef LINUX
|
||||
memcpy(pdcp_read_payload,
|
||||
(unsigned char *)NLMSG_DATA(nas_nlh),
|
||||
nas_nlh->nlmsg_len - sizeof(struct nlmsghdr));
|
||||
#endif
|
||||
|
||||
#ifdef IDROMEL_NEMO
|
||||
pdcp_read_header.inst = 0;
|
||||
#endif
|
||||
pdcp_read_header.inst = (pdcp_read_header.inst >= oai_emulation.info.nb_enb_local) ?
|
||||
pdcp_read_header.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
|
||||
pdcp_read_header.inst + oai_emulation.info.first_enb_local;
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
printf("[PDCP][NETLINK][IP->PDCP] TTI %d, INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
|
||||
Mac_rlc_xface->frame,
|
||||
pdcp_read_header.inst,
|
||||
len,
|
||||
nas_nlh->nlmsg_len-sizeof(struct nlmsghdr),
|
||||
pdcp_read_header.rb_id);
|
||||
#endif PDCP_DEBUG
|
||||
|
||||
pdcp_data_req(pdcp_read_header.inst,
|
||||
pdcp_read_header.rb_id,
|
||||
pdcp_read_header.data_size,
|
||||
pdcp_read_payload);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
pdcp_primitives.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PDCP_PRIMITIVES_H__
|
||||
# define __PDCP_PRIMITIVES_H__
|
||||
|
||||
# include "platform.h"
|
||||
//----------------------------------------------------------
|
||||
// primitives
|
||||
//----------------------------------------------------------
|
||||
# define PDCP_DATA_REQ 0x01
|
||||
# define PDCP_DATA_IND 0x02
|
||||
//----------------------------------------------------------
|
||||
// control primitives
|
||||
//----------------------------------------------------------
|
||||
# define CPDCP_CONFIG_REQ 0x04
|
||||
# define CPDCP_RELEASE_REQ 0x08
|
||||
# define CPDCP_SN_REQ 0x10
|
||||
# define CPDCP_RELOC_REQ 0x20
|
||||
# define CPDCP_RELOC_CNF 0x40
|
||||
//----------------------------------------------------------
|
||||
// primitives definition
|
||||
//----------------------------------------------------------
|
||||
struct pdcp_data_req {
|
||||
u16 rb_id;
|
||||
u16 data_size;
|
||||
};
|
||||
struct pdcp_data_ind {
|
||||
u16 rb_id;
|
||||
u16 data_size;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------
|
||||
// control primitives definition
|
||||
//----------------------------------------------------------
|
||||
// TO DO
|
||||
struct cpdcp_config_req {
|
||||
void *rlc_sap;
|
||||
u8 rlc_type_sap; // am, um, tr
|
||||
u8 header_compression_type;
|
||||
};
|
||||
struct cpdcp_release_req {
|
||||
void *rlc_sap;
|
||||
};
|
||||
|
||||
struct cpdcp_sn_req {
|
||||
u32 sn;
|
||||
};
|
||||
|
||||
struct cpdcp_relloc_req {
|
||||
u32 receive_sn;
|
||||
};
|
||||
|
||||
struct cpdcp_relloc_conf {
|
||||
u32 receive_sn;
|
||||
u32 send_sn;
|
||||
};
|
||||
|
||||
struct cpdcp_primitive {
|
||||
u8 type;
|
||||
union {
|
||||
struct cpdcp_config_req config_req;
|
||||
struct cpdcp_release_req release_req;
|
||||
struct cpdcp_sn_req sn_req;
|
||||
struct cpdcp_relloc_req relloc_req;
|
||||
struct cpdcp_relloc_conf relloc_conf;
|
||||
} primitive;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
pdcp_proto_extern.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __PDCP_PROTO_EXTERN_H__
|
||||
# define __PDCP_PROTO_EXTERN_H__
|
||||
|
||||
//# include "pdcp_entity.h"
|
||||
//# include "rb_mux.h"
|
||||
# include "mem_block.h"
|
||||
|
||||
#ifdef ROHC
|
||||
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP);
|
||||
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_high(struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, u16 data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, u8 rb_idP);
|
||||
extern void pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block * sduP, u16 data_sizeP, u16 rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, u16 data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, u16 data_sizeP, mem_block * sduP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, u8 rb_idP);
|
||||
extern void *pdcp_tx (struct pdcp_entity *pdcpP, u16 data_sizeP, mem_block * sduP);
|
||||
extern int reception_from_rohc_mt(void);
|
||||
extern int reception_from_rohc_bs(void);
|
||||
#else
|
||||
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP);
|
||||
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, u8 rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, u8 rb_idP);
|
||||
extern void *pdcp_tx (void *argP);
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,354 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2011 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file pdcp.c
|
||||
* \brief pdcp interface with RLC
|
||||
* \author Lionel GAUTHIER and Navid Nikaein
|
||||
* \date 2009-2012
|
||||
* \version 1.0
|
||||
*/
|
||||
|
||||
#ifndef __PDCP_H__
|
||||
# define __PDCP_H__
|
||||
//-----------------------------------------------------------------------------
|
||||
# ifdef PDCP_C
|
||||
# define private_pdcp(x) x
|
||||
# define protected_pdcp(x) x
|
||||
# define public_pdcp(x) x
|
||||
# else
|
||||
# define private_pdcp(x)
|
||||
# define public_pdcp(x) extern x
|
||||
# ifdef PDCP_FIFO_C
|
||||
# define protected_pdcp(x) extern x
|
||||
# else
|
||||
# define protected_pdcp(x)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef PDCP_FIFO_C
|
||||
# define private_pdcp_fifo(x) x
|
||||
# define protected_pdcp_fifo(x) x
|
||||
# define public_pdcp_fifo(x) x
|
||||
# else
|
||||
# define private_pdcp_fifo(x)
|
||||
# define public_pdcp_fifo(x) extern x
|
||||
# ifdef PDCP_C
|
||||
# define protected_pdcp_fifo(x) extern x
|
||||
# else
|
||||
# define protected_pdcp_fifo(x)
|
||||
# endif
|
||||
# endif
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef NON_ACCESS_STRATUM
|
||||
#include "UTIL/MEM/mem_block.h"
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#endif //NON_ACCESS_STRATUM
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "DRB-ToAddMod.h"
|
||||
#include "DRB-ToAddModList.h"
|
||||
#include "SRB-ToAddMod.h"
|
||||
#include "SRB-ToAddModList.h"
|
||||
#ifdef Rel10
|
||||
#include "MBMS-SessionInfoList-r9.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
|
||||
#define FALSE (0x00)
|
||||
#define TRUE !(FALSE)
|
||||
typedef unsigned char BOOL;
|
||||
|
||||
public_pdcp(unsigned int Pdcp_stats_tx[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_tx_bytes[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_tx_bytes_last[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_tx_rate[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx_bytes[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx_bytes_last[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
public_pdcp(unsigned int Pdcp_stats_rx_rate[NB_MODULES_MAX][NB_CNX_CH][NB_RAB_MAX]);
|
||||
|
||||
typedef struct pdcp_t {
|
||||
BOOL instanciated_instance;
|
||||
u16 header_compression_profile;
|
||||
|
||||
u8 cipheringAlgorithm;
|
||||
u8 integrityProtAlgorithm;
|
||||
|
||||
u8 rlc_mode;
|
||||
u8 status_report;
|
||||
u8 seq_num_size;
|
||||
|
||||
u8 lcid;
|
||||
/*
|
||||
* Sequence number state variables
|
||||
*
|
||||
* TX and RX window
|
||||
*/
|
||||
u16 next_pdcp_tx_sn;
|
||||
u16 next_pdcp_rx_sn;
|
||||
/*
|
||||
* TX and RX Hyper Frame Numbers
|
||||
*/
|
||||
u16 tx_hfn;
|
||||
u16 rx_hfn;
|
||||
/*
|
||||
* SN of the last PDCP SDU delivered to upper layers
|
||||
*/
|
||||
u16 last_submitted_pdcp_rx_sn;
|
||||
|
||||
/*
|
||||
* Following array is used as a bitmap holding missing sequence
|
||||
* numbers to generate a PDCP Control PDU for PDCP status
|
||||
* report (see 6.2.6)
|
||||
*/
|
||||
u8 missing_pdu_bitmap[512];
|
||||
/*
|
||||
* This is intentionally signed since we need a 'NULL' value
|
||||
* which is not also a valid sequence number
|
||||
*/
|
||||
short int first_missing_pdu;
|
||||
} pdcp_t;
|
||||
|
||||
typedef struct pdcp_mbms_t {
|
||||
BOOL instanciated_instance;
|
||||
|
||||
uint16_t service_id;
|
||||
uint32_t session_id; // lcid
|
||||
|
||||
uint16_t rb_id;
|
||||
|
||||
} pdcp_mbms_t;
|
||||
/*
|
||||
* Following symbolic constant alters the behaviour of PDCP
|
||||
* and makes it linked to PDCP test code under targets/TEST/PDCP/
|
||||
*
|
||||
* For the version at SVN repository this should be UNDEFINED!
|
||||
* XXX And later this should be configured through the Makefile
|
||||
* under targets/TEST/PDCP/
|
||||
*/
|
||||
#undef PDCP_UNIT_TEST
|
||||
|
||||
#ifdef PDCP_UNIT_TEST
|
||||
/*! \fn BOOL pdcp_data_req(module_id_t, u32_t, u8_t, rb_id_t, sdu_size_t, unsigned char*, pdcp_t*, list_t*)
|
||||
* \brief This functions handles data transfer requests coming from test code (see below for actual code)
|
||||
* \param[in] module_id Module ID
|
||||
* \param[in] frame Frame number
|
||||
* \param[in] Shows if relevant PDCP entity is part of an eNB or a UE
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] test_pdcp_entity PDCP entity used for testing purposes
|
||||
* \param[in] test_list list_t used for testing purposes
|
||||
* \param[out] test_list Newly created PDU is enqueued into the list
|
||||
* \param[out] test_pdcp PDCP sequence numbering state is updated
|
||||
* \return TRUE on success, FALSE otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(BOOL pdcp_data_req (module_id_t module_id, u32_t frame, u8_t eNB_flag, rb_id_t rab_id, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer, pdcp_t* test_pdcp_entity, list_t* test_list);)
|
||||
/*! \fn BOOL pdcp_data_ind(module_id_t, u32_t, u8_t, rb_id_t, sdu_size_t, unsigned char*)
|
||||
* \brief This functions handles data transfer indications coming from test code (see below for actual code)
|
||||
* \param[in] module_id Module ID
|
||||
* \param[in] frame Frame number
|
||||
* \param[in] Shows if relevant PDCP entity is part of an eNB or a UE
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] test_list Incoming PDU is received/dequeued from this list
|
||||
* \param[in] test_pdcp_entity PDCP entity used for testing purposes
|
||||
* \return TRUE on success, FALSE otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(BOOL pdcp_data_ind (module_id_t module_id, u32_t frame, u8_t eNB_flag, rb_id_t rab_id, sdu_size_t sdu_buffer_size, \
|
||||
mem_block_t* sdu_buffer, pdcp_t* test_pdcp_entity, list_t* test_list);)
|
||||
#else
|
||||
/*! \fn BOOL pdcp_data_req(module_id_t, u32_t, u8_t, rb_id_t, sdu_size_t, unsigned char*)
|
||||
* \brief This functions handles data transfer requests coming either from RRC or from IP
|
||||
* \param[in] module_id Module ID
|
||||
* \param[in] frame Frame number
|
||||
* \param[in] Shows if relevant PDCP entity is part of an eNB or a UE
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] muiP
|
||||
* \param[in] confirmP
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] mode flag to indicate whether the userplane data belong to the control plane or data plane or transparent
|
||||
* \return TRUE on success, FALSE otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(BOOL pdcp_data_req (module_id_t module_id, u32_t frame, u8_t eNB_flag, rb_id_t rab_id, u32 muiP, u32 confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer, u8 mode);)
|
||||
|
||||
/*! \fn BOOL pdcp_data_ind(module_id_t, u32_t, u8_t, u8_t, rb_id_t, sdu_size_t, unsigned char*)
|
||||
* \brief This functions handles data transfer indications coming from RLC
|
||||
* \param[in] module_id Module ID
|
||||
* \param[in] frame Frame number
|
||||
* \param[in] Shows if relevant PDCP entity is part of an eNB or a UE
|
||||
* \param[in] Tells if MBMS traffic
|
||||
* \param[in] rab_id Radio Bearer ID
|
||||
* \param[in] sdu_buffer_size Size of incoming SDU in bytes
|
||||
* \param[in] sdu_buffer Buffer carrying SDU
|
||||
* \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
|
||||
* \return TRUE on success, FALSE otherwise
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(BOOL pdcp_data_ind (module_id_t module_id, u32_t frame, u8_t eNB_flag, u8_t MBMS_flagP, rb_id_t rab_id, sdu_size_t sdu_buffer_size, \
|
||||
mem_block_t* sdu_buffer, u8 is_data_plane);)
|
||||
#endif // PDCP_UNIT_TEST
|
||||
|
||||
/*! \fn void rrc_pdcp_config_req(module_id_t, rb_id_t,u8)
|
||||
* \brief This functions initializes relevant PDCP entity
|
||||
* \param[in] module_id Module ID of relevant PDCP entity
|
||||
* \param[in] frame frame counter (TTI)
|
||||
* \param[in] eNB_flag flag indicating the node type
|
||||
* \param[in] action flag for action: add, remove , modify
|
||||
* \param[in] rab_id Radio Bearer ID of relevant PDCP entity
|
||||
* \return none
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(void rrc_pdcp_config_req (module_id_t module_id, u32 frame, u8_t eNB_flag, u32 action, rb_id_t rab_id, u8 security_mode);)
|
||||
|
||||
|
||||
/*! \fn bool rrc_pdcp_config_asn1_req (module_id_t module_id, u32_t frame, u8_t eNB_flag, SRB_ToAddModList_t* srb2add_list, DRB_ToAddModList_t* drb2add_list, DRB_ToReleaseList_t* drb2release_list)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
* \param[in] module_id Virtualized module identifier.
|
||||
* \param[in] frame Frame index.
|
||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
||||
* \param[in] index index of UE or eNB depending on the eNB_flag
|
||||
* \param[in] srb2add_list SRB configuration list to be created.
|
||||
* \param[in] drb2add_list DRB configuration list to be created.
|
||||
* \param[in] drb2release_list DRB configuration list to be released.
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
#ifdef Rel10
|
||||
public_pdcp(BOOL rrc_pdcp_config_asn1_req (module_id_t module_id, u32_t frame, u8_t eNB_flag, u32_t index, SRB_ToAddModList_t* srb2add_list, DRB_ToAddModList_t* drb2add_list, DRB_ToReleaseList_t* drb2release_list,PMCH_InfoList_r9_t* pmch_InfoList_r9);)
|
||||
#else
|
||||
public_pdcp(BOOL rrc_pdcp_config_asn1_req (module_id_t module_id, u32_t frame, u8_t eNB_flag, u32_t index, SRB_ToAddModList_t* srb2add_list, DRB_ToAddModList_t* drb2add_list, DRB_ToReleaseList_t* drb2release_list);)
|
||||
#endif
|
||||
|
||||
|
||||
/*! \fn BOOL pdcp_config_req_asn1 (module_id_t module_id, u32 frame, u8_t eNB_flag, u32 action, rb_id_t rb_id, u8 rb_sn, u8 rb_report, u16 header_compression_profile, u8 security_mode)
|
||||
* \brief Function for RRC to configure a Radio Bearer.
|
||||
* \param[in] module_id Virtualized module identifier.
|
||||
* \param[in] frame Frame index.
|
||||
* \param[in] eNB_flag Flag to indicate eNB (1) or UE (0)
|
||||
* \param[in] action add, remove, modify a RB
|
||||
* \param[in] rb_id radio bearer id
|
||||
* \param[in] rb_sn sequence number for this radio bearer
|
||||
* \param[in] drb_report set a pdcp report for this drb
|
||||
* \param[in] header_compression set the rohc profile
|
||||
* \param[in] security_mode set the integrity and ciphering algs
|
||||
* \return A status about the processing, OK or error code.
|
||||
*/
|
||||
public_pdcp(BOOL pdcp_config_req_asn1 (module_id_t module_id, u32 frame, u8_t eNB_flag, u16 index, rlc_mode_t rlc_mode, u32 action, u16 lc_id, u16 mch_id, rb_id_t rb_id, u8 rb_sn, u8 rb_report, u16 header_compression_profile, u8 security_mode);)
|
||||
|
||||
/*! \fn void rrc_pdcp_config_release(module_id_t, rb_id_t)
|
||||
* \brief This functions is unused
|
||||
* \param[in] module_id Module ID of relevant PDCP entity
|
||||
* \param[in] rab_id Radio Bearer ID of relevant PDCP entity
|
||||
* \return none
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
//public_pdcp(void rrc_pdcp_config_release (module_id_t, rb_id_t);)
|
||||
|
||||
/*! \fn void pdcp_run(u32_t, u8_t)
|
||||
* \brief Runs PDCP entity to let it handle incoming/outgoing SDUs
|
||||
* \param[in] frame Frame number
|
||||
* \param[in] eNB_flag Indicates if this PDCP entity belongs to an eNB or to a UE
|
||||
* \return none
|
||||
* \note None
|
||||
* @ingroup _pdcp
|
||||
*/
|
||||
public_pdcp(void pdcp_run (u32_t frame, u8_t eNB_flag, u8 UE_index,u8 eNB_index);)
|
||||
public_pdcp(int pdcp_module_init ();)
|
||||
public_pdcp(void pdcp_module_cleanup ();)
|
||||
public_pdcp(void pdcp_layer_init ();)
|
||||
public_pdcp(void pdcp_layer_cleanup ();)
|
||||
|
||||
#define PDCP2NAS_FIFO 21
|
||||
#define NAS2PDCP_FIFO 22
|
||||
|
||||
protected_pdcp_fifo(int pdcp_fifo_flush_sdus (u32_t,u8_t);)
|
||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus_remaining_bytes (u32_t,u8_t);)
|
||||
protected_pdcp_fifo(int pdcp_fifo_read_input_sdus(u32_t,u8_t);)
|
||||
protected_pdcp_fifo(void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index, u8 eNB_index);)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* Following two types are utilized between NAS driver and PDCP
|
||||
*/
|
||||
typedef struct pdcp_data_req_header_t {
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t data_size;
|
||||
int inst;
|
||||
} pdcp_data_req_header_t;
|
||||
typedef struct pdcp_data_ind_header_t {
|
||||
rb_id_t rb_id;
|
||||
sdu_size_t data_size;
|
||||
int inst;
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Missing PDU information struct, a copy of this will be enqueued
|
||||
* into pdcp.missing_pdus for every missing PDU
|
||||
*/
|
||||
typedef struct pdcp_missing_pdu_info_t {
|
||||
u16 sequence_number;
|
||||
} pdcp_missing_pdu_info_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PDCP limit values
|
||||
*/
|
||||
#define PDCP_MAX_SDU_SIZE 8188 // octets, see 4.3.1 Services provided to upper layers
|
||||
#define PDCP_MAX_SN_5BIT 31 // 2^5-1
|
||||
#define PDCP_MAX_SN_7BIT 127 // 2^7-1
|
||||
#define PDCP_MAX_SN_12BIT 4095 // 2^12-1
|
||||
|
||||
protected_pdcp(signed int pdcp_2_nas_irq;)
|
||||
protected_pdcp(pdcp_t pdcp_array[MAX_MODULES][MAX_RB];)
|
||||
public_pdcp(pdcp_mbms_t pdcp_mbms_array[MAX_MODULES][16*29];) // MAX_SERVICEx MAX_SESSION
|
||||
protected_pdcp(sdu_size_t pdcp_output_sdu_bytes_to_write;)
|
||||
protected_pdcp(sdu_size_t pdcp_output_header_bytes_to_write;)
|
||||
protected_pdcp(list_t pdcp_sdu_list;)
|
||||
protected_pdcp(int pdcp_sent_a_sdu;)
|
||||
protected_pdcp(pdcp_data_req_header_t pdcp_input_header;)
|
||||
protected_pdcp(unsigned char pdcp_input_sdu_buffer[MAX_IP_PACKET_SIZE];)
|
||||
protected_pdcp(sdu_size_t pdcp_input_index_header;)
|
||||
protected_pdcp(sdu_size_t pdcp_input_sdu_size_read;)
|
||||
protected_pdcp(sdu_size_t pdcp_input_sdu_remaining_size_to_read;)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
/***************************************************************************
|
||||
pdcp_control_primitives.c
|
||||
-------------------
|
||||
begin : Mon Dec 10 2001
|
||||
copyright : (C) 2001 by EURECOM
|
||||
email : Lionel.Gauthier@eurecom.fr
|
||||
-------------------
|
||||
description
|
||||
This file contains the functions used for configuration of pdcp
|
||||
|
||||
***************************************************************************/
|
||||
#include "rtos_header.h"
|
||||
#include "platform.h"
|
||||
#include "protocol_vars_extern.h"
|
||||
#include "print.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "rlc.h"
|
||||
#include "pdcp.h"
|
||||
#include "debug_l2.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
configure_pdcp_req (struct pdcp_entity *pdcpP, void *rlcP, u8 rlc_sap_typeP, u8 header_compression_typeP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block *mb;
|
||||
|
||||
mb = get_free_mem_block (sizeof (struct cpdcp_primitive));
|
||||
((struct cpdcp_primitive *) mb->data)->type = CPDCP_CONFIG_REQ;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.rlc_sap = rlcP;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.rlc_type_sap = rlc_sap_typeP;
|
||||
((struct cpdcp_primitive *) mb->data)->primitive.config_req.header_compression_type = header_compression_typeP;
|
||||
send_pdcp_control_primitive (pdcpP, mb);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/***************************************************************************
|
||||
pdcp_control_primitives_proto_extern.h
|
||||
-------------------
|
||||
begin : Mon Dec 10 2001
|
||||
copyright : (C) 2001 by EURECOM
|
||||
email : Lionel.Gauthier@eurecom.fr
|
||||
-------------------
|
||||
description
|
||||
This file contains the prototypes of functions used for configuration of pdcp
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef PDCP_CONTROL_PRIMITIVES_PROTO_EXTERN_H
|
||||
# define PDCP_CONTROL_PRIMITIVES_PROTO_EXTERN_H
|
||||
# include "pdcp.h"
|
||||
void rrc_configure_pdcp (struct pdcp_entity *pdcpP, void *rlcP, u8 rlc_sap_typeP, u8 header_compression_typeP);
|
||||
#endif
|
||||
@@ -0,0 +1,552 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2011 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file pdcp_fifo.c
|
||||
* \brief pdcp interface with linux IP interface
|
||||
* \author Lionel GAUTHIER and Navid Nikaein
|
||||
* \date 2009
|
||||
* \version 0.5
|
||||
* \warning This component can be runned only in user-space
|
||||
* @ingroup pdcp
|
||||
*/
|
||||
|
||||
#define PDCP_FIFO_C
|
||||
#define PDCP_DEBUG 1
|
||||
//#define IDROMEL_NEMO 1
|
||||
|
||||
#ifndef OAI_EMU
|
||||
extern int otg_enabled;
|
||||
#endif
|
||||
|
||||
#include "pdcp.h"
|
||||
#include "pdcp_primitives.h"
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#define rtf_put write
|
||||
#define rtf_get read
|
||||
#else
|
||||
#include <rtai_fifos.h>
|
||||
#endif //USER_MODE
|
||||
|
||||
#include "../MAC/extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/extern.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OCG/OCG_extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/FIFO/pad_list.h"
|
||||
|
||||
#ifdef NAS_NETLINK
|
||||
#include <sys/socket.h>
|
||||
#include <linux/netlink.h>
|
||||
|
||||
extern struct sockaddr_nl nas_src_addr, nas_dest_addr;
|
||||
extern struct nlmsghdr *nas_nlh;
|
||||
extern struct iovec nas_iov;
|
||||
extern int nas_sock_fd;
|
||||
extern struct msghdr nas_msg;
|
||||
|
||||
#define MAX_PAYLOAD 1600
|
||||
|
||||
unsigned char pdcp_read_state = 0;
|
||||
unsigned char pdcp_read_payload[MAX_PAYLOAD];
|
||||
#endif
|
||||
|
||||
extern Packet_OTG_List *otg_pdcp_buffer;
|
||||
|
||||
pdcp_data_req_header_t pdcp_read_header;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
pdcp_fifo_flush_sdus (u32_t frame,u8 eNB_flag)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
mem_block_t *sdu = list_get_head (&pdcp_sdu_list);
|
||||
int bytes_wrote = 0;
|
||||
int pdcp_nb_sdu_sent = 0;
|
||||
u8 cont = 1;
|
||||
int ret;
|
||||
int mcs_inst;
|
||||
|
||||
while (sdu && cont) {
|
||||
|
||||
#if defined(OAI_EMU)
|
||||
mcs_inst = ((pdcp_data_ind_header_t *)(sdu->data))->inst;
|
||||
// asjust the instance id when passing sdu to IP
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst = (((pdcp_data_ind_header_t *)(sdu->data))->inst >= NB_eNB_INST) ?
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst - NB_eNB_INST +oai_emulation.info.nb_enb_local - oai_emulation.info.first_ue_local :// UE
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst - oai_emulation.info.first_ue_local; // ENB
|
||||
#else
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst = 0;
|
||||
#endif
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_I(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
|
||||
frame, ((pdcp_data_ind_header_t *)(sdu->data))->inst,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->data_size, ((pdcp_data_ind_header_t *)(sdu->data))->rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
|
||||
cont = 0;
|
||||
|
||||
if (!pdcp_output_sdu_bytes_to_write) {
|
||||
if (!pdcp_output_header_bytes_to_write) {
|
||||
pdcp_output_header_bytes_to_write = sizeof (pdcp_data_ind_header_t);
|
||||
}
|
||||
|
||||
#ifdef NAS_FIFO
|
||||
bytes_wrote = rtf_put (PDCP2NAS_FIFO,
|
||||
&(((u8 *) sdu->data)[sizeof (pdcp_data_ind_header_t) - pdcp_output_header_bytes_to_write]),
|
||||
pdcp_output_header_bytes_to_write);
|
||||
|
||||
#else
|
||||
#ifdef NAS_NETLINK
|
||||
#ifdef LINUX
|
||||
memcpy(NLMSG_DATA(nas_nlh), &(((u8 *) sdu->data)[sizeof (pdcp_data_ind_header_t) - pdcp_output_header_bytes_to_write]),
|
||||
pdcp_output_header_bytes_to_write);
|
||||
nas_nlh->nlmsg_len = pdcp_output_header_bytes_to_write;
|
||||
#endif //LINUX
|
||||
#endif //NAS_NETLINK
|
||||
|
||||
bytes_wrote = pdcp_output_header_bytes_to_write;
|
||||
#endif //NAS_FIFO
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_I(PDCP, "Frame %d Sent %d Bytes of header to Nas_mesh\n",
|
||||
frame,
|
||||
bytes_wrote);
|
||||
#endif //PDCP_DEBUG
|
||||
|
||||
if (bytes_wrote > 0) {
|
||||
pdcp_output_header_bytes_to_write = pdcp_output_header_bytes_to_write - bytes_wrote;
|
||||
|
||||
if (!pdcp_output_header_bytes_to_write) { // continue with sdu
|
||||
pdcp_output_sdu_bytes_to_write = ((pdcp_data_ind_header_t *) sdu->data)->data_size;
|
||||
|
||||
#ifdef NAS_FIFO
|
||||
bytes_wrote = rtf_put (PDCP2NAS_FIFO, &(sdu->data[sizeof (pdcp_data_ind_header_t)]), pdcp_output_sdu_bytes_to_write);
|
||||
#else
|
||||
|
||||
#ifdef NAS_NETLINK
|
||||
#ifdef LINUX
|
||||
memcpy(NLMSG_DATA(nas_nlh)+sizeof(pdcp_data_ind_header_t), &(sdu->data[sizeof (pdcp_data_ind_header_t)]), pdcp_output_sdu_bytes_to_write);
|
||||
nas_nlh->nlmsg_len += pdcp_output_sdu_bytes_to_write;
|
||||
ret = sendmsg(nas_sock_fd,&nas_msg,0);
|
||||
if (ret<0) {
|
||||
LOG_D(PDCP, "[PDCP_FIFOS] sendmsg returns %d (errno: %d)\n", ret, errno);
|
||||
mac_xface->macphy_exit("");
|
||||
break;
|
||||
}
|
||||
#endif // LINUX
|
||||
#endif //NAS_NETLINK
|
||||
bytes_wrote= pdcp_output_sdu_bytes_to_write;
|
||||
#endif // NAS_FIFO
|
||||
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_I(PDCP, "PDCP->IP Frame %d INST %d: Sent %d Bytes of data from rab %d to Nas_mesh\n",
|
||||
frame,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->inst,
|
||||
bytes_wrote,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
if (bytes_wrote > 0) {
|
||||
pdcp_output_sdu_bytes_to_write -= bytes_wrote;
|
||||
|
||||
if (!pdcp_output_sdu_bytes_to_write) { // OK finish with this SDU
|
||||
// LOG_D(PDCP, "rb sent a sdu qos_sap %d\n", sapiP);
|
||||
LOG_D(PDCP,
|
||||
"[MSC_MSG][FRAME %05d][PDCP][MOD %02d][RB %02d][--- PDCP_DATA_IND / %d Bytes --->][IP][MOD %02d][]\n",
|
||||
frame,
|
||||
mcs_inst, //((pdcp_data_ind_header_t *)(sdu->data))->inst,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->rb_id,
|
||||
((pdcp_data_ind_header_t *)(sdu->data))->data_size,
|
||||
mcs_inst); //((pdcp_data_ind_header_t *)(sdu->data))->inst
|
||||
|
||||
list_remove_head (&pdcp_sdu_list);
|
||||
free_mem_block (sdu);
|
||||
cont = 1;
|
||||
pdcp_nb_sdu_sent += 1;
|
||||
sdu = list_get_head (&pdcp_sdu_list);
|
||||
}
|
||||
} else {
|
||||
LOG_W(PDCP, "RADIO->IP SEND SDU CONGESTION!\n");
|
||||
}
|
||||
} else {
|
||||
LOG_W(PDCP, "RADIO->IP SEND SDU CONGESTION!\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// continue writing sdu
|
||||
#ifdef NAS_FIFO
|
||||
bytes_wrote = rtf_put (PDCP2NAS_FIFO,
|
||||
(u8 *) (&(sdu->data[sizeof (pdcp_data_ind_header_t) + ((pdcp_data_ind_header_t *) sdu->data)->data_size - pdcp_output_sdu_bytes_to_write])),
|
||||
pdcp_output_sdu_bytes_to_write);
|
||||
#else // NAS_FIFO
|
||||
bytes_wrote = pdcp_output_sdu_bytes_to_write;
|
||||
#endif // NAS_FIFO
|
||||
|
||||
if (bytes_wrote > 0) {
|
||||
pdcp_output_sdu_bytes_to_write -= bytes_wrote;
|
||||
|
||||
if (!pdcp_output_sdu_bytes_to_write) { // OK finish with this SDU
|
||||
//PRINT_RB_SEND_OUTPUT_SDU ("[PDCP] RADIO->IP SEND SDU\n");
|
||||
list_remove_head (&pdcp_sdu_list);
|
||||
free_mem_block (sdu);
|
||||
cont = 1;
|
||||
pdcp_nb_sdu_sent += 1;
|
||||
sdu = list_get_head (&pdcp_sdu_list);
|
||||
// LOG_D(PDCP, "rb sent a sdu from rab\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef NAS_FIFO
|
||||
if ((pdcp_nb_sdu_sent)) {
|
||||
if ((pdcp_2_nas_irq > 0)) {
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_I(PDCP, "Frame %d : Trigger NAS RX interrupt\n",
|
||||
frame);
|
||||
#endif //PDCP_DEBUG
|
||||
|
||||
rt_pend_linux_srq (pdcp_2_nas_irq);
|
||||
} else {
|
||||
LOG_E(PDCP, "Frame %d: ERROR IF IP STACK WANTED : NOTIF PACKET(S) pdcp_2_nas_irq not initialized : %d\n",
|
||||
frame,
|
||||
pdcp_2_nas_irq);
|
||||
}
|
||||
}
|
||||
#endif //NAS_FIFO
|
||||
|
||||
return pdcp_nb_sdu_sent;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* returns a positive value if whole bytes that had to be read were read
|
||||
* returns zero value if whole bytes that had to be read were not read at all
|
||||
* returns a negative value if an error was encountered while reading the rt fifo
|
||||
*/
|
||||
int
|
||||
pdcp_fifo_read_input_sdus_remaining_bytes (u32_t frame,u8_t eNB_flag)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
sdu_size_t bytes_read=0;
|
||||
|
||||
// if remaining bytes to read
|
||||
if (pdcp_input_sdu_remaining_size_to_read > 0) {
|
||||
bytes_read = rtf_get (NAS2PDCP_FIFO,
|
||||
&(pdcp_input_sdu_buffer[pdcp_input_sdu_size_read]),
|
||||
pdcp_input_sdu_remaining_size_to_read);
|
||||
|
||||
if (bytes_read > 0) {
|
||||
LOG_D(PDCP, "[PDCP_FIFOS] Read %d remaining bytes of data from Nas_mesh\n", bytes_read);
|
||||
|
||||
pdcp_input_sdu_remaining_size_to_read = pdcp_input_sdu_remaining_size_to_read - bytes_read;
|
||||
pdcp_input_sdu_size_read = pdcp_input_sdu_size_read + bytes_read;
|
||||
|
||||
if (pdcp_input_sdu_remaining_size_to_read != 0) {
|
||||
return 0;
|
||||
} else {
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_I(PDCP, "Frame %d: IP->RADIO RECEIVED COMPLETE SDU size %d inst %d rb %d\n",
|
||||
frame,
|
||||
pdcp_input_sdu_size_read,
|
||||
pdcp_input_header.inst,
|
||||
pdcp_input_header.rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
pdcp_input_sdu_size_read = 0;
|
||||
#ifdef IDROMEL_NEMO
|
||||
pdcp_read_header.inst = 0;
|
||||
#endif
|
||||
|
||||
if (pdcp_array[pdcp_read_header.inst][pdcp_read_header.rb_id].instanciated_instance) {
|
||||
LOG_D(PDCP, "[MSC_MSG][FRAME %05d][IP][MOD %02d][][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %02d][RB %02d]\n",
|
||||
frame, pdcp_read_header.inst, pdcp_read_header.data_size, pdcp_read_header.inst, pdcp_read_header.rb_id);
|
||||
|
||||
pdcp_data_req (pdcp_input_header.inst,
|
||||
frame, eNB_flag,
|
||||
pdcp_input_header.rb_id,
|
||||
RLC_MUI_UNDEFINED,
|
||||
RLC_SDU_CONFIRM_NO,
|
||||
pdcp_input_header.data_size,
|
||||
pdcp_input_sdu_buffer,
|
||||
PDCP_DATA_PDU);
|
||||
}
|
||||
// not necessary
|
||||
//memset(pdcp_input_sdu_buffer, 0, MAX_IP_PACKET_SIZE);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
return bytes_read;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
pdcp_fifo_read_input_sdus (u32_t frame, u8_t eNB_flag)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef NAS_FIFO
|
||||
int cont;
|
||||
int bytes_read;
|
||||
|
||||
// if remaining bytes to read
|
||||
if (pdcp_fifo_read_input_sdus_remaining_bytes (frame,eNB_flag) > 0) {
|
||||
|
||||
// all bytes that had to be read for a SDU were read
|
||||
// if not overflow of list, try to get new sdus from rt fifo
|
||||
cont = 1;
|
||||
|
||||
while (cont > 0) {
|
||||
bytes_read = rtf_get (NAS2PDCP_FIFO,
|
||||
&(((u8 *) & pdcp_input_header)[pdcp_input_index_header]),
|
||||
sizeof (pdcp_data_req_header_t) - pdcp_input_index_header);
|
||||
|
||||
if (bytes_read > 0) {
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_D(PDCP, "[PDCP_FIFOS] TTI %d Read %d Bytes of data (header %d) from Nas_mesh\n",
|
||||
frame,
|
||||
bytes_read,
|
||||
sizeof(pdcp_data_req_header_t));
|
||||
#endif // PDCP_DEBUG
|
||||
pdcp_input_index_header += bytes_read;
|
||||
|
||||
if (pdcp_input_index_header == sizeof (pdcp_data_req_header_t)) {
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_D(PDCP, "TTI %d IP->RADIO READ HEADER sdu size %d\n",
|
||||
frame,
|
||||
pdcp_input_header.data_size);
|
||||
#endif //PDCP_DEBUG
|
||||
pdcp_input_index_header = 0;
|
||||
if (pdcp_input_header.data_size < 0) {
|
||||
LOG_E(PDCP, "READ_FIFO: DATA_SIZE %d < 0\n",pdcp_input_header.data_size);
|
||||
|
||||
mac_xface->macphy_exit("");
|
||||
return 0;
|
||||
}
|
||||
pdcp_input_sdu_remaining_size_to_read = pdcp_input_header.data_size;
|
||||
pdcp_input_sdu_size_read = 0;
|
||||
// we know the size of the sdu, so read the sdu;
|
||||
cont = pdcp_fifo_read_input_sdus_remaining_bytes (frame,eNB_flag);
|
||||
} else {
|
||||
cont = 0;
|
||||
}
|
||||
// error while reading rt fifo
|
||||
} else {
|
||||
cont = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return bytes_read;
|
||||
|
||||
#else //NAS_FIFO
|
||||
#ifdef NAS_NETLINK
|
||||
int len = 1;
|
||||
|
||||
while (len > 0) {
|
||||
if (pdcp_read_state == 0) {
|
||||
#ifdef LINUX
|
||||
len = recvmsg(nas_sock_fd, &nas_msg, 0);
|
||||
#else
|
||||
len = -1;
|
||||
#endif
|
||||
|
||||
if (len < 0) {
|
||||
// nothing in pdcp NAS socket
|
||||
//LOG_I(PDCP, "[PDCP][NETLINK] Nothing in socket, length %d \n", len);
|
||||
} else {
|
||||
#ifdef PDCP_DEBUG
|
||||
#ifdef LINUX
|
||||
LOG_I(PDCP, "[PDCP][NETLINK] Received socket with length %d (nlmsg_len = %d)\n", \
|
||||
len, nas_nlh->nlmsg_len-sizeof(struct nlmsghdr));
|
||||
#else
|
||||
LOG_I(PDCP, "[PDCP][NETLINK] nlmsg_len = %d (%d,%d)\n", \
|
||||
nas_nlh->nlmsg_len, sizeof(pdcp_data_req_header_t), \
|
||||
sizeof(struct nlmsghdr));
|
||||
#endif // LINUX
|
||||
#endif // PDCP_DEBUG
|
||||
}
|
||||
|
||||
#ifdef LINUX
|
||||
if (nas_nlh->nlmsg_len == sizeof (pdcp_data_req_header_t) + sizeof(struct nlmsghdr)) {
|
||||
pdcp_read_state = 1; //get
|
||||
memcpy((void *)&pdcp_read_header, (void *)NLMSG_DATA(nas_nlh), sizeof(pdcp_data_req_header_t));
|
||||
}
|
||||
#else
|
||||
pdcp_read_state = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (pdcp_read_state == 1) {
|
||||
#ifdef LINUX
|
||||
len = recvmsg(nas_sock_fd, &nas_msg, 0);
|
||||
#else
|
||||
len = -1;
|
||||
#endif
|
||||
|
||||
if (len < 0) {
|
||||
// nothing in pdcp NAS socket
|
||||
//LOG_I(PDCP, "[PDCP][NETLINK] Nothing in socket, length %d \n", len);
|
||||
} else {
|
||||
pdcp_read_state = 0;
|
||||
// print_active_requests()
|
||||
|
||||
#ifdef LINUX
|
||||
memcpy(pdcp_read_payload, (unsigned char *)NLMSG_DATA(nas_nlh), nas_nlh->nlmsg_len - sizeof(struct nlmsghdr));
|
||||
#endif
|
||||
|
||||
#ifdef OAI_EMU
|
||||
pdcp_read_header.inst = (pdcp_read_header.inst >= oai_emulation.info.nb_enb_local) ? \
|
||||
pdcp_read_header.inst - oai_emulation.info.nb_enb_local+ NB_eNB_INST + oai_emulation.info.first_ue_local :
|
||||
pdcp_read_header.inst + oai_emulation.info.first_enb_local;
|
||||
#else
|
||||
pdcp_read_header.inst = 0;
|
||||
#endif
|
||||
|
||||
if (pdcp_array[pdcp_read_header.inst][pdcp_read_header.rb_id].instanciated_instance) {
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_I(PDCP, "[PDCP][NETLINK][IP->PDCP] TTI %d, INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n", \
|
||||
frame, pdcp_read_header.inst, len, nas_nlh->nlmsg_len-sizeof(struct nlmsghdr), pdcp_read_header.rb_id);
|
||||
LOG_D(PDCP, "[MSC_MSG][FRAME %05d][IP][MOD %02d][][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %02d][RB %02d]\n",
|
||||
frame, pdcp_read_header.inst, pdcp_read_header.data_size, pdcp_read_header.inst, pdcp_read_header.rb_id);
|
||||
#endif
|
||||
|
||||
pdcp_data_req(pdcp_read_header.inst,
|
||||
frame,
|
||||
eNB_flag,
|
||||
pdcp_read_header.rb_id,
|
||||
RLC_MUI_UNDEFINED,
|
||||
RLC_SDU_CONFIRM_NO,
|
||||
pdcp_read_header.data_size,
|
||||
pdcp_read_payload,
|
||||
PDCP_DATA_PDU);
|
||||
} else {
|
||||
LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u\n",
|
||||
pdcp_read_header.inst, pdcp_read_header.rb_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of while
|
||||
|
||||
return len;
|
||||
|
||||
#else // neither NAS_NETLINK nor NAS_FIFO
|
||||
return 0;
|
||||
#endif // NAS_NETLINK
|
||||
#endif // NAS_FIFO
|
||||
}
|
||||
|
||||
|
||||
void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index, u8 eNB_index) {
|
||||
unsigned char *otg_pkt=NULL;
|
||||
int src_id, module_id; // src for otg
|
||||
int dst_id, rb_id; // dst for otg
|
||||
int pkt_size=0, pkt_cnt=0;
|
||||
u8 pdcp_mode;
|
||||
Packet_otg_elt * otg_pkt_info;
|
||||
// we need to add conditions to avoid transmitting data when the UE is not RRC connected.
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
if (oai_emulation.info.otg_enabled ==1 ){
|
||||
module_id = (eNB_flag == 1) ? eNB_index : /*NB_eNB_INST +*/ UE_index ;
|
||||
//rb_id = (eNB_flag == 1) ? eNB_index * MAX_NUM_RB + DTCH : (NB_eNB_INST + UE_index -1 ) * MAX_NUM_RB + DTCH ;
|
||||
|
||||
if (eNB_flag == 1) { // search for DL traffic
|
||||
//for (dst_id = NB_eNB_INST; dst_id < NB_UE_INST + NB_eNB_INST; dst_id++) {
|
||||
while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) {
|
||||
LOG_I(EMU,"HEAD of otg_pdcp_buffer[%d] is %p but Nb elts = %d\n", module_id, pkt_list_get_head(&(otg_pdcp_buffer[module_id])), otg_pdcp_buffer[module_id].nb_elements);
|
||||
//otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]));
|
||||
dst_id = (otg_pkt_info->otg_pkt).dst_id;
|
||||
module_id = (otg_pkt_info->otg_pkt).module_id;
|
||||
rb_id = (otg_pkt_info->otg_pkt).rb_id;
|
||||
pdcp_mode = (otg_pkt_info->otg_pkt).mode;
|
||||
// generate traffic if the ue is rrc reconfigured state
|
||||
// if (mac_get_rrc_status(module_id, eNB_flag, dst_id ) > 2 /*RRC_CONNECTED*/) { // not needed: this test is already done in update_otg_enb
|
||||
otg_pkt = (u8*) (otg_pkt_info->otg_pkt).sdu_buffer;
|
||||
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
|
||||
if (otg_pkt != NULL) {
|
||||
//rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH;
|
||||
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n", eNB_index, frame, pkt_cnt++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode);
|
||||
pdcp_data_req(module_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,pdcp_mode);
|
||||
free(otg_pkt);
|
||||
}
|
||||
// } //else LOG_D(OTG,"frame %d enb %d-> ue %d link not yet established state %d \n", frame, eNB_index,dst_id - NB_eNB_INST, mac_get_rrc_status(module_id, eNB_flag, dst_id - NB_eNB_INST));
|
||||
}
|
||||
} else while ((otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]))) != NULL) {
|
||||
//otg_pkt_info = pkt_list_remove_head(&(otg_pdcp_buffer[module_id]));
|
||||
dst_id = (otg_pkt_info->otg_pkt).dst_id;
|
||||
module_id = (otg_pkt_info->otg_pkt).module_id;
|
||||
rb_id = (otg_pkt_info->otg_pkt).rb_id;
|
||||
src_id = module_id;
|
||||
|
||||
if (mac_get_rrc_status(module_id, eNB_flag, eNB_index ) > 2 /*RRC_CONNECTED*/) {
|
||||
otg_pkt = (u8*) (otg_pkt_info->otg_pkt).sdu_buffer;
|
||||
pkt_size = (otg_pkt_info->otg_pkt).sdu_buffer_size;
|
||||
if (otg_pkt != NULL){
|
||||
//rb_id= eNB_index * MAX_NUM_RB + DTCH;
|
||||
LOG_D(OTG,"[UE %d] sending packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", UE_index, src_id, rb_id, src_id, dst_id, pkt_size);
|
||||
pdcp_data_req(src_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO,pkt_size, otg_pkt, PDCP_DATA_PDU);
|
||||
free(otg_pkt);
|
||||
}
|
||||
} //else LOG_D(OTG,"frame %d ue %d-> enb %d link not yet established state %d \n", frame, UE_index, eNB_index, mac_get_rrc_status(module_id, eNB_flag, eNB_index ));
|
||||
}
|
||||
}
|
||||
#else
|
||||
if ((otg_enabled==1) && (eNB_flag == 1)) { // generate DL traffic
|
||||
unsigned int ctime=0;
|
||||
src_id = eNB_index;
|
||||
ctime = frame * 100;
|
||||
|
||||
/*if ((mac_get_rrc_status(eNB_index, eNB_flag, 0 ) > 2) &&
|
||||
(mac_get_rrc_status(eNB_index, eNB_flag, 1 ) > 2)) { */
|
||||
for (dst_id = 0; dst_id<NUMBER_OF_UE_MAX; dst_id++) {
|
||||
if (mac_get_rrc_status(eNB_index, eNB_flag, dst_id ) > 2) {
|
||||
otg_pkt=packet_gen(src_id, dst_id, ctime, &pkt_size);
|
||||
if (otg_pkt != NULL){
|
||||
rb_id = dst_id * NB_RB_MAX + DTCH;
|
||||
pdcp_data_req(src_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO,pkt_size, otg_pkt, PDCP_DATA_PDU);
|
||||
LOG_I(OTG,"send packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", eNB_index, rb_id, src_id, dst_id, pkt_size);
|
||||
free(otg_pkt);
|
||||
}
|
||||
/*else {
|
||||
LOG_I(OTG,"nothing generated (src %d, dst %d)\n",src_id, dst_id);
|
||||
}*/
|
||||
}
|
||||
/*else {
|
||||
LOG_I(OTG,"rrc_status (src %d, dst %d) = %d\n",src_id, dst_id, mac_get_rrc_status(src_id, eNB_flag, dst_id ));
|
||||
}*/
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*******************************************************************************
|
||||
|
||||
Eurecom OpenAirInterface
|
||||
Copyright(c) 1999 - 2011 Eurecom
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms and conditions of the GNU General Public License,
|
||||
version 2, as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
The full GNU General Public License is included in this distribution in
|
||||
the file called "COPYING".
|
||||
|
||||
Contact Information
|
||||
Openair Admin: openair_admin@eurecom.fr
|
||||
Openair Tech : openair_tech@eurecom.fr
|
||||
Forums : http://forums.eurecom.fsr/openairinterface
|
||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file pdcp_primitives.c
|
||||
* \brief PDCP PDU buffer dissector code
|
||||
* \author Baris Demiray
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
*/
|
||||
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "platform_types.h"
|
||||
#include "platform_constants.h"
|
||||
#include "pdcp_primitives.h"
|
||||
|
||||
extern BOOL util_mark_nth_bit_of_octet(u8_t* octet, u8_t index);
|
||||
|
||||
/*
|
||||
* Parses data/control field out of buffer of User Plane PDCP Data PDU with
|
||||
* long PDCP SN (12-bit)
|
||||
*
|
||||
* @param pdu_buffer PDCP PDU buffer
|
||||
* @return 1 bit dc
|
||||
*/
|
||||
u8 pdcp_get_dc_filed(unsigned char* pdu_buffer)
|
||||
{
|
||||
u8 dc = 0x00;
|
||||
|
||||
if (pdu_buffer == NULL)
|
||||
return 0;
|
||||
|
||||
dc = (u8)pdu_buffer[0] & 0xF0; // Reset D/C field
|
||||
dc >>= 8;
|
||||
|
||||
return dc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parses sequence number out of buffer of User Plane PDCP Data PDU with
|
||||
* long PDCP SN (12-bit)
|
||||
*
|
||||
* @param pdu_buffer PDCP PDU buffer
|
||||
* @return 12-bit sequence number
|
||||
*/
|
||||
u16 pdcp_get_sequence_number_of_pdu_with_long_sn(unsigned char* pdu_buffer)
|
||||
{
|
||||
u16 sequence_number = 0x00;
|
||||
|
||||
if (pdu_buffer == NULL)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* First octet carries the first 4 bits of SN (see 6.2.3)
|
||||
*/
|
||||
sequence_number = (u8)pdu_buffer[0] & 0x0F; // Reset D/C field
|
||||
sequence_number <<= 8;
|
||||
/*
|
||||
* Second octet carries the second part (8-bit) of SN (see 6.2.3)
|
||||
*/
|
||||
sequence_number |= (u8)pdu_buffer[1] & 0xFF;
|
||||
|
||||
return sequence_number;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parses sequence number out of buffer of User Plane PDCP Data PDU with
|
||||
* short PDCP SN (7-bit)
|
||||
*
|
||||
* @param pdu_buffer PDCP PDU buffer
|
||||
* @return 7-bit sequence number
|
||||
*/
|
||||
u8 pdcp_get_sequence_number_of_pdu_with_short_sn(unsigned char* pdu_buffer)
|
||||
{
|
||||
if (pdu_buffer == NULL)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* First octet carries all 7 bits of SN (see 6.2.4)
|
||||
*/
|
||||
return (u8)pdu_buffer[0] & 0x7F; // Reset D/C field
|
||||
}
|
||||
/*
|
||||
* Parses sequence number out of buffer of Control Plane PDCP Data PDU with
|
||||
* short PDCP SN (5-bit)
|
||||
*
|
||||
* @param pdu_buffer PDCP PDU buffer
|
||||
* @return 5-bit sequence number
|
||||
*/
|
||||
u8 pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer)
|
||||
{
|
||||
if (pdu_buffer == NULL)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* First octet carries all 5 bits of SN (see 6.2.4)
|
||||
*/
|
||||
return (u8)pdu_buffer[0] & 0x1F;
|
||||
}
|
||||
/*
|
||||
* Fills the incoming buffer with the fields of the header for srb sn
|
||||
*
|
||||
* @param pdu_buffer PDCP PDU buffer
|
||||
* @return TRUE on success, FALSE otherwise
|
||||
*/
|
||||
BOOL pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
|
||||
pdcp_control_plane_data_pdu_header* pdu)
|
||||
{
|
||||
if (pdu_buffer == NULL || pdu == NULL)
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Fill the Sequence Number field
|
||||
*/
|
||||
u8 sequence_number = pdu->sn;
|
||||
pdu_buffer[0] = sequence_number & 0x1F; // 5bit sn
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fills the incoming buffer with the fields of the header for long sn
|
||||
*
|
||||
* @param pdu_buffer PDCP PDU buffer
|
||||
* @return TRUE on success, FALSE otherwise
|
||||
*/
|
||||
BOOL pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
|
||||
pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
|
||||
{
|
||||
if (pdu_buffer == NULL || pdu == NULL)
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Fill the Sequence Number field
|
||||
*/
|
||||
u16 sequence_number = pdu->sn;
|
||||
pdu_buffer[1] = sequence_number & 0xFF;
|
||||
sequence_number >>= 8;
|
||||
pdu_buffer[0] = sequence_number & 0xFF;
|
||||
|
||||
/*
|
||||
* Fill Data or Control field
|
||||
*/
|
||||
if (pdu->dc == PDCP_DATA_PDU) {
|
||||
LOG_D(PDCP, "Setting PDU as a DATA PDU\n");
|
||||
pdu_buffer[0] |= 0x80; // set the first bit as 1
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fills the incoming PDU buffer with with given control PDU
|
||||
*
|
||||
* @param pdu_buffer The buffer that PDU will be serialized into
|
||||
* @param pdu A status report header
|
||||
* @return TRUE on success, FALSE otherwise
|
||||
*/
|
||||
BOOL pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
|
||||
u8 bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu)
|
||||
{
|
||||
if (pdu_buffer == NULL || pdu == NULL)
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Data or Control field and PDU type (already 0x00, noop)
|
||||
*
|
||||
* Set leftmost bit to set this PDU as `Control PDU'
|
||||
*/
|
||||
util_mark_nth_bit_of_octet(((u8_t*)&pdu_buffer[0]), 1);
|
||||
|
||||
/*
|
||||
* Fill `First Missing PDU SN' field
|
||||
*/
|
||||
pdu_buffer[0] |= ((pdu->first_missing_sn >> 8) & 0xFF);
|
||||
pdu_buffer[1] |= (pdu->first_missing_sn && 0xFF);
|
||||
|
||||
/*
|
||||
* Append `bitmap'
|
||||
*/
|
||||
memcpy(pdu_buffer + 2, bitmap, 512);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||