Commit e179ab0e authored by gauthier's avatar gauthier

Old rev code


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7378 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e07edc17
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
/***************************************************************************
rrc_bch_ies.c - description
-------------------
copyright : (C) 2002, 2010 by Eurecom
email : Michelle.Wetterwald@eurecom.fr
**************************************************************************
Procedures to perform encoding/decoding of information elements used for broadcast
***************************************************************************/
/********************
//OpenAir definitions
********************/
#include "LAYER2/MAC/extern.h"
#include "UTIL/MEM/mem_block.h"
/********************
// RRC definitions
********************/
#ifdef NODE_MT
#include "rrc_ue_vars.h"
#endif
#ifdef NODE_RG
#include "rrc_rg_vars.h"
#endif
#include "rrc_bch_mib.h"
//#include "rrc_rg_bch_variables.h"
//-----------------------------------------------------------------------------
#include "rrc_proto_bch.h"
/**************************************************************/
/* MIB_ValueTag */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_MIB_ValueTag (PERParms * pParms, MIB_ValueTag value)
{
int status = P_SUCCESS;
status = rrc_PEREnc_ConstrInteger (pParms, value, 0, 7);
#ifdef DEBUG_RRC_BROADCAST_DETAILS
//msg("[RRC_PER]encode MIB_ValueTag status %d \n",status);
#endif
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_MIB_ValueTag (PERParms * pParms, MIB_ValueTag * pvalue)
{
int status = P_SUCCESS;
status = rrc_PERDec_ConstrInteger (pParms, pvalue, 0, 7);
#ifdef DEBUG_RRC_BROADCAST_DETAILS
//msg("[RRC_PER]decode MIB_ValueTag status %d \n",status);
#endif
return status;
}
#endif
/**************************************************************/
/* SIB_Type */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_SIB_Type (PERParms * pParms, SIB_Type value)
{
int status = P_SUCCESS;
status = rrc_PEREnc_ConsUnsigned (pParms, (unsigned int) value, 0, 31);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_SIB_Type (PERParms * pParms, SIB_Type * pvalue)
{
int status = P_SUCCESS;
status = rrc_PERDec_ConsUnsigned (pParms, (unsigned int *) pvalue, 0, 31);
return status;
}
#endif
/**************************************************************/
/* SegCount */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_SegCount (PERParms * pParms, SegCount value)
{
int status = P_SUCCESS;
status = rrc_PEREnc_ConstrInteger (pParms, value, 1, 16);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_SegCount (PERParms * pParms, SegCount * pvalue)
{
int status = P_SUCCESS;
status = rrc_PERDec_ConstrInteger (pParms, pvalue, 1, 16);
return status;
}
#endif
/**************************************************************/
/* SegmentIndex */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_SegmentIndex (PERParms * pParms, SegmentIndex value)
{
int status = P_SUCCESS;
status = rrc_PEREnc_ConstrInteger (pParms, value, 1, 15);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_SegmentIndex (PERParms * pParms, SegmentIndex * pvalue)
{
int status = P_SUCCESS;
status = rrc_PERDec_ConstrInteger (pParms, pvalue, 1, 15);
return status;
}
#endif
/**************************************************************/
/* SIB_Data_fixed */
/**************************************************************/
// size constraint lower= 222 upper= 222
#ifdef NODE_RG
int rrc_PEREnc_SIB_Data_fixed (PERParms * pParms, SIB_Data_fixed value)
{
int status = P_SUCCESS;
// 1st step, encode with octets
int length;
length = (pParms->data_size - pParms->data_offset >= LSIBfixed) ? LSIBfixed : pParms->data_size - pParms->data_offset;
status = rrc_PEREnc_OctetString (pParms, length, (char *) pParms->data);
//status = rrc_PEREnc_BitString (pParms, value.numbits, value.data);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_SIB_Data_fixed (PERParms * pParms, SIB_Data_fixed * pvalue)
{
int status = P_SUCCESS;
// status = rrc_PERDec_BitString (pParms,
// &pvalue->numbits,
// pvalue->data,
// sizeof(pvalue->data));
return status;
}
#endif
/**************************************************************/
/* CompleteSIB_sib_Data_fixed */
/**************************************************************/
// size constraint lower= 226 upper= 226 -- 24*8=224
#ifdef NODE_RG
int rrc_PEREnc_CompleteSIB_sib_Data_fixed (PERParms * pParms, CompleteSIB_sib_Data_fixed value)
{
// size constraint lower= 226 upper= 226 -- 24*8=224
int status = P_SUCCESS;
int max = LSIBcompl; //cf structure definition
int length;
//
status = rrc_PEREnc_BitString (pParms, value.numbits, value.data);
if (status != P_SUCCESS)
return status;
// add padding bits - 1st step = maxsize - length of segment.
length = max - rrc_get_per_length (pParms->data);
status = rrc_PEREnc_padding (pParms, length);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_CompleteSIB_sib_Data_fixed (PERParms * pParms, CompleteSIB_sib_Data_fixed * pvalue)
{
int status = P_SUCCESS;
// status = rrc_PERDec_BitString (pParms, &pvalue->numbits, pvalue->data, sizeof(pvalue->data));
return status;
}
#endif
/**************************************************************/
/* SFN_Prime */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_SFN_Prime (PERParms * pParms, SFN_Prime value)
{
int status = P_SUCCESS;
status = rrc_PEREnc_ConstrInteger (pParms, value, 0, 2047);
//if (status != P_SUCCESS) return status;
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_SFN_Prime (PERParms * pParms, SFN_Prime * pvalue)
{
int status = P_SUCCESS;
status = rrc_PERDec_ConstrInteger (pParms, pvalue, 0, 2047);
return status;
}
#endif
/**************************************************************/
/* MCC */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_MCC (PERParms * pParms, RCELL_MCC * pvalue)
{
//size constraints = 3, 3
int status = P_SUCCESS;
int i;
/* encode length determinant */
status = rrc_PEREnc_Length (pParms, pvalue->numDigits);
if (status < 0)
return status;
/* encode elements */
for (i = 0; i < pvalue->numDigits; i++) {
status = rrc_PEREnc_Digit (pParms, pvalue->elem[i]);
if (status != P_SUCCESS)
return status;
}
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_MCC (PERParms * pParms, RCELL_MCC * pvalue)
{
//size constraints = 3, 3
int status = P_SUCCESS;
int i;
/* decode length determinant */
status = rrc_PERDec_Length (pParms, &pvalue->numDigits);
if (status != P_SUCCESS)
return status;
/* decode elements */
for (i = 0; i < pvalue->numDigits; i++) {
status = rrc_PERDec_Digit (pParms, &pvalue->elem[i]);
if (status != P_SUCCESS)
return status;
}
return status;
}
#endif
/**************************************************************/
/* MNC */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_MNC (PERParms * pParms, MNC * pvalue)
{
int status = P_SUCCESS;
status = rrc_PEREnc_ConsUnsigned (pParms, *pvalue, 1, 65000);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_MNC (PERParms * pParms, MNC * pvalue)
{
int status = P_SUCCESS;
status = rrc_PERDec_ConsUnsigned (pParms, pvalue, 1, 65000);
return status;
}
#endif
/**************************************************************/
/* PLMN_Identity */
/**************************************************************/
#ifdef NODE_RG
int rrc_PEREnc_PLMN_Identity (PERParms * pParms, RCELL_PLMN_Identity * pvalue)
{
int status = P_SUCCESS;
/* encode mcc */
status = rrc_PEREnc_MCC (pParms, &pvalue->mcc);
if (status != P_SUCCESS)
return status;
/* encode mnc */
status = rrc_PEREnc_MNC (pParms, &pvalue->mnc);
return status;
}
#endif
//-----------------------------------------------------------------------------
#ifdef NODE_MT
int rrc_PERDec_PLMN_Identity (PERParms * pParms, RCELL_PLMN_Identity * pvalue)
{
int status = P_SUCCESS;