Skip to content
Snippets Groups Projects
Commit e179ab0e authored by Lionel Gauthier's avatar Lionel Gauthier
Browse files

Old rev code

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7378 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e07edc17
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 4883 deletions
include $(OPENAIR_DIR)/common/utils/Makefile.inc
KERNEL_MAIN_TYPE=$(shell echo `uname -r | cut -d. -f-2 | tr "." "_"`)
export KERNEL_MAIN_TYPE
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)
CFLAGS += $(shell rtai-config --module-cflags) -DRTAI_ENABLED -DPC_TARGET -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -I$(KERNEL_DIR)/build/include -I$(KERNEL_DIR)/build/include/asm/mach-default $(if $(IS_RTAI_SUBVERSION_LESS_THAN_FIVE),-DRTAI_ISNT_POSIX,)
endif
CCC=gcc
#--------------------------------------------------------
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
AS_MPLS_DIR =../mpls
AS_MEM_DIR =../util/mem
AS_LIST_DIR =../util/lists
AS_MATH_DIR =../util/math
AS_TIMER_DIR =../util/timer
AS_RRM_CONFIG_DIR =../rrm_config
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_MATH_DIR
export AS_TIMER_DIR
export AS_RRM_CONFIG_DIR
ifdef MASTER
CFLAGS += -DNODE_RG
else
CFLAGS += -DNODE_MT
endif
EXTRA_CFLAGS += -DKERNEL$(KERNEL_MAIN_TYPE) -DCELLULAR -DMAX_MODULES=1 -DBIGPHYSAREA -DNB_ANTENNAS=2
EXTRA_CFLAGS += -Wall -Wstrict-prototypes -fno-common -fno-strict-aliasing -pipe -freg-struct-return -ffreestanding -maccumulate-outgoing-args -funroll-loops -march=i686 -mmmx -msse -msse2 -fomit-frame-pointer -nostdinc -DMODULE -D_LOOSE_KERNEL_NAMES -O2
CFLAGS += -I$(obj)/$(AS_RRM_CONFIG_DIR) -I$(obj)/$(AS_TIMER_DIR) -I$(obj)/$(AS_MATH_DIR) -I$(obj)/$(AS_LIST_DIR) -I$(obj)/$(AS_MEM_DIR) -I$(obj)/$(AS_RLC_DIR) -I$(obj)/$(AS_RLC_UM_DIR) -I$(obj)/$(AS_RLC_TM_DIR) -I$(obj)/$(AS_RLC_AM_DIR) -I$(obj)/$(AS_PDCP_DIR) -I$(obj)/$(AS_MPLS_DIR) -I $(M)/include -I$(M)/../include -I$(M)/../../../include -I$(M)/../../../phy/ofdm_phy/phy_coding -I$(M)/../../../phy/ofdm_phy -I $(M)/../../../phy/ofdm_phy/phy_init -I $(M)/../../../mac -I $(M)/../../../phy/phy_mac_interface -I $(M)/../../../sched -I$(obj)/../../../arch/common -I$(obj)/../../../util/misc -I$(obj)/../../../arch/openair_CardBus_MIMO1/device_driver -I$(obj)/../../../arch/openair_CardBus_MIMO1/LEON3/hostpc -I$(obj)/../opeanir_rrc_L2_interface
obj-m += openair_rrc.o
openair_rrc-objs += ../openair_rrc_L2_interface/openair_rrc_L2_interface.o
ifdef eNB_flag
EXTRA_CFLAGS += -DNODE_RG -DCELLULAR
endif
ifdef UE_flag
EXTRA_CFLAGS += -DNODE_MT -DCELLULAR
endif
RRC_CELLULAR_OBJS = $(RRC_CELL_DIR)/rrc_utilities.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_bch_per_basic.o $(RRC_CELL_DIR)/rrc_bch_ies.o $(RRC_CELL_DIR)/rrc_bch_mib.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_msg_pdus.o $(RRC_CELL_DIR)/rrc_mbms_pdus.o
ifdef eNB_flag
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_init.o $(RRC_CELL_DIR)/rrc_rg_main.o $(RRC_CELL_DIR)/rrc_rg_srb_bch.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_dummies.o $(RRC_CELL_DIR)/rrc_rg_L2_interface.o $(RRC_CELL_DIR)/rrc_rg_L2_frontend.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_bch_init.o $(RRC_CELL_DIR)/rrc_rg_bch_write.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_nas_intf.o $(RRC_CELL_DIR)/rrc_rg_msg_decode.o $(RRC_CELL_DIR)/rrc_rg_outputs.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg.o $(RRC_CELL_DIR)/rrc_rg_esterfsm.o $(RRC_CELL_DIR)/rrc_rg_data.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_process.o $(RRC_CELL_DIR)/rrc_rg_control.o $(RRC_CELL_DIR)/rrc_rg_msg_peer.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_mbms_encode.o $(RRC_CELL_DIR)/rrc_rg_mbms_nas_if.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_mbms_outputs.o $(RRC_CELL_DIR)/rrc_rg_mbms_process.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rg_rrm_process.o $(RRC_CELL_DIR)/rrc_rg_rrm_decode.o $(RRC_CELL_DIR)/rrc_rg_rrm_outputs.o
endif
ifdef UE_flag
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_init.o $(RRC_CELL_DIR)/rrc_ue_main.o $(RRC_CELL_DIR)/rrc_ue_srb_bch.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_dummies.o $(RRC_CELL_DIR)/rrc_ue_L2_interface.o $(RRC_CELL_DIR)/rrc_ue_L2_frontend.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_bch_read.o $(RRC_CELL_DIR)/rrc_ue_bch_process.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_nas_intf.o $(RRC_CELL_DIR)/rrc_ue_msg_decode.o $(RRC_CELL_DIR)/rrc_ue_outputs.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_rb_ue.o $(RRC_CELL_DIR)/rrc_rb_ue_data.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue.o $(RRC_CELL_DIR)/rrc_ue_data.o $(RRC_CELL_DIR)/rrc_ue_control.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_esterfsm.o $(RRC_CELL_DIR)/rrc_ue_process.o $(RRC_CELL_DIR)/rrc_ue_msg_peer.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_mbms_decode.o $(RRC_CELL_DIR)/rrc_ue_mbms_fsm.o
RRC_CELLULAR_OBJS += $(RRC_CELL_DIR)/rrc_ue_mbms_outputs.o $(RRC_CELL_DIR)/rrc_ue_mbms_process.o
endif
rrc_test:
@echo RRC makefile is in
@echo RRC cellular variable $(rrc_cellular)
@echo $(L2_incl)
\ No newline at end of file
Status of openair2 RRC CELLULAR
updated April 18, 2013
This Readme is empty. This is still work under progress
\ No newline at end of file
/***************************************************************************
as_configuration.h - description
-------------------
copyright : (C) 2003, 2010 by Eurecom
contact : www.eurecom.fr
**************************************************************************
Insert the User equipement IMEI
***************************************************************************/
#ifndef __AS_CONFIG_H__
# define __AS_CONFIG_H__
# define IMEI_D0 3
# define IMEI_D1 5
# define IMEI_D2 6
# define IMEI_D3 0
# define IMEI_D4 0
# define IMEI_D5 0
# define IMEI_D6 8
# define IMEI_D7 0
# define IMEI_D8 1
# define IMEI_D9 4
# define IMEI_D10 9
# define IMEI_D11 1
# define IMEI_D12 5
# ifdef MOBILE0
# define IMEI_D13 0
# endif
# ifdef MOBILE1
# define IMEI_D13 1
# endif
#endif
/***************************************************************************
rrc_ue.c
-------------------
begin : Nov 10, 2001
copyright : (C) 2001 by Eurecom
author : Michelle.Wetterwald@eurecom.fr
**************************************************************************
This file contains the code generated by the Esterel engine
IT MUST NOT BE MODIFIED MANUALLY
***************************************************************************/
#ifndef USER_MODE
#define __NO_VERSION__
#include <rtl.h>
#include <time.h>
#include <rtl_sched.h>
#include <rtl_sync.h>
#include <pthread.h>
#include <rtl_debug.h>
#include <rtl_core.h>
#include <rtl_fifo.h>
#else
#endif
/***************************************************************************
rrc_L2_proto.h - description
-------------------
begin : Sept 9, 2008
copyright : (C) 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Prototypes related to L2 interface functions
***************************************************************************/
#ifndef __RRC_L2_PROTO_H__
#define __RRC_L2_PROTO_H__
// rrc_L2_interfaces.c
s8 rrc_L2_data_req_rx (unsigned char Mod_id, unsigned short Srb_id, unsigned char Nb_tb,char *Buffer,u8 CH_index);
//void rrc_L2_mac_data_ind_rx (void);
// s8 mac_rrc_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, s8 *Sdu,u16 Sdu_len,u8 eNB_flag, u8 eNB_index );
s8 rrc_L2_mac_data_ind_rx (u8 Mod_id, u16 Srb_id, char *Sdu, u16 Sdu_len, u8 eNB_index);
void rrc_L2_rlc_data_ind_rx (unsigned char Mod_id, unsigned int Srb_id, unsigned int Sdu_size, unsigned char *Buffer);
void rrc_L2_mac_meas_ind_rx (void);
void rrc_L2_def_meas_ind_rx (unsigned char Mod_id, unsigned char Idx2);
void rrc_L2_sync_ind_rx (u8 Mod_id);
void rrc_L2_out_sync_ind_rx (void);
void rrc_init_mac_config(void);
int rrc_L2_get_rrc_status(u8 Mod_id,u8 eNB_flag,u8 index);
char rrc_L2_ue_init(u8 Mod_id, unsigned char eNB_index);
char rrc_L2_eNB_init(u8 Mod_id);
//void openair_rrc_lite_top_init(void);
#ifdef NODE_MT
//rrc_ue_init.c
void rrc_ue_init (u8 Mod_id);
char rrc_ue_rglite_init(u8 Mod_id, unsigned char eNB_index);
//rrc_ue_main.c
//void rrc_ue_main_scheduler (u8 Mod_id);
int rrc_ue_main_scheduler(u8 Mod_id,u32 frame, u8 eNB_flag,u8 index);
#endif
#ifdef NODE_RG
//rrc_rg_init.c
void rrc_rg_init (u8 Mod_id);
char rrc_rg_uelite_init(u8 Mod_id, unsigned char eNB_index);
//rrc_rg_main.c
//void rrc_rg_main_scheduler (u8 Mod_id);
int rrc_rg_main_scheduler(u8 Mod_id,u32 frame, u8 eNB_flag,u8 index);
#endif
#endif
/***************************************************************************
rrc_bch_constant.h - description
-------------------
copyright : (C) 2002, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Define structures for Broadcast MIB and SIBs
***************************************************************************/
#ifndef __RRC_BCH_CONSTANT_H__
#define __RRC_BCH_CONSTANT_H__
#include "rrc_bch_per_basic.h"
#define maxBlock 210
typedef char ENCODEDBLOCK[maxBlock];
#define maxSI 30 // (262-16)bits/8 = 30.75
typedef char ENCODEDSI[maxSI];
#define LSIBfixed 24 //= 30-4-2 * spec=28 when PER unaligned
#define LSIBcompl 25 //= 30-4-1 * spec=29 when PER unaligned
#define supportedSIBs 6 //with value_tags [SIBs 1,2,5,11,18] - 14 is time-out
#define maxSIB1NAS 200 // max num of bytes for NAS data in SIB 1
#define maxSIBNAS 110 // max num of bytes for NAS data in SIB 18
typedef struct { /* PER control block */
ENCODEDBLOCK *buffer; /* start of data buffer */
int buff_index; /* index for next data */
int buff_size; /* size of data in the encoded buffer */
int bitoffset; /* for PER unaligned - FFS */
ENCODEDBLOCK *data; /* start of encoded data */
int data_size; /* size of encoded data */
int data_offset; /* in bytes - PER unaligned is FFS */
int errInfo; /* error info */
} PERParms;
#define NO_BLOCK 0xFF
// Default broadcast scheduling
/*
Rules : Repetition must be a constant as defined below
0 <= position <= 2 pow sib_rep -1
eg : sib_rep = 4096, position<= 2047
Current definition MIB: Rep32, pos 0
Long SIBs (>5segments) Rep128, pos 7 [9 segments available]: SIB1, SIB5, SIB18
Short SIBs (<=5 segments) Rep64, pos 3 [5 segments available]: SIB2, SIB11?, SIB14?
*/
#define LONG_SIB_POS 7
#define SHORT_SIB_POS 2
#define MIB_REP SchedulingInformation_scheduling_rep32
#define MIB_POS 0
#define SIB1_REP SchedulingInformation_scheduling_rep64 //128
#define SIB1_POS LONG_SIB_POS
//#define SIB2_REP SchedulingInformation_scheduling_rep64
//#define SIB2_POS SHORT_SIB_POS
#define SIB2_REP SchedulingInformation_scheduling_norep
#define SIB2_POS 0
#define SIB5_REP SchedulingInformation_scheduling_rep64 //128
#define SIB5_POS LONG_SIB_POS + 16 //=(64/2)/2 +7
#define SIB11_REP SchedulingInformation_scheduling_norep
#define SIB11_POS 0
#define SIB14_REP SchedulingInformation_scheduling_rep64
#define SIB14_POS SHORT_SIB_POS + 2
#define SIB14_TFACTOR 7
#define SIB18_REP SchedulingInformation_scheduling_rep64
#define SIB18_POS SHORT_SIB_POS + 16
//Temp
#define maxSIBperMsg 16
//#define P_SUCCESS 0
//#define P_MISCLERROR 1
//#define P_OUTOFBOUNDS 2
//#define P_INVDIGIT 3
/* Segment Combination Types */
#define BCH_noSegment 1
#define BCH_firstSegment 2
#define BCH_subsequentSegment 3
#define BCH_lastSegmentShort 4
#define BCH_lastAndFirst 5
#define BCH_lastAndComplete 6
#define BCH_lastAndCompleteAndFirst 7
#define BCH_completeSIB_List 8
#define BCH_completeAndFirst 9
#define BCH_completeSIB 10
#define BCH_lastSegment 11
/* PLMN_Type */
#define PLMN_gsm_MAP 1
#define PLMN_ansi_41 2
#define PLMN_gsm_MAP_and_ANSI_41 3
#define PLMN_MobyDick 4
/* SIBSb tag constants */
#define SIBSb_sysInfoType1 1
#define SIBSb_sysInfoType2 2
#define SIBSb_sysInfoType3 3
#define SIBSb_sysInfoType4 4
#define SIBSb_sysInfoType5 5
#define SIBSb_sysInfoType6 6
#define SIBSb_sysInfoType7 7
#define SIBSb_sysInfoType8 8
#define SIBSb_sysInfoType9 9
#define SIBSb_sysInfoType10 10
#define SIBSb_sysInfoType11 11
#define SIBSb_sysInfoType12 12
#define SIBSb_sysInfoType13 13
#define SIBSb_sysInfoType13_1 14
#define SIBSb_sysInfoType13_2 15
#define SIBSb_sysInfoType13_3 16
#define SIBSb_sysInfoType13_4 17
#define SIBSb_sysInfoType14 18
#define SIBSb_sysInfoType15 19
#define SIBSb_sysInfoType16 20
#define SIBSb_sysInfoType17 21
#define SIBSb_sysInfoTypeSB1 22
#define SIBSb_sysInfoTypeSB2 23
#define SIBSb_sysInfoType15_1 24
#define SIBSb_sysInfoType15_2 25
#define SIBSb_sysInfoType15_3 26
#define SIBSb_sysInfoType15_4 27
#define SIBSb_sysInfoType18 28
#define SIBSb_sysInfoType15_5 29
/* SchedulingInformation Sib_Pos */
#define SchedulingInformation_scheduling_norep 0
#define SchedulingInformation_scheduling_rep4 1
#define SchedulingInformation_scheduling_rep8 2
#define SchedulingInformation_scheduling_rep16 3
#define SchedulingInformation_scheduling_rep32 4
#define SchedulingInformation_scheduling_rep64 5
#define SchedulingInformation_scheduling_rep128 6
#define SchedulingInformation_scheduling_rep256 7
#define SchedulingInformation_scheduling_rep512 8
#define SchedulingInformation_scheduling_rep1024 9
#define SchedulingInformation_scheduling_rep2048 10
#define SchedulingInformation_scheduling_rep4096 11
#endif
This diff is collapsed.
/***************************************************************************
rrc_bch_ies.h - description
-------------------
begin : Aug 30, 2002
copyright : (C) 2002, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Define structures for Broadcast MIB and SIBs
***************************************************************************/
#ifndef __RRC_BCH_IES_H__
#define __RRC_BCH_IES_H__
#include "rrc_bch_constant.h"
/*********************************************************************
System Information for BCH - Information Elements
*********************************************************************/
// SegCount
typedef int SegCount;
// SegmentIndex
typedef int SegmentIndex;
// SFN_Prime
typedef int SFN_Prime;
// SIB_Type
typedef enum {
masterInformationBlock = 0,
systemInformationBlockType1 = 1,
systemInformationBlockType2 = 2,
systemInformationBlockType3 = 3,
systemInformationBlockType4 = 4,
systemInformationBlockType5 = 5,
systemInformationBlockType6 = 6,
systemInformationBlockType7 = 7,
systemInformationBlockType8 = 8,
systemInformationBlockType9 = 9,
systemInformationBlockType10 = 10,
systemInformationBlockType11 = 11,
systemInformationBlockType12 = 12,
systemInformationBlockType13 = 13,
systemInformationBlockType13_1 = 14,
systemInformationBlockType13_2 = 15,
systemInformationBlockType13_3 = 16,
systemInformationBlockType13_4 = 17,
systemInformationBlockType14 = 18,
systemInformationBlockType15 = 19,
systemInformationBlockType15_1 = 20,
systemInformationBlockType15_2 = 21,
systemInformationBlockType15_3 = 22,
systemInformationBlockType16 = 23,
systemInformationBlockType17 = 24,
systemInformationBlockType15_4 = 25,
systemInformationBlockType18 = 26,
schedulingBlock1 = 27,
schedulingBlock2 = 28,
systemInformationBlockType15_5 = 29
} SIB_Type;
// SIB_Data_fixed
typedef struct SIB_Data_fixed {
unsigned int numbits;
unsigned char data[LSIBfixed];
} SIB_Data_fixed;
// SIB_Data_variable
typedef struct SIB_Data_variable {
unsigned int numbits;
unsigned char data[27];
} SIB_Data_variable;
// CompleteSIB_sib_Data_fixed
typedef struct CompleteSIB_sib_Data_fixed {
unsigned int numbits;
unsigned char data[LSIBcompl];
} CompleteSIB_sib_Data_fixed;
/**************************************************************/
/* MasterInformationBlock Information elements */
/**************************************************************/
// MIB_ValueTag
typedef int MIB_ValueTag;
/**************************************************************/
// PLMN_Type
/* Digit */
//typedef int Digit; already defined
/* MCC */
typedef struct RCELL_MCC {
unsigned int numDigits;
Digit elem[3];
} RCELL_MCC;
/* MNC */
//typedef struct MNC {
// unsigned int numDigits;
// Digit elem[3];
//} MNC;
typedef unsigned int MNC;
/* PLMN_Identity */
typedef struct RCELL_PLMN_Identity {
RCELL_MCC mcc;
MNC mnc;
} RCELL_PLMN_Identity;
/**************************************************************/
/* PLMN_ValueTag */
typedef int PLMN_ValueTag;
/* CellValueTag */
typedef int CellValueTag;
/* SIBSb_TypeAndTag */
typedef struct SIBSb_TypeAndTag {
int type;
union {
/* t = 1 */
PLMN_ValueTag sysInfoType1;
/* t = 2 */
CellValueTag sysInfoType2;
/* t = 5 */
CellValueTag sysInfoType5;
/* t = 11 */
CellValueTag sysInfoType11;
/* t = 28 */
CellValueTag sysInfoType18;
} type_tag;
} SIBSb_TypeAndTag;
/**************************************************************/
/* SegCount */
//typedef int SegCount; already defined
/* scheduling_sib_Pos */
typedef struct Scheduling_sib_Pos {
unsigned int sib_Rep;
unsigned int sib_Pos;
} Scheduling_sib_Pos;
/* SibOFF */
typedef enum {
so2 = 0,
so4 = 1,
so6 = 2,
so8 = 3,
so10 = 4,
so12 = 5,
so14 = 6,
so16 = 7,
so18 = 8,
so20 = 9,
so22 = 10,
so24 = 11,
so26 = 12,
so28 = 13,
so30 = 14,
so32 = 15
} SibOFF;
/* SibOFF_List */
typedef struct SibOFF_List {
unsigned int num;
SibOFF data[15];
} SibOFF_List;
/* SchedulingInformation */
typedef struct SchedulingInformation {
SegCount segCount;
Scheduling_sib_Pos scheduling_sib_rep;
SibOFF_List sib_PosOffsetInfo;
} SchedulingInformation;
/**************************************************************/
/* SchedulingInformationSIBSb */
typedef struct SchedulingInformationSIBSb {
SIBSb_TypeAndTag sibSb_Type;
SchedulingInformation scheduling;
} SchedulingInformationSIBSb;
/* SIBSb_ReferenceList */
typedef struct SIBSb_ReferenceList {
unsigned int numSIB;
SchedulingInformationSIBSb sib_ref[supportedSIBs];
} SIBSb_ReferenceList;
/**************************************************************/
/* SysInfoType1 Information elements */
/**************************************************************/
/* NAS_SystemInformation */
typedef struct NAS_SystemInformation {
unsigned int numocts;
unsigned char data[maxSIB1NAS];
} NAS_SystemInformation;
/* UE_TimersAndConstants */
typedef struct RCELL_UE_TimersAndConstants {
unsigned int numocts;
unsigned char data[8];
} RCELL_UE_TimersAndConstants;
/**************************************************************/
/* SysInfoType2 Information elements */
/**************************************************************/
/* IP_Address */
//typedef struct SRNC_Identity {
typedef struct IP_Address {
unsigned char data[16];
} IP_Address;
/**************************************************************/
/* SysInfoType5 Information elements */
/**************************************************************/
/* PRACH_SCCPCH_SIList */
typedef struct PRACH_SCCPCH_SIList {
unsigned int numocts;
unsigned char data[maxBlock - 8];
} PRACH_SCCPCH_SIList;
/* PrimaryCCPCH_TX_Power */
typedef int PrimaryCCPCH_TX_Power;
/* Alpha */
typedef int Alpha;
/* ConstantValueTdd */
typedef int ConstantValueTdd;
/* OpenLoopPowerControl_TDD */
typedef struct OpenLoopPowerControl_TDD {
PrimaryCCPCH_TX_Power primaryCCPCH_TX_Power;
Alpha alpha;
ConstantValueTdd prach_ConstantValue;
ConstantValueTdd dpch_ConstantValue;
// ConstantValueTdd pusch_ConstantValue;
} OpenLoopPowerControl_TDD;
/**************************************************************/
/* SysInfoType14 Information elements */
/**************************************************************/
/* TimeslotNumber */
// value >= 0 && value <= 14
typedef unsigned int TimeslotNumber;
/* TDD_UL_Interference */
// value >= -110 && value <= -52
typedef int TDD_UL_Interference;
/* IndividualTS_Interference */
typedef struct IndividualTS_Interference {
TimeslotNumber timeslot;
TDD_UL_Interference ul_TimeslotInterference;
} IndividualTS_Interference;
/* IndividualTS_InterferenceList */
typedef struct IndividualTS_InterferenceList {
unsigned int numSlots;
IndividualTS_Interference data[15];
} IndividualTS_InterferenceList;
/* ExpirationTimeFactor */
// value >= 1 && value <= 8 --> 2^(value)
typedef unsigned int ExpirationTimeFactor;
/**************************************************************/
/* SysInfoType18 Information elements */
/**************************************************************/
/* IdentitiesOfNeighbourCells */
typedef struct IdentitiesOfNeighbourCells {
unsigned int numocts;
unsigned char data[maxSIBNAS];
} IdentitiesOfNeighbourCells;
/* CodeGroupsOfNeighbourCells */
typedef struct CodeGroupsOfNeighbourCells {
unsigned char data[maxCells];
} CodeGroupsOfNeighbourCells;
#endif
This diff is collapsed.
/***************************************************************************
rrc_bch_mib.h - description
-------------------
begin : Aug 30, 2002
copyright : (C) 2002, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Define structures for Broadcast MIB and SIBs
***************************************************************************/
#ifndef __RRC_BCH_MIB_H__
#define __RRC_BCH_MIB_H__
#include "rrc_bch_ies.h"
#include "rrc_bch_constant.h"
/*********************************************************************
System Information for BCH
*********************************************************************/
typedef struct FirstSegment {
SIB_Type sib_Type;
SegCount seg_Count;
SIB_Data_fixed sib_Data_fixed;
} FirstSegment;
typedef struct SubsequentSegment {
SIB_Type sib_Type;
SegmentIndex segmentIndex;
SIB_Data_fixed sib_Data_fixed;
} SubsequentSegment;
typedef struct LastSegmentShort {
SIB_Type sib_Type;
SegmentIndex segmentIndex;
SIB_Data_variable sib_Data_variable;
} LastSegmentShort;
typedef struct CompleteSIBshort {
SIB_Type sib_Type;
SIB_Data_variable sib_Data_variable;
} CompleteSIBshort;
typedef struct CompleteSIB_List {
unsigned int numSIB;
CompleteSIBshort elem[maxSIBperMsg];
} CompleteSIB_List;
typedef struct CompleteSIB {
SIB_Type sib_Type;
CompleteSIB_sib_Data_fixed sib_Data_fixed;
} CompleteSIB;
typedef struct LastSegment {
SIB_Type sib_Type;
SegmentIndex segmentIndex;
SIB_Data_fixed sib_Data_fixed;
} LastSegment;
typedef struct SystemInformation_BCH_payload {
int type;
union {
/* type = 1 */
// noSegment
/* type = 2 */
FirstSegment *firstSegment;
/* type = 3 */
SubsequentSegment *subsequentSegment;
/* type = 4 */
LastSegmentShort *lastSegmentShort;
/* type = 8 */
CompleteSIB_List *completeSIB_List;
/* type = 10 */
CompleteSIB *completeSIB;
/* type = 11 */
LastSegment *lastSegment;
} segment;
} SystemInformation_BCH_payload;
typedef struct SystemInformation_BCH {
SFN_Prime sfn_Prime;
SystemInformation_BCH_payload payload;
} SystemInformation_BCH;
/**************************************************************/
/* MasterInformationBlock */
/**************************************************************/
typedef struct MasterInformationBlock {
MIB_ValueTag mib_ValueTag;
RCELL_PLMN_Identity plmn_Identity;
SIBSb_ReferenceList sibSb_ReferenceList;
} MasterInformationBlock;
/**************************************************************/
/* SysInfoType1 */
/**************************************************************/
typedef struct SysInfoType1 {
NAS_SystemInformation subnet_NAS_SysInfo;
RCELL_UE_TimersAndConstants ue_TimersAndConstants;
} SysInfoType1;
/**************************************************************/
/* SysInfoType2 */
/**************************************************************/
typedef struct SysInfoType2 {
IP_Address net_IP_addr;
} SysInfoType2;
/**************************************************************/
/* SysInfoType5 */
/**************************************************************/
typedef struct SysInfoType5 {
PRACH_SCCPCH_SIList prach_sCCPCH_SIList;
OpenLoopPowerControl_TDD openLoopPowerControl_TDD;
} SysInfoType5;
/**************************************************************/
/* SysInfoType11 */
/**************************************************************/
//typedef struct SysInfoType11 {
// FACH_MeasurementOccasionInfo fach_MeasurementOccasionInfo;
// MeasurementControlSysInfo measurementControlSysInfo;
//} SysInfoType11;
/**************************************************************/
/* SysInfoType14 */
/**************************************************************/
typedef struct SysInfoType14 {
IndividualTS_InterferenceList individualTS_InterferenceList;
ExpirationTimeFactor expirationTimeFactor;
} SysInfoType14;
/**************************************************************/
/* SysInfoType18 */
/**************************************************************/
typedef struct SysInfoType18 {
IdentitiesOfNeighbourCells cellIdentities;
CodeGroupsOfNeighbourCells cellCodegroups;
} SysInfoType18;
#endif
/***************************************************************************
rrc_bch_per_basic.c - description
-------------------
copyright : (C) 2002, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Procedures to perform PER encoding/decoding of basic entities
Currently, following entities are supported:
- constrained integer
- bit string
- constrained unsigned integer
***************************************************************************/
/********************
//OpenAir definitions
********************/
#include "LAYER2/MAC/extern.h"
//#include "UTIL/MEM/mem_block.h"
#ifdef NODE_RG
#include "rrc_rg_vars_extern.h"
#endif
#ifdef NODE_MT
#include "rrc_ue_vars_extern.h"
#endif
/********************
// RRC definitions
********************/
//#include "rrc_constant.h"
//#include "rrc_bch_mib.h"
//-----------------------------------------------------------------------------
//#include "rrc_proto_int.h"
void rrc_print_buffer (char *buffer, int length);
//-----------------------------------------------------------------------------
void rrc_new_per_parms (PERParms * pParms, ENCODEDBLOCK * pBuffer)
{
//-----------------------------------------------------------------------------
pParms->buffer = pBuffer;
pParms->buff_index = 1; //start +1 = placeholder for buffer total length
pParms->buff_size = 1; // idem
pParms->bitoffset = 0;
pParms->errInfo = P_SUCCESS;
}
//-----------------------------------------------------------------------------
void rrc_set_per_length (PERParms * pParms)
{
//-----------------------------------------------------------------------------
char *pwrite;
pwrite = ((char *) pParms->buffer);
*pwrite = pParms->buff_size;
}
//-----------------------------------------------------------------------------
int rrc_get_per_length (ENCODEDBLOCK * pBlock)
{
//-----------------------------------------------------------------------------
u8 length;
length = *((char *) pBlock);
return length;
}
//-----------------------------------------------------------------------------
void rrc_print_per_parms (PERParms * pParms)
{
//-----------------------------------------------------------------------------
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] PER Control block values \t- index : %d\t- size : %d\t- error info : %d", pParms->buff_index, pParms->buff_size, pParms->errInfo);
rrc_print_buffer ((char *) pParms->buffer, pParms->buff_size);
#endif
}
//-----------------------------------------------------------------------------
int rrc_PEREnc_padding (PERParms * pParms, int length)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
char *pwrite;
int i;
pwrite = ((char *) pParms->buffer) + pParms->buff_index;
for (i = 0; i < length; i++) {
*pwrite = 0;
pwrite++;
}
pParms->buff_index += length;
pParms->buff_size += length;
return status;
}
/**************************************************************/
/* Constrained Integer */
/**************************************************************/
//-----------------------------------------------------------------------------
int rrc_PEREnc_ConstrInteger (PERParms * pParms, int pvalue, int lower, int upper)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
unsigned char *pwrite = NULL;
unsigned short int *pshort = NULL;
pwrite = ((unsigned char *) pParms->buffer) + pParms->buff_index;
if (pvalue >= lower && pvalue <= upper) {
if ((lower >= -128) && (upper <= 127)) {
// *pwrite = (unsigned char)pvalue;
*pwrite = (char) pvalue;
pParms->buff_index += 1;
pParms->buff_size += 1;
} else {
if ((lower >= -32768) && (upper <= 32767)) {
// pshort = (unsigned short int *)pwrite;
// *pshort = (unsigned short int)pvalue;
pshort = (unsigned short int *) pwrite;
*pshort = (short int) pvalue;
pParms->buff_index += 2;
pParms->buff_size += 2;
} else {
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] Error, Value larger than 2 bytes, Code to be written : %d\n", pvalue);
#endif
status = P_MISCLERROR;
}
}
} else {
status = P_OUTOFBOUNDS;
}
return status;
}
//-----------------------------------------------------------------------------
int rrc_PERDec_ConstrInteger (PERParms * pParms, int *pvalue, int lower, int upper)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
// unsigned char * pRead;
// unsigned short int * pshort;
char *pRead = NULL;
short int *pshort = NULL;
char value_read_1 = 0;
short int value_read_2 = 0;
pRead = ((char *) pParms->buffer) + pParms->buff_index;
if ((lower >= -128) && (upper <= 127)) {
value_read_1 = *(pRead);
if (value_read_1 >= lower && value_read_1 <= upper) {
*pvalue = value_read_1;
pParms->buff_index += 1;
pParms->buff_size -= 1;
} else {
status = P_OUTOFBOUNDS;
}
} else {
if ((lower >= -32768) && (upper <= 32767)) {
pshort = (short int *) pRead;
// pshort = (unsigned short int *)pRead;
value_read_2 = *(pshort);
if (value_read_2 >= lower && value_read_2 <= upper) {
*pvalue = value_read_2;
pParms->buff_index += 2;
pParms->buff_size -= 2;
} else {
status = P_OUTOFBOUNDS;
}
} else {
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] Error, Value>65535, Code to be written : %d\n", *pRead);
#endif
status = P_MISCLERROR;
}
#ifdef DEBUG_RRC_BROADCAST
// msg("[RRC_BCH] Value read : %d\n", *pvalue);
#endif
}
return status;
}
/**************************************************************/
/* Constrained Unsigned Integer */
/**************************************************************/
//-----------------------------------------------------------------------------
int rrc_PEREnc_ConsUnsigned (PERParms * pParms, unsigned int pvalue, unsigned int lower, unsigned int upper)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
unsigned char *pwrite;
unsigned short int *pshort;
pwrite = ((unsigned char *) pParms->buffer) + pParms->buff_index;
if (pvalue >= lower && pvalue <= upper) {
if (upper <= 255) {
*pwrite = (unsigned char) pvalue;
pParms->buff_index += 1;
pParms->buff_size += 1;
} else {
if (upper <= 65535) {
pshort = (unsigned short int *) pwrite;
*pshort = (unsigned short int) pvalue;
pParms->buff_index += 2;
pParms->buff_size += 2;
} else {
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] Error, Value>65535, Code to be written : %d\n", pvalue);
#endif
status = P_MISCLERROR;
}
}
} else {
status = P_OUTOFBOUNDS;
}
return status;
}
//-----------------------------------------------------------------------------
int rrc_PERDec_ConsUnsigned (PERParms * pParms, unsigned int *pvalue, unsigned int lower, unsigned int upper)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
unsigned char *pRead;
unsigned short int *pshort;
unsigned char value_read_1 = 0;
short int value_read_2 = 0;
pRead = ((unsigned char *) pParms->buffer) + pParms->buff_index;
if (upper <= 255) {
value_read_1 = *(pRead);
if (value_read_1 >= lower && value_read_1 <= upper) {
*pvalue = value_read_1;
pParms->buff_index += 1;
pParms->buff_size -= 1;
} else {
status = P_OUTOFBOUNDS;
}
} else {
if (upper <= 65535) {
pshort = (unsigned short int *) pRead;
value_read_2 = *(pshort);
if (value_read_2 >= lower && value_read_2 <= upper) {
*pvalue = value_read_2;
pParms->buff_index += 2;
pParms->buff_size -= 2;
} else {
status = P_OUTOFBOUNDS;
}
} else {
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] Error, Value>65535, Code to be written : %d\n", *pRead);
#endif
status = P_MISCLERROR;
}
}
return status;
}
/**************************************************************/
/* Bit String */
/**************************************************************/
// working on octets in 1st step - 3rd parameter not used , FFS
//-----------------------------------------------------------------------------
int rrc_PEREnc_BitString (PERParms * pParms, unsigned int numbits, unsigned char *data)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
unsigned int length;
int i;
char *pwrite;
char *psource;
if (numbits == 0) { //data buffer empty. Get encoded values from pParms
length = rrc_get_per_length (pParms->data);
pwrite = ((char *) pParms->buffer) + pParms->buff_index;
psource = (char *) pParms->data;
for (i = 0; i < length; i++) {
*pwrite = *psource;
pwrite++;
psource++;
}
pParms->buff_index += length;
pParms->buff_size += length;
} else {
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] Error, numbits>0, Code to be written \n");
#endif
status = P_MISCLERROR;
pParms->errInfo = P_MISCLERROR;
}
return status;
}
//-----------------------------------------------------------------------------
int rrc_PERDec_BitString (PERParms * pParms, unsigned int *numbits_p, char *buffer, unsigned int bufsiz)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
return status;
}
/**************************************************************/
/* Octet string */
/**************************************************************/
//-----------------------------------------------------------------------------
int rrc_PEREnc_OctetString (PERParms * pParms, unsigned int numocts, char *data)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
char *pwrite;
pwrite = ((char *) pParms->buffer) + pParms->buff_index;
memcpy (pwrite, data, numocts);
pParms->buff_index += numocts;
pParms->buff_size += numocts;
return status;
}
//-----------------------------------------------------------------------------
int rrc_PERDec_OctetString (PERParms * pParms, unsigned int *numocts_p, char *data, unsigned int bufsize)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
//int i;
char *pwrite;
char *psource;
unsigned int numocts;
psource = ((char *) pParms->buffer) + pParms->buff_index;
pwrite = data;
numocts = *psource;
*numocts_p = bufsize;
memcpy (data, psource, bufsize);
pParms->buff_index += numocts + 1;
pParms->buff_size -= (numocts + 1);
return status;
}
/**************************************************************/
/* Var Octet String - same as string, but with length */
/**************************************************************/
//-----------------------------------------------------------------------------
int rrc_PEREnc_VarOctetString (PERParms * pParms, unsigned int numocts, unsigned char *data)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
char *pwrite;
pwrite = ((char *) pParms->buffer) + pParms->buff_index;
*pwrite = numocts;
pwrite += 1;
memcpy (pwrite, data, numocts);
pParms->buff_index += numocts + 1;
pParms->buff_size += numocts + 1;
return status;
}
//-----------------------------------------------------------------------------
int rrc_PERDec_VarOctetString (PERParms * pParms, unsigned int *numocts_p, unsigned char *data)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
char *psource;
unsigned int numocts;
u8 read_value;
psource = ((char *) pParms->buffer) + pParms->buff_index;
read_value = *psource;
numocts = (unsigned int)read_value;
// (u8) numocts = *((u8 *)psource);
*numocts_p = numocts;
psource += 1;
memcpy (data, psource, numocts);
pParms->buff_index += numocts + 1;
pParms->buff_size -= (numocts + 1);
return status;
}
/**************************************************************/
/* Digit */
/**************************************************************/
//-----------------------------------------------------------------------------
int rrc_PEREnc_Digit (PERParms * pParms, Digit value)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
// status = rrc_PEREnc_ConstrInteger (pParms, value, 0, 9);
char *pwrite;
if (value >= 0 && value <= 9) {
pwrite = ((char *) pParms->buffer) + pParms->buff_index;
*pwrite = (char) value;
pParms->buff_index += 1;
pParms->buff_size += 1;
} else {
status = P_INVDIGIT;
}
return (status);
}
//-----------------------------------------------------------------------------
int rrc_PERDec_Digit (PERParms * pParms, Digit * pvalue)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
//status = rrc_PERDec_ConstrInteger (pParms, pvalue, 0, 9);
char *pRead;
unsigned char value_read;
pRead = ((char *) pParms->buffer) + pParms->buff_index;
value_read = *(pRead);
// if (value_read>=0 && value_read<=9){
*pvalue = value_read;
pParms->buff_index += 1;
pParms->buff_size -= 1;
// }else{
// status = P_INVDIGIT;
// }
return (status);
}
/**************************************************************/
/* Length */
/**************************************************************/
//-----------------------------------------------------------------------------
int rrc_PEREnc_Length (PERParms * pParms, unsigned int value)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
char *pwrite;
if (value <= 255) {
pwrite = ((char *) pParms->buffer) + pParms->buff_index;
*pwrite = (char) value;
pParms->buff_index += 1;
pParms->buff_size += 1;
} else {
#ifdef DEBUG_RRC_BROADCAST
msg ("[RRC_BCH] Error, length>255, value : %d\n", value);
#endif
status = P_OUTOFBOUNDS;
}
return status;
}
//-----------------------------------------------------------------------------
int rrc_PERDec_Length (PERParms * pParms, unsigned int *pvalue)
{
//-----------------------------------------------------------------------------
int status = P_SUCCESS;
char *pRead;
pRead = ((char *) pParms->buffer) + pParms->buff_index;
*pvalue = *pRead;
pParms->buff_index += 1;
pParms->buff_size -= 1;
return status;
}
/***************************************************************************
rrc_bch_per_basic.h - description
-------------------
copyright : (C) 2003, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Define basic types for RRC peer-to-peer messages and broadcast
***************************************************************************/
#ifndef __RRC_BCH_PER_BASIC_H__
#define __RRC_BCH_PER_BASIC_H__
#include "rrc_platform_types.h"
typedef int Digit;
//Return codes
#define P_SUCCESS 0
#define P_MISCLERROR 1
#define P_OUTOFBOUNDS 2
#define P_INVDIGIT 3
#define P_INVMSGTYPE 4
#define P_NOMSG 5
#define P_INVVALUE 6
#define P_INVINTEGRITY 7
#define P_INVPROC 8
#endif
/***************************************************************************
rrc_constant.h - description
-------------------
begin : Someday 2001
copyright : (C) 2001, 2010 by Eurecom
created by : Lionel.Gauthier@eurecom.fr
modified by : Michelle.Wetterwald@eurecom.fr
**************************************************************************
RRC protocol constants
***************************************************************************/
#ifndef __RRC_CONSTANT_H__
#define __RRC_CONSTANT_H__
/* ***Debug flags*** */
#define DEBUG_RRC_STATE
//#define DEBUG_RRC_DETAILS
//#define DEBUG_RRC_DETAILS_2
#define RRC_DEBUG_DUMMIES
//#define DEBUG_RRC_BROADCAST_NAS
//#ifndef DEBUG_RRC_BROADCAST
//#define DEBUG_RRC_BROADCAST
//#define DEBUG_RRC_BROADCAST_DETAILS
//#endif
#define DEBUG_RRC_RRM_INTF
//#define DEBUG_RRC_TEMP_OPENAIR
#define DEBUG_NAS_CONTROL_SIMU
//#define DEBUG_NAS_MEAS_SIMU
// Measurement Control Message
#define DEBUG_RRC_MEASURE_CONTROL
// Measurement Report Message
#define DEBUG_RRC_MEASURE_REPORT_MAIN
// #ifdef NODE_RG
// #define DEBUG_RRC_MEASURE_REPORT
// #define DEBUG_RRC_FORWARD_MT_MEASURE_REPORT
// #endif
/* **** */
/* ** FLAG DEFINED FOR HANDLING of 2UEs in EMULATION MODE ** */
/* **** */
#define RRC_OAI_EMU
/* **** */
/* ** FLAG DEFINED FOR HANDLING of ENb Measures ** */
/* **** */
//#define RRC_ENABLE_REAL_ENB_MESURES
/* **** */
/* ** FLAGS DEFINED FOR HANDLING of NAS_INTERFACE ** */
/* **** */
// Case 1 : simulation = USER_MODE defined + RRC_NETLINK commented
// Case 2 : netlink sockets = USER_MODE defined +
#define RRC_NETLINK PDCP_USE_NETLINK
// (TEMP: should be placed in Makefile, but currently, PDCP_USE_NETLINK is default in USER_MODE)
// Case 3 : RT_FIFOS = USER_MODE undefined
/* **** */
/* ** FLAGS DEFINED FOR MBMS DEFINITION ** */
/* **** */
// !!Activate or deactivate the MBMS Protocol!!
//#define ALLOW_MBMS_PROTOCOL
//#define MBMS_TEST_MODE //Used in stand-alone mode (MBMS standalone simulator)
#define MBMS_INTEGRATION_MODE //Used in platform mode - simulation or realtime mode
//#define ALLOW_MBMS_ACCESS_INFO
/* *** Debug flags for MBMS *** */
#define DEBUG_RRC_MBMS_BASIC //basic level of trace for MBMS operation
//#define DEBUG_RRC_MBMS //1st level of trace for MBMS operation
//#define DEBUG_RRC_MBMS_DETAIL //2nd level of trace for MBMS operation
#define DEBUG_UE_MBMS_FSM //traces for UE FSM internals
#define DEBUG_UE_MBMS_FSM_TEST //full traces of MBMS FSM
#define DEBUG_RRC_MBMS_MSG_CONTENT // content for received/sent message buffer
#define DEBUG_RRC_MBMS_SFN // MBMS frame counter
#define DEBUG_RRC_MBMS_STATUS // current status of services in UE
#ifdef MBMS_INTEGRATION_MODE
#undef MBMS_TEST_MODE
#endif
/* ***End MBMS Debug flags*** */
/* **** */
/* ** RRC INTERNAL VALUES ** */
/* **** */
// will be a variable when virtualisation
#define RRC_MODULE_INST_ID 0
//max number of UE per BS
// Warning : This must be coordinated with the number of FIFOs in the RG (rrc_sap.h)
#define maxUsers 3
// max number of cells or RGs
// to be coordinated with NAS list of RGs
#define maxCells 2
#define RRC_NAS_MAX_SIZE 4096
//Values to be used in UE for quality measurement - to be adjusted
//Formula : NAS_measure = (RSSI0 / RATIO_RSSI0) + SHIFT_RSSI0
//Result must be a positive integer [0-90]
#define RATIO_RSSI0 100
#define SHIFT_RSSI0 110
//#define NB_ANTENNAS 2 // A Revoir
// NB_ANTENNAS is set in the Makefile
#define numANTENNAS NB_ANTENNAS_RX
#ifdef NODE_RG
#define RRC_RG_MAX_RB maxRB*maxUsers
// RG_CONN_TIMEOUT will clean the MT resources from the RG if it failed
// between CONN_SETUP and CONN_SETUP_COMPLETE - 3000 ==> 30s.
#define RG_CONN_TIMEOUT 3000
#endif
/* CONSTANTS for ESTEREL */
#define SUCCESS 0
#define FAILURE 1
#define ALREADY_C 2
//
#define FALSE 0
#ifndef TRUE
#define TRUE 1
#endif
// Actions for computing the configuration
#define E_ADD_MT 1
#define E_REL_MT 3
#define E_ADD_RB 5
#define E_REL_RB 7
// UE States
#define RRC_CELL_IDLE RRC_UE_IDLE //0x01
#define CONNECTED RRC_UE_CONNECTED //0x02
#define CELL_FACH RRC_UE_CONNECTED_CELL_FACH //0x06
#define CELL_DCH RRC_UE_CONNECTED_CELL_DCH //0x0A
#define CELL_PCH 16+CONNECTED
// RG States
#define Conn_Received 0x10
#define CELL_FACH_Connecting 0x14
#define CELL_DCH_Connecting 0x18
#define CELL_FACH_Connected RRC_RG_CONNECTED_CELL_FACH //0x06
#define CELL_DCH_Connected RRC_RG_CONNECTED_CELL_DCH //0x0A
#define CELL_FACH_Releasing 0x24
#define CELL_DCH_Releasing 0x28
// RRC Messages Types (sent by)-- ESTEREL values
#define RRC_CONN_REQ 11 //UE
#define RRC_CONN_SETUP 12 //RG
#define RRC_CONN_SETUP_COMPLETE 13 //UE
#define RRC_CONN_REJECT 14 //RG
#define RRC_CONN_RELEASE 15 //RG - UE
#define RRC_CONN_REL_COMPLETE 16 //UE
#define RB_SETUP 17 //RG
#define RB_SETUP_COMPLETE 18 //UE
#define RB_SETUP_FAILURE 19 //UE
#define RB_RELEASE 21 //RG
#define RB_RELEASE_COMPLETE 22 //UE
#define RB_RELEASE_FAILURE 23 //UE
#define CELL_UPDATE 25 //UE
#define CELL_UPDATE_CONFIRM 26 //RG
#define UE_CAPABILITY_INFO 27 //UE
#define UE_CAPABILITY_INFO_CONF 28 //RG
//
#define REL_COUNT 3 // Nb RESEND RRC_CONNECTION_RELEASE by RG
//#define N300 5000 // NB RETRY RRC_CONNECTION_REQUEST
#define N300 500000 // L1 TEST
#define N308 2 // NB RETRY RRC_CONNECTION_RELEASE_REQUEST
#define T300_DURATION 2000 //in millisec
// Timers ID
#define RRC_T300 1
// protocol state
#define RRC_UE_IDLE 0x01
#define RRC_UE_CONNECTED 0x02
#define RRC_UE_CONNECTED_CELL_FACH 0x04 + RRC_UE_CONNECTED
#define RRC_UE_CONNECTED_CELL_DCH 0x08 + RRC_UE_CONNECTED
#define RRC_UE_REQUESTING 0x10
#define RRC_RG_IDLE 0x01
#define RRC_RG_CONNECTED 0x02
#define RRC_RG_CONNECTED_CELL_FACH 0x04 + RRC_RG_CONNECTED
#define RRC_RG_CONNECTED_CELL_DCH 0x08 + RRC_RG_CONNECTED
// protocol events
#define RRC_CONNECTION_REQUEST_EVENT 0x01
#define RRC_CONNECTION_REQUEST_TIME_OUT_EVENT 0x02
#define RRC_CONNECTION_SETUP_EVENT 0x04
#define RRC_CONNECTION_RELEASE_EVENT 0x08
#define RRC_CONNECTION_LOSS_EVENT 0x10
// SIGNALLING RADIO BEARERS - OPENAIR
#ifdef NODE_RG
#define RRC_SRB_OFFSET 8
#endif
#ifdef NODE_MT
#define RRC_SRB_OFFSET 0
#endif
//MW 19/9/2013 - Hard coded value of DRB_ID for rrc_ue_outputs.c
#define RRC_OAI_DRB0_ID 3
#define RRC_LTE_DCCH_ID 2+RRC_SRB_OFFSET // for openair scheduling
#define RRC_LCHAN_SRB0_ID 4+RRC_SRB_OFFSET // traffic on CCCH
#define RRC_LCHAN_SRB1_ID 5+RRC_SRB_OFFSET // any traffic on DCCH using RLC-UM
#define RRC_LCHAN_SRB2_ID 6+RRC_SRB_OFFSET // AS traffic using RLC-AM
#define RRC_LCHAN_SRB3_ID 7+RRC_SRB_OFFSET // high priority NAS traffic using RLC-AM
#define RRC_LCHAN_SRB4_ID 8+RRC_SRB_OFFSET // low priority NAS traffic using RLC-AM
#define RRC_BCCH_ID 64 // Broadcast
#define RRC_SRB0_ID 0 // traffic on CCCH
#define RRC_SRB1_ID 1 // any traffic on DCCH using RLC-UM
#define RRC_SRB2_ID 2 // AS traffic using RLC-AM
#define RRC_SRB3_ID 3 // high priority NAS traffic using RLC-AM
#define RRC_SRB4_ID 4 // low priority NAS traffic using RLC-AM
#define RRC_MCCH_ID 5 // MBMS Control
// RB ESTABLISHMENT
#define RB_STARTED 1
#define RB_STOPPED 0
//For PDCP
#define RRC_RB_NO_USE_PDCP 0
#define RRC_RB_USE_PDCP 1
//Interface with RLC- Request or not confirmation
// (cf rlc.h)
#define RRC_RLC_CONFIRM_YES 1
#define RRC_RLC_CONFIRM_NO 0
// PROTOCOL ALLOC
#define RRC_PROTOCOL_ENTITY_FREE 0x00
#define RRC_PROTOCOL_ENTITY_ALLOCATED 0xAA
// RB Release Error cause
#define RB_FAIL_IDLE_MOBILE 1
#define RB_FAIL_INVALID_QOS_VALUE 2
#define RB_FAIL_INVALID_CONFIG 3
#define RB_FAIL_RLC_FAILURE 4
#define RB_FAIL_PHY_CHANNEL_FAILURE 5
#define RB_FAIL_UE_SETUP_FAILURE 6
// extension to 25.331
#define maxCCTrCH_rg 32
#define maxRB 32
#define maxTS 15
//The real value is defined in rrc_msg_constant.h
#define ACCESS_STRATUM_RELEASE_INDICATOR_DEFAULT ACCESS_STRATUM_RELEASE_INDICATOR_REL_6
#define EURECOM_KERNEL_RELEASE_INDICATOR_DEFAULT EURECOM_KERNEL_RELEASE_INDICATOR_REL_26
////25.331
#define maxCCTrCH 8
// Values from RHODOS26 - Temp to be removed
#define JRRM_SLOTS_PER_FRAME 15L
#define RRC_FRAME_DURATION 320*64/(6.5*1000) // in ms - from Florian
//Other RRM interface values
#define RRC_CONNECTED_TO_RRM 0xCC
#ifdef USER_MODE
#define RPC_CONNECTION_REQUEST_TIME_OUT 2000 // in ms
#else
#define RPC_CONNECTION_REQUEST_TIME_OUT 5000 // in ms
#endif
#endif
/***************************************************************************
rrc_mbms_constant.h
-------------------
begin : May 4, 2005
copyright : (C) 2002, 2010 by Eurecom
author : Michelle.Wetterwald@eurecom.fr, Huu-Nghia.Nguyen@eurecom.fr
goal : This file contains all the constants concerned with MBMS
**************************************************************************/
#ifndef _RRC_MBMS_CONSTANT_H_
#define _RRC_MBMS_CONSTANT_H_
#include "rrc_platform_types.h"
#if defined(FALSE) && (FALSE != 0)
#error FALSE was defined elsewhere with a none zero value !!!
#endif
/********************************/
/* MBMS impl. specific types */
typedef int o3; /* OctetString(3) */
typedef u8 mbms_bool; /* mbms_bool used in RRC MBMS */
/********************************/
/* MBMS impl. constants */
//Data size
#define MBMS_MAX_BUFFER_SIZE 512
//#define MBMS_SERVICE_IDENTITY_SIZE 3
#define MBMS_MIN_TRANSACTION_ID 3
#define MBMS_DEFAULT_CGID 1 // default Cell Group Identity
//Channels for the test
#define MCCH_ID 0
#define DCCH_ID 1
#define MSCH_ID 2
//States for FSM
#define ACQUI_START 0
#define ACQUI_I_ACQUISITION 1
#define ACQUI_WAIT_MBMS_MSG 2
//MBMS Message header + length
#define MCCH_MSG_HEAD_LGTH 4 //type only, no integrity check
#define MSCH_MSG_HEAD_LGTH 4 //type only, no integrity check
#define MBMS_MAX_NEIGBOURING_COUNT 4 // Temp
#define MBMS_L12_CONFIGURATION_SIZE 200
#define NEIGHBOUR_CONFIGURATION_SIZE 200 //Size of neighbouring cell's configuration
#define MTCH_CONFIGURATION_SIZE 400
//Default value for Scheduling
#define ACCESS_PERIOD_COEF_DEFAULT 2 //[0..3] HGN 2
#define REPETITION_PERIOD_COEF_DEFAULT 1 //[0..3] HGN 3
#define MODIF_PERIOD_COEF_DEFAULT 7 //[7..10] HGN 7
#define SCHED_PERIOD_COEF_DEFAULT 3
//SHOULD BE IDENTICAL WITH MAX_MBMS_SERVICES in rrc_nas_primitives.h
#define maxMBMSServices 4
//Service Type defined in MBMS Activated Services List
//FFS
#define MBMS_MULTICAST 5
#define MBMS_BROADCAST 8
/********************************/
/* Defined in TS 25.331 */
//Values of T_318, use these constants instead of enumeration in standard T25.331
#define ms250 250
#define ms500 500
#define ms750 750
#define ms1000 1000
#define ms1250 1250
#define ms1500 1500
#define ms1750 1750
#define ms2000 2000
#define ms3000 3000
#define ms4000 4000
#define ms6000 6000
#define ms8000 8000
#define ms10000 10000
#define ms12000 12000
#define ms16000 16000
//Values of Access Probability Factor. use these constants instead of enumertion in TS25.331
#define apf0 0
#define apf32 32
#define apf64 64
#define apf96 96
#define apf128 128
#define apf160 160
#define apf192 192
#define apf224 224
#define apf256 256
#define apf288 288
#define apf320 320
#define apf352 352
#define apf384 384
#define apf416 416
#define apf448 448
#define apf480 480
#define apf512 512
#define apf544 544
#define apf576 576
#define apf608 608
#define apf640 640
#define apf672 672
#define apf704 704
#define apf736 736
#define apf768 768
#define apf800 800
#define apf832 832
#define apf864 864
#define apf896 896
#define apf928 928
#define apf960 960
#define apf1000 1000
//Values of MBMS_RequiredUEAction_Mod, use these constants instead of enum in TS25.331
#define Mod_none 0
#define Mod_acquireCountingInfo 1 //not on DCCH
#define Mod_acquirePTM_RBInfo 2
#define Mod_establishPMMConnection 3 //not used
#define Mod_releasePTM_RB 4
//Values of MBMS_RequiredUEAction_UMod. use these constants instead of enum in TS25.331
#define UMod_none 0
#define UMod_acquirePTM_RBInfo 1
#define UMod_establishPMMConnection 2
#define UMod_releasePTM_RB 3
//#define maxMBMS_CommonCCTrCh 32
//#define maxMBMS_CommonPhyCh 32
//#define maxMBMS_CommonRB 32
//#define maxMBMS_CommonTrCh 32
#define maxMBMSservCount 4 // spec v6.a.0 = 8
//#define maxMBMSservDedic 4 // spec v6.a.0 removed
#define maxMBMSservModif 4 // spec v6.a.0 = 32
#define maxMBMSservUnmodif 4 // spec v6.a.0 = 64
#define maxMBMSservSched 4 // spec v6.a.0 = 16
#define maxMBMSTransmis 4
#endif //_RRC_MBMS_CONSTANT_H_
/***************************************************************************
rrc_mbms_ies.h - description
-------------------
begin : May 9, 2005
copyright : (C) 2005, 2010 by Eurecom
created by : Huu-Nghia.Nguyen@eurecom.fr
modified by : Michelle.Wetterwald@eurecom.fr
goal : This file contains definitions of IEs for MBMS messages
**************************************************************************/
#ifndef _RRC_MBMS_IES_H_
#define _RRC_MBMS_IES_H_
#include "rrc_platform_types.h"
#include "rrc_mbms_constant.h"
/**************************************************************/
/* MBMSAccessInformation */
/**************************************************************/
/* MBMS-ShortTransmissionID */
typedef u16 MBMS_ShortTransmissionID; /* 1..32 */
/* MBMS_AccessProbabilityFactor */
typedef u16 MBMS_AccessProbabilityFactor;
/* MBMS_ServiceAccessInfo-r6 */
typedef struct MBMS_ServiceAccessInfo {
MBMS_ShortTransmissionID shortTransmissionID;
MBMS_AccessProbabilityFactor accessprobabilityFactor_Idle;
//MBMS_AccessProbabilityFactor accessprobabilityFactor_UraPCH /* OPTIONAL */;
} MBMS_ServiceAccessInfo;
/* MBMS_ServiceAccessInfoList */
typedef struct MBMS_ServiceAccessInfoList {
u8 numAccessInfo; //0..maxMBMSservCount (=4)
MBMS_ServiceAccessInfo accessInfo[maxMBMSservCount];
} MBMS_ServiceAccessInfoList;
/**************************************************************/
/* MBMSGeneralInformation */
/**************************************************************/
typedef u16 T_318;
/* MBMS_TimersAndCounters */
typedef struct MBMS_TimersAndCounters {
T_318 t_318 /* DEFAULT 3 <-- ms1000 */;
} MBMS_TimersAndCounters;
/* MBMS_CellGroupIdentity */
typedef u16 MBMS_CellGroupIdentity; /** Bit string (12) coded in u16 */
/**************************************************************/
/* MBMSCommonPTMRBInformation */
/**************************************************************/
/* L1L2Configuration */
//HGN typedef u8 MBMS_L12Configuration[MBMS_L12_CONFIGURATION_SIZE];
typedef struct MTCH_Configuration {
u16 numoctets;
u8 data[MTCH_CONFIGURATION_SIZE];
} MTCH_Configuration;
/**************************************************************/
/* MBMSCurrentCellPTMRBInformation */
/**************************************************************/
/* L1L2Configuration cf. MBMSCommonPTMRBInformation*/
/**************************************************************/
/* MBMSNeighbouringCellPTMRBInformation */
/**************************************************************/
/* NeighbourCellIdentity */
typedef u8 NeighbourCellIdentity;
/* NeighbouringCellConfiguration */
//typedef u8 MBMS_NeighbouringCellConfiguration[MBMS_NEIGHBOURING_CONFIGURATION_SIZE];
typedef struct NeighbouringCellConfiguration {
u16 numoctets;
u8 data[NEIGHBOUR_CONFIGURATION_SIZE];
} NeighbouringCellConfiguration;
/**************************************************************/
/* MBMSModifiedServicesInformation */
/**************************************************************/
/* MBMS-ServiceIdentity */
typedef struct MBMS_ServiceIdentity {
u8 serviceIdentity[3];
// PLMN_Identity plmn_Identity; //Not needed, assumed that this is the same value in BCH
} MBMS_ServiceIdentity;
/* MBMS_SessionIdentity */
typedef u8 MBMS_SessionIdentity;
/* MBMS-TransmissionIdentity */
typedef struct MBMS_TransmissionIdentity {
MBMS_ServiceIdentity mbms_ServiceIdentity;
MBMS_SessionIdentity mbms_SessionIdentity;
} MBMS_TransmissionIdentity;
/* MBMS_RequiredUEAction_Mod */
/* values defined in rrc_mbms_constant.h */
typedef u16 MBMS_RequiredUEAction_Mod;
/* MBMS-ModifiedService-r6 */
typedef struct MBMS_ModifiedService {
MBMS_TransmissionIdentity mbms_TransmissionIdentity;
MBMS_RequiredUEAction_Mod mbms_RequiredUEAction;
mbms_bool continueMCCHReading;
} MBMS_ModifiedService;
/* MBMS_ModifiedServiceList */
typedef struct MBMS_ModifiedServiceList {
u16 numService; //0..maxMBMSservModif
MBMS_ModifiedService mbms_modifiedServices[maxMBMSservModif];
} MBMS_ModifiedServiceList;
/****/
// mbms_ReacquireMCCH; //ENUMERATED { true }
// mbms_AllUnmodifiedPTMServices //ENUMERATED { true }
// are defined directly in the PDU, same as done in ASN1
/* MBMS-NumberOfNeighbourCells */
// INTEGER (0..32)
typedef u16 MBMS_NumberOfNeighbourCells;
/* MBMS-PTMActivationTime */
// INTEGER (0..2047)
typedef u16 MBMS_PTMActivationTime;
/**************************************************************/
/* MBMSUnmodifiedServicesInformation */
/**************************************************************/
/* MBMS-TransmissionIdentity cf. MBMSModifiedServicesInformation*/
/* MBMS_RequiredUEAction_UMod */
/* values defined in rrc_mbms_constant.h */
typedef u16 MBMS_RequiredUEAction_UMod;
/* MBMS_UnmodifiedService */
typedef struct MBMS_UnmodifiedService {
MBMS_TransmissionIdentity mbms_TransmissionIdentity;
MBMS_RequiredUEAction_UMod mbms_RequiredUEAction;
} MBMS_UnmodifiedService;
/* MBMS_UnmodifiedServiceList */
typedef struct MBMS_UnmodifiedServiceList {
u16 numService; //0..maxMBMSservUnmodif
MBMS_UnmodifiedService unmodifiedServices[maxMBMSservUnmodif];
} MBMS_UnmodifiedServiceList;
/**************************************************************/
/* MBMSSchedulingInformation */
/**************************************************************/
/* MBMS-ServiceTransmInfo */
// Spec : Actual values (start, duration) = IE values * 4
typedef struct MBMS_ServiceTransmInfo {
u16 start; //0..1020 by step of 4
u16 duration; //4..1024
} MBMS_ServiceTransmInfo;
/* MBMS_ServiceTransmInfoList */
typedef struct MBMS_ServiceTransmInfoList {
u16 numInfo; //0..maxMBMSTransmis ( = 4)
MBMS_ServiceTransmInfo serviceTransmissionInfo[maxMBMSTransmis];
} MBMS_ServiceTransmInfoList;
/* MBMS_ServiceSchedulingInfo */
typedef struct MBMS_ServiceSchedulingInfo {
MBMS_TransmissionIdentity mbms_TransmissionIdentity;
MBMS_ServiceTransmInfoList mbms_TransmissionInfoList;
u16 nextSchedulingPeriod; //0..31
} MBMS_ServiceSchedulingInfo;
typedef struct MBMS_ServiceSchedulingInfoList {
u16 numInfo; //0..maxMBMSservSched ( = 16)
MBMS_ServiceSchedulingInfo schedulingInfo[maxMBMSservSched];
} MBMS_ServiceSchedulingInfoList;
#endif
This diff is collapsed.
/***************************************************************************
rrc_mbms_pdus.h - description
-------------------
begin : May 9, 2005
copyright : (C) 2001, 2010 by Eurecom
created by : Michelle.Wetterwald@eurecom.fr, Huu-Nghia.Nguyen@eurecom.fr
modified by : This file contains definitions of PDUs concerned with MBMS
**************************************************************************/
#ifndef _RRC_MBMS_PDUS_H_
#define _RRC_MBMS_PDUS_H_
#include "rrc_mbms_ies.h"
/**************************************************************/
/* MBMSAccessInformation */
/**************************************************************/
typedef struct MBMSAccessInformation {
MBMS_ServiceAccessInfoList mbms_ServiceAccessInfoList;
} MBMSAccessInformation;
/**************************************************************/
/* MBMSGeneralInformation */
/**************************************************************/
typedef struct MBMSGeneralInformation {
MBMS_TimersAndCounters mbms_TimersAndCounters;
// MBMS_MICHConfigurationInfo michConfigurationInfo;
MBMS_CellGroupIdentity cellGroupIdentity;
// MBMS_MSCHConfigurationInfo mschDefaultConfigurationInfo;
} MBMSGeneralInformation;
/**************************************************************/
/* MBMSCommonPTMRBInformation */
/**************************************************************/
typedef struct MBMSCommonPTMRBInformation {
MTCH_Configuration l12Configuration;
// The followings are specified in TS 25.331
// MBMS_CommonRBInformationList mbms_CommonRBInformationList;
// MBMS_TranspChInfoForEachTrCh mbms_TranspChInfoForEachTrCh;
// MBMS_TranspChInfoForEachCCTrCh mbms_TranspChInfoForEachCCTrCh;
// MBMS_PhyChInformationList mbms_PhyChInformationList;
} MBMSCommonPTMRBInformation;
/**************************************************************/
/* MBMSCurrentCellPTMRBInformation */
/**************************************************************/
typedef struct MBMSCurrentCellPTMRBInformation {
MTCH_Configuration l12Configuration;
// MBMS_CurrentCell_SCCPCHList mbms_CurrentCell_SCCPCHList;
// MBMS_SIBType5_SCCPCHList mbms_SIBType5_SCCPCHList;
} MBMSCurrentCellPTMRBInformation;
/**************************************************************/
/* MBMSNeighbouringCellPTMRBInformation */
/**************************************************************/
typedef struct MBMSNeighbouringCellPTMRBInformation {
/** in the range 1..X where X is undefined */
NeighbourCellIdentity neighbouringCellIdentity;
NeighbouringCellConfiguration neighbouringCellConfig;
} MBMSNeighbouringCellPTMRBInformation;
/**************************************************************/
/* MBMSModifiedServicesInformation */
/**************************************************************/
typedef struct MBMSModifiedServicesInformation {
MBMS_ModifiedServiceList modifiedServiceList;
mbms_bool mbms_ReacquireMCCH;
// DynamicPersistenceLevel mbms_DynamicPersistenceLevel;
// u16 endOfModifiedMCCHInformation; //[1..16]
MBMS_NumberOfNeighbourCells mbmsNumberOfNeighbourCells;
// mbms_bool mbms_AllUnmodifiedPTMServices;
MBMS_PTMActivationTime mbms_PTMActivationTime;
} MBMSModifiedServicesInformation;
/**************************************************************/
/* MBMSUnmodifiedServicesInformation */
/**************************************************************/
typedef struct MBMSUnmodifiedServicesInformation {
MBMS_UnmodifiedServiceList unmodifiedServiceList;
} MBMSUnmodifiedServicesInformation;
/**************************************************************/
/* MBMSSchedulingInformation */
/**************************************************************/
typedef struct MBMSSchedulingInformation {
MBMS_ServiceSchedulingInfoList serviceSchedulingInfoList;
// u8 nextSchedulingPeriod;
} MBMSSchedulingInformation;
#endif
/***************************************************************************
rrc_messages.h - description
-------------------
begin : Jan 11, 2002
copyright : (C) 2001, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Define external interface primitive messages
***************************************************************************/
#ifndef __RRC_MESSAGES_H__
#define __RRC_MESSAGES_H__
#include "rrc_constant.h"
#include "rrc_nas_primitives.h"
/*****
* RRC interface
*****/
// Internal definitions, to work with the Esterel UE FSM
#define NAS_CONN_REQ 1
#define RRC_CONNECT_SETUP 3
#define RRC_CONNECT_REJECT 5
#define UE_RB_SETUP 7
#define UE_RB_RELEASE 9
#define CELLU_CNF 11
#define T300_TO 15
#define WAIT_TO 17
#define RRC_RLC_SUCCESS 19
#define RRC_RLC_FAILURE 21
#define NAS_REL_REQ 23
#define UE_CRLC_STATUS 25
#define UE_PHY_SETUP 27
#define UE_PHY_FAIL 29
#define UE_CONN_LOSS 31
#define UE_CAP_INFO_CNF 33
// Internal definitions, to work with the Esterel RG FSM
#define RRC_CONNECT_REQ 2
#define RRC_CONNECT_LOSS 4
#define RRC_CONN_SETUP_COMP 6
#define RRC_CONNECT_RELUL 8
#define UE_RB_SU_CMP 10
#define UE_RB_SU_FAIL 12
#define UE_RB_REL_CMP 14
#define UE_RB_REL_FAIL 16
#define UE_CELLU 18
#define RG_RLC_SUCCESS 20
#define RG_RLC_FAILURE 22
#define NAS_CONN_CNF 24
#define NAS_RB_ESTAB 26
#define NAS_RB_RELEASE 28
#define RG_CRLC_STATUS 30
#define RRM_CFG 32
#define RG_PHY_SETUP 34
#define RG_PHY_FAIL 36
#define UE_PHY_OUTSYNCH 38
#define UE_PHY_SYNCH 40
#define UE_CAP_INFO 42
#define RRM_FAILURE 44
/*****
* NAS interface
*****/
#define NAS_SIB1 1
#define NAS_SIB18 18
#ifdef NODE_MT
struct nas_ue_if_element {
u16 prim_length;
int xmit_fifo;
mem_block_t *next; // to chain before Xmit
union {
struct nas_ue_gc_element gc_sap_prim;
struct nas_ue_dc_element dc_sap_prim;
struct nas_ue_nt_element nt_sap_prim;
} nasUePrimitive;
u8 nasData[NAS_DATA_MAX_LENGTH];
};
#endif
#ifdef NODE_RG
struct nas_rg_if_element {
u16 prim_length;
int xmit_fifo;
mem_block_t *next; // to chain before Xmit
union {
struct nas_rg_gc_element gc_sap_prim;
struct nas_rg_dc_element dc_sap_prim;
struct nas_rg_nt_element nt_sap_prim;
} nasRgPrimitive;
u8 nasData[NAS_DATA_MAX_LENGTH];
};
#endif
#endif
/***************************************************************************
rrc_msg_class.h - description
-------------------
begin : Jan 6, 2003
copyright : (C) 2003, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Define structures for RRC peer-to-peer messages
***************************************************************************/
#ifndef __RRC_MSG_CLASS_H__
#define __RRC_MSG_CLASS_H__
#include "rrc_msg_pdus.h"
#include "rrc_mbms_pdus.h"
/**************************************************************/
/* DL_DCCH_MessageType */
/**************************************************************/
typedef struct DL_DCCH_MessageType {
unsigned char type;
union {
/* type = 4 */
// CellUpdateConfirm *cellUpdateConfirm;
/* type = 6 */
DownlinkDirectTransfer *downlinkDirectTransfer;
/* type = 9 */
MeasurementControl *measurementControl;
/* type = 10 */
PagingType2 *pagingType2;
/* type = 14 */
RadioBearerRelease *radioBearerRelease;
/* type = 15 */
RadioBearerSetup *radioBearerSetup;
/* type = 16 */
// RRCConnectionRelease *rrcConnectionRelease;
/* type = 22 */
UECapabilityInformationConfirm *ueCapabilityInformationConfirm;
/* type = 23 */
//ULPCHControl *ulPchControl;
/* type = 27 */
MBMSModifiedServicesInformation *mbmsModifiedServicesInformation;
} content;
} DL_DCCH_MessageType;
/**************************************************************/
/* DL DCCH Message */
/**************************************************************/
typedef struct DL_DCCH_Message {
IntegrityCheckInfo integrityCheckInfo;
DL_DCCH_MessageType message;
} DL_DCCH_Message;
/**************************************************************/
/* UL_DCCH_MessageType */
/**************************************************************/
typedef struct UL_DCCH_MessageType {
unsigned char type;
union {
/* type = 6 */
InitialDirectTransfer *initialDirectTransfer;
/* type = 9 */
MeasurementReport *measurementReport;
/* type = 14 */
RadioBearerReleaseComplete *radioBearerReleaseComplete;
/* type = 15 */
RadioBearerReleaseFailure *radioBearerReleaseFailure;
/* type = 16 */
RadioBearerSetupComplete *radioBearerSetupComplete;
/* type = 17 */
RadioBearerSetupFailure *radioBearerSetupFailure;
/* type = 18 */
// RRCConnectionReleaseComplete *rrcConnectionReleaseComplete;
/* type = 19 */
RRCConnectionSetupComplete *rrcConnectionSetupComplete;
/*type = 27 */
UECapabilityInformation *ueCapabilityInformation;
/* type = 28 */
UplinkDirectTransfer *uplinkDirectTransfer;
/* type = 31 */
RRCConnectionRelease_UL *rrcConnectionRelease_UL;
} content;
} UL_DCCH_MessageType;
/**************************************************************/
/* UL DCCH Message */
/**************************************************************/
typedef struct UL_DCCH_Message {
IntegrityCheckInfo integrityCheckInfo;
UL_DCCH_MessageType message;
} UL_DCCH_Message;
/**************************************************************/
/* DL_CCCH_MessageType */
/**************************************************************/
typedef struct DL_CCCH_MessageType {
unsigned char type;
union {
/* type = 1 */
CellUpdateConfirm_CCCH *cellUpdateConfirm;
/* type = 2 */
RRCConnectionReject *rrcConnectionReject;
/* type = 3 */
// RRCConnectionRelease_CCCH *rrcConnectionRelease;
/* type = 4 */
RRCConnectionSetup *rrcConnectionSetup;
} content;
} DL_CCCH_MessageType;
/**************************************************************/
/* DL CCCH Message */
/**************************************************************/
typedef struct DL_CCCH_Message {
IntegrityCheckInfo integrityCheckInfo;
DL_CCCH_MessageType message;
} DL_CCCH_Message;
/**************************************************************/
/* UL CCCH MessageType */
/**************************************************************/
typedef struct UL_CCCH_MessageType {
unsigned char type;
union {
/* type = 1 */
CellUpdate cellUpdate;
/* type = 2 */
RRCConnectionRequest rrcConnectionRequest;
} content;
} UL_CCCH_MessageType;
/**************************************************************/
/* UL CCCH Message */
/**************************************************************/
typedef struct UL_CCCH_Message {
IntegrityCheckInfo integrityCheckInfo;
UL_CCCH_MessageType message;
} UL_CCCH_Message;
/**************************************************************/
/* DL MCCH MessageType */
/**************************************************************/
typedef struct MCCH_MessageType {
unsigned char type;
union {
/* type = 1 */
MBMSAccessInformation *mbmsAccessInformation;
/* type = 2 */
MBMSCommonPTMRBInformation *mbmsCommonPTMRBInformation;
/* type = 3 */
MBMSCurrentCellPTMRBInformation *mbmsCurrentCellPTMRBInformation;
/* type = 4 */
MBMSGeneralInformation *mbmsGeneralInformation;
/* type = 5 */
MBMSModifiedServicesInformation *mbmsModifiedServicesInformation;
/* type = 6 */
MBMSNeighbouringCellPTMRBInformation *mbmsNeighbouringCellPTMRBInformation;
/* type = 7 */
MBMSUnmodifiedServicesInformation *mbmsUnmodifiedServicesInformation;
} content;
} MCCH_MessageType;
/**************************************************************/
/* DL MCCH Message */
/**************************************************************/
typedef struct MCCH_Message {
MCCH_MessageType message;
} MCCH_Message;
/**************************************************************/
/* DL MSCH MessageType */
/**************************************************************/
typedef struct MSCH_MessageType {
unsigned char type; //reserved for the future extension
union {
/* type = 1 */
MBMSSchedulingInformation *mbmsSchedulingInformation;
} content;
} MSCH_MessageType;
/**************************************************************/
/* DL MSCH Message */
/**************************************************************/
typedef struct MSCH_Message {
IntegrityCheckInfo integrityCheckInfo;
MSCH_MessageType message;
} MSCH_Message;
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment