add license to autotest framework + delete files not used in project
This commit is contained in:
@@ -1,4 +1,26 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then
|
||||
source $OPENAIR_DIR/cmake_targets/tools/build_helper
|
||||
|
||||
@@ -1,4 +1,26 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import time
|
||||
import serial
|
||||
|
||||
@@ -1,4 +1,26 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
#Simple script to retry git clone in case of failure
|
||||
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
|
||||
#arg0 -> Name of executable
|
||||
#args[1...N] -> arguments to be passed to executable
|
||||
|
||||
@@ -1,4 +1,26 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly"
|
||||
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
PLATFORM = linux-x86-32
|
||||
NUM_PROC = $(shell echo `cat /proc/cpuinfo | grep processor | wc -l`)
|
||||
NUM_PROC = 1
|
||||
|
||||
LIBS = -L/usr/local/lib -Llib -lSockets -lasn1rrc -lpthread -lssl -lcrypto -lssl -lxml2
|
||||
|
||||
#------------------------------------------------
|
||||
# DIRS
|
||||
#------------------------------------------------
|
||||
UPDIR := $(shell /bin/pwd)
|
||||
BIN_DIR = bin
|
||||
SRC_DIR = $(UPDIR)/src
|
||||
COM_DIR = $(SRC_DIR)/com
|
||||
FOREIGN_DIR = $(SRC_DIR)/foreign
|
||||
SOCKETS_DIR = $(FOREIGN_DIR)/sockets-2.3.9.4
|
||||
TCPIP_DIR = $(FOREIGN_DIR)/tcpip
|
||||
SQL_DIR = $(FOREIGN_DIR)/sql
|
||||
ASN1_RRC_SPEC_DIR = $(FOREIGN_DIR)/generated_c_asn1_rrc/ASN1_files
|
||||
RRC_RRM_ASN1_DIR = $(COM_DIR)/asn1
|
||||
RADIO_RESOURCES_DIR = $(SRC_DIR)/radio_resources
|
||||
RRC_DIR = ../RRC/LITE
|
||||
TEST_DIR = $(SRC_DIR)/test
|
||||
|
||||
|
||||
#------------------------------------------------
|
||||
# INCLUDES
|
||||
#------------------------------------------------
|
||||
include Makefile.objs
|
||||
include Makefile.Defines.$(PLATFORM)
|
||||
INCLUDE = -I$(SRC_DIR) -I$(SOCKETS_DIR) -I$(SQL_DIR) -I$(COM_DIR) -I$(COM_DIR)/rrc -I$(COM_DIR)/rrm \
|
||||
-I$(TCPIP_DIR) -I$(RADIO_RESOURCES_DIR) -I$(RRC_RRM_ASN1_DIR) -I$(TEST_DIR)
|
||||
|
||||
|
||||
#------------------------------------------------
|
||||
# CFLAGS
|
||||
#------------------------------------------------
|
||||
|
||||
CPPFLAGS = $(CFLAGS)
|
||||
#CPPFLAGS += -fpermissive -std=gnu++98
|
||||
|
||||
#------------------------------------------------
|
||||
# LIBS
|
||||
#------------------------------------------------
|
||||
libasn1rrc: libasn1rrc.a
|
||||
mv libasn1rrc.a lib
|
||||
|
||||
libsqlite: libsqlite.a
|
||||
mv libsqlite.a lib
|
||||
|
||||
|
||||
libSockets: libSockets.a
|
||||
mv libSockets.a lib
|
||||
|
||||
|
||||
libasn1rrc.a: $(ASN1RRC_OBJS)
|
||||
ar cru $@ $^
|
||||
ranlib $@
|
||||
|
||||
libSockets.a: $(SOCKETS_OBJS)
|
||||
ar cru $@ $^
|
||||
ranlib $@
|
||||
|
||||
libsqlite.a: $(SQLITE_OBJS)
|
||||
ar cru $@ $^
|
||||
ranlib $@
|
||||
|
||||
LDFLAGS += -rdynamic
|
||||
|
||||
#------------------------------------------------
|
||||
# PROGS
|
||||
#------------------------------------------------
|
||||
PROGS = rrm_exe test_exe
|
||||
|
||||
gen-c-from-asn1:
|
||||
#-fbless-SIZE
|
||||
# Allow SIZE() constraint for INTEGER, ENUMERATED, and other types
|
||||
# for which this constraint is normally prohibited by the stan-
|
||||
# dard. This is a violation of ASN.1 standard, and the compiler
|
||||
# may fail to produce a meaningful code.
|
||||
|
||||
#-fcompound-names
|
||||
# Using this option prevents name collisions in the target source
|
||||
# code by using complex names for target language structures.
|
||||
# (Name collisions may occur if the ASN.1 module reuses the same
|
||||
# identifiers in multiple contexts).
|
||||
|
||||
#-findirect-choice
|
||||
# When generating code for a CHOICE type, compile the CHOICE mem-
|
||||
# bers as indirect pointers instead of declaring them inline. Con-
|
||||
# sider using this option together with -fno-include-deps to pre-
|
||||
# vent circular references.
|
||||
|
||||
#-fknown-extern-type=<name>
|
||||
# Pretend the specified type is known. The compiler will assume
|
||||
# the target language source files for the given type have been
|
||||
# provided manually.
|
||||
|
||||
#-fno-constraints
|
||||
# Do not generate ASN.1 subtype constraint checking code. This may
|
||||
# make a shorter executable.
|
||||
|
||||
#-fno-include-deps
|
||||
# Do not generate courtesy #include lines for non-critical type
|
||||
# dependencies. Helps prevent namespace collisions.
|
||||
|
||||
#-funnamed-unions
|
||||
# Enable unnamed unions in the definitions of target language's
|
||||
# structures.
|
||||
#cd $(RRC_RRM_ASN1_DIR);asn1c -gen-PER -fcompound-names -fnative-types -fskeletons-copy $(ASN1_RRC_SPEC_DIR)/EUTRA-RRC-Definitions.asn $(RRC_RRM_ASN1_DIR)/rrc-rrm.asn; cd -
|
||||
cd $(RRC_RRM_ASN1_DIR);asn1c -gen-PER -fno-include-deps -fcompound-names -fnative-types -fskeletons-copy $(ASN1_RRC_SPEC_DIR)/EUTRA-RRC-Definitions.asn $(RRC_RRM_ASN1_DIR)/rrc-rrm.asn; cd -
|
||||
|
||||
|
||||
libs:
|
||||
make -j$(NUM_PROC) libasn1rrc libsqlite libSockets
|
||||
|
||||
|
||||
all: libs
|
||||
make -j$(NUM_PROC) $(PROGS)
|
||||
|
||||
|
||||
rrm: $(RRM_OBJS) lib/libSockets.a lib/libasn1rrc.a
|
||||
g++ -o $@ $^ $(LIBS)
|
||||
mv rrm $(BIN_DIR)
|
||||
|
||||
rrm_exe: clean_test_objs
|
||||
make -j$(NUM_PROC) rrm
|
||||
|
||||
|
||||
|
||||
clean_test_objs:
|
||||
find $(COM_DIR)/rrc/ -name '*Response.o' -delete -print;
|
||||
find $(COM_DIR)/rrc/ -name '*Reconfiguration.o' -delete -print;
|
||||
|
||||
dummy_rrc: CFLAGS += -DTEST_SCENARIO=1
|
||||
|
||||
dummy_rrc: $(TEST_OBJS) lib/libSockets.a lib/libasn1rrc.a
|
||||
g++ -o $@ $^ $(LIBS)
|
||||
mv dummy_rrc $(BIN_DIR)
|
||||
|
||||
test_exe: clean_test_objs
|
||||
make -j$(NUM_PROC) dummy_rrc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
find -name '*.o' -delete -print; \
|
||||
find -name '*.bak' -delete -print; \
|
||||
find -name '*.d' -delete -print; \
|
||||
find -name '*~' -delete -print; \
|
||||
rm -f bin/*; \
|
||||
rm -f lib/*
|
||||
|
||||
cleanrrm:
|
||||
find src/com/rrc -name '*.o' -delete -print; \
|
||||
find src/com/rrm -name '*.o' -delete -print; \
|
||||
find src/com -name 'Message.o' -delete -print; \
|
||||
find src/radio_resources -name '*.o' -delete -print; \
|
||||
find src/com -name '*.bak' -delete -print; \
|
||||
find src/radio_resources -name '*.bak' -delete -print; \
|
||||
find src/com -name '*.d' -delete -print; \
|
||||
find src/radio_resources -name '*.d' -delete -print; \
|
||||
find src/com -name '*~' -delete -print; \
|
||||
find src/radio_resources -name '*~' -delete -print; \
|
||||
rm -f bin/*; \
|
||||
|
||||
-include *.d
|
||||
@@ -1,25 +0,0 @@
|
||||
CXX = g++-4.3
|
||||
|
||||
CFLAGS += -Wall -g $(INCLUDE) -MD -D_VERSION='"$(VERSION)"'
|
||||
|
||||
# turn off optimization if compiling with gcc 2.9.x:
|
||||
#CFLAGS += -O0
|
||||
#CFLAGS += -O2
|
||||
|
||||
|
||||
CFLAGS += -DLINUX
|
||||
|
||||
#LG TEST REMOVECFLAGS += -fPIC
|
||||
|
||||
LIBS += \
|
||||
-lssl -lcrypto \
|
||||
-lpthread
|
||||
|
||||
LDFLAGSSO = -shared \
|
||||
-Wl,-lssl \
|
||||
-Wl,-lcrypto \
|
||||
-Wl,-lxml2 \
|
||||
-Wl,-lpthread \
|
||||
-Wl,-h$(SONAME) \
|
||||
-Wl,-call_shared
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
CXX = g++
|
||||
|
||||
CFLAGS += -Wall -g $(INCLUDE) -MD -D_VERSION='"$(VERSION)"'
|
||||
|
||||
# turn off optimization if compiling with gcc 2.9.x:
|
||||
#CFLAGS += -O0
|
||||
CFLAGS += -O2
|
||||
|
||||
|
||||
CFLAGS += -DLINUX -m64
|
||||
|
||||
CFLAGS += -fPIC
|
||||
|
||||
LIBS += \
|
||||
-lssl -lcrypto \
|
||||
-lpthread
|
||||
|
||||
OBJS += Semaphore.o
|
||||
|
||||
LDFLAGSSO = -shared \
|
||||
-Wl,-lssl \
|
||||
-Wl,-lcrypto \
|
||||
-Wl,-lxml2 \
|
||||
-Wl,-lpthread \
|
||||
-Wl,-h$(SONAME) \
|
||||
-Wl,-call_shared
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
SUBDIRS = src
|
||||
|
||||
EXTRA_DIST = README ChangeLog AUTHORS COPYING INSTALL NEWS
|
||||
|
||||
|
||||
|
||||
rrm$(EXEEXT):
|
||||
$(MAKE) -C src $@
|
||||
@@ -1,9 +0,0 @@
|
||||
default: all
|
||||
|
||||
all:
|
||||
autoreconf -i
|
||||
|
||||
clean:
|
||||
rm -r aclocal.m4 autom4te.cache/ config.* configure depcomp install-sh missing src/config.h.in ltmain.sh INSTALL ; \
|
||||
find . -name Makefile.in -exec rm '{}' ';'
|
||||
|
||||
@@ -1,547 +0,0 @@
|
||||
ASN1RRC_OBJS= $(RRC_RRM_ASN1_DIR)/AC-BarringConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/AccessStratumRelease.o \
|
||||
$(RRC_RRM_ASN1_DIR)/AdditionalSpectrumEmission.o \
|
||||
$(RRC_RRM_ASN1_DIR)/AllowedMeasBandwidth.o \
|
||||
$(RRC_RRM_ASN1_DIR)/AntennaInfoCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/AntennaInfoDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ARFCN-ValueCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ARFCN-ValueEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ARFCN-ValueGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ARFCN-ValueUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/asn_codecs_prim.o \
|
||||
$(RRC_RRM_ASN1_DIR)/asn_SEQUENCE_OF.o \
|
||||
$(RRC_RRM_ASN1_DIR)/asn_SET_OF.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandclassCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandClassInfoCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandClassListCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandClassPriority1XRTT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandClassPriorityHRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandClassPriorityList1XRTT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandClassPriorityListHRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandIndicatorGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandInfoEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BandListEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BCCH-BCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BCCH-BCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BCCH-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BCCH-DL-SCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BCCH-DL-SCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ber_decoder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ber_tlv_length.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ber_tlv_tag.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BIT_STRING.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BlackCellsToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BlackCellsToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/BOOLEAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierBandwidthEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqListUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqListUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqsGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqsInfoGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqsInfoListGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CarrierFreqUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CDMA2000-Type.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellChangeOrder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellGlobalIdCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellGlobalIdEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellGlobalIdGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellGlobalIdUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellIdentity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellIndexList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellIndex.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellReselectionParametersCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellReselectionPriority.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModListCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModListUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModListUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CellsToAddModUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/constraints.o \
|
||||
$(RRC_RRM_ASN1_DIR)/constr_CHOICE.o \
|
||||
$(RRC_RRM_ASN1_DIR)/constr_SEQUENCE.o \
|
||||
$(RRC_RRM_ASN1_DIR)/constr_SEQUENCE_OF.o \
|
||||
$(RRC_RRM_ASN1_DIR)/constr_SET_OF.o \
|
||||
$(RRC_RRM_ASN1_DIR)/constr_TYPE.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CounterCheck.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CounterCheck-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CounterCheckResponse.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CounterCheckResponse-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CQI-ReportConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CQI-ReportPeriodic.o \
|
||||
$(RRC_RRM_ASN1_DIR)/C-RNTI.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CSFBParametersRequestCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CSFBParametersRequestCDMA2000-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CSFBParametersResponseCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CSFBParametersResponseCDMA2000-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/CSFB-RegistrationParam1XRTT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DedicatedInfoCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DedicatedInfoNAS.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DeltaFList-PUCCH.o \
|
||||
$(RRC_RRM_ASN1_DIR)/der_encoder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DL-AM-RLC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DL-CCCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DL-CCCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DL-DCCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DL-DCCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DLInformationTransfer.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DLInformationTransfer-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DL-UM-RLC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-CountInfoList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-CountInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-CountMSB-InfoList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-CountMSB-Info.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-Identity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-ToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-ToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRB-ToReleaseList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/DRX-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/EstablishmentCause.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ExplicitListOfARFCNs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FilterCoefficient.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqPriorityEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqPriorityListEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqPriorityListUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqPriorityListUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqPriorityUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqPriorityUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqsPriorityGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/FreqsPriorityListGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/HandoverFromEUTRAPreparationRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/HandoverFromEUTRAPreparationRequest-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/Handover.o \
|
||||
$(RRC_RRM_ASN1_DIR)/Hysteresis.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IdleModeMobilityControlInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IMSI-Digit.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IMSI.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InitialUE-Identity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/INTEGER.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqBandInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqBandList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqBlackCellList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqCarrierFreqInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqCarrierFreqList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqNeighCellInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterFreqNeighCellList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterRAT-BandInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/InterRAT-BandList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IntraFreqBlackCellList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IntraFreqNeighCellInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IntraFreqNeighCellList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersCDMA2000-1XRTT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersCDMA2000-HRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersUTRA-TDD128.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersUTRA-TDD384.o \
|
||||
$(RRC_RRM_ASN1_DIR)/IRAT-ParametersUTRA-TDD768.o \
|
||||
$(RRC_RRM_ASN1_DIR)/LogicalChannelConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MAC-MainConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MasterInformationBlock.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MBSFN-SubframeConfigList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MBSFN-SubframeConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MCC-MNC-Digit.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MCC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasGapConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasId.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasIdToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasIdToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasIdToRemoveList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectId.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectToRemoveList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasObjectUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasParameters.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultListCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultListEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultListGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultListUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultsCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResults.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasResultUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasurementReport.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MeasurementReport-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MMEC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MNC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MobilityControlInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MobilityFromEUTRACommand.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MobilityFromEUTRACommand-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MobilityParametersCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/MobilityStateParameters.o \
|
||||
$(RRC_RRM_ASN1_DIR)/N1-PUCCH-AN-PersistentList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NativeEnumerated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NativeInteger.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NeighCellCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NeighCellConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NeighCellListCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NeighCellsPerBandclassCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NeighCellsPerBandclassListCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NextHopChainingCount.o \
|
||||
$(RRC_RRM_ASN1_DIR)/NULL.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OCTET_STRING.o \
|
||||
$(RRC_RRM_ASN1_DIR)/Paging.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PagingRecordList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PagingRecord.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PagingUE-Identity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PCCH-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PCCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PCCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PDCP-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PDCP-Parameters.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PDSCH-ConfigCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PDSCH-ConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/per_decoder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/per_encoder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/per_opentype.o \
|
||||
$(RRC_RRM_ASN1_DIR)/per_support.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PHICH-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhyLayerParameters.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellIdCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellIdGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellIdListCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellId.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellIdRange.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellIdUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysCellIdUTRA-TDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PhysicalConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PLMN-IdentityInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PLMN-IdentityList2.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PLMN-IdentityList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PLMN-Identity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/P-Max.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PollByte.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PollPDU.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PRACH-ConfigInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PRACH-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PRACH-ConfigSIB.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PreRegistrationInfoHRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PreRegistrationZoneIdHRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PresenceAntennaPort1.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PUCCH-ConfigCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PUCCH-ConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PUSCH-ConfigCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/PUSCH-ConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/Q-OffsetRangeInterRAT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/Q-OffsetRange.o \
|
||||
$(RRC_RRM_ASN1_DIR)/Q-RxLevMin.o \
|
||||
$(RRC_RRM_ASN1_DIR)/QuantityConfigCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/QuantityConfigEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/QuantityConfigGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/QuantityConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/QuantityConfigUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RACH-ConfigCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RACH-ConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RadioResourceConfigCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RadioResourceConfigCommonSIB.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RadioResourceConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RAND-CDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RAT-Type.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RedirectedCarrierInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReestablishmentCause.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReestabUE-Identity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RegisteredMME.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReleaseCause.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportConfigEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportConfigId.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportConfigInterRAT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportConfigToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportConfigToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportConfigToRemoveList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReportInterval.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ReselectionThreshold.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RF-Parameters.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RLC-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReconfigurationComplete.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReconfigurationComplete-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReconfiguration.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReconfiguration-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishmentComplete.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishmentComplete-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishment.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishment-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishmentReject.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishmentReject-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishmentRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReestablishmentRequest-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReject.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionReject-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionRelease.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionRelease-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionRequest-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionSetupComplete.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionSetupComplete-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionSetup.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionSetup-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRC-TransactionIdentifier.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RSRP-Range.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RSRQ-Range.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SchedulingInfoList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SchedulingInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SchedulingRequestConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecondaryPreRegistrationZoneIdListHRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityAlgorithmConfig.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityConfigHO.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityConfigSMC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityModeCommand.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityModeCommand-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityModeComplete.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityModeComplete-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityModeFailure.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SecurityModeFailure-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ShortMAC-I.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SIB-MappingInfo.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SIB-Type.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SI-OrPSI-GERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SN-FieldLength.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SoundingRS-UL-ConfigCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SoundingRS-UL-ConfigDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SpeedStateScaleFactors.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SPS-ConfigDL.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SPS-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SPS-ConfigUL.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SRB-ToAddModList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SRB-ToAddMod.o \
|
||||
$(RRC_RRM_ASN1_DIR)/S-TMSI.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandList1XRTT.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListHRPD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListUTRA-TDD128.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListUTRA-TDD384.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandListUTRA-TDD768.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandUTRA-FDD.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandUTRA-TDD128.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandUTRA-TDD384.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SupportedBandUTRA-TDD768.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInfoListGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType10.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType11.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType1.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType2.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType3.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType4.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType5.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType6.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType7.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType8.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformationBlockType9.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformation.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemInformation-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/SystemTimeInfoCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TDD-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ThresholdCDMA2000.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ThresholdEUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ThresholdGERAN.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ThresholdUTRA.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TimeAlignmentTimer.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TimeToTrigger.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TPC-Index.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TPC-PDCCH-Config.o \
|
||||
$(RRC_RRM_ASN1_DIR)/T-PollRetransmit.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TrackingAreaCode.o \
|
||||
$(RRC_RRM_ASN1_DIR)/T-Reordering.o \
|
||||
$(RRC_RRM_ASN1_DIR)/T-Reselection.o \
|
||||
$(RRC_RRM_ASN1_DIR)/T-StatusProhibit.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UECapabilityEnquiry.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UECapabilityEnquiry-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UECapabilityInformation.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UECapabilityInformation-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UE-CapabilityRAT-ContainerList.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UE-CapabilityRAT-Container.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UE-CapabilityRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UE-EUTRA-Capability.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UE-TimersAndConstants.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-AM-RLC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-CCCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-CCCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-CyclicPrefixLength.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-DCCH-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-DCCH-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ULHandoverPreparationTransfer.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ULHandoverPreparationTransfer-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ULInformationTransfer.o \
|
||||
$(RRC_RRM_ASN1_DIR)/ULInformationTransfer-r8-IEs.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-ReferenceSignalsPUSCH.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UL-UM-RLC.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UplinkPowerControlCommon.o \
|
||||
$(RRC_RRM_ASN1_DIR)/UplinkPowerControlDedicated.o \
|
||||
$(RRC_RRM_ASN1_DIR)/xer_decoder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/xer_encoder.o \
|
||||
$(RRC_RRM_ASN1_DIR)/xer_support.o \
|
||||
$(RRC_RRM_ASN1_DIR)/E-NodeB-Identity.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OpenAir-Application-TrafficClass.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OpenAir-Application-ms-PacketDelay.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OpenAir-ApplicationKBitRate.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OpenAir-C-RNTI.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OpenAir-RRM-Response-Status.o \
|
||||
$(RRC_RRM_ASN1_DIR)/OpenAir-RRM-Response-Reason.o \
|
||||
$(RRC_RRM_ASN1_DIR)/TransactionId.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCAddDataRadioBearerConfirm.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCAddDataRadioBearerRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCAddDataRadioBearerResponse.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCRemoveDataRadioBearerConfirm.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCAddUserConfirm.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCRemoveDataRadioBearerRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCAddUserRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCRemoveDataRadioBearerResponse.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCAddUserResponse.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCRemoveUserRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCRemoveUserResponse.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCConnectionRelease.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCUserReconfiguration.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCUserReconfigurationComplete.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRM-RRC-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRM-RRC-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRC-RRM-Message.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRC-RRM-MessageType.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCSystemConfigurationRequest.o \
|
||||
$(RRC_RRM_ASN1_DIR)/RRCSystemConfigurationResponse.o
|
||||
|
||||
|
||||
|
||||
SQLITE_OBJS= $(SQL_DIR)/sqlite3.o
|
||||
|
||||
|
||||
# Sockets
|
||||
SOCKETS_OBJS = \
|
||||
$(SOCKETS_DIR)/Ajp13Socket.o \
|
||||
$(SOCKETS_DIR)/AjpBaseSocket.o \
|
||||
$(SOCKETS_DIR)/Base64.o \
|
||||
$(SOCKETS_DIR)/Debug.o \
|
||||
$(SOCKETS_DIR)/Event.o \
|
||||
$(SOCKETS_DIR)/EventHandler.o \
|
||||
$(SOCKETS_DIR)/EventTime.o \
|
||||
$(SOCKETS_DIR)/Exception.o \
|
||||
$(SOCKETS_DIR)/File.o \
|
||||
$(SOCKETS_DIR)/FileStream.o \
|
||||
$(SOCKETS_DIR)/HTTPSocket.o \
|
||||
$(SOCKETS_DIR)/HttpBaseSocket.o \
|
||||
$(SOCKETS_DIR)/HttpClientSocket.o \
|
||||
$(SOCKETS_DIR)/HttpDebugSocket.o \
|
||||
$(SOCKETS_DIR)/HttpGetSocket.o \
|
||||
$(SOCKETS_DIR)/HttpPostSocket.o \
|
||||
$(SOCKETS_DIR)/HttpPutSocket.o \
|
||||
$(SOCKETS_DIR)/HttpRequest.o \
|
||||
$(SOCKETS_DIR)/HttpResponse.o \
|
||||
$(SOCKETS_DIR)/HttpTransaction.o \
|
||||
$(SOCKETS_DIR)/HttpdCookies.o \
|
||||
$(SOCKETS_DIR)/HttpdForm.o \
|
||||
$(SOCKETS_DIR)/HttpdSocket.o \
|
||||
$(SOCKETS_DIR)/IEventOwner.o \
|
||||
$(SOCKETS_DIR)/Ipv4Address.o \
|
||||
$(SOCKETS_DIR)/Ipv6Address.o \
|
||||
$(SOCKETS_DIR)/Json.o \
|
||||
$(SOCKETS_DIR)/Lock.o \
|
||||
$(SOCKETS_DIR)/MemFile.o \
|
||||
$(SOCKETS_DIR)/Mutex.o \
|
||||
$(SOCKETS_DIR)/Parse.o \
|
||||
$(SOCKETS_DIR)/ResolvServer.o \
|
||||
$(SOCKETS_DIR)/ResolvSocket.o \
|
||||
$(SOCKETS_DIR)/SSLInitializer.o \
|
||||
$(SOCKETS_DIR)/SctpSocket.o \
|
||||
$(SOCKETS_DIR)/Semaphore.o \
|
||||
$(SOCKETS_DIR)/SmtpdSocket.o \
|
||||
$(SOCKETS_DIR)/Socket.o \
|
||||
$(SOCKETS_DIR)/SocketHandler.o \
|
||||
$(SOCKETS_DIR)/SocketHandlerEp.o \
|
||||
$(SOCKETS_DIR)/SocketHandlerThread.o \
|
||||
$(SOCKETS_DIR)/SocketStream.o \
|
||||
$(SOCKETS_DIR)/SocketThread.o \
|
||||
$(SOCKETS_DIR)/StdoutLog.o \
|
||||
$(SOCKETS_DIR)/StreamSocket.o \
|
||||
$(SOCKETS_DIR)/StreamWriter.o \
|
||||
$(SOCKETS_DIR)/TcpSocket.o \
|
||||
$(SOCKETS_DIR)/Thread.o \
|
||||
$(SOCKETS_DIR)/UdpSocket.o \
|
||||
$(SOCKETS_DIR)/Utility.o \
|
||||
$(SOCKETS_DIR)/XmlDocument.o \
|
||||
$(SOCKETS_DIR)/XmlNode.o \
|
||||
$(SOCKETS_DIR)/XmlException.o
|
||||
|
||||
|
||||
# RRM
|
||||
RRM_OBJS = \
|
||||
$(SRC_DIR)/rrm.o \
|
||||
$(COM_DIR)/Message.o \
|
||||
$(COM_DIR)/rrc/RRCMessageHandler.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageConnectionRequest.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageConnectionResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddUserRequest.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddUserConfirm.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageAddUserResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageRemoveUserRequest.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageRemoveUserResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddRadioAccessBearerRequest.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddRadioAccessBearerConfirm.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageAddRadioAccessBearerResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageRemoveRadioAccessBearerRequest.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageRemoveRadioAccessBearerResponse.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageUserReconfiguration.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageUserReconfigurationComplete.o \
|
||||
$(COM_DIR)/rrc/RRCUdpSocket.o \
|
||||
$(TCPIP_DIR)/storage.o \
|
||||
$(RADIO_RESOURCES_DIR)/Asn1Utils.o \
|
||||
$(RADIO_RESOURCES_DIR)/ENodeB.o \
|
||||
$(RADIO_RESOURCES_DIR)/Mobile.o \
|
||||
$(RADIO_RESOURCES_DIR)/RadioBearer.o \
|
||||
$(RADIO_RESOURCES_DIR)/DataRadioBearer.o \
|
||||
$(RADIO_RESOURCES_DIR)/SignallingRadioBearer.o \
|
||||
$(RADIO_RESOURCES_DIR)/LogicalChannel.o \
|
||||
$(RADIO_RESOURCES_DIR)/Command.o \
|
||||
$(RADIO_RESOURCES_DIR)/RadioResources.o \
|
||||
$(RADIO_RESOURCES_DIR)/Transaction.o \
|
||||
$(RADIO_RESOURCES_DIR)/Transactions.o
|
||||
|
||||
|
||||
# RRM
|
||||
TEST_OBJS = \
|
||||
$(SRC_DIR)/test/test.o \
|
||||
$(SRC_DIR)/test/TestScenario.o \
|
||||
$(COM_DIR)/Message.o \
|
||||
$(COM_DIR)/rrm/RRMMessageHandler.o \
|
||||
$(COM_DIR)/rrc/RRCMessageHandler.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageConnectionRequest.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageConnectionResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddUserRequest.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddUserConfirm.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageAddUserResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageRemoveUserRequest.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageRemoveUserResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddRadioAccessBearerRequest.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageAddRadioAccessBearerConfirm.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageAddRadioAccessBearerResponse.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageRemoveRadioAccessBearerRequest.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageRemoveRadioAccessBearerResponse.o \
|
||||
$(COM_DIR)/rrc/RRM2RRCMessageUserReconfiguration.o \
|
||||
$(COM_DIR)/rrc/RRC2RRMMessageUserReconfigurationComplete.o \
|
||||
$(COM_DIR)/rrc/RRCUdpSocket.o \
|
||||
$(COM_DIR)/rrm/RRMUdpSocket.o \
|
||||
$(TCPIP_DIR)/storage.o \
|
||||
$(RADIO_RESOURCES_DIR)/Asn1Utils.o \
|
||||
$(RADIO_RESOURCES_DIR)/ENodeB.o \
|
||||
$(RADIO_RESOURCES_DIR)/Mobile.o \
|
||||
$(RADIO_RESOURCES_DIR)/RadioBearer.o \
|
||||
$(RADIO_RESOURCES_DIR)/LogicalChannel.o \
|
||||
$(RADIO_RESOURCES_DIR)/Transaction.o \
|
||||
$(RADIO_RESOURCES_DIR)/Transactions.o \
|
||||
$(RADIO_RESOURCES_DIR)/Command.o \
|
||||
$(RADIO_RESOURCES_DIR)/RadioResources.o
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
###################################
|
||||
To compile rrm
|
||||
###################################
|
||||
cd in this directory
|
||||
make libs
|
||||
make rrm_exe
|
||||
rrm executable is in ./bin
|
||||
###################################
|
||||
To compile dummy_rrc
|
||||
###################################
|
||||
cd in this directory
|
||||
make libs
|
||||
make test_exe
|
||||
dummy_rrc executable is in ./bin
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(Radio Resource Manager, 0.1.0)
|
||||
AC_CONFIG_SRCDIR(src/rrm.cpp)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
dnl create an config-header
|
||||
AC_CONFIG_HEADER(src/config.h)
|
||||
|
||||
dnl enable automake-support
|
||||
AM_INIT_AUTOMAKE([gnu dist-zip tar-ustar dist-bzip2])
|
||||
|
||||
|
||||
|
||||
AC_DEFINE([OUTPUT_ACCURACY], [2], [defines the number of digits after the comma in output])
|
||||
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
dnl enable libtool-support
|
||||
dnl gives a deprecated warning for RANLIB with newer libtools
|
||||
AC_PROG_RANLIB
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
|
||||
dnl Check for enable-features that shall go into config.h
|
||||
|
||||
|
||||
dnl ... for xerces 3.0
|
||||
PKG_CHECK_MODULES([XERCES], [xerces-c >= 3.0],
|
||||
[AC_DEFINE([XERCES3_SIZE_t],[XMLSize_t],[Define length for Xerces 3.])],
|
||||
[AC_DEFINE([XERCES3_SIZE_t],[unsigned int],[Define length for Xerces 2.])])
|
||||
|
||||
|
||||
|
||||
AM_CONDITIONAL([WITH_VERSION_H], test -f .svn/entries)
|
||||
if test -f .svn/entries; then
|
||||
AC_DEFINE([HAVE_VERSION_H], [1], [Define if auto-generated version.h should be used.])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(VERSION_STRING, "$PACKAGE_VERSION", [Defined if auto-generated version.h is unavailable.])
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------
|
||||
dnl check for libraries...
|
||||
dnl - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
dnl ... for xerces
|
||||
AC_ARG_WITH([xerces], [AS_HELP_STRING([--with-xerces=DIR],[where Xerces-C is installed (libraries in DIR/lib, headers in DIR/include).])])
|
||||
if test x"$with_xerces" != x; then
|
||||
if test x"$with_xerces_libraries" = x; then
|
||||
with_xerces_libraries=$with_xerces/lib
|
||||
fi
|
||||
if test x"$with_xerces_includes" = x; then
|
||||
with_xerces_includes=$with_xerces/include
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ... for libs
|
||||
LIB_XERCES="xerces-c"
|
||||
AC_ARG_WITH([xerces-libraries], [AS_HELP_STRING([--with-xerces-libraries=DIR],[where the Xerces-C library is installed.])])
|
||||
if test x"$with_xerces_libraries" = x; then
|
||||
AC_CHECK_LIB([$LIB_XERCES], [main], [true],
|
||||
[AC_MSG_ERROR([xerces-lib not found. Specify path with option --with-xerces-libraries=DIR.])])
|
||||
else
|
||||
save_ldflags=$LDFLAGS
|
||||
LDFLAGS="-L$with_xerces_libraries"
|
||||
export LDFLAGS
|
||||
AC_CHECK_LIB([$LIB_XERCES], [main], [XERCES_LDFLAGS=$LDFLAGS],
|
||||
[AC_MSG_ERROR([xerces-lib not found in "$with_xerces_libraries".])])
|
||||
LDFLAGS=$save_ldflags
|
||||
AC_SUBST(XERCES_LDFLAGS)
|
||||
fi
|
||||
AC_SUBST(LIB_XERCES)
|
||||
|
||||
|
||||
dnl ... for includes
|
||||
AC_ARG_WITH([xerces-includes], [AS_HELP_STRING([--with-xerces-includes=DIR],[where the Xerces-C includes are.])])
|
||||
save_cppflags=$CPPFLAGS
|
||||
if test x"$with_xerces_includes" = x; then
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/include"
|
||||
export CPPFLAGS
|
||||
AC_CHECK_HEADER([xercesc/util/XercesVersion.hpp], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"],
|
||||
[AC_MSG_ERROR([xerces-includes not found. Specify path with option --with-xerces-includes=DIR.])])
|
||||
else
|
||||
CPPFLAGS="-I$with_xerces_includes"
|
||||
export CPPFLAGS
|
||||
AC_CHECK_HEADER([xercesc/util/XercesVersion.hpp], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"],
|
||||
[AC_MSG_ERROR([xerces-includes not found in "$with_xerces_includes".])])
|
||||
fi
|
||||
CPPFLAGS=$save_cppflags
|
||||
|
||||
|
||||
|
||||
|
||||
AM_CPPFLAGS="-I$PWD/$srcdir/src $AM_CPPFLAGS"
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(AM_CXXFLAGS)
|
||||
|
||||
|
||||
dnl ---------------------------------------------
|
||||
dnl Checks proposed by autoscan.
|
||||
dnl Checks for header files.
|
||||
AC_FUNC_ALLOCA
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([float.h limits.h malloc.h math.h stddef.h stdlib.h string.h sys/time.h unistd.h wchar.h])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_STDBOOL
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
AC_C_VOLATILE
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_STAT
|
||||
AC_CHECK_FUNCS([floor getcwd gettimeofday memset pow select socket sqrt])
|
||||
|
||||
|
||||
dnl ---------------------------------------------
|
||||
dnl add here all your Makefiles. These will be created by configure
|
||||
AC_CONFIG_FILES([
|
||||
src/Makefile
|
||||
src/com/Makefile
|
||||
src/foreign/Makefile
|
||||
src/foreign/sockets-2.3.9.4/Makefile
|
||||
src/foreign/sql/Makefile
|
||||
src/foreign/tcpip/Makefile
|
||||
src/utils/Makefile
|
||||
src/utils/options/Makefile
|
||||
Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
dnl ---------------------------------------------
|
||||
dnl Summary
|
||||
|
||||
AC_MSG_RESULT()
|
||||
@@ -1,662 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
//-----------------------------------------------------------------
|
||||
#include "Message.h"
|
||||
#include "RRC-RRM-Message.h"
|
||||
#include "RRM-RRC-Message.h"
|
||||
#include "Utility.h"
|
||||
#include "RRC2RRMMessageConnectionRequest.h"
|
||||
#include "RRC2RRMMessageAddUserRequest.h"
|
||||
#include "RRC2RRMMessageAddUserConfirm.h"
|
||||
#include "RRC2RRMMessageAddRadioAccessBearerRequest.h"
|
||||
#include "RRC2RRMMessageRemoveRadioAccessBearerRequest.h"
|
||||
#include "RRC2RRMMessageRemoveUserRequest.h"
|
||||
#include "RRC2RRMMessageAddRadioAccessBearerConfirm.h"
|
||||
#include "RRM2RRCMessageConnectionResponse.h"
|
||||
#include "RRM2RRCMessageAddUserResponse.h"
|
||||
#include "RRM2RRCMessageAddRadioAccessBearerResponse.h"
|
||||
#include "RRM2RRCMessageRemoveRadioAccessBearerResponse.h"
|
||||
#include "RRM2RRCMessageRemoveUserResponse.h"
|
||||
#include "RRM2RRCMessageUserReconfiguration.h"
|
||||
#include "RRC2RRMMessageUserReconfigurationComplete.h"
|
||||
#include "storage.h"
|
||||
uint8_t Message::s_buffer[MESSAGE_DESERIALIZE_BUFFER_SIZE];
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
#define TRACE_RRM_MESSAGES
|
||||
#define LOOP_TEST
|
||||
//-----------------------------------------------------------------
|
||||
using namespace std;
|
||||
using namespace tcpip;
|
||||
//-----------------------------------------------------------------
|
||||
Message::Message()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_message_buffer = NULL;
|
||||
m_ip_char_src = new char(INET6_ADDRSTRLEN);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Message::Message(tcpip::Storage& in_messageP): m_message_storage(in_messageP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_message_buffer = NULL;
|
||||
m_ip_char_src = new char(INET6_ADDRSTRLEN);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Message* Message::DeserializeRRCMessage(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
Message* message = NULL;
|
||||
asn_dec_rval_t rval;
|
||||
asn_codec_ctx_t *opt_codec_ctx = 0;
|
||||
RRC_RRM_Message_t *asn1_message = 0;
|
||||
#ifdef LOOP_TEST
|
||||
for (int i=0; i<10000; i++) {
|
||||
message = NULL;
|
||||
opt_codec_ctx = 0;
|
||||
asn1_message = 0;
|
||||
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_RRC_RRM_Message,/* Type to decode */
|
||||
(void **)&asn1_message, /* Pointer to a target structure's pointer */
|
||||
in_bufferP, /* Data to be decoded */
|
||||
size_dataP, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
ASN_STRUCT_FREE(asn_DEF_RRC_RRM_Message, asn1_message);
|
||||
}
|
||||
cout << "Message::DeserializeRRCMessage(): LOOP TEST END" << endl;
|
||||
opt_codec_ctx = 0;
|
||||
asn1_message = 0;
|
||||
#endif
|
||||
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_RRC_RRM_Message,/* Type to decode */
|
||||
(void **)&asn1_message, /* Pointer to a target structure's pointer */
|
||||
in_bufferP, /* Data to be decoded */
|
||||
size_dataP, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_RRC_RRM_Message, (void*)asn1_message);
|
||||
if (rval.code != RC_OK) {
|
||||
cerr << " DeserializeRRCMessage ERROR IN ASN1 DECODING" << endl;
|
||||
return NULL;
|
||||
}
|
||||
if (asn1_message->message.present == RRC_RRM_MessageType_PR_c1) {
|
||||
switch (asn1_message->message.choice.c1.present) {
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_NOTHING:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_NOTHING" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcSystemConfigurationRequest:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_SYSTEM_CONFIGURATION_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageConnectionRequest(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcAddUserRequest:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_ADD_USER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageAddUserRequest(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcAddUserConfirm:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_ADD_USER_CONFIRM" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageAddUserConfirm(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcUserReconfigurationComplete:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_USER_RECONFIGURATION_COMPLETE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageUserReconfigurationComplete(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcAddDataRadioBearerRequest:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_ADD_DATA_RADIO_BEARER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcAddDataRadioBearerConfirm:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_ADD_DATA_RADIO_BEARER_CONFIRM" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcRemoveUserRequest:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_REMOVE_USER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcRemoveDataRadioBearerRequest:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_REMOVE_DATA_RADIO_BEARER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRC_RRM_MessageType__c1_PR_rrcRemoveDataRadioBearerConfirm:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_REMOVE_DATA_RADIO_BEARER_CONFIRM" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
cerr << " DeserializeRRMMessage ERROR IN message.present field" << endl;
|
||||
return NULL;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Message* Message::DeserializeRRMMessage(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
Message* message = NULL;
|
||||
asn_dec_rval_t rval;
|
||||
asn_codec_ctx_t *opt_codec_ctx = 0;
|
||||
RRM_RRC_Message_t *asn1_message = 0;
|
||||
#ifdef LOOP_TEST
|
||||
for (int i=0; i<10000; i++) {
|
||||
message = NULL;
|
||||
opt_codec_ctx = 0;
|
||||
asn1_message = 0;
|
||||
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_RRM_RRC_Message,/* Type to decode */
|
||||
(void **)&asn1_message, /* Pointer to a target structure's pointer */
|
||||
in_bufferP, /* Data to be decoded */
|
||||
size_dataP, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
ASN_STRUCT_FREE(asn_DEF_RRM_RRC_Message, asn1_message);
|
||||
}
|
||||
cout << "Message::DeserializeRRMMessage(): LOOP TEST END" << endl;
|
||||
opt_codec_ctx = 0;
|
||||
asn1_message = 0;
|
||||
#endif
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_RRM_RRC_Message,/* Type to decode */
|
||||
(void **)&asn1_message, /* Pointer to a target structure's pointer */
|
||||
in_bufferP, /* Data to be decoded */
|
||||
size_dataP, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)asn1_message);
|
||||
if (rval.code != RC_OK) {
|
||||
cerr << " DeserializeRRMMessage ERROR IN ASN1 DECODING" << endl;
|
||||
return NULL;
|
||||
}
|
||||
if (asn1_message->message.present == RRM_RRC_MessageType_PR_c1) {
|
||||
switch (asn1_message->message.choice.c1.present) {
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_NOTHING:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_NOTHING" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_rrcSystemConfigurationResponse:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_SYSTEM_CONFIGURATION_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRM2RRCMessageConnectionResponse(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_rrcAddUserResponse:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_ADD_USER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRM2RRCMessageAddUserResponse(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_rrcUserReconfiguration:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_USER_RECONFIGURATION" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRM2RRCMessageUserReconfiguration(sa_fromP, sa_lenP, asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_rrcAddDataRadioBearerResponse:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_ADD_DATA_RADIO_BEARER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionResponse(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_rrcRemoveUserResponse:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_REMOVE_USER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionResponse(asn1_message);
|
||||
break;
|
||||
//-------------------------------
|
||||
case RRM_RRC_MessageType__c1_PR_rrcRemoveDataRadioBearerResponse:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize(): MESSAGE_REMOVE_DATA_RADIO_BEARER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionResponse(asn1_message);
|
||||
break;
|
||||
|
||||
}
|
||||
} else {
|
||||
cerr << " DeserializeRRMMessage ERROR IN message.present field" << endl;
|
||||
return NULL;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Message* Message::Deserialize(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
|
||||
msg_type_t msg_type;
|
||||
msg_length_t msg_length;
|
||||
frame_t msg_frame;
|
||||
|
||||
Storage in_message(const_cast<unsigned char*>(reinterpret_cast<const unsigned char *>(in_bufferP)), size_dataP);
|
||||
msg_type = in_message.readChar();
|
||||
msg_length = in_message.readShort();
|
||||
//msg_frame = in_message.readInt();
|
||||
assert(msg_length == size_dataP);
|
||||
|
||||
msg_length = msg_length - 1 - 2;
|
||||
|
||||
Message* message = NULL;
|
||||
switch (msg_type) {
|
||||
//-------------------------------
|
||||
case MESSAGE_CONNECTION_REQUEST:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_CONNECTION_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageConnectionRequest(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_CONNECTION_RESPONSE:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_CONNECTION_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRM2RRCMessageConnectionResponse(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_ADD_USER_REQUEST:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_ADD_USER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageAddUserRequest(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_ADD_USER_CONFIRM:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_ADD_USER_CONFIRM" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRC2RRMMessageAddUserConfirm(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_ADD_USER_RESPONSE:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_ADD_USER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
//message = new RRM2RRCMessageAddUserResponse(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_ADD_RADIO_ACCESS_BEARER_REQUEST:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_ADD_RADIO_ACCESS_BEARER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageAddRadioAccessBearerRequest(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_ADD_RADIO_ACCESS_BEARER_CONFIRM:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_ADD_RADIO_ACCESS_BEARER_CONFIRM" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageAddRadioAccessBearerConfirm(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_ADD_RADIO_ACCESS_BEARER_RESPONSE:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_ADD_RADIO_ACCESS_BEARER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRM2RRCMessageAddRadioAccessBearerResponse(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_REMOVE_RADIO_ACCESS_BEARER_REQUEST:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_REMOVE_RADIO_ACCESS_BEARER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageRemoveRadioAccessBearerRequest(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_REMOVE_RADIO_ACCESS_BEARER_RESPONSE:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_REMOVE_RADIO_ACCESS_BEARER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRM2RRCMessageRemoveRadioAccessBearerResponse(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_REMOVE_USER_REQUEST:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_REMOVE_USER_REQUEST" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRC2RRMMessageRemoveUserRequest(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
case MESSAGE_REMOVE_USER_RESPONSE:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type : MESSAGE_REMOVE_USER_RESPONSE" << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
message = new RRM2RRCMessageRemoveUserResponse(in_message, msg_length, msg_frame, sa_fromP, sa_lenP);
|
||||
break;
|
||||
|
||||
//-------------------------------
|
||||
default:
|
||||
//-------------------------------
|
||||
#ifdef TRACE_RRM_UMTS_MESSAGES
|
||||
cout << hex;
|
||||
cout << "Message::deserialize():" << endl;
|
||||
cout << " Type NOT HANDLED : 0x" << static_cast<unsigned int>(msg_type) << endl;
|
||||
cout << dec;
|
||||
#endif
|
||||
;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void Message::ParseIpParameters(struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
|
||||
if (sa_lenP == sizeof(struct sockaddr_in6)) {
|
||||
m_is_ipv6 = true;
|
||||
memcpy(&m_sockaddr_in6_src,sa_fromP,sa_lenP);
|
||||
Utility::l2ip(m_sockaddr_in6_src.sin6_addr, m_ip_str_src,0);
|
||||
//const char* result = inet_ntop(AF_INET6, &m_sockaddr_in6_src, m_ip_char_src, sa_lenP);
|
||||
//cout << "inet_ntop returned" << result << endl;
|
||||
m_port_src = ntohs(m_sockaddr_in6_src.sin6_port);
|
||||
cout << "Message::ParseIpParameters: m_ip_str_src6 = " << m_ip_str_src << endl;
|
||||
cout << "Message::ParseIpParameters: m_port_src6 = " << m_port_src << endl;
|
||||
} else if (sa_lenP == sizeof(struct sockaddr_in)) {
|
||||
m_is_ipv6 = false;
|
||||
memcpy(&m_sockaddr_in4_src,sa_fromP,sa_lenP);
|
||||
ipaddr_t a;
|
||||
memcpy(&a,&m_sockaddr_in4_src.sin_addr,4);
|
||||
Utility::l2ip(a,m_ip_str_src);
|
||||
m_port_src = ntohs(m_sockaddr_in4_src.sin_port);
|
||||
cout << "Message::ParseIpParameters: m_ip_str_src = " << m_ip_str_src << endl;
|
||||
cout << "Message::ParseIpParameters: m_port_src = " << m_port_src << endl;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
msg_length_t Message::GetSerializedMessageSize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
return m_msg_length;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
const char* Message::GetSerializedMessageBuffer()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
return const_cast<const char*>(reinterpret_cast<char*>(m_message_serialize_buffer));
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Message::StatusToString(msg_response_status_t statusP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
stringstream result;
|
||||
switch (statusP) {
|
||||
//-------------------------------
|
||||
case STATUS_CONNECTION_ACCEPTED:
|
||||
//-------------------------------
|
||||
result << "CONNECTION_ACCEPTED"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_CONNECTION_FAILED:
|
||||
//-------------------------------
|
||||
result << "CONNECTION_FAILED"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_ADD_USER_SUCCESSFULL:
|
||||
//-------------------------------
|
||||
result << "ADD_USER_SUCCESSFULL"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_ADD_USER_FAILED:
|
||||
//-------------------------------
|
||||
result << "ADD_USER_FAILED"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_REMOVE_USER_SUCCESSFULL:
|
||||
//-------------------------------
|
||||
result << "REMOVE_USER_SUCCESSFULL"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_REMOVE_USER_FAILED:
|
||||
//-------------------------------
|
||||
result << "REMOVE_USER_FAILED"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL:
|
||||
//-------------------------------
|
||||
result << "ADD_RADIO_ACCESS_BEARER_SUCCESSFULL"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_ADD_RADIO_ACCESS_BEARER_FAILED:
|
||||
//-------------------------------
|
||||
result << "ADD_RADIO_ACCESS_BEARER_FAILED"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL:
|
||||
//-------------------------------
|
||||
result << "REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED:
|
||||
//-------------------------------
|
||||
result << "REMOVE_RADIO_ACCESS_BEARER_FAILED"; return result.str();
|
||||
break;
|
||||
default:
|
||||
result << "UNKNOWN STATUS " << statusP; return result.str();
|
||||
}
|
||||
return result.str();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Message::ReasonToString(msg_response_reason_t reasonP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
stringstream result;
|
||||
switch (reasonP) {
|
||||
//-------------------------------
|
||||
case MSG_RESP_OK:
|
||||
//-------------------------------
|
||||
result << "RESP_OK"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case MSG_RESP_PROTOCOL_ERROR:
|
||||
//-------------------------------
|
||||
result << "RESP_PROTOCOL_ERROR"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case MSG_RESP_RESSOURCES_UNAVAILABLE:
|
||||
//-------------------------------
|
||||
result << "RESP_RESSOURCES_UNAVAILABLE"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case MSG_RESP_UNKNOWN_MESSAGE:
|
||||
//-------------------------------
|
||||
result << "RESP_UNKNOWN_MESSAGE"; return result.str();
|
||||
break;
|
||||
//-------------------------------
|
||||
case MSG_RESP_INTERNAL_ERROR:
|
||||
//-------------------------------
|
||||
result << "RESP_INTERNAL_ERROR"; return result.str();
|
||||
break;
|
||||
default:
|
||||
result << "UNKNOWN REASON " << reasonP; return result.str();
|
||||
}
|
||||
return result.str();
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Message::~Message()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (m_message_buffer != NULL) {
|
||||
delete [] m_message_buffer;
|
||||
}
|
||||
if (m_ip_char_src != NULL) {
|
||||
delete [] m_ip_char_src;
|
||||
}
|
||||
m_message_storage.reset();
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _MESSAGE_H_
|
||||
# define _MESSAGE_H_
|
||||
|
||||
# include <string>
|
||||
# include <cstring>
|
||||
|
||||
# include "socket_include.h"
|
||||
# include "storage.h"
|
||||
# include "platform.h"
|
||||
|
||||
#define MESSAGE_DESERIALIZE_BUFFER_SIZE 2048
|
||||
#define MESSAGE_SERIALIZE_BUFFER_SIZE 2048
|
||||
class Message
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
typedef std::pair<std::string,int> e_nodeb_internet_address_id_t;
|
||||
|
||||
//============ STATUS ======================
|
||||
static const msg_response_status_t STATUS_CONNECTION_ACCEPTED = 1;
|
||||
static const msg_response_status_t STATUS_CONNECTION_FAILED = -1;
|
||||
static const msg_response_status_t STATUS_ADD_USER_SUCCESSFULL = 2;
|
||||
static const msg_response_status_t STATUS_ADD_USER_FAILED = -2;
|
||||
static const msg_response_status_t STATUS_REMOVE_USER_SUCCESSFULL = 3;
|
||||
static const msg_response_status_t STATUS_REMOVE_USER_FAILED = -3;
|
||||
static const msg_response_status_t STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL = 4;
|
||||
static const msg_response_status_t STATUS_ADD_RADIO_ACCESS_BEARER_FAILED = -4;
|
||||
static const msg_response_status_t STATUS_REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL = 5;
|
||||
static const msg_response_status_t STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED = -5;
|
||||
//============ MESSAGES ======================
|
||||
static const msg_type_t MESSAGE_CONNECTION_REQUEST = 0;
|
||||
static const msg_type_t MESSAGE_CONNECTION_RESPONSE = 1;
|
||||
static const msg_type_t MESSAGE_CONNECTION_CLOSE = 2;
|
||||
static const msg_type_t MESSAGE_CONNECTION_CLOSE_ACK = 3;
|
||||
static const msg_type_t MESSAGE_ADD_USER_REQUEST = 4;
|
||||
static const msg_type_t MESSAGE_ADD_USER_RESPONSE = 5;
|
||||
static const msg_type_t MESSAGE_ADD_USER_CONFIRM = 6;
|
||||
static const msg_type_t MESSAGE_REMOVE_USER_REQUEST = 7;
|
||||
static const msg_type_t MESSAGE_REMOVE_USER_RESPONSE = 8;
|
||||
static const msg_type_t MESSAGE_ADD_RADIO_ACCESS_BEARER_REQUEST = 9;
|
||||
static const msg_type_t MESSAGE_ADD_RADIO_ACCESS_BEARER_RESPONSE = 10;
|
||||
static const msg_type_t MESSAGE_ADD_RADIO_ACCESS_BEARER_CONFIRM = 11;
|
||||
static const msg_type_t MESSAGE_REMOVE_RADIO_ACCESS_BEARER_REQUEST = 12;
|
||||
static const msg_type_t MESSAGE_REMOVE_RADIO_ACCESS_BEARER_RESPONSE = 13;
|
||||
static const msg_type_t MESSAGE_MEASUREMENT_REQUEST = 14;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_INTERNAL_REPORT = 15;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_QUALITY_REPORT = 16;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_TRAFFIC_VOLUME_REPORT = 17;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_PHYSICAL_CHANNEL_DATA_AMP_REPORT = 18;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_INTERNAL_REPORT = 19;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_QUALITY_REPORT = 20;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_TRAFFIC_VOLUME_REPORT = 21;
|
||||
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_INTRA_FREQUENCY_REPORT = 22;
|
||||
static const msg_type_t MESSAGE_UPLINK_PHYSICAL_CHANNEL_CONTROL = 23;
|
||||
static const msg_type_t MESSAGE_CONFIG_REQUEST = 24;
|
||||
static const msg_type_t MESSAGE_ACK = 25;
|
||||
static const msg_type_t MESSAGE_UPDATE_DSCH = 26;
|
||||
//============ REASONS ======================
|
||||
static const msg_response_reason_t MSG_RESP_OK = 0;
|
||||
static const msg_response_reason_t MSG_RESP_PROTOCOL_ERROR = 1;
|
||||
static const msg_response_reason_t MSG_RESP_RESSOURCES_UNAVAILABLE = 2;
|
||||
static const msg_response_reason_t MSG_RESP_UNKNOWN_MESSAGE = 128;
|
||||
static const msg_response_reason_t MSG_RESP_INTERNAL_ERROR = 255;
|
||||
|
||||
static uint8_t s_buffer[MESSAGE_DESERIALIZE_BUFFER_SIZE];
|
||||
|
||||
Message ();
|
||||
Message(tcpip::Storage&);
|
||||
virtual void Serialize () {};
|
||||
virtual void Forward () {};
|
||||
virtual void Serialize (char *out_bufferP, size_t* size_dataP) {};
|
||||
|
||||
static Message *DeserializeRRCMessage(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
|
||||
static Message *DeserializeRRMMessage(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
|
||||
static Message *Deserialize (const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
|
||||
void ParseIpParameters(struct sockaddr *sa_fromP,socklen_t sa_lenP);
|
||||
msg_length_t GetSerializedMessageSize();
|
||||
const char* GetSerializedMessageBuffer();
|
||||
const int GetSrcPort() {
|
||||
return m_port_src;
|
||||
};
|
||||
const char* GetSrcAddress() {
|
||||
return m_ip_char_src;
|
||||
};
|
||||
virtual ~ Message ();
|
||||
|
||||
static std::string StatusToString(msg_response_status_t);
|
||||
static std::string ReasonToString(msg_response_reason_t);
|
||||
|
||||
|
||||
protected:
|
||||
msg_type_t m_type;
|
||||
bool m_is_ipv6;
|
||||
struct sockaddr_in m_sockaddr_in4_src;
|
||||
struct sockaddr_in6 m_sockaddr_in6_src;
|
||||
std::string m_ip_str_src;
|
||||
char* m_ip_char_src;
|
||||
int m_port_src;
|
||||
tcpip::Storage m_message_storage;
|
||||
unsigned char* m_message_buffer;
|
||||
|
||||
msg_length_t m_msg_length;
|
||||
uint8_t m_message_serialize_buffer[MESSAGE_SERIALIZE_BUFFER_SIZE];
|
||||
//uint8_t m_message_serialize_buffer[MESSAGE_DESERIALIZE_BUFFER_SIZE];
|
||||
};
|
||||
|
||||
# endif
|
||||
@@ -1,870 +0,0 @@
|
||||
ASN_MODULE_SOURCES= \
|
||||
BCCH-BCH-Message.c \
|
||||
BCCH-BCH-MessageType.c \
|
||||
BCCH-DL-SCH-Message.c \
|
||||
BCCH-DL-SCH-MessageType.c \
|
||||
PCCH-Message.c \
|
||||
PCCH-MessageType.c \
|
||||
DL-CCCH-Message.c \
|
||||
DL-CCCH-MessageType.c \
|
||||
DL-DCCH-Message.c \
|
||||
DL-DCCH-MessageType.c \
|
||||
UL-CCCH-Message.c \
|
||||
UL-CCCH-MessageType.c \
|
||||
UL-DCCH-Message.c \
|
||||
UL-DCCH-MessageType.c \
|
||||
CounterCheck.c \
|
||||
CounterCheck-r8-IEs.c \
|
||||
DRB-CountMSB-InfoList.c \
|
||||
DRB-CountMSB-Info.c \
|
||||
CounterCheckResponse.c \
|
||||
CounterCheckResponse-r8-IEs.c \
|
||||
DRB-CountInfoList.c \
|
||||
DRB-CountInfo.c \
|
||||
CSFBParametersRequestCDMA2000.c \
|
||||
CSFBParametersRequestCDMA2000-r8-IEs.c \
|
||||
CSFBParametersResponseCDMA2000.c \
|
||||
CSFBParametersResponseCDMA2000-r8-IEs.c \
|
||||
DLInformationTransfer.c \
|
||||
DLInformationTransfer-r8-IEs.c \
|
||||
HandoverFromEUTRAPreparationRequest.c \
|
||||
HandoverFromEUTRAPreparationRequest-r8-IEs.c \
|
||||
MasterInformationBlock.c \
|
||||
MeasurementReport.c \
|
||||
MeasurementReport-r8-IEs.c \
|
||||
MobilityFromEUTRACommand.c \
|
||||
MobilityFromEUTRACommand-r8-IEs.c \
|
||||
Handover.c \
|
||||
CellChangeOrder.c \
|
||||
SI-OrPSI-GERAN.c \
|
||||
SystemInfoListGERAN.c \
|
||||
Paging.c \
|
||||
PagingRecordList.c \
|
||||
PagingRecord.c \
|
||||
PagingUE-Identity.c \
|
||||
IMSI.c \
|
||||
IMSI-Digit.c \
|
||||
RRCConnectionReconfiguration.c \
|
||||
RRCConnectionReconfiguration-r8-IEs.c \
|
||||
SecurityConfigHO.c \
|
||||
RRCConnectionReconfigurationComplete.c \
|
||||
RRCConnectionReconfigurationComplete-r8-IEs.c \
|
||||
RRCConnectionReestablishment.c \
|
||||
RRCConnectionReestablishment-r8-IEs.c \
|
||||
RRCConnectionReestablishmentComplete.c \
|
||||
RRCConnectionReestablishmentComplete-r8-IEs.c \
|
||||
RRCConnectionReestablishmentReject.c \
|
||||
RRCConnectionReestablishmentReject-r8-IEs.c \
|
||||
RRCConnectionReestablishmentRequest.c \
|
||||
RRCConnectionReestablishmentRequest-r8-IEs.c \
|
||||
ReestabUE-Identity.c \
|
||||
ReestablishmentCause.c \
|
||||
RRCConnectionReject.c \
|
||||
RRCConnectionReject-r8-IEs.c \
|
||||
RRCConnectionRelease.c \
|
||||
RRCConnectionRelease-r8-IEs.c \
|
||||
ReleaseCause.c \
|
||||
RedirectedCarrierInfo.c \
|
||||
IdleModeMobilityControlInfo.c \
|
||||
FreqPriorityListEUTRA.c \
|
||||
FreqPriorityEUTRA.c \
|
||||
FreqsPriorityListGERAN.c \
|
||||
FreqsPriorityGERAN.c \
|
||||
FreqPriorityListUTRA-FDD.c \
|
||||
FreqPriorityUTRA-FDD.c \
|
||||
FreqPriorityListUTRA-TDD.c \
|
||||
FreqPriorityUTRA-TDD.c \
|
||||
BandClassPriorityListHRPD.c \
|
||||
BandClassPriorityHRPD.c \
|
||||
BandClassPriorityList1XRTT.c \
|
||||
BandClassPriority1XRTT.c \
|
||||
RRCConnectionRequest.c \
|
||||
RRCConnectionRequest-r8-IEs.c \
|
||||
InitialUE-Identity.c \
|
||||
EstablishmentCause.c \
|
||||
RRCConnectionSetup.c \
|
||||
RRCConnectionSetup-r8-IEs.c \
|
||||
RRCConnectionSetupComplete.c \
|
||||
RRCConnectionSetupComplete-r8-IEs.c \
|
||||
RegisteredMME.c \
|
||||
SecurityModeCommand.c \
|
||||
SecurityModeCommand-r8-IEs.c \
|
||||
SecurityConfigSMC.c \
|
||||
SecurityModeComplete.c \
|
||||
SecurityModeComplete-r8-IEs.c \
|
||||
SecurityModeFailure.c \
|
||||
SecurityModeFailure-r8-IEs.c \
|
||||
SystemInformation.c \
|
||||
SystemInformation-r8-IEs.c \
|
||||
SystemInformationBlockType1.c \
|
||||
PLMN-IdentityList.c \
|
||||
PLMN-IdentityInfo.c \
|
||||
SchedulingInfoList.c \
|
||||
SchedulingInfo.c \
|
||||
SIB-MappingInfo.c \
|
||||
SIB-Type.c \
|
||||
UECapabilityEnquiry.c \
|
||||
UECapabilityEnquiry-r8-IEs.c \
|
||||
UE-CapabilityRequest.c \
|
||||
UECapabilityInformation.c \
|
||||
UECapabilityInformation-r8-IEs.c \
|
||||
ULHandoverPreparationTransfer.c \
|
||||
ULHandoverPreparationTransfer-r8-IEs.c \
|
||||
ULInformationTransfer.c \
|
||||
ULInformationTransfer-r8-IEs.c \
|
||||
SystemInformationBlockType2.c \
|
||||
AC-BarringConfig.c \
|
||||
MBSFN-SubframeConfigList.c \
|
||||
MBSFN-SubframeConfig.c \
|
||||
SystemInformationBlockType3.c \
|
||||
SystemInformationBlockType4.c \
|
||||
IntraFreqNeighCellList.c \
|
||||
IntraFreqNeighCellInfo.c \
|
||||
IntraFreqBlackCellList.c \
|
||||
SystemInformationBlockType5.c \
|
||||
InterFreqCarrierFreqList.c \
|
||||
InterFreqCarrierFreqInfo.c \
|
||||
InterFreqNeighCellList.c \
|
||||
InterFreqNeighCellInfo.c \
|
||||
InterFreqBlackCellList.c \
|
||||
SystemInformationBlockType6.c \
|
||||
CarrierFreqListUTRA-FDD.c \
|
||||
CarrierFreqUTRA-FDD.c \
|
||||
CarrierFreqListUTRA-TDD.c \
|
||||
CarrierFreqUTRA-TDD.c \
|
||||
SystemInformationBlockType7.c \
|
||||
CarrierFreqsInfoListGERAN.c \
|
||||
CarrierFreqsInfoGERAN.c \
|
||||
SystemInformationBlockType8.c \
|
||||
CellReselectionParametersCDMA2000.c \
|
||||
NeighCellListCDMA2000.c \
|
||||
NeighCellCDMA2000.c \
|
||||
NeighCellsPerBandclassListCDMA2000.c \
|
||||
NeighCellsPerBandclassCDMA2000.c \
|
||||
PhysCellIdListCDMA2000.c \
|
||||
BandClassListCDMA2000.c \
|
||||
BandClassInfoCDMA2000.c \
|
||||
SystemInformationBlockType9.c \
|
||||
SystemInformationBlockType10.c \
|
||||
SystemInformationBlockType11.c \
|
||||
AntennaInfoCommon.c \
|
||||
AntennaInfoDedicated.c \
|
||||
CQI-ReportConfig.c \
|
||||
CQI-ReportPeriodic.c \
|
||||
DRB-Identity.c \
|
||||
LogicalChannelConfig.c \
|
||||
MAC-MainConfig.c \
|
||||
DRX-Config.c \
|
||||
PDCP-Config.c \
|
||||
PDSCH-ConfigCommon.c \
|
||||
PDSCH-ConfigDedicated.c \
|
||||
PHICH-Config.c \
|
||||
PhysicalConfigDedicated.c \
|
||||
P-Max.c \
|
||||
PRACH-ConfigSIB.c \
|
||||
PRACH-Config.c \
|
||||
PRACH-ConfigInfo.c \
|
||||
PresenceAntennaPort1.c \
|
||||
PUCCH-ConfigCommon.c \
|
||||
PUCCH-ConfigDedicated.c \
|
||||
PUSCH-ConfigCommon.c \
|
||||
PUSCH-ConfigDedicated.c \
|
||||
UL-ReferenceSignalsPUSCH.c \
|
||||
RACH-ConfigCommon.c \
|
||||
RACH-ConfigDedicated.c \
|
||||
RadioResourceConfigCommonSIB.c \
|
||||
RadioResourceConfigCommon.c \
|
||||
BCCH-Config.c \
|
||||
PCCH-Config.c \
|
||||
UL-CyclicPrefixLength.c \
|
||||
RadioResourceConfigDedicated.c \
|
||||
SRB-ToAddModList.c \
|
||||
SRB-ToAddMod.c \
|
||||
DRB-ToAddModList.c \
|
||||
DRB-ToAddMod.c \
|
||||
DRB-ToReleaseList.c \
|
||||
RLC-Config.c \
|
||||
UL-AM-RLC.c \
|
||||
DL-AM-RLC.c \
|
||||
UL-UM-RLC.c \
|
||||
DL-UM-RLC.c \
|
||||
SN-FieldLength.c \
|
||||
T-PollRetransmit.c \
|
||||
PollPDU.c \
|
||||
PollByte.c \
|
||||
T-Reordering.c \
|
||||
T-StatusProhibit.c \
|
||||
SchedulingRequestConfig.c \
|
||||
SoundingRS-UL-ConfigCommon.c \
|
||||
SoundingRS-UL-ConfigDedicated.c \
|
||||
SPS-Config.c \
|
||||
SPS-ConfigDL.c \
|
||||
SPS-ConfigUL.c \
|
||||
N1-PUCCH-AN-PersistentList.c \
|
||||
TDD-Config.c \
|
||||
TimeAlignmentTimer.c \
|
||||
TPC-PDCCH-Config.c \
|
||||
TPC-Index.c \
|
||||
UplinkPowerControlCommon.c \
|
||||
UplinkPowerControlDedicated.c \
|
||||
DeltaFList-PUCCH.c \
|
||||
NextHopChainingCount.c \
|
||||
SecurityAlgorithmConfig.c \
|
||||
ShortMAC-I.c \
|
||||
AdditionalSpectrumEmission.c \
|
||||
ARFCN-ValueCDMA2000.c \
|
||||
ARFCN-ValueEUTRA.c \
|
||||
ARFCN-ValueGERAN.c \
|
||||
ARFCN-ValueUTRA.c \
|
||||
BandclassCDMA2000.c \
|
||||
BandIndicatorGERAN.c \
|
||||
CarrierFreqCDMA2000.c \
|
||||
CarrierFreqGERAN.c \
|
||||
CarrierFreqsGERAN.c \
|
||||
ExplicitListOfARFCNs.c \
|
||||
CDMA2000-Type.c \
|
||||
CellIdentity.c \
|
||||
CellIndexList.c \
|
||||
CellIndex.c \
|
||||
CellReselectionPriority.c \
|
||||
CSFB-RegistrationParam1XRTT.c \
|
||||
CellGlobalIdEUTRA.c \
|
||||
CellGlobalIdUTRA.c \
|
||||
CellGlobalIdGERAN.c \
|
||||
CellGlobalIdCDMA2000.c \
|
||||
MobilityControlInfo.c \
|
||||
CarrierBandwidthEUTRA.c \
|
||||
CarrierFreqEUTRA.c \
|
||||
MobilityParametersCDMA2000.c \
|
||||
MobilityStateParameters.c \
|
||||
PhysCellId.c \
|
||||
PhysCellIdRange.c \
|
||||
PhysCellIdCDMA2000.c \
|
||||
PhysCellIdGERAN.c \
|
||||
PhysCellIdUTRA-FDD.c \
|
||||
PhysCellIdUTRA-TDD.c \
|
||||
PLMN-Identity.c \
|
||||
MCC.c \
|
||||
MNC.c \
|
||||
MCC-MNC-Digit.c \
|
||||
PreRegistrationInfoHRPD.c \
|
||||
SecondaryPreRegistrationZoneIdListHRPD.c \
|
||||
PreRegistrationZoneIdHRPD.c \
|
||||
Q-RxLevMin.c \
|
||||
Q-OffsetRange.c \
|
||||
Q-OffsetRangeInterRAT.c \
|
||||
ReselectionThreshold.c \
|
||||
SpeedStateScaleFactors.c \
|
||||
SystemTimeInfoCDMA2000.c \
|
||||
TrackingAreaCode.c \
|
||||
T-Reselection.c \
|
||||
AllowedMeasBandwidth.c \
|
||||
Hysteresis.c \
|
||||
MeasConfig.c \
|
||||
MeasIdToRemoveList.c \
|
||||
MeasObjectToRemoveList.c \
|
||||
ReportConfigToRemoveList.c \
|
||||
MeasGapConfig.c \
|
||||
MeasId.c \
|
||||
MeasIdToAddModList.c \
|
||||
MeasIdToAddMod.c \
|
||||
MeasObjectCDMA2000.c \
|
||||
CellsToAddModListCDMA2000.c \
|
||||
CellsToAddModCDMA2000.c \
|
||||
MeasObjectEUTRA.c \
|
||||
CellsToAddModList.c \
|
||||
CellsToAddMod.c \
|
||||
BlackCellsToAddModList.c \
|
||||
BlackCellsToAddMod.c \
|
||||
MeasObjectGERAN.c \
|
||||
MeasObjectId.c \
|
||||
MeasObjectToAddModList.c \
|
||||
MeasObjectToAddMod.c \
|
||||
MeasObjectUTRA.c \
|
||||
CellsToAddModListUTRA-FDD.c \
|
||||
CellsToAddModUTRA-FDD.c \
|
||||
CellsToAddModListUTRA-TDD.c \
|
||||
CellsToAddModUTRA-TDD.c \
|
||||
MeasResults.c \
|
||||
MeasResultListEUTRA.c \
|
||||
MeasResultEUTRA.c \
|
||||
MeasResultListUTRA.c \
|
||||
MeasResultUTRA.c \
|
||||
MeasResultListGERAN.c \
|
||||
MeasResultGERAN.c \
|
||||
MeasResultsCDMA2000.c \
|
||||
MeasResultListCDMA2000.c \
|
||||
MeasResultCDMA2000.c \
|
||||
PLMN-IdentityList2.c \
|
||||
QuantityConfig.c \
|
||||
QuantityConfigEUTRA.c \
|
||||
QuantityConfigUTRA.c \
|
||||
QuantityConfigGERAN.c \
|
||||
QuantityConfigCDMA2000.c \
|
||||
ReportConfigEUTRA.c \
|
||||
ThresholdEUTRA.c \
|
||||
ReportConfigId.c \
|
||||
ReportConfigInterRAT.c \
|
||||
ThresholdUTRA.c \
|
||||
ThresholdGERAN.c \
|
||||
ThresholdCDMA2000.c \
|
||||
ReportConfigToAddModList.c \
|
||||
ReportConfigToAddMod.c \
|
||||
ReportInterval.c \
|
||||
RSRP-Range.c \
|
||||
RSRQ-Range.c \
|
||||
TimeToTrigger.c \
|
||||
C-RNTI.c \
|
||||
DedicatedInfoCDMA2000.c \
|
||||
DedicatedInfoNAS.c \
|
||||
FilterCoefficient.c \
|
||||
MMEC.c \
|
||||
NeighCellConfig.c \
|
||||
RAND-CDMA2000.c \
|
||||
RAT-Type.c \
|
||||
RRC-TransactionIdentifier.c \
|
||||
S-TMSI.c \
|
||||
UE-CapabilityRAT-ContainerList.c \
|
||||
UE-CapabilityRAT-Container.c \
|
||||
UE-EUTRA-Capability.c \
|
||||
AccessStratumRelease.c \
|
||||
PDCP-Parameters.c \
|
||||
PhyLayerParameters.c \
|
||||
RF-Parameters.c \
|
||||
SupportedBandListEUTRA.c \
|
||||
SupportedBandEUTRA.c \
|
||||
MeasParameters.c \
|
||||
BandListEUTRA.c \
|
||||
BandInfoEUTRA.c \
|
||||
InterFreqBandList.c \
|
||||
InterFreqBandInfo.c \
|
||||
InterRAT-BandList.c \
|
||||
InterRAT-BandInfo.c \
|
||||
IRAT-ParametersUTRA-FDD.c \
|
||||
SupportedBandListUTRA-FDD.c \
|
||||
SupportedBandUTRA-FDD.c \
|
||||
IRAT-ParametersUTRA-TDD128.c \
|
||||
SupportedBandListUTRA-TDD128.c \
|
||||
SupportedBandUTRA-TDD128.c \
|
||||
IRAT-ParametersUTRA-TDD384.c \
|
||||
SupportedBandListUTRA-TDD384.c \
|
||||
SupportedBandUTRA-TDD384.c \
|
||||
IRAT-ParametersUTRA-TDD768.c \
|
||||
SupportedBandListUTRA-TDD768.c \
|
||||
SupportedBandUTRA-TDD768.c \
|
||||
IRAT-ParametersGERAN.c \
|
||||
SupportedBandListGERAN.c \
|
||||
SupportedBandGERAN.c \
|
||||
IRAT-ParametersCDMA2000-HRPD.c \
|
||||
SupportedBandListHRPD.c \
|
||||
IRAT-ParametersCDMA2000-1XRTT.c \
|
||||
SupportedBandList1XRTT.c \
|
||||
UE-TimersAndConstants.c \
|
||||
RRC-RRM-Message.c \
|
||||
RRC-RRM-MessageType.c \
|
||||
RRCSystemConfigurationRequest.c \
|
||||
RRCAddUserRequest.c \
|
||||
RRCAddUserConfirm.c \
|
||||
RRCAddDataRadioBearerRequest.c \
|
||||
RRCAddDataRadioBearerConfirm.c \
|
||||
RRCRemoveUserRequest.c \
|
||||
RRCRemoveDataRadioBearerRequest.c \
|
||||
RRCRemoveDataRadioBearerConfirm.c \
|
||||
RRCUserReconfigurationComplete.c \
|
||||
RRM-RRC-Message.c \
|
||||
RRM-RRC-MessageType.c \
|
||||
RRCSystemConfigurationResponse.c \
|
||||
RRCAddUserResponse.c \
|
||||
RRCAddDataRadioBearerResponse.c \
|
||||
RRCRemoveUserResponse.c \
|
||||
RRCRemoveDataRadioBearerResponse.c \
|
||||
RRCUserReconfiguration.c \
|
||||
E-NodeB-Identity.c \
|
||||
TransactionId.c \
|
||||
OpenAir-C-RNTI.c \
|
||||
OpenAir-ApplicationKBitRate.c \
|
||||
OpenAir-Application-ms-PacketDelay.c \
|
||||
OpenAir-Application-TrafficClass.c \
|
||||
OpenAir-RRM-Response-Reason.c \
|
||||
OpenAir-RRM-Response-Status.c
|
||||
|
||||
ASN_MODULE_HEADERS= \
|
||||
BCCH-BCH-Message.h \
|
||||
BCCH-BCH-MessageType.h \
|
||||
BCCH-DL-SCH-Message.h \
|
||||
BCCH-DL-SCH-MessageType.h \
|
||||
PCCH-Message.h \
|
||||
PCCH-MessageType.h \
|
||||
DL-CCCH-Message.h \
|
||||
DL-CCCH-MessageType.h \
|
||||
DL-DCCH-Message.h \
|
||||
DL-DCCH-MessageType.h \
|
||||
UL-CCCH-Message.h \
|
||||
UL-CCCH-MessageType.h \
|
||||
UL-DCCH-Message.h \
|
||||
UL-DCCH-MessageType.h \
|
||||
CounterCheck.h \
|
||||
CounterCheck-r8-IEs.h \
|
||||
DRB-CountMSB-InfoList.h \
|
||||
DRB-CountMSB-Info.h \
|
||||
CounterCheckResponse.h \
|
||||
CounterCheckResponse-r8-IEs.h \
|
||||
DRB-CountInfoList.h \
|
||||
DRB-CountInfo.h \
|
||||
CSFBParametersRequestCDMA2000.h \
|
||||
CSFBParametersRequestCDMA2000-r8-IEs.h \
|
||||
CSFBParametersResponseCDMA2000.h \
|
||||
CSFBParametersResponseCDMA2000-r8-IEs.h \
|
||||
DLInformationTransfer.h \
|
||||
DLInformationTransfer-r8-IEs.h \
|
||||
HandoverFromEUTRAPreparationRequest.h \
|
||||
HandoverFromEUTRAPreparationRequest-r8-IEs.h \
|
||||
MasterInformationBlock.h \
|
||||
MeasurementReport.h \
|
||||
MeasurementReport-r8-IEs.h \
|
||||
MobilityFromEUTRACommand.h \
|
||||
MobilityFromEUTRACommand-r8-IEs.h \
|
||||
Handover.h \
|
||||
CellChangeOrder.h \
|
||||
SI-OrPSI-GERAN.h \
|
||||
SystemInfoListGERAN.h \
|
||||
Paging.h \
|
||||
PagingRecordList.h \
|
||||
PagingRecord.h \
|
||||
PagingUE-Identity.h \
|
||||
IMSI.h \
|
||||
IMSI-Digit.h \
|
||||
RRCConnectionReconfiguration.h \
|
||||
RRCConnectionReconfiguration-r8-IEs.h \
|
||||
SecurityConfigHO.h \
|
||||
RRCConnectionReconfigurationComplete.h \
|
||||
RRCConnectionReconfigurationComplete-r8-IEs.h \
|
||||
RRCConnectionReestablishment.h \
|
||||
RRCConnectionReestablishment-r8-IEs.h \
|
||||
RRCConnectionReestablishmentComplete.h \
|
||||
RRCConnectionReestablishmentComplete-r8-IEs.h \
|
||||
RRCConnectionReestablishmentReject.h \
|
||||
RRCConnectionReestablishmentReject-r8-IEs.h \
|
||||
RRCConnectionReestablishmentRequest.h \
|
||||
RRCConnectionReestablishmentRequest-r8-IEs.h \
|
||||
ReestabUE-Identity.h \
|
||||
ReestablishmentCause.h \
|
||||
RRCConnectionReject.h \
|
||||
RRCConnectionReject-r8-IEs.h \
|
||||
RRCConnectionRelease.h \
|
||||
RRCConnectionRelease-r8-IEs.h \
|
||||
ReleaseCause.h \
|
||||
RedirectedCarrierInfo.h \
|
||||
IdleModeMobilityControlInfo.h \
|
||||
FreqPriorityListEUTRA.h \
|
||||
FreqPriorityEUTRA.h \
|
||||
FreqsPriorityListGERAN.h \
|
||||
FreqsPriorityGERAN.h \
|
||||
FreqPriorityListUTRA-FDD.h \
|
||||
FreqPriorityUTRA-FDD.h \
|
||||
FreqPriorityListUTRA-TDD.h \
|
||||
FreqPriorityUTRA-TDD.h \
|
||||
BandClassPriorityListHRPD.h \
|
||||
BandClassPriorityHRPD.h \
|
||||
BandClassPriorityList1XRTT.h \
|
||||
BandClassPriority1XRTT.h \
|
||||
RRCConnectionRequest.h \
|
||||
RRCConnectionRequest-r8-IEs.h \
|
||||
InitialUE-Identity.h \
|
||||
EstablishmentCause.h \
|
||||
RRCConnectionSetup.h \
|
||||
RRCConnectionSetup-r8-IEs.h \
|
||||
RRCConnectionSetupComplete.h \
|
||||
RRCConnectionSetupComplete-r8-IEs.h \
|
||||
RegisteredMME.h \
|
||||
SecurityModeCommand.h \
|
||||
SecurityModeCommand-r8-IEs.h \
|
||||
SecurityConfigSMC.h \
|
||||
SecurityModeComplete.h \
|
||||
SecurityModeComplete-r8-IEs.h \
|
||||
SecurityModeFailure.h \
|
||||
SecurityModeFailure-r8-IEs.h \
|
||||
SystemInformation.h \
|
||||
SystemInformation-r8-IEs.h \
|
||||
SystemInformationBlockType1.h \
|
||||
PLMN-IdentityList.h \
|
||||
PLMN-IdentityInfo.h \
|
||||
SchedulingInfoList.h \
|
||||
SchedulingInfo.h \
|
||||
SIB-MappingInfo.h \
|
||||
SIB-Type.h \
|
||||
UECapabilityEnquiry.h \
|
||||
UECapabilityEnquiry-r8-IEs.h \
|
||||
UE-CapabilityRequest.h \
|
||||
UECapabilityInformation.h \
|
||||
UECapabilityInformation-r8-IEs.h \
|
||||
ULHandoverPreparationTransfer.h \
|
||||
ULHandoverPreparationTransfer-r8-IEs.h \
|
||||
ULInformationTransfer.h \
|
||||
ULInformationTransfer-r8-IEs.h \
|
||||
SystemInformationBlockType2.h \
|
||||
AC-BarringConfig.h \
|
||||
MBSFN-SubframeConfigList.h \
|
||||
MBSFN-SubframeConfig.h \
|
||||
SystemInformationBlockType3.h \
|
||||
SystemInformationBlockType4.h \
|
||||
IntraFreqNeighCellList.h \
|
||||
IntraFreqNeighCellInfo.h \
|
||||
IntraFreqBlackCellList.h \
|
||||
SystemInformationBlockType5.h \
|
||||
InterFreqCarrierFreqList.h \
|
||||
InterFreqCarrierFreqInfo.h \
|
||||
InterFreqNeighCellList.h \
|
||||
InterFreqNeighCellInfo.h \
|
||||
InterFreqBlackCellList.h \
|
||||
SystemInformationBlockType6.h \
|
||||
CarrierFreqListUTRA-FDD.h \
|
||||
CarrierFreqUTRA-FDD.h \
|
||||
CarrierFreqListUTRA-TDD.h \
|
||||
CarrierFreqUTRA-TDD.h \
|
||||
SystemInformationBlockType7.h \
|
||||
CarrierFreqsInfoListGERAN.h \
|
||||
CarrierFreqsInfoGERAN.h \
|
||||
SystemInformationBlockType8.h \
|
||||
CellReselectionParametersCDMA2000.h \
|
||||
NeighCellListCDMA2000.h \
|
||||
NeighCellCDMA2000.h \
|
||||
NeighCellsPerBandclassListCDMA2000.h \
|
||||
NeighCellsPerBandclassCDMA2000.h \
|
||||
PhysCellIdListCDMA2000.h \
|
||||
BandClassListCDMA2000.h \
|
||||
BandClassInfoCDMA2000.h \
|
||||
SystemInformationBlockType9.h \
|
||||
SystemInformationBlockType10.h \
|
||||
SystemInformationBlockType11.h \
|
||||
AntennaInfoCommon.h \
|
||||
AntennaInfoDedicated.h \
|
||||
CQI-ReportConfig.h \
|
||||
CQI-ReportPeriodic.h \
|
||||
DRB-Identity.h \
|
||||
LogicalChannelConfig.h \
|
||||
MAC-MainConfig.h \
|
||||
DRX-Config.h \
|
||||
PDCP-Config.h \
|
||||
PDSCH-ConfigCommon.h \
|
||||
PDSCH-ConfigDedicated.h \
|
||||
PHICH-Config.h \
|
||||
PhysicalConfigDedicated.h \
|
||||
P-Max.h \
|
||||
PRACH-ConfigSIB.h \
|
||||
PRACH-Config.h \
|
||||
PRACH-ConfigInfo.h \
|
||||
PresenceAntennaPort1.h \
|
||||
PUCCH-ConfigCommon.h \
|
||||
PUCCH-ConfigDedicated.h \
|
||||
PUSCH-ConfigCommon.h \
|
||||
PUSCH-ConfigDedicated.h \
|
||||
UL-ReferenceSignalsPUSCH.h \
|
||||
RACH-ConfigCommon.h \
|
||||
RACH-ConfigDedicated.h \
|
||||
RadioResourceConfigCommonSIB.h \
|
||||
RadioResourceConfigCommon.h \
|
||||
BCCH-Config.h \
|
||||
PCCH-Config.h \
|
||||
UL-CyclicPrefixLength.h \
|
||||
RadioResourceConfigDedicated.h \
|
||||
SRB-ToAddModList.h \
|
||||
SRB-ToAddMod.h \
|
||||
DRB-ToAddModList.h \
|
||||
DRB-ToAddMod.h \
|
||||
DRB-ToReleaseList.h \
|
||||
RLC-Config.h \
|
||||
UL-AM-RLC.h \
|
||||
DL-AM-RLC.h \
|
||||
UL-UM-RLC.h \
|
||||
DL-UM-RLC.h \
|
||||
SN-FieldLength.h \
|
||||
T-PollRetransmit.h \
|
||||
PollPDU.h \
|
||||
PollByte.h \
|
||||
T-Reordering.h \
|
||||
T-StatusProhibit.h \
|
||||
SchedulingRequestConfig.h \
|
||||
SoundingRS-UL-ConfigCommon.h \
|
||||
SoundingRS-UL-ConfigDedicated.h \
|
||||
SPS-Config.h \
|
||||
SPS-ConfigDL.h \
|
||||
SPS-ConfigUL.h \
|
||||
N1-PUCCH-AN-PersistentList.h \
|
||||
TDD-Config.h \
|
||||
TimeAlignmentTimer.h \
|
||||
TPC-PDCCH-Config.h \
|
||||
TPC-Index.h \
|
||||
UplinkPowerControlCommon.h \
|
||||
UplinkPowerControlDedicated.h \
|
||||
DeltaFList-PUCCH.h \
|
||||
NextHopChainingCount.h \
|
||||
SecurityAlgorithmConfig.h \
|
||||
ShortMAC-I.h \
|
||||
AdditionalSpectrumEmission.h \
|
||||
ARFCN-ValueCDMA2000.h \
|
||||
ARFCN-ValueEUTRA.h \
|
||||
ARFCN-ValueGERAN.h \
|
||||
ARFCN-ValueUTRA.h \
|
||||
BandclassCDMA2000.h \
|
||||
BandIndicatorGERAN.h \
|
||||
CarrierFreqCDMA2000.h \
|
||||
CarrierFreqGERAN.h \
|
||||
CarrierFreqsGERAN.h \
|
||||
ExplicitListOfARFCNs.h \
|
||||
CDMA2000-Type.h \
|
||||
CellIdentity.h \
|
||||
CellIndexList.h \
|
||||
CellIndex.h \
|
||||
CellReselectionPriority.h \
|
||||
CSFB-RegistrationParam1XRTT.h \
|
||||
CellGlobalIdEUTRA.h \
|
||||
CellGlobalIdUTRA.h \
|
||||
CellGlobalIdGERAN.h \
|
||||
CellGlobalIdCDMA2000.h \
|
||||
MobilityControlInfo.h \
|
||||
CarrierBandwidthEUTRA.h \
|
||||
CarrierFreqEUTRA.h \
|
||||
MobilityParametersCDMA2000.h \
|
||||
MobilityStateParameters.h \
|
||||
PhysCellId.h \
|
||||
PhysCellIdRange.h \
|
||||
PhysCellIdCDMA2000.h \
|
||||
PhysCellIdGERAN.h \
|
||||
PhysCellIdUTRA-FDD.h \
|
||||
PhysCellIdUTRA-TDD.h \
|
||||
PLMN-Identity.h \
|
||||
MCC.h \
|
||||
MNC.h \
|
||||
MCC-MNC-Digit.h \
|
||||
PreRegistrationInfoHRPD.h \
|
||||
SecondaryPreRegistrationZoneIdListHRPD.h \
|
||||
PreRegistrationZoneIdHRPD.h \
|
||||
Q-RxLevMin.h \
|
||||
Q-OffsetRange.h \
|
||||
Q-OffsetRangeInterRAT.h \
|
||||
ReselectionThreshold.h \
|
||||
SpeedStateScaleFactors.h \
|
||||
SystemTimeInfoCDMA2000.h \
|
||||
TrackingAreaCode.h \
|
||||
T-Reselection.h \
|
||||
AllowedMeasBandwidth.h \
|
||||
Hysteresis.h \
|
||||
MeasConfig.h \
|
||||
MeasIdToRemoveList.h \
|
||||
MeasObjectToRemoveList.h \
|
||||
ReportConfigToRemoveList.h \
|
||||
MeasGapConfig.h \
|
||||
MeasId.h \
|
||||
MeasIdToAddModList.h \
|
||||
MeasIdToAddMod.h \
|
||||
MeasObjectCDMA2000.h \
|
||||
CellsToAddModListCDMA2000.h \
|
||||
CellsToAddModCDMA2000.h \
|
||||
MeasObjectEUTRA.h \
|
||||
CellsToAddModList.h \
|
||||
CellsToAddMod.h \
|
||||
BlackCellsToAddModList.h \
|
||||
BlackCellsToAddMod.h \
|
||||
MeasObjectGERAN.h \
|
||||
MeasObjectId.h \
|
||||
MeasObjectToAddModList.h \
|
||||
MeasObjectToAddMod.h \
|
||||
MeasObjectUTRA.h \
|
||||
CellsToAddModListUTRA-FDD.h \
|
||||
CellsToAddModUTRA-FDD.h \
|
||||
CellsToAddModListUTRA-TDD.h \
|
||||
CellsToAddModUTRA-TDD.h \
|
||||
MeasResults.h \
|
||||
MeasResultListEUTRA.h \
|
||||
MeasResultEUTRA.h \
|
||||
MeasResultListUTRA.h \
|
||||
MeasResultUTRA.h \
|
||||
MeasResultListGERAN.h \
|
||||
MeasResultGERAN.h \
|
||||
MeasResultsCDMA2000.h \
|
||||
MeasResultListCDMA2000.h \
|
||||
MeasResultCDMA2000.h \
|
||||
PLMN-IdentityList2.h \
|
||||
QuantityConfig.h \
|
||||
QuantityConfigEUTRA.h \
|
||||
QuantityConfigUTRA.h \
|
||||
QuantityConfigGERAN.h \
|
||||
QuantityConfigCDMA2000.h \
|
||||
ReportConfigEUTRA.h \
|
||||
ThresholdEUTRA.h \
|
||||
ReportConfigId.h \
|
||||
ReportConfigInterRAT.h \
|
||||
ThresholdUTRA.h \
|
||||
ThresholdGERAN.h \
|
||||
ThresholdCDMA2000.h \
|
||||
ReportConfigToAddModList.h \
|
||||
ReportConfigToAddMod.h \
|
||||
ReportInterval.h \
|
||||
RSRP-Range.h \
|
||||
RSRQ-Range.h \
|
||||
TimeToTrigger.h \
|
||||
C-RNTI.h \
|
||||
DedicatedInfoCDMA2000.h \
|
||||
DedicatedInfoNAS.h \
|
||||
FilterCoefficient.h \
|
||||
MMEC.h \
|
||||
NeighCellConfig.h \
|
||||
RAND-CDMA2000.h \
|
||||
RAT-Type.h \
|
||||
RRC-TransactionIdentifier.h \
|
||||
S-TMSI.h \
|
||||
UE-CapabilityRAT-ContainerList.h \
|
||||
UE-CapabilityRAT-Container.h \
|
||||
UE-EUTRA-Capability.h \
|
||||
AccessStratumRelease.h \
|
||||
PDCP-Parameters.h \
|
||||
PhyLayerParameters.h \
|
||||
RF-Parameters.h \
|
||||
SupportedBandListEUTRA.h \
|
||||
SupportedBandEUTRA.h \
|
||||
MeasParameters.h \
|
||||
BandListEUTRA.h \
|
||||
BandInfoEUTRA.h \
|
||||
InterFreqBandList.h \
|
||||
InterFreqBandInfo.h \
|
||||
InterRAT-BandList.h \
|
||||
InterRAT-BandInfo.h \
|
||||
IRAT-ParametersUTRA-FDD.h \
|
||||
SupportedBandListUTRA-FDD.h \
|
||||
SupportedBandUTRA-FDD.h \
|
||||
IRAT-ParametersUTRA-TDD128.h \
|
||||
SupportedBandListUTRA-TDD128.h \
|
||||
SupportedBandUTRA-TDD128.h \
|
||||
IRAT-ParametersUTRA-TDD384.h \
|
||||
SupportedBandListUTRA-TDD384.h \
|
||||
SupportedBandUTRA-TDD384.h \
|
||||
IRAT-ParametersUTRA-TDD768.h \
|
||||
SupportedBandListUTRA-TDD768.h \
|
||||
SupportedBandUTRA-TDD768.h \
|
||||
IRAT-ParametersGERAN.h \
|
||||
SupportedBandListGERAN.h \
|
||||
SupportedBandGERAN.h \
|
||||
IRAT-ParametersCDMA2000-HRPD.h \
|
||||
SupportedBandListHRPD.h \
|
||||
IRAT-ParametersCDMA2000-1XRTT.h \
|
||||
SupportedBandList1XRTT.h \
|
||||
UE-TimersAndConstants.h \
|
||||
RRC-RRM-Message.h \
|
||||
RRC-RRM-MessageType.h \
|
||||
RRCSystemConfigurationRequest.h \
|
||||
RRCAddUserRequest.h \
|
||||
RRCAddUserConfirm.h \
|
||||
RRCAddDataRadioBearerRequest.h \
|
||||
RRCAddDataRadioBearerConfirm.h \
|
||||
RRCRemoveUserRequest.h \
|
||||
RRCRemoveDataRadioBearerRequest.h \
|
||||
RRCRemoveDataRadioBearerConfirm.h \
|
||||
RRCUserReconfigurationComplete.h \
|
||||
RRM-RRC-Message.h \
|
||||
RRM-RRC-MessageType.h \
|
||||
RRCSystemConfigurationResponse.h \
|
||||
RRCAddUserResponse.h \
|
||||
RRCAddDataRadioBearerResponse.h \
|
||||
RRCRemoveUserResponse.h \
|
||||
RRCRemoveDataRadioBearerResponse.h \
|
||||
RRCUserReconfiguration.h \
|
||||
E-NodeB-Identity.h \
|
||||
TransactionId.h \
|
||||
OpenAir-C-RNTI.h \
|
||||
OpenAir-ApplicationKBitRate.h \
|
||||
OpenAir-Application-ms-PacketDelay.h \
|
||||
OpenAir-Application-TrafficClass.h \
|
||||
OpenAir-RRM-Response-Reason.h \
|
||||
OpenAir-RRM-Response-Status.h
|
||||
|
||||
ASN_MODULE_HEADERS+=BOOLEAN.h
|
||||
ASN_MODULE_SOURCES+=BOOLEAN.c
|
||||
ASN_MODULE_HEADERS+=INTEGER.h
|
||||
ASN_MODULE_HEADERS+=NativeEnumerated.h
|
||||
ASN_MODULE_SOURCES+=INTEGER.c
|
||||
ASN_MODULE_HEADERS+=NULL.h
|
||||
ASN_MODULE_SOURCES+=NULL.c
|
||||
ASN_MODULE_SOURCES+=NativeEnumerated.c
|
||||
ASN_MODULE_HEADERS+=NativeInteger.h
|
||||
ASN_MODULE_SOURCES+=NativeInteger.c
|
||||
ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h
|
||||
ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c
|
||||
ASN_MODULE_HEADERS+=asn_SET_OF.h
|
||||
ASN_MODULE_SOURCES+=asn_SET_OF.c
|
||||
ASN_MODULE_HEADERS+=constr_CHOICE.h
|
||||
ASN_MODULE_SOURCES+=constr_CHOICE.c
|
||||
ASN_MODULE_HEADERS+=constr_SEQUENCE.h
|
||||
ASN_MODULE_SOURCES+=constr_SEQUENCE.c
|
||||
ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h
|
||||
ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c
|
||||
ASN_MODULE_HEADERS+=constr_SET_OF.h
|
||||
ASN_MODULE_SOURCES+=constr_SET_OF.c
|
||||
ASN_MODULE_HEADERS+=asn_application.h
|
||||
ASN_MODULE_HEADERS+=asn_system.h
|
||||
ASN_MODULE_HEADERS+=asn_codecs.h
|
||||
ASN_MODULE_HEADERS+=asn_internal.h
|
||||
ASN_MODULE_HEADERS+=OCTET_STRING.h
|
||||
ASN_MODULE_SOURCES+=OCTET_STRING.c
|
||||
ASN_MODULE_HEADERS+=BIT_STRING.h
|
||||
ASN_MODULE_SOURCES+=BIT_STRING.c
|
||||
ASN_MODULE_SOURCES+=asn_codecs_prim.c
|
||||
ASN_MODULE_HEADERS+=asn_codecs_prim.h
|
||||
ASN_MODULE_HEADERS+=ber_tlv_length.h
|
||||
ASN_MODULE_SOURCES+=ber_tlv_length.c
|
||||
ASN_MODULE_HEADERS+=ber_tlv_tag.h
|
||||
ASN_MODULE_SOURCES+=ber_tlv_tag.c
|
||||
ASN_MODULE_HEADERS+=ber_decoder.h
|
||||
ASN_MODULE_SOURCES+=ber_decoder.c
|
||||
ASN_MODULE_HEADERS+=der_encoder.h
|
||||
ASN_MODULE_SOURCES+=der_encoder.c
|
||||
ASN_MODULE_HEADERS+=constr_TYPE.h
|
||||
ASN_MODULE_SOURCES+=constr_TYPE.c
|
||||
ASN_MODULE_HEADERS+=constraints.h
|
||||
ASN_MODULE_SOURCES+=constraints.c
|
||||
ASN_MODULE_HEADERS+=xer_support.h
|
||||
ASN_MODULE_SOURCES+=xer_support.c
|
||||
ASN_MODULE_HEADERS+=xer_decoder.h
|
||||
ASN_MODULE_SOURCES+=xer_decoder.c
|
||||
ASN_MODULE_HEADERS+=xer_encoder.h
|
||||
ASN_MODULE_SOURCES+=xer_encoder.c
|
||||
ASN_MODULE_HEADERS+=per_support.h
|
||||
ASN_MODULE_SOURCES+=per_support.c
|
||||
ASN_MODULE_HEADERS+=per_decoder.h
|
||||
ASN_MODULE_SOURCES+=per_decoder.c
|
||||
ASN_MODULE_HEADERS+=per_encoder.h
|
||||
ASN_MODULE_SOURCES+=per_encoder.c
|
||||
ASN_MODULE_HEADERS+=per_opentype.h
|
||||
ASN_MODULE_SOURCES+=per_opentype.c
|
||||
ASN_CONVERTER_SOURCES+=converter-sample.c
|
||||
|
||||
|
||||
lib_LTLIBRARIES=libsomething.la
|
||||
libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
|
||||
|
||||
# This file may be used as an input for make(3)
|
||||
# Remove the lines below to convert it into a pure .am file
|
||||
TARGET = progname
|
||||
CFLAGS += -I.
|
||||
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): ${OBJS}
|
||||
$(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
rm -f $(OBJS)
|
||||
|
||||
regen: regenerate-from-asn1-source
|
||||
|
||||
regenerate-from-asn1-source:
|
||||
asn1c -gen-PER -fno-include-deps -fcompound-names -fnative-types -fskeletons-copy /homes/gauthier/PROJETS/trunk/openair2/RRM_4_RRC_LITE/src/foreign/generated_c_asn1_rrc/ASN1_files/EUTRA-RRC-Definitions.asn /homes/gauthier/PROJETS/trunk/openair2/RRM_4_RRC_LITE/src/com/asn1/rrc-rrm.asn
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
RRM-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
DRB-Identity,
|
||||
PhysCellId,
|
||||
RadioResourceConfigDedicated,
|
||||
RRCConnectionReconfiguration-r8-IEs,
|
||||
RRCConnectionReconfigurationComplete-r8-IEs,
|
||||
SystemInformation,
|
||||
SystemInformationBlockType1,
|
||||
SystemInformationBlockType2 FROM EUTRA-RRC-Definitions;
|
||||
|
||||
RRC-RRM-Message ::= SEQUENCE {
|
||||
message RRC-RRM-MessageType
|
||||
}
|
||||
|
||||
RRC-RRM-MessageType ::= CHOICE {
|
||||
c1 CHOICE {
|
||||
rrcSystemConfigurationRequest RRCSystemConfigurationRequest,
|
||||
rrcAddUserRequest RRCAddUserRequest,
|
||||
rrcAddUserConfirm RRCAddUserConfirm,
|
||||
rrcAddDataRadioBearerRequest RRCAddDataRadioBearerRequest,
|
||||
rrcAddDataRadioBearerConfirm RRCAddDataRadioBearerConfirm,
|
||||
rrcRemoveUserRequest RRCRemoveUserRequest,
|
||||
rrcRemoveDataRadioBearerRequest RRCRemoveDataRadioBearerRequest,
|
||||
rrcRemoveDataRadioBearerConfirm RRCRemoveDataRadioBearerConfirm,
|
||||
rrcUserReconfigurationComplete RRCUserReconfigurationComplete
|
||||
|
||||
},
|
||||
messageClassExtension SEQUENCE {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
RRCSystemConfigurationRequest ::= SEQUENCE {
|
||||
transactionId TransactionId
|
||||
}
|
||||
|
||||
RRCAddUserRequest ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI
|
||||
}
|
||||
|
||||
RRCAddUserConfirm ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI
|
||||
}
|
||||
|
||||
RRCAddDataRadioBearerRequest ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
drb-Identity DRB-Identity,
|
||||
applicationTrafficClass OpenAir-Application-TrafficClass,
|
||||
applicationPacketDelay OpenAir-Application-ms-PacketDelay,
|
||||
guaranted-bit-rate-uplink OpenAir-ApplicationKBitRate,
|
||||
max-bit-rate-uplink OpenAir-ApplicationKBitRate,
|
||||
guaranted-bit-rate-downlink OpenAir-ApplicationKBitRate,
|
||||
max-bit-rate-downlink OpenAir-ApplicationKBitRate
|
||||
}
|
||||
|
||||
RRCAddDataRadioBearerConfirm ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
drb-Identity DRB-Identity
|
||||
}
|
||||
|
||||
RRCRemoveUserRequest ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI
|
||||
}
|
||||
|
||||
|
||||
RRCRemoveDataRadioBearerRequest ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
drb-Identity DRB-Identity
|
||||
}
|
||||
|
||||
RRCRemoveDataRadioBearerConfirm ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
drb-Identity DRB-Identity
|
||||
}
|
||||
|
||||
RRCUserReconfigurationComplete ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI
|
||||
}
|
||||
|
||||
|
||||
RRM-RRC-Message ::= SEQUENCE {
|
||||
message RRM-RRC-MessageType
|
||||
}
|
||||
|
||||
RRM-RRC-MessageType ::= CHOICE {
|
||||
c1 CHOICE {
|
||||
rrcSystemConfigurationResponse RRCSystemConfigurationResponse,
|
||||
rrcAddUserResponse RRCAddUserResponse,
|
||||
rrcAddDataRadioBearerResponse RRCAddDataRadioBearerResponse,
|
||||
rrcRemoveUserResponse RRCRemoveUserResponse,
|
||||
rrcRemoveDataRadioBearerResponse RRCRemoveDataRadioBearerResponse,
|
||||
rrcUserReconfiguration RRCUserReconfiguration
|
||||
},
|
||||
messageClassExtension SEQUENCE {}
|
||||
}
|
||||
|
||||
RRCSystemConfigurationResponse ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
rrm-Response-Status OpenAir-RRM-Response-Status,
|
||||
rrm-Response-Reason OpenAir-RRM-Response-Reason,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
systemInformationBlockType1 SystemInformationBlockType1 OPTIONAL,
|
||||
systemInformation SystemInformation OPTIONAL
|
||||
}
|
||||
|
||||
RRCAddUserResponse ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
rrm-Response-Status OpenAir-RRM-Response-Status,
|
||||
rrm-Response-Reason OpenAir-RRM-Response-Reason,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
|
||||
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
|
||||
}
|
||||
|
||||
RRCAddDataRadioBearerResponse ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
rrm-Response-Status OpenAir-RRM-Response-Status,
|
||||
rrm-Response-Reason OpenAir-RRM-Response-Reason,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
-- MAY BE USELESS SINCE INCLUDED IN RadioResourceConfigDedicated drb-Identity DRB-Identity,
|
||||
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
|
||||
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
|
||||
}
|
||||
|
||||
RRCRemoveUserResponse ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
rrm-Response-Status OpenAir-RRM-Response-Status,
|
||||
rrm-Response-Reason OpenAir-RRM-Response-Reason,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
|
||||
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
|
||||
}
|
||||
|
||||
RRCRemoveDataRadioBearerResponse ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
rrm-Response-Status OpenAir-RRM-Response-Status,
|
||||
rrm-Response-Reason OpenAir-RRM-Response-Reason,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
|
||||
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
|
||||
}
|
||||
|
||||
RRCUserReconfiguration ::= SEQUENCE {
|
||||
transactionId TransactionId,
|
||||
rrm-Response-Status OpenAir-RRM-Response-Status,
|
||||
rrm-Response-Reason OpenAir-RRM-Response-Reason,
|
||||
e-NodeB-Identity E-NodeB-Identity,
|
||||
c-RNTI OpenAir-C-RNTI,
|
||||
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
|
||||
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
|
||||
}
|
||||
|
||||
E-NodeB-Identity ::= SEQUENCE {
|
||||
physCellId PhysCellId
|
||||
}
|
||||
|
||||
TransactionId ::= INTEGER (0..255)
|
||||
OpenAir-C-RNTI ::= INTEGER (0..255)
|
||||
OpenAir-ApplicationKBitRate ::= INTEGER (0..100000)
|
||||
OpenAir-Application-ms-PacketDelay ::= INTEGER (0..10000)
|
||||
OpenAir-Application-TrafficClass ::= INTEGER (0..255)
|
||||
|
||||
OpenAir-RRM-Response-Reason ::= ENUMERATED {
|
||||
ok, protocolError, ressourcesUnavailable, malformedMessage, unknownMessage, internalError }
|
||||
|
||||
OpenAir-RRM-Response-Status ::= ENUMERATED {
|
||||
success, warning, failure }
|
||||
|
||||
|
||||
END
|
||||
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "RRC2RRMMessageAddRadioAccessBearerConfirm.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm::RRC2RRMMessageAddRadioAccessBearerConfirm(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm::RRC2RRMMessageAddRadioAccessBearerConfirm(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
|
||||
Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
/* if (m_is_ipv6) {
|
||||
printf("[RRM][RRC2RRMMessageAddRadioAccessBearerConfirm] (IPv6) Received %d bytes from: %s:%d\n", msg_lengthP, m_ip_char_src, m_port_src);
|
||||
} else {
|
||||
printf("[RRM][RRC2RRMMessageAddRadioAccessBearerConfirm] (IPv4) Received %d bytes from: %s:%d\n", msg_lengthP, m_ip_char_src, m_port_src);
|
||||
}*/
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_radio_bearer_id = m_message_storage.readChar();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("RRC\t-------ADD DATA RADIO BEARER CONFIRM------->\tRRM\n");
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddRadioAccessBearerConfirm::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
Transaction* tx = RadioResources::Instance()->Request(*this);
|
||||
if (tx != NULL) {
|
||||
delete tx;
|
||||
}
|
||||
} catch (std::exception const& e ) {
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddRadioAccessBearerConfirm::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_ADD_RADIO_ACCESS_BEARER_CONFIRM);
|
||||
m_message_storage.writeShort(7u);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_radio_bearer_id);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm::~RRC2RRMMessageAddRadioAccessBearerConfirm()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEADDRADIOACCESSBEARERCONFIRM_H
|
||||
# define _RRC2RRMMESSAGEADDRADIOACCESSBEARERCONFIRM_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "storage.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageAddRadioAccessBearerConfirm: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP);
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
|
||||
~RRC2RRMMessageAddRadioAccessBearerConfirm ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const unsigned int GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
}
|
||||
const rb_id_t GetRadioBearerId() {
|
||||
return m_radio_bearer_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
|
||||
private:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
rb_id_t m_radio_bearer_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "RRC2RRMMessageAddRadioAccessBearerRequest.h"
|
||||
#include "RRM2RRCMessageAddRadioAccessBearerResponse.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddRadioAccessBearerRequest::RRC2RRMMessageAddRadioAccessBearerRequest(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
unsigned short traffic_classP,
|
||||
unsigned short delayP,
|
||||
unsigned int guaranted_bit_rate_uplinkP,
|
||||
unsigned int max_bit_rate_uplinkP,
|
||||
unsigned int guaranted_bit_rate_downlinkP,
|
||||
unsigned int max_bit_rate_downlinkP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_traffic_class = traffic_classP;
|
||||
m_delay = delayP;
|
||||
m_guaranted_bit_rate_uplink = guaranted_bit_rate_uplinkP;
|
||||
m_max_bit_rate_uplink = max_bit_rate_uplinkP;
|
||||
m_guaranted_bit_rate_downlink = guaranted_bit_rate_downlinkP;
|
||||
m_max_bit_rate_downlink = max_bit_rate_downlinkP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddRadioAccessBearerRequest::RRC2RRMMessageAddRadioAccessBearerRequest(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
|
||||
Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_radio_bearer_id = m_message_storage.readChar();
|
||||
m_traffic_class = m_message_storage.readShort();
|
||||
m_delay = m_message_storage.readShort();
|
||||
m_guaranted_bit_rate_uplink = m_message_storage.readInt();
|
||||
m_max_bit_rate_uplink = m_message_storage.readInt();
|
||||
m_guaranted_bit_rate_downlink = m_message_storage.readInt();
|
||||
m_max_bit_rate_downlink = m_message_storage.readInt();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("RRC\t-------ADD DATA RADIO BEARER REQUEST------->\tRRM\n");
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddRadioAccessBearerRequest::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
Transaction* tx = RadioResources::Instance()->Request(*this);
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse response(Message::STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL, Message::MSG_RESP_OK, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id, tx);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (mobile_already_connected_error & x ) {
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse response(Message::STATUS_ADD_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_PROTOCOL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (std::exception const& e ) {
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse response(Message::STATUS_ADD_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_INTERNAL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddRadioAccessBearerRequest::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_ADD_RADIO_ACCESS_BEARER_REQUEST);
|
||||
m_message_storage.writeShort(27u);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_radio_bearer_id);
|
||||
m_message_storage.writeShort(m_traffic_class);
|
||||
m_message_storage.writeShort(m_delay);
|
||||
m_message_storage.writeInt(m_guaranted_bit_rate_uplink);
|
||||
m_message_storage.writeInt(m_max_bit_rate_uplink);
|
||||
m_message_storage.writeInt(m_guaranted_bit_rate_downlink);
|
||||
m_message_storage.writeInt( m_max_bit_rate_downlink);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddRadioAccessBearerRequest::~RRC2RRMMessageAddRadioAccessBearerRequest()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEADDRADIOACCESSBEARERREQUEST_H
|
||||
# define _RRC2RRMMESSAGEADDRADIOACCESSBEARERREQUEST_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "storage.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageAddRadioAccessBearerRequest: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageAddRadioAccessBearerRequest(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
unsigned short traffic_classP,
|
||||
unsigned short delayP,
|
||||
unsigned int guaranted_bit_rate_uplinkP,
|
||||
unsigned int max_bit_rate_uplinkP,
|
||||
unsigned int guaranted_bit_rate_downlinkP,
|
||||
unsigned int max_bit_rate_downlinkP,
|
||||
transaction_id_t transaction_idP);
|
||||
RRC2RRMMessageAddRadioAccessBearerRequest (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
|
||||
~RRC2RRMMessageAddRadioAccessBearerRequest ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const unsigned int GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
}
|
||||
const rb_id_t GetRadioBearerId() {
|
||||
return m_radio_bearer_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
|
||||
const unsigned short GetTrafficClass() {
|
||||
return m_traffic_class;
|
||||
}
|
||||
const unsigned short GetDelay() {
|
||||
return m_delay;
|
||||
}
|
||||
const unsigned int GetGuarantedBitRateUplink() {
|
||||
return m_guaranted_bit_rate_uplink;
|
||||
}
|
||||
const unsigned int GetMaxBitRateUplink() {
|
||||
return m_max_bit_rate_uplink;
|
||||
}
|
||||
const unsigned int GetGuarantedBitRateDownlink() {
|
||||
return m_guaranted_bit_rate_downlink;
|
||||
}
|
||||
const unsigned int GetMaxBitRateDownlink() {
|
||||
return m_max_bit_rate_downlink;
|
||||
}
|
||||
|
||||
private:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
rb_id_t m_radio_bearer_id;
|
||||
unsigned short m_traffic_class;
|
||||
unsigned short m_delay;
|
||||
unsigned int m_guaranted_bit_rate_uplink;
|
||||
unsigned int m_max_bit_rate_uplink;
|
||||
unsigned int m_guaranted_bit_rate_downlink;
|
||||
unsigned int m_max_bit_rate_downlink;
|
||||
transaction_id_t m_transaction_id;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRC2RRMMessageAddUserConfirm.h"
|
||||
#include "RRM2RRCMessageUserReconfiguration.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddUserConfirm::RRC2RRMMessageAddUserConfirm(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.transactionId;
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.c_RNTI;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddUserConfirm::RRC2RRMMessageAddUserConfirm(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
|
||||
memset(m_asn1_message, 0, sizeof(RRC_RRM_Message_t));
|
||||
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
|
||||
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcAddUserConfirm;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.transactionId = transaction_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.e_NodeB_Identity.physCellId = cell_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.c_RNTI = mobile_idP;
|
||||
|
||||
|
||||
m_transaction_id = transaction_idP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_msg_length = 0;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddUserConfirm::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
RRM2RRCMessageUserReconfiguration* user_reconfiguration = RadioResources::Instance()->Request(*this);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, user_reconfiguration->GetSerializedMessageBuffer(), user_reconfiguration->GetSerializedMessageSize());
|
||||
delete user_reconfiguration;
|
||||
} catch (std::exception const& e ) {
|
||||
RRM2RRCMessageUserReconfiguration response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_internalError, m_cell_id, m_mobile_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddUserConfirm::Serialize ()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
cout << "[RRM][RRC2RRMMessageAddUserConfirm] asn_DEF_RRC_RRM_Message Encoded " << enc_rval.encoded << " bits (" << (enc_rval.encoded+7)/8 << " bytes)" << endl;
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cerr << "[RRM][RRC2RRMMessageAddUserConfirm] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddUserConfirm::~RRC2RRMMessageAddUserConfirm()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
cout << "[RRM][RRC2RRMMessageAddUserConfirm::~RRC2RRMMessageAddUserConfirm()] free asn1_message start" << endl;
|
||||
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
|
||||
cout << "[RRM][RRC2RRMMessageAddUserConfirm::~RRC2RRMMessageAddUserConfirm()] free asn1_message end" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEADDUSERCONFIRM_H
|
||||
# define _RRC2RRMMESSAGEADDUSERCONFIRM_H
|
||||
|
||||
# include "RRC-RRM-Message.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
|
||||
class RRC2RRMMessageAddUserConfirm: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageAddUserConfirm(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
|
||||
RRC2RRMMessageAddUserConfirm(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
~RRC2RRMMessageAddUserConfirm ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
private:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
RRC_RRM_Message_t *m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRC2RRMMessageAddUserRequest.h"
|
||||
#include "RRM2RRCMessageAddUserResponse.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddUserRequest::RRC2RRMMessageAddUserRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.transactionId;
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.c_RNTI;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddUserRequest::RRC2RRMMessageAddUserRequest(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
|
||||
memset(m_asn1_message, 0, sizeof(RRC_RRM_Message_t));
|
||||
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
|
||||
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcAddUserRequest;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.transactionId = transaction_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.e_NodeB_Identity.physCellId = cell_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.c_RNTI = mobile_idP;
|
||||
|
||||
|
||||
m_transaction_id = transaction_idP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_msg_length = 0;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddUserRequest::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
RRM2RRCMessageAddUserResponse* add_user_response = RadioResources::Instance()->Request(*this);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, add_user_response->GetSerializedMessageBuffer(), add_user_response->GetSerializedMessageSize());
|
||||
delete add_user_response;
|
||||
} catch (mobile_already_connected_error & x ) {
|
||||
RRM2RRCMessageAddUserResponse response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_protocolError, m_cell_id, m_mobile_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (std::exception const& e ) {
|
||||
RRM2RRCMessageAddUserResponse response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_internalError, m_cell_id, m_mobile_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageAddUserRequest::Serialize ()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
printf("[RRM][RRC2RRMMessageConnectionRequest] asn_DEF_RRC_RRM_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
printf("[RRM][RRC2RRMMessageConnectionRequest] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING\n");
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageAddUserRequest::~RRC2RRMMessageAddUserRequest()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEADDUSERREQUEST_H
|
||||
# define _RRC2RRMMESSAGEADDUSERREQUEST_H
|
||||
|
||||
# include "RRC-RRM-Message.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageAddUserRequest: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageAddUserRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
|
||||
RRC2RRMMessageAddUserRequest(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
~RRC2RRMMessageAddUserRequest ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
private:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
RRC_RRM_Message_t *m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "RRC2RRMMessageConnectionRequest.h"
|
||||
#include "RRM2RRCMessageConnectionResponse.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "Utility.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageConnectionRequest::RRC2RRMMessageConnectionRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
cout << "RRC2RRMMessageConnectionRequest(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationRequest.transactionId;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageConnectionRequest::RRC2RRMMessageConnectionRequest(std::string ip_dest_strP, int port_destP, transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
|
||||
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
|
||||
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcSystemConfigurationRequest;
|
||||
m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationRequest.transactionId = transaction_idP;
|
||||
|
||||
m_transaction_id = transaction_idP;
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_msg_length = 0;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageConnectionRequest::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
|
||||
RRM2RRCMessageConnectionResponse* connection_response = RadioResources::Instance()->Request(*this);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, connection_response->GetSerializedMessageBuffer(), connection_response->GetSerializedMessageSize());
|
||||
delete connection_response;
|
||||
} catch (enodeb_already_connected_error & x ) {
|
||||
RRM2RRCMessageConnectionResponse connection_response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_protocolError);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, connection_response.GetSerializedMessageBuffer(), connection_response.GetSerializedMessageSize());
|
||||
} catch (std::exception const& e ) {
|
||||
RRM2RRCMessageConnectionResponse connection_response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_internalError);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, connection_response.GetSerializedMessageBuffer(), connection_response.GetSerializedMessageSize());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageConnectionRequest::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
printf("[RRM][RRC2RRMMessageConnectionRequest] asn_DEF_RRM_RRC_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
printf("[RRM][RRC2RRMMessageConnectionRequest] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING\n");
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageConnectionRequest::~RRC2RRMMessageConnectionRequest()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGECONNECTIONREQUEST_H
|
||||
# define _RRC2RRMMESSAGECONNECTIONREQUEST_H
|
||||
|
||||
# include "RRC-RRM-Message.h"
|
||||
# include "Message.h"
|
||||
# include "storage.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageConnectionRequest: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageConnectionRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
|
||||
RRC2RRMMessageConnectionRequest (std::string ip_dest_strP, int port_destP, transaction_id_t transaction_idP);
|
||||
~RRC2RRMMessageConnectionRequest ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
private:
|
||||
//cell_id_t m_cell_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
RRC_RRM_Message_t *m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRC2RRMMessageRemoveRadioAccessBearerRequest.h"
|
||||
#include "RRM2RRCMessageRemoveRadioAccessBearerResponse.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageRemoveRadioAccessBearerRequest::RRC2RRMMessageRemoveRadioAccessBearerRequest(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageRemoveRadioAccessBearerRequest::RRC2RRMMessageRemoveRadioAccessBearerRequest(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
|
||||
Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_radio_bearer_id = m_message_storage.readChar();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("RRC\t-------REMOVE DATA RADIO BEARER REQUEST------->\tRRM\n");
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageRemoveRadioAccessBearerRequest::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
Transaction* tx = RadioResources::Instance()->Request(*this);
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse response(Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL, Message::MSG_RESP_OK, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id, tx);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (mobile_already_connected_error & x ) {
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse response(Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_PROTOCOL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (std::exception const& e ) {
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse response(Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_INTERNAL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageRemoveRadioAccessBearerRequest::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_REMOVE_RADIO_ACCESS_BEARER_REQUEST);
|
||||
m_message_storage.writeShort(7u);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_radio_bearer_id);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageRemoveRadioAccessBearerRequest::~RRC2RRMMessageRemoveRadioAccessBearerRequest()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEREMOVERADIOACCESSBEARERREQUEST_H
|
||||
# define _RRC2RRMMESSAGEREMOVERADIOACCESSBEARERREQUEST_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "storage.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageRemoveRadioAccessBearerRequest: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageRemoveRadioAccessBearerRequest(std::string ip_dest_strP,
|
||||
int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP);
|
||||
|
||||
RRC2RRMMessageRemoveRadioAccessBearerRequest (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
|
||||
~RRC2RRMMessageRemoveRadioAccessBearerRequest ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
const unsigned int GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
}
|
||||
const rb_id_t GetRadioBearerId() {
|
||||
return m_radio_bearer_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
private:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
|
||||
transaction_id_t m_transaction_id;
|
||||
rb_id_t m_radio_bearer_id;
|
||||
unsigned short m_traffic_class;
|
||||
unsigned short m_delay;
|
||||
unsigned int m_guaranted_bit_rate_uplink;
|
||||
unsigned int m_max_bit_rate_uplink;
|
||||
unsigned int m_guaranted_bit_rate_downlink;
|
||||
unsigned int m_max_bit_rate_downlink;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRC2RRMMessageRemoveUserRequest.h"
|
||||
#include "RRM2RRCMessageRemoveUserResponse.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageRemoveUserRequest::RRC2RRMMessageRemoveUserRequest(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageRemoveUserRequest::RRC2RRMMessageRemoveUserRequest(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
|
||||
Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("RRC\t-------REMOVE USER REQUEST------->\tRRM\n");
|
||||
printf("----------------------------------------------------------------------------------------------------------\n");
|
||||
printf("cell id = %d mobile id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageRemoveUserRequest::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
Transaction* tx = RadioResources::Instance()->Request(*this);
|
||||
RRM2RRCMessageRemoveUserResponse response(Message::STATUS_REMOVE_USER_SUCCESSFULL, Message::MSG_RESP_OK, m_cell_id, m_mobile_id, m_transaction_id, tx);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (mobile_already_connected_error & x ) {
|
||||
RRM2RRCMessageRemoveUserResponse response(Message::STATUS_REMOVE_USER_FAILED, Message::MSG_RESP_PROTOCOL_ERROR, m_cell_id, m_mobile_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
} catch (std::exception const& e ) {
|
||||
RRM2RRCMessageRemoveUserResponse response(Message::STATUS_REMOVE_USER_FAILED, Message::MSG_RESP_INTERNAL_ERROR, m_cell_id, m_mobile_id, m_transaction_id);
|
||||
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageRemoveUserRequest::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_REMOVE_USER_REQUEST);
|
||||
m_message_storage.writeShort(6u);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageRemoveUserRequest::~RRC2RRMMessageRemoveUserRequest()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEREMOVEUSERREQUEST_H
|
||||
# define _RRC2RRMMESSAGEREMOVEUSERREQUEST_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "storage.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageRemoveUserRequest: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageRemoveUserRequest(std::string ip_dest_strP, int port_destP,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
transaction_id_t );
|
||||
|
||||
RRC2RRMMessageRemoveUserRequest (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
|
||||
|
||||
~RRC2RRMMessageRemoveUserRequest ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const unsigned int GetENodeBId() {
|
||||
return 1u;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
}
|
||||
|
||||
protected:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRC2RRMMessageUserReconfigurationComplete.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "Utility.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageUserReconfigurationComplete::RRC2RRMMessageUserReconfigurationComplete(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
cout << "RRC2RRMMessageUserReconfigurationComplete(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.transactionId;
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.c_RNTI;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageUserReconfigurationComplete::RRC2RRMMessageUserReconfigurationComplete(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
|
||||
memset(m_asn1_message, 0, sizeof(RRC_RRM_Message_t));
|
||||
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
|
||||
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcUserReconfigurationComplete;
|
||||
m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.transactionId = transaction_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.e_NodeB_Identity.physCellId = cell_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.c_RNTI = mobile_idP;
|
||||
|
||||
|
||||
m_transaction_id = transaction_idP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
|
||||
m_msg_length = 0;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageUserReconfigurationComplete::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
try {
|
||||
RadioResources::Instance()->Request(*this);
|
||||
} catch (std::exception const& e ) {
|
||||
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRC2RRMMessageUserReconfigurationComplete::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
//xer_fprint(stdout, &asn_DEF_RRC_RRM_Message, (void*)m_asn1_message);
|
||||
char errbuf[256];
|
||||
size_t errlen = sizeof(errbuf);
|
||||
int ret = asn_check_constraints(&asn_DEF_RRC_RRM_Message, m_asn1_message, errbuf, &errlen);
|
||||
if (ret) {
|
||||
fprintf(stderr, "CONSTRAINT VALIDATION FAILED FOR RRM-RRC Message: %s\n", errbuf);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
printf("[RRM][RRC2RRMMessageUserReconfigurationComplete] asn_DEF_RRC_RRM_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cerr << "[RRM][RRC2RRMMessageUserReconfigurationComplete] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING" << endl;
|
||||
cerr << "[RRM][RRC2RRMMessageUserReconfigurationComplete] Cannot encode "<< enc_rval.failed_type->name <<" " << strerror(errno) << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//xer_fprint(stdout, &asn_DEF_RRC_RRM_Message, (void*)m_asn1_message);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRC2RRMMessageUserReconfigurationComplete::~RRC2RRMMessageUserReconfigurationComplete()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
cout << "[RRM][RRC2RRMMessageUserReconfigurationComplete::~RRC2RRMMessageUserReconfigurationComplete()] free asn1_message start" << endl;
|
||||
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
|
||||
m_asn1_message = NULL;
|
||||
cout << "[RRM][RRC2RRMMessageUserReconfigurationComplete::~RRC2RRMMessageUserReconfigurationComplete()] free asn1_message end " << endl;
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRC2RRMMESSAGEUSERRECONFIGURATIONCOMPLETE_H
|
||||
# define _RRC2RRMMESSAGEUSERRECONFIGURATIONCOMPLETE_H
|
||||
|
||||
# include "RRC-RRM-Message.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRC2RRMMessageUserReconfigurationComplete: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRC2RRMMessageUserReconfigurationComplete(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
|
||||
RRC2RRMMessageUserReconfigurationComplete(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
~RRC2RRMMessageUserReconfigurationComplete ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
const cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
};
|
||||
transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
protected:
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
|
||||
RRC_RRM_Message_t* m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "RRCMessageHandler.h"
|
||||
|
||||
|
||||
RRCMessageHandler* RRCMessageHandler::s_instance = 0;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void* RRCMessageHandlerThreadLoop(void *arg)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
return RRCMessageHandler::Instance()->ThreadLoop(arg);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRCMessageHandler* RRCMessageHandler::Instance()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (RRCMessageHandler::s_instance == 0) {
|
||||
RRCMessageHandler::s_instance = new RRCMessageHandler;
|
||||
}
|
||||
return s_instance;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRCMessageHandler::RRCMessageHandler()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_socket_handler = new SocketHandler();
|
||||
m_log = new StdoutLog() ;
|
||||
m_socket_handler->RegStdLog(m_log);
|
||||
|
||||
m_socket = new RRCUdpSocket(*m_socket_handler, 16384, true);
|
||||
port_t port = 33333;
|
||||
Ipv6Address ad("0::1", port);
|
||||
if (m_socket->Bind(ad, 1) == -1) {
|
||||
printf("Exiting...\n");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("Ready to receive on port %d\n",port);
|
||||
}
|
||||
m_socket_handler->Add(m_socket);
|
||||
|
||||
if (pthread_create(&m_thread, NULL, RRCMessageHandlerThreadLoop, (void *) NULL) != 0) {
|
||||
fprintf(stderr, "\nRRCMessageHandler::RRCMessageHandler() ERROR pthread_create...\n");
|
||||
} else {
|
||||
pthread_setname_np( m_thread, "RRCMsgHandler" );
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void* RRCMessageHandler::ThreadLoop(void *arg)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
m_socket_handler->Select(1,0);
|
||||
|
||||
while (m_socket_handler->GetCount() && !*m_quit) {
|
||||
m_socket_handler->Select(1,0);
|
||||
}
|
||||
fprintf(stderr, "\nRRCMessageHandler::ThreadLoop Exiting...\n");
|
||||
return NULL;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRCMessageHandler::Join(bool *quitP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_quit = quitP;
|
||||
|
||||
pthread_join(m_thread, NULL);
|
||||
fprintf(stderr, "\nRRCMessageHandler::Join Done\n");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void RRCMessageHandler::NotifyRxData(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message* message;
|
||||
do {
|
||||
//message = Message::Deserialize(in_bufferP, size_dataP, sa_fromP, sa_lenP);
|
||||
message = Message::DeserializeRRCMessage(in_bufferP, size_dataP, sa_fromP, sa_lenP);
|
||||
if (message != NULL) {
|
||||
//fprintf(stderr, "RRCMessageHandler::notifyRxData GOT MESSAGE\n");
|
||||
message->Forward();
|
||||
delete message;
|
||||
message = NULL;
|
||||
} else {
|
||||
// TO DO
|
||||
}
|
||||
} while (message != NULL);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RRCMessageHandler::Send2Peer(Message* messageP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
Send2Peer(messageP->GetSrcAddress(), messageP->GetSrcPort(), messageP->GetSerializedMessageBuffer(), messageP->GetSerializedMessageSize());
|
||||
delete messageP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RRCMessageHandler::Send2Peer(std::string ip_dest_strP, int port_destP, const char *in_bufferP, msg_length_t size_dataP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
std::string lo_bad_address("1");
|
||||
std::string lo_good_address("0::1");
|
||||
if (ip_dest_strP.compare(lo_bad_address) != 0) {
|
||||
m_socket->SendToBuf(ip_dest_strP, port_destP, in_bufferP, size_dataP, 0);
|
||||
} else {
|
||||
m_socket->SendToBuf(lo_good_address, port_destP, in_bufferP, size_dataP, 0);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRCMessageHandler::~RRCMessageHandler()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (m_socket_handler != 0)
|
||||
{
|
||||
delete m_socket_handler;
|
||||
}
|
||||
if (m_log != 0)
|
||||
{
|
||||
delete m_log;
|
||||
}
|
||||
// m_socket should be closed and deleted by m_socket_handler
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
# ifndef _RRCMESSAGEHANDLER_H
|
||||
# define _RRCMESSAGEHANDLER_H
|
||||
|
||||
# include <pthread.h>
|
||||
|
||||
# include "StdoutLog.h"
|
||||
# include "SocketHandlerEp.h"
|
||||
# include "RRCUdpSocket.h"
|
||||
# include "ListenSocket.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
|
||||
class RRCMessageHandler
|
||||
{
|
||||
public:
|
||||
static RRCMessageHandler *Instance ();
|
||||
void NotifyRxData (const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
|
||||
void Send2Peer (Message *);
|
||||
void Send2Peer(std::string ip_dest_strP, int port_destP, const char *in_bufferP, msg_length_t size_dataP);
|
||||
void* ThreadLoop(void *arg);
|
||||
void Join(bool *quitP);
|
||||
~RRCMessageHandler ();
|
||||
|
||||
private:
|
||||
RRCMessageHandler ();
|
||||
|
||||
SocketHandler *m_socket_handler;
|
||||
RRCUdpSocket *m_socket;
|
||||
StdoutLog *m_log;
|
||||
pthread_t m_thread;
|
||||
bool *m_quit;
|
||||
static RRCMessageHandler *s_instance;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "RRCUdpSocket.h"
|
||||
#include "RRCMessageHandler.h"
|
||||
|
||||
|
||||
RRCUdpSocket::RRCUdpSocket(ISocketHandler& h,int ibufsz, bool ipv6)
|
||||
:UdpSocket(h, ibufsz, ipv6)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void RRCUdpSocket::OnRawData(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
{
|
||||
RRCMessageHandler::Instance()->NotifyRxData(in_bufferP, size_dataP, sa_fromP, sa_lenP);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRCUDPSOCKET_H
|
||||
#define _RRCUDPSOCKET_H
|
||||
|
||||
#include "UdpSocket.h"
|
||||
|
||||
|
||||
class RRCUdpSocket : public UdpSocket
|
||||
{
|
||||
public:
|
||||
RRCUdpSocket(ISocketHandler&,int ibufsz, bool ipv6);
|
||||
|
||||
void OnRawData(const char *,size_t,struct sockaddr *,socklen_t);
|
||||
};
|
||||
|
||||
|
||||
#endif // _RRCUDPSOCKET_H
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRM2RRCMessageAddRadioAccessBearerResponse.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "TestScenario.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse::RRM2RRCMessageAddRadioAccessBearerResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_status = m_message_storage.readChar();
|
||||
m_reason = m_message_storage.readChar();
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_radio_bearer_id= m_message_storage.readChar();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
m_transaction_result = NULL;
|
||||
cout << "----------------------------------------------------------------------------------------------------------" << endl;
|
||||
cout << "RRC\t<-------ADD DATA RADIO BEARER RESPONSE-------\tRRM STATUS: "<< Message::StatusToString(m_status).c_str() << " REASON: "<< Message::ReasonToString(m_reason).c_str() << endl;
|
||||
cout << "----------------------------------------------------------------------------------------------------------" << endl;
|
||||
cout << "cell id = " << m_cell_id << " mobile id = " << m_mobile_id << " radio bearer id = "<< m_radio_bearer_id << " transaction id = "<< m_transaction_id << endl;
|
||||
if ((msg_lengthP - 6) > 0 ) {
|
||||
m_transaction_result = new Transaction(m_transaction_id, m_message_storage, msg_lengthP - 6);
|
||||
cout << m_transaction_result->ToString().c_str() << endl;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse::RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t statusP,
|
||||
msg_response_reason_t reasonP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse::RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t statusP,
|
||||
msg_response_reason_t reasonP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP,
|
||||
Transaction* transactionP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
m_transaction_result = transactionP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageAddRadioAccessBearerResponse::Serialize ()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
//printf("[RRM][RRM2RRCMessageAddRadioAccessBearerResponse] Serialize () status = %d reason = %d cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_status, m_reason, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
int tx_packet_size = 0;
|
||||
if (m_transaction_result != NULL) {
|
||||
tx_packet_size = m_transaction_result->Size();
|
||||
}
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_ADD_RADIO_ACCESS_BEARER_RESPONSE);
|
||||
m_message_storage.writeShort(9u+tx_packet_size);
|
||||
m_message_storage.writeChar(m_status);
|
||||
m_message_storage.writeChar(m_reason);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_radio_bearer_id);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
if (m_transaction_result != NULL) {
|
||||
unsigned char packet[tx_packet_size];
|
||||
m_transaction_result->Serialize(&packet[0]);
|
||||
m_message_storage.writePacket(&packet[0], tx_packet_size);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageAddRadioAccessBearerResponse::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef TEST_SCENARIO
|
||||
TestScenario::notifyRxMessage(this);
|
||||
#endif
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse::~RRM2RRCMessageAddRadioAccessBearerResponse()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_transaction_result != NULL) {
|
||||
delete m_transaction_result;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM2RRCMESSAGEADDRADIOACCESSBEARERRESPONSE_H
|
||||
# define _RRM2RRCMESSAGEADDRADIOACCESSBEARERRESPONSE_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
# include "Transaction.h"
|
||||
|
||||
class RRM2RRCMessageAddRadioAccessBearerResponse: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t ,
|
||||
msg_response_reason_t ,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
rb_id_t ,
|
||||
transaction_id_t );
|
||||
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t ,
|
||||
msg_response_reason_t ,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
rb_id_t ,
|
||||
transaction_id_t ,
|
||||
Transaction*);
|
||||
|
||||
~RRM2RRCMessageAddRadioAccessBearerResponse ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
msg_response_status_t GetStatus() {
|
||||
return m_status;
|
||||
};
|
||||
msg_response_reason_t GetReason() {
|
||||
return m_reason;
|
||||
};
|
||||
cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
};
|
||||
mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
};
|
||||
rb_id_t GetRadioBearerId() {
|
||||
return m_radio_bearer_id;
|
||||
};
|
||||
transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
protected:
|
||||
msg_response_status_t m_status;
|
||||
msg_response_reason_t m_reason;
|
||||
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
rb_id_t m_radio_bearer_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
Transaction* m_transaction_result;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRM2RRCMessageAddUserResponse.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "TestScenario.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddUserResponse::RRM2RRCMessageAddUserResponse(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
cout << "RRM2RRCMessageAddUserResponse(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_status = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Status;
|
||||
m_reason = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Reason;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.transactionId;
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.c_RNTI;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddUserResponse::RRM2RRCMessageAddUserResponse(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_transaction_id = transaction_idP;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.transactionId = transaction_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Status = statusP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Reason = reasonP;
|
||||
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.c_RNTI;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddUserResponse::RRM2RRCMessageAddUserResponse(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageAddUserResponse::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef TEST_SCENARIO
|
||||
TestScenario::notifyRxMessage(this);
|
||||
#endif
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageAddUserResponse::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
if (m_asn1_message != NULL) {
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
|
||||
char errbuf[128];
|
||||
size_t errlen = sizeof(errbuf);
|
||||
int ret = asn_check_constraints(&asn_DEF_RRM_RRC_Message, m_asn1_message, errbuf, &errlen);
|
||||
if (ret) {
|
||||
fprintf(stderr, "CONSTRAINT VALIDATION FAILED FOR RRM-RRC Message: %s\n", errbuf);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRM_RRC_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
printf("[RRM][RRM2RRCMessageAddUserResponse] asn_DEF_RRM_RRC_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
printf("[RRM][RRM2RRCMessageAddUserResponse] ASN1 : asn_DEF_RRM_RRC_Message encoding FAILED, EXITING\n");
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageAddUserResponse::~RRM2RRCMessageAddUserResponse()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
ASN_STRUCT_FREE( asn_DEF_RRM_RRC_Message, m_asn1_message);
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM2RRCMESSAGEADDUSERRESPONSE_H
|
||||
# define _RRM2RRCMESSAGEADDUSERRESPONSE_H
|
||||
|
||||
# include "RRM-RRC-Message.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRM2RRCMessageAddUserResponse: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRM2RRCMessageAddUserResponse(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP);
|
||||
RRM2RRCMessageAddUserResponse(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP);
|
||||
RRM2RRCMessageAddUserResponse(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
~RRM2RRCMessageAddUserResponse ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
msg_response_status_t GetStatus() {
|
||||
return m_status;
|
||||
};
|
||||
msg_response_reason_t GetReason() {
|
||||
return m_reason;
|
||||
};
|
||||
const cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
};
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
protected:
|
||||
msg_response_status_t m_status;
|
||||
msg_response_reason_t m_reason;
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
|
||||
RRM_RRC_Message_t* m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRM2RRCMessageConnectionResponse.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "TestScenario.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageConnectionResponse::RRM2RRCMessageConnectionResponse(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
cout << "RRM2RRCMessageConnectionResponse(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_status = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.rrm_Response_Status;
|
||||
m_reason = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.rrm_Response_Reason;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.transactionId;
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.e_NodeB_Identity.physCellId;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageConnectionResponse::RRM2RRCMessageConnectionResponse(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_transaction_id = transaction_idP;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.transactionId = transaction_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.rrm_Response_Status = statusP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.rrm_Response_Reason = reasonP;
|
||||
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationResponse.e_NodeB_Identity.physCellId;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageConnectionResponse::RRM2RRCMessageConnectionResponse(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageConnectionResponse::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
cout << "[RRM][RRM2RRCMessageConnectionResponse] status = " << m_status << " reason = " << m_reason << " cell id = " << m_cell_id << endl;
|
||||
#ifdef TEST_SCENARIO
|
||||
TestScenario::notifyRxMessage(this);
|
||||
#endif
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageConnectionResponse::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
if (m_asn1_message != NULL) {
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
|
||||
char errbuf[128];
|
||||
size_t errlen = sizeof(errbuf);
|
||||
int ret = asn_check_constraints(&asn_DEF_RRM_RRC_Message, m_asn1_message, errbuf, &errlen);
|
||||
if (ret) {
|
||||
cerr << "[RRM][RRM2RRCMessageConnectionResponse] CONSTRAINT VALIDATION FAILED FOR RRM-RRC Message: " << errbuf << endl;
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRM_RRC_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
cout << "[RRM][RRM2RRCMessageConnectionResponse] asn_DEF_RRM_RRC_Message Encoded " << enc_rval.encoded << " bits (" << (enc_rval.encoded+7)/8 << " bytes)" << endl;
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cout << "[RRM][RRM2RRCMessageConnectionResponse] ASN1 : asn_DEF_RRM_RRC_Message encoding FAILED, EXITING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageConnectionResponse::~RRM2RRCMessageConnectionResponse()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
ASN_STRUCT_FREE( asn_DEF_RRM_RRC_Message, m_asn1_message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM2RRCMESSAGECONNECTIONRESPONSE_H
|
||||
# define _RRM2RRCMESSAGECONNECTIONRESPONSE_H
|
||||
|
||||
# include "RRM-RRC-Message.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRM2RRCMessageConnectionResponse: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRM2RRCMessageConnectionResponse(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP);
|
||||
RRM2RRCMessageConnectionResponse(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP);
|
||||
RRM2RRCMessageConnectionResponse (msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP=-1);
|
||||
~RRM2RRCMessageConnectionResponse ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
const msg_response_status_t GetStatus() {
|
||||
return m_status;
|
||||
};
|
||||
const msg_response_reason_t GetReason() {
|
||||
return m_reason;
|
||||
};
|
||||
const cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
protected:
|
||||
msg_response_status_t m_status;
|
||||
msg_response_reason_t m_reason;
|
||||
cell_id_t m_cell_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
|
||||
RRM_RRC_Message_t* m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
-128
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRM2RRCMessageRemoveRadioAccessBearerResponse.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "TestScenario.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse::RRM2RRCMessageRemoveRadioAccessBearerResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_status = m_message_storage.readChar();
|
||||
m_reason = m_message_storage.readChar();
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_radio_bearer_id = m_message_storage.readChar();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
m_transaction_result = NULL;
|
||||
cout << "----------------------------------------------------------------------------------------------------------" << endl;
|
||||
cout << "RRC\t<-------REMOVE DATA RADIO BEARER RESPONSE-------\tRRM STATUS: "<< Message::StatusToString(m_status).c_str() << " REASON: "<< Message::ReasonToString(m_reason).c_str() << endl;
|
||||
cout << "----------------------------------------------------------------------------------------------------------" << endl;
|
||||
cout << "cell id = " << m_cell_id << " mobile id = " << m_mobile_id << " radio bearer id = "<< m_radio_bearer_id << " transaction id = "<< m_transaction_id << endl;
|
||||
if ((msg_lengthP - 6) > 0 ) {
|
||||
m_transaction_result = new Transaction(m_transaction_id, m_message_storage, msg_lengthP - 6);
|
||||
cout << m_transaction_result->ToString().c_str() << endl;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse::RRM2RRCMessageRemoveRadioAccessBearerResponse(msg_response_status_t statusP,
|
||||
msg_response_reason_t reasonP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse::RRM2RRCMessageRemoveRadioAccessBearerResponse(msg_response_status_t statusP,
|
||||
msg_response_reason_t reasonP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
transaction_id_t transaction_idP,
|
||||
Transaction* transactionP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_radio_bearer_id = radio_bearer_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
m_transaction_result = transactionP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageRemoveRadioAccessBearerResponse::Serialize ()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
// printf("[RRM][RRM2RRCMessageRemoveRadioAccessBearerResponse] Serialize () status = %d reason = %d cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_status, m_reason, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
|
||||
int tx_packet_size = 0;
|
||||
if (m_transaction_result != NULL) {
|
||||
tx_packet_size = m_transaction_result->Size();
|
||||
}
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_REMOVE_RADIO_ACCESS_BEARER_RESPONSE);
|
||||
m_message_storage.writeShort(9u+tx_packet_size);
|
||||
m_message_storage.writeChar(m_status);
|
||||
m_message_storage.writeChar(m_reason);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_radio_bearer_id);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
if (m_transaction_result != NULL) {
|
||||
unsigned char packet[tx_packet_size];
|
||||
m_transaction_result->Serialize(&packet[0]);
|
||||
m_message_storage.writePacket(&packet[0], tx_packet_size);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageRemoveRadioAccessBearerResponse::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef TEST_SCENARIO
|
||||
TestScenario::notifyRxMessage(this);
|
||||
#endif
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse::~RRM2RRCMessageRemoveRadioAccessBearerResponse()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_transaction_result != NULL) {
|
||||
delete m_transaction_result;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM2RRCMESSAGEREMOVERADIOACCESSBEARERRESPONSE_H
|
||||
# define _RRM2RRCMESSAGEREMOVERADIOACCESSBEARERRESPONSE_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
# include "Transaction.h"
|
||||
|
||||
class RRM2RRCMessageRemoveRadioAccessBearerResponse: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse(msg_response_status_t ,
|
||||
msg_response_reason_t ,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
rb_id_t ,
|
||||
transaction_id_t );
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse(msg_response_status_t ,
|
||||
msg_response_reason_t ,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
rb_id_t ,
|
||||
transaction_id_t ,
|
||||
Transaction* );
|
||||
|
||||
|
||||
~RRM2RRCMessageRemoveRadioAccessBearerResponse ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
msg_response_status_t GetStatus() {
|
||||
return m_status;
|
||||
};
|
||||
msg_response_reason_t GetReason() {
|
||||
return m_reason;
|
||||
};
|
||||
cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
};
|
||||
mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
};
|
||||
rb_id_t GetRadioBearerId() {
|
||||
return m_radio_bearer_id;
|
||||
};
|
||||
transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
protected:
|
||||
msg_response_status_t m_status;
|
||||
msg_response_reason_t m_reason;
|
||||
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
rb_id_t m_radio_bearer_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
Transaction* m_transaction_result;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRM2RRCMessageRemoveUserResponse.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "TestScenario.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveUserResponse::RRM2RRCMessageRemoveUserResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):Message(in_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
m_status = m_message_storage.readChar();
|
||||
m_reason = m_message_storage.readChar();
|
||||
m_cell_id = m_message_storage.readChar();
|
||||
m_mobile_id = m_message_storage.readChar();
|
||||
m_transaction_id = m_message_storage.readChar();
|
||||
m_transaction_result = NULL;
|
||||
cout << "----------------------------------------------------------------------------------------------------------" << endl;
|
||||
cout << "RRC\t<-------REMOVE USER RESPONSE-------\tRRM STATUS: " << Message::StatusToString(m_status).c_str() << " REASON: " << Message::ReasonToString(m_reason).c_str() << endl;
|
||||
cout << "----------------------------------------------------------------------------------------------------------"<< endl;
|
||||
cout << "cell id = "<< m_cell_id << " mobile id = " << m_mobile_id << " transaction id = " << m_transaction_id << endl;
|
||||
if ((msg_lengthP - 5) > 0 ) {
|
||||
m_transaction_result = new Transaction(m_transaction_id, m_message_storage, msg_lengthP - 5);
|
||||
printf("%s\n",m_transaction_result->ToString().c_str());
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveUserResponse::RRM2RRCMessageRemoveUserResponse(msg_response_status_t statusP,
|
||||
msg_response_reason_t reasonP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveUserResponse::RRM2RRCMessageRemoveUserResponse(msg_response_status_t statusP,
|
||||
msg_response_reason_t reasonP,
|
||||
cell_id_t cell_idP,
|
||||
mobile_id_t mobile_idP,
|
||||
transaction_id_t transaction_idP,
|
||||
Transaction* transactionP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
m_transaction_result = transactionP;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageRemoveUserResponse::Serialize ()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
// printf("[RRM][RRM2RRCMessageRemoveUserResponse] Serialize () status = %d reason = %d cell id = %d mobile id = %d transaction id = %d \n", m_status, m_reason, m_cell_id, m_mobile_id, m_transaction_id);
|
||||
int tx_packet_size = 0;
|
||||
if (m_transaction_result != NULL) {
|
||||
tx_packet_size = m_transaction_result->Size();
|
||||
}
|
||||
m_message_storage.reset();
|
||||
m_message_storage.writeChar(Message::MESSAGE_REMOVE_USER_RESPONSE);
|
||||
m_message_storage.writeShort(8u+tx_packet_size);
|
||||
m_message_storage.writeChar(m_status);
|
||||
m_message_storage.writeChar(m_reason);
|
||||
m_message_storage.writeChar(m_cell_id);
|
||||
m_message_storage.writeChar(m_mobile_id);
|
||||
m_message_storage.writeChar(m_transaction_id);
|
||||
if (m_transaction_result != NULL) {
|
||||
unsigned char packet[tx_packet_size];
|
||||
m_transaction_result->Serialize(&packet[0]);
|
||||
m_message_storage.writePacket(&packet[0], tx_packet_size);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageRemoveUserResponse::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef TEST_SCENARIO
|
||||
TestScenario::notifyRxMessage(this);
|
||||
#endif
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageRemoveUserResponse::~RRM2RRCMessageRemoveUserResponse()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_transaction_result != NULL) {
|
||||
delete m_transaction_result;
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM2RRCMESSAGEREMOVEUSERRESPONSE_H
|
||||
# define _RRM2RRCMESSAGEREMOVEUSERRESPONSE_H
|
||||
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
# include "Transaction.h"
|
||||
|
||||
class RRM2RRCMessageRemoveUserResponse: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRM2RRCMessageRemoveUserResponse(tcpip::Storage& in_messageP,
|
||||
msg_length_t msg_lengthP,
|
||||
frame_t msg_frameP,
|
||||
struct sockaddr *sa_fromP,
|
||||
socklen_t sa_lenP);
|
||||
|
||||
RRM2RRCMessageRemoveUserResponse(msg_response_status_t ,
|
||||
msg_response_reason_t ,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
transaction_id_t );
|
||||
|
||||
RRM2RRCMessageRemoveUserResponse(msg_response_status_t ,
|
||||
msg_response_reason_t ,
|
||||
cell_id_t ,
|
||||
mobile_id_t ,
|
||||
transaction_id_t ,
|
||||
Transaction* );
|
||||
|
||||
~RRM2RRCMessageRemoveUserResponse ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
msg_response_status_t GetStatus() {
|
||||
return m_status;
|
||||
};
|
||||
msg_response_reason_t GetReason() {
|
||||
return m_reason;
|
||||
};
|
||||
cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
};
|
||||
mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
};
|
||||
transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
private:
|
||||
msg_response_status_t m_status;
|
||||
msg_response_reason_t m_reason;
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
Transaction* m_transaction_result;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRM2RRCMessageUserReconfiguration.h"
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "TestScenario.h"
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageUserReconfiguration::RRM2RRCMessageUserReconfiguration(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
ParseIpParameters(sa_fromP, sa_lenP);
|
||||
cout << "RRM2RRCMessageUserReconfiguration(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_status = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.rrm_Response_Status;
|
||||
m_reason = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.rrm_Response_Reason;
|
||||
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.transactionId;
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.c_RNTI;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageUserReconfiguration::RRM2RRCMessageUserReconfiguration(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_transaction_id = transaction_idP;
|
||||
|
||||
m_asn1_message = asn1_messageP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.transactionId = transaction_idP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.rrm_Response_Status = statusP;
|
||||
m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.rrm_Response_Reason = reasonP;
|
||||
|
||||
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.e_NodeB_Identity.physCellId;
|
||||
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfiguration.c_RNTI;
|
||||
Serialize();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageUserReconfiguration::RRM2RRCMessageUserReconfiguration(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message();
|
||||
m_status = statusP;
|
||||
m_reason = reasonP;
|
||||
m_cell_id = cell_idP;
|
||||
m_mobile_id = mobile_idP;
|
||||
m_transaction_id = transaction_idP;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageUserReconfiguration::Forward()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef TEST_SCENARIO
|
||||
TestScenario::notifyRxMessage(this);
|
||||
#endif
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRM2RRCMessageUserReconfiguration::Serialize()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
|
||||
char errbuf[256];
|
||||
size_t errlen = sizeof(errbuf);
|
||||
int ret = asn_check_constraints(&asn_DEF_RRM_RRC_Message, m_asn1_message, errbuf, &errlen);
|
||||
if (ret) {
|
||||
fprintf(stderr, "CONSTRAINT VALIDATION FAILED FOR RRM-RRC Message: %s\n", errbuf);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_RRM_RRC_Message,
|
||||
(void*)m_asn1_message,
|
||||
&m_message_serialize_buffer[0],
|
||||
MESSAGE_SERIALIZE_BUFFER_SIZE);
|
||||
printf("[RRM][RRM2RRCMessageUserReconfiguration] asn_DEF_RRM_RRC_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
m_msg_length = (enc_rval.encoded+7)/8;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cerr << "[RRM][RRM2RRCMessageUserReconfiguration] ASN1 : asn_DEF_RRM_RRC_Message encoding FAILED, EXITING" << endl;
|
||||
cerr << "[RRM][RRM2RRCMessageUserReconfiguration] Cannot encode "<< enc_rval.failed_type->name <<" " << strerror(errno) << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
RRM2RRCMessageUserReconfiguration::~RRM2RRCMessageUserReconfiguration()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_asn1_message != NULL) {
|
||||
cout << "[RRM][RRM2RRCMessageUserReconfiguration::~RRM2RRCMessageUserReconfiguration()] free asn1_message start" << endl;
|
||||
ASN_STRUCT_FREE( asn_DEF_RRM_RRC_Message, m_asn1_message);
|
||||
m_asn1_message = NULL;
|
||||
cout << "[RRM][RRM2RRCMessageUserReconfiguration::~RRM2RRCMessageUserReconfiguration()] free asn1_message end " << endl;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM2RRCMESSAGEUSERRECONFIGURATION_H
|
||||
# define _RRM2RRCMESSAGEUSERRECONFIGURATION_H
|
||||
|
||||
# include "RRM-RRC-Message.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
class RRM2RRCMessageUserReconfiguration: public Message
|
||||
{
|
||||
|
||||
public:
|
||||
RRM2RRCMessageUserReconfiguration(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP);
|
||||
RRM2RRCMessageUserReconfiguration(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP);
|
||||
RRM2RRCMessageUserReconfiguration(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
~RRM2RRCMessageUserReconfiguration ();
|
||||
|
||||
void Serialize ();
|
||||
void Forward();
|
||||
|
||||
msg_response_status_t GetStatus() {
|
||||
return m_status;
|
||||
};
|
||||
msg_response_reason_t GetReason() {
|
||||
return m_reason;
|
||||
};
|
||||
const cell_id_t GetENodeBId() {
|
||||
return m_cell_id;
|
||||
}
|
||||
const mobile_id_t GetMobileId() {
|
||||
return m_mobile_id;
|
||||
};
|
||||
const transaction_id_t GetTransactionId() {
|
||||
return m_transaction_id;
|
||||
};
|
||||
|
||||
protected:
|
||||
msg_response_status_t m_status;
|
||||
msg_response_reason_t m_reason;
|
||||
cell_id_t m_cell_id;
|
||||
mobile_id_t m_mobile_id;
|
||||
transaction_id_t m_transaction_id;
|
||||
|
||||
RRM_RRC_Message_t* m_asn1_message;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "RRMMessageHandler.h"
|
||||
|
||||
|
||||
RRMMessageHandler* RRMMessageHandler::s_instance = 0;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void* RRMMessageHandlerThreadLoop(void *arg)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
return RRMMessageHandler::Instance()->ThreadLoop(arg);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRMMessageHandler* RRMMessageHandler::Instance()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (RRMMessageHandler::s_instance == 0) {
|
||||
RRMMessageHandler::s_instance = new RRMMessageHandler;
|
||||
}
|
||||
return s_instance;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRMMessageHandler::RRMMessageHandler()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_socket_handler = new SocketHandler();
|
||||
m_log = new StdoutLog() ;
|
||||
m_socket_handler->RegStdLog(m_log);
|
||||
|
||||
m_socket = new RRMUdpSocket(*m_socket_handler, 16384, true);
|
||||
port_t port = 33334;
|
||||
Ipv6Address ad("0::1",port);
|
||||
if (m_socket->Bind(ad, 1) == -1) {
|
||||
printf("Exiting...\n");
|
||||
exit(-1);
|
||||
} else {
|
||||
printf("Ready to receive on port %d\n",port);
|
||||
}
|
||||
m_socket_handler->Add(m_socket);
|
||||
|
||||
if (pthread_create(&m_thread, NULL, RRMMessageHandlerThreadLoop, (void *) NULL) != 0) {
|
||||
fprintf(stderr, "\nRRMMessageHandler::RRMMessageHandler() ERROR pthread_create...\n");
|
||||
} else {
|
||||
pthread_setname_np( m_thread, "RRMMsgHandler" );
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void* RRMMessageHandler::ThreadLoop(void *arg)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
m_socket_handler->Select(1,0);
|
||||
|
||||
while (m_socket_handler->GetCount() && !*m_quit) {
|
||||
m_socket_handler->Select(1,0);
|
||||
}
|
||||
fprintf(stderr, "\nRRMMessageHandler::ThreadLoop Exiting...\n");
|
||||
return NULL;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRMMessageHandler::Join(bool *quitP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_quit = quitP;
|
||||
|
||||
pthread_join(m_thread, NULL);
|
||||
fprintf(stderr, "\nRRMMessageHandler::Join Done\n");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void RRMMessageHandler::NotifyRxData(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Message* message;
|
||||
do {
|
||||
fprintf(stderr, "RRMMessageHandler::notifyRxData GOT MESSAGE %d bytes\n", size_dataP);
|
||||
message = Message::DeserializeRRMMessage(in_bufferP, size_dataP, sa_fromP, sa_lenP);
|
||||
if (message != NULL) {
|
||||
message->Forward();
|
||||
delete message;
|
||||
message = NULL;
|
||||
} else {
|
||||
// TO DO
|
||||
}
|
||||
} while (message != NULL);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RRMMessageHandler::Send2Peer(Message* messageP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
Send2Peer(messageP->GetSrcAddress(), messageP->GetSrcPort(), messageP->GetSerializedMessageBuffer(), messageP->GetSerializedMessageSize());
|
||||
delete messageP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RRMMessageHandler::Send2Peer(std::string ip_dest_strP, int port_destP, const char *in_bufferP, size_t size_dataP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_socket->SendToBuf(ip_dest_strP, port_destP, in_bufferP, size_dataP, 0);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRMMessageHandler::~RRMMessageHandler()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (m_socket_handler != 0)
|
||||
{
|
||||
delete m_socket_handler;
|
||||
}
|
||||
if (m_log != 0)
|
||||
{
|
||||
delete m_log;
|
||||
}
|
||||
// m_socket should be closed and deleted by m_socket_handler
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRMMESSAGEHANDLER_H
|
||||
# define _RRMMESSAGEHANDLER_H
|
||||
|
||||
# include <pthread.h>
|
||||
|
||||
# include "StdoutLog.h"
|
||||
# include "SocketHandlerEp.h"
|
||||
# include "RRMUdpSocket.h"
|
||||
# include "ListenSocket.h"
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
|
||||
class RRMMessageHandler
|
||||
{
|
||||
public:
|
||||
static RRMMessageHandler *Instance ();
|
||||
void NotifyRxData (const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
|
||||
void Send2Peer (Message *);
|
||||
void Send2Peer(std::string ip_dest_strP, int port_destP, const char *in_bufferP, size_t size_dataP);
|
||||
void* ThreadLoop(void *arg);
|
||||
void Join(bool *quitP);
|
||||
~RRMMessageHandler ();
|
||||
|
||||
private:
|
||||
RRMMessageHandler ();
|
||||
|
||||
SocketHandler *m_socket_handler;
|
||||
RRMUdpSocket *m_socket;
|
||||
StdoutLog *m_log;
|
||||
pthread_t m_thread;
|
||||
bool *m_quit;
|
||||
static RRMMessageHandler *s_instance;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "RRMUdpSocket.h"
|
||||
#include "RRMMessageHandler.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
RRMUdpSocket::RRMUdpSocket(ISocketHandler& h,int ibufsz, bool ipv6):UdpSocket(h, ibufsz, ipv6)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void RRMUdpSocket::OnRawData(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
RRMMessageHandler::Instance()->NotifyRxData(in_bufferP, size_dataP, sa_fromP, sa_lenP);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRMUDPSOCKET_H
|
||||
# define _RRMUDPSOCKET_H
|
||||
|
||||
# include "UdpSocket.h"
|
||||
|
||||
|
||||
class RRMUdpSocket : public UdpSocket
|
||||
{
|
||||
public:
|
||||
RRMUdpSocket(ISocketHandler&,int ibufsz, bool ipv6);
|
||||
|
||||
void OnRawData(const char *,size_t,struct sockaddr *,socklen_t);
|
||||
};
|
||||
|
||||
|
||||
#endif // _RRMUDPSOCKET_H
|
||||
File diff suppressed because one or more lines are too long
-121
@@ -1,121 +0,0 @@
|
||||
EUTRA-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
|
||||
HandoverCommand ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
handoverCommand-r8 HandoverCommand-r8-IEs,
|
||||
spare7 NULL,
|
||||
spare6 NULL, spare5 NULL, spare4 NULL,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
HandoverCommand-r8-IEs ::= SEQUENCE {
|
||||
handoverCommandMessage OCTET STRING (CONTAINING DL-DCCH-Message),
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
HandoverPreparationInformation ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
handoverPreparationInformation-r8 HandoverPreparationInformation-r8-IEs,
|
||||
spare7 NULL,
|
||||
spare6 NULL, spare5 NULL, spare4 NULL,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
HandoverPreparationInformation-r8-IEs ::= SEQUENCE {
|
||||
ue-RadioAccessCapabilityInfo UE-CapabilityRAT-ContainerList,
|
||||
as-Config AS-Config OPTIONAL, -- Cond HO
|
||||
rrm-Config RRM-Config OPTIONAL,
|
||||
as-Context AS-Context OPTIONAL, -- Cond HO
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
UERadioAccessCapabilityInformation ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
ueRadioAccessCapabilityInformation-r8
|
||||
UERadioAccessCapabilityInformation-r8-IEs,
|
||||
spare7 NULL,
|
||||
spare6 NULL, spare5 NULL, spare4 NULL,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
UERadioAccessCapabilityInformation-r8-IEs ::= SEQUENCE {
|
||||
ue-RadioAccessCapabilityInfo OCTET STRING (CONTAINING UECapabilityInformation),
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
AS-Config ::= SEQUENCE {
|
||||
sourceMeasConfig MeasConfig,
|
||||
sourceRadioResourceConfig RadioResourceConfigDedicated,
|
||||
sourceSecurityAlgorithmConfig SecurityAlgorithmConfig,
|
||||
sourceUE-Identity C-RNTI,
|
||||
sourceMasterInformationBlock MasterInformationBlock,
|
||||
sourceSystemInformationBlockType1 SystemInformationBlockType1,
|
||||
sourceSystemInformationBlockType2 SystemInformationBlockType2,
|
||||
antennaInfoCommon AntennaInfoCommon,
|
||||
sourceDl-CarrierFreq ARFCN-ValueEUTRA,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
AS-Context ::= SEQUENCE {
|
||||
reestablishmentInfo ReestablishmentInfo OPTIONAL -- Cond HO
|
||||
}
|
||||
|
||||
|
||||
ReestablishmentInfo ::= SEQUENCE {
|
||||
sourcePhysCellId PhysCellId,
|
||||
targetCellShortMAC-I ShortMAC-I,
|
||||
additionalReestabInfoList AdditionalReestabInfoList OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
AdditionalReestabInfoList ::= SEQUENCE ( SIZE (1..maxReestabInfo) ) OF AdditionalReestabInfo
|
||||
|
||||
AdditionalReestabInfo ::= SEQUENCE{
|
||||
cellIdentity CellIdentity,
|
||||
key-eNodeB-Star Key-eNodeB-Star,
|
||||
shortMAC-I ShortMAC-I
|
||||
}
|
||||
|
||||
Key-eNodeB-Star ::= BIT STRING (SIZE (256))
|
||||
|
||||
|
||||
RRM-Config ::= SEQUENCE {
|
||||
ue-InactiveTime ENUMERATED {
|
||||
s1, s2, s3, s5, s7, s10, s15, s20,
|
||||
s25, s30, s40, s50, min1, min1s20c, min1s40,
|
||||
min2, min2s30, min3, min3s30, min4, min5, min6,
|
||||
min7, min8, min9, min10, min12, min14, min17, min20,
|
||||
min24, min28, min33, min38, min44, min50, hr1,
|
||||
hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6,
|
||||
hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2,
|
||||
day2hr12, day3, day4, day5, day7, day10, day14, day19,
|
||||
day24, day30, dayMoreThan30} OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
maxReestabInfo INTEGER ::= 32 -- Maximum number of KeNB* and shortMAC-I forwarded
|
||||
-- at handover for re-establishment preparation
|
||||
|
||||
|
||||
END
|
||||
|
||||
-2638
File diff suppressed because it is too large
Load Diff
-47
@@ -1,47 +0,0 @@
|
||||
EUTRA-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
|
||||
VarMeasConfig ::= SEQUENCE {
|
||||
-- Measurement identities
|
||||
measIdList MeasIdToAddModList OPTIONAL,
|
||||
-- Measurement objects
|
||||
measObjectList MeasObjectToAddModList OPTIONAL,
|
||||
-- Reporting configurations
|
||||
reportConfigList ReportConfigToAddModList OPTIONAL,
|
||||
-- Other parameters
|
||||
quantityConfig QuantityConfig OPTIONAL,
|
||||
s-Measure RSRP-Range OPTIONAL,
|
||||
speedStatePars CHOICE {
|
||||
release NULL,
|
||||
setup SEQUENCE {
|
||||
mobilityStateParameters MobilityStateParameters,
|
||||
timeToTrigger-SF SpeedStateScaleFactors
|
||||
}
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
VarMeasReportList ::= SEQUENCE (SIZE (1..maxMeasId)) OF VarMeasReport
|
||||
|
||||
VarMeasReport ::= SEQUENCE {
|
||||
-- List of measurement that have been triggered
|
||||
measId MeasId,
|
||||
cellsTriggeredList CellsTriggeredList OPTIONAL,
|
||||
numberOfReportsSent INTEGER
|
||||
}
|
||||
|
||||
CellsTriggeredList ::= SEQUENCE (SIZE (1..maxCellMeas)) OF PhysCellId
|
||||
|
||||
|
||||
VarShortMAC-Input ::= SEQUENCE {
|
||||
cellIdentity CellIdentity,
|
||||
physCellId PhysCellId,
|
||||
c-RNTI C-RNTI
|
||||
}
|
||||
|
||||
|
||||
|
||||
END
|
||||
|
||||
@@ -1,816 +0,0 @@
|
||||
ASN_MODULE_SOURCES= \
|
||||
BCCH-BCH-Message.c \
|
||||
BCCH-BCH-MessageType.c \
|
||||
BCCH-DL-SCH-Message.c \
|
||||
BCCH-DL-SCH-MessageType.c \
|
||||
PCCH-Message.c \
|
||||
PCCH-MessageType.c \
|
||||
DL-CCCH-Message.c \
|
||||
DL-CCCH-MessageType.c \
|
||||
DL-DCCH-Message.c \
|
||||
DL-DCCH-MessageType.c \
|
||||
UL-CCCH-Message.c \
|
||||
UL-CCCH-MessageType.c \
|
||||
UL-DCCH-Message.c \
|
||||
UL-DCCH-MessageType.c \
|
||||
CounterCheck.c \
|
||||
CounterCheck-r8-IEs.c \
|
||||
DRB-CountMSB-InfoList.c \
|
||||
DRB-CountMSB-Info.c \
|
||||
CounterCheckResponse.c \
|
||||
CounterCheckResponse-r8-IEs.c \
|
||||
DRB-CountInfoList.c \
|
||||
DRB-CountInfo.c \
|
||||
CSFBParametersRequestCDMA2000.c \
|
||||
CSFBParametersRequestCDMA2000-r8-IEs.c \
|
||||
CSFBParametersResponseCDMA2000.c \
|
||||
CSFBParametersResponseCDMA2000-r8-IEs.c \
|
||||
DLInformationTransfer.c \
|
||||
DLInformationTransfer-r8-IEs.c \
|
||||
HandoverFromEUTRAPreparationRequest.c \
|
||||
HandoverFromEUTRAPreparationRequest-r8-IEs.c \
|
||||
MasterInformationBlock.c \
|
||||
MeasurementReport.c \
|
||||
MeasurementReport-r8-IEs.c \
|
||||
MobilityFromEUTRACommand.c \
|
||||
MobilityFromEUTRACommand-r8-IEs.c \
|
||||
Handover.c \
|
||||
CellChangeOrder.c \
|
||||
SI-OrPSI-GERAN.c \
|
||||
SystemInfoListGERAN.c \
|
||||
Paging.c \
|
||||
PagingRecordList.c \
|
||||
PagingRecord.c \
|
||||
PagingUE-Identity.c \
|
||||
IMSI.c \
|
||||
IMSI-Digit.c \
|
||||
RRCConnectionReconfiguration.c \
|
||||
RRCConnectionReconfiguration-r8-IEs.c \
|
||||
SecurityConfigHO.c \
|
||||
RRCConnectionReconfigurationComplete.c \
|
||||
RRCConnectionReconfigurationComplete-r8-IEs.c \
|
||||
RRCConnectionReestablishment.c \
|
||||
RRCConnectionReestablishment-r8-IEs.c \
|
||||
RRCConnectionReestablishmentComplete.c \
|
||||
RRCConnectionReestablishmentComplete-r8-IEs.c \
|
||||
RRCConnectionReestablishmentReject.c \
|
||||
RRCConnectionReestablishmentReject-r8-IEs.c \
|
||||
RRCConnectionReestablishmentRequest.c \
|
||||
RRCConnectionReestablishmentRequest-r8-IEs.c \
|
||||
ReestabUE-Identity.c \
|
||||
ReestablishmentCause.c \
|
||||
RRCConnectionReject.c \
|
||||
RRCConnectionReject-r8-IEs.c \
|
||||
RRCConnectionRelease.c \
|
||||
RRCConnectionRelease-r8-IEs.c \
|
||||
ReleaseCause.c \
|
||||
RedirectedCarrierInfo.c \
|
||||
IdleModeMobilityControlInfo.c \
|
||||
FreqPriorityListEUTRA.c \
|
||||
FreqPriorityEUTRA.c \
|
||||
FreqsPriorityListGERAN.c \
|
||||
FreqsPriorityGERAN.c \
|
||||
FreqPriorityListUTRA-FDD.c \
|
||||
FreqPriorityUTRA-FDD.c \
|
||||
FreqPriorityListUTRA-TDD.c \
|
||||
FreqPriorityUTRA-TDD.c \
|
||||
BandClassPriorityListHRPD.c \
|
||||
BandClassPriorityHRPD.c \
|
||||
BandClassPriorityList1XRTT.c \
|
||||
BandClassPriority1XRTT.c \
|
||||
RRCConnectionRequest.c \
|
||||
RRCConnectionRequest-r8-IEs.c \
|
||||
InitialUE-Identity.c \
|
||||
EstablishmentCause.c \
|
||||
RRCConnectionSetup.c \
|
||||
RRCConnectionSetup-r8-IEs.c \
|
||||
RRCConnectionSetupComplete.c \
|
||||
RRCConnectionSetupComplete-r8-IEs.c \
|
||||
RegisteredMME.c \
|
||||
SecurityModeCommand.c \
|
||||
SecurityModeCommand-r8-IEs.c \
|
||||
SecurityConfigSMC.c \
|
||||
SecurityModeComplete.c \
|
||||
SecurityModeComplete-r8-IEs.c \
|
||||
SecurityModeFailure.c \
|
||||
SecurityModeFailure-r8-IEs.c \
|
||||
SystemInformation.c \
|
||||
SystemInformation-r8-IEs.c \
|
||||
SystemInformationBlockType1.c \
|
||||
PLMN-IdentityList.c \
|
||||
PLMN-IdentityInfo.c \
|
||||
SchedulingInfoList.c \
|
||||
SchedulingInfo.c \
|
||||
SIB-MappingInfo.c \
|
||||
SIB-Type.c \
|
||||
UECapabilityEnquiry.c \
|
||||
UECapabilityEnquiry-r8-IEs.c \
|
||||
UE-CapabilityRequest.c \
|
||||
UECapabilityInformation.c \
|
||||
UECapabilityInformation-r8-IEs.c \
|
||||
ULHandoverPreparationTransfer.c \
|
||||
ULHandoverPreparationTransfer-r8-IEs.c \
|
||||
ULInformationTransfer.c \
|
||||
ULInformationTransfer-r8-IEs.c \
|
||||
SystemInformationBlockType2.c \
|
||||
AC-BarringConfig.c \
|
||||
MBSFN-SubframeConfigList.c \
|
||||
MBSFN-SubframeConfig.c \
|
||||
SystemInformationBlockType3.c \
|
||||
SystemInformationBlockType4.c \
|
||||
IntraFreqNeighCellList.c \
|
||||
IntraFreqNeighCellInfo.c \
|
||||
IntraFreqBlackCellList.c \
|
||||
SystemInformationBlockType5.c \
|
||||
InterFreqCarrierFreqList.c \
|
||||
InterFreqCarrierFreqInfo.c \
|
||||
InterFreqNeighCellList.c \
|
||||
InterFreqNeighCellInfo.c \
|
||||
InterFreqBlackCellList.c \
|
||||
SystemInformationBlockType6.c \
|
||||
CarrierFreqListUTRA-FDD.c \
|
||||
CarrierFreqUTRA-FDD.c \
|
||||
CarrierFreqListUTRA-TDD.c \
|
||||
CarrierFreqUTRA-TDD.c \
|
||||
SystemInformationBlockType7.c \
|
||||
CarrierFreqsInfoListGERAN.c \
|
||||
CarrierFreqsInfoGERAN.c \
|
||||
SystemInformationBlockType8.c \
|
||||
CellReselectionParametersCDMA2000.c \
|
||||
NeighCellListCDMA2000.c \
|
||||
NeighCellCDMA2000.c \
|
||||
NeighCellsPerBandclassListCDMA2000.c \
|
||||
NeighCellsPerBandclassCDMA2000.c \
|
||||
PhysCellIdListCDMA2000.c \
|
||||
BandClassListCDMA2000.c \
|
||||
BandClassInfoCDMA2000.c \
|
||||
SystemInformationBlockType9.c \
|
||||
SystemInformationBlockType10.c \
|
||||
SystemInformationBlockType11.c \
|
||||
AntennaInfoCommon.c \
|
||||
AntennaInfoDedicated.c \
|
||||
CQI-ReportConfig.c \
|
||||
CQI-ReportPeriodic.c \
|
||||
DRB-Identity.c \
|
||||
LogicalChannelConfig.c \
|
||||
MAC-MainConfig.c \
|
||||
DRX-Config.c \
|
||||
PDCP-Config.c \
|
||||
PDSCH-ConfigCommon.c \
|
||||
PDSCH-ConfigDedicated.c \
|
||||
PHICH-Config.c \
|
||||
PhysicalConfigDedicated.c \
|
||||
P-Max.c \
|
||||
PRACH-ConfigSIB.c \
|
||||
PRACH-Config.c \
|
||||
PRACH-ConfigInfo.c \
|
||||
PresenceAntennaPort1.c \
|
||||
PUCCH-ConfigCommon.c \
|
||||
PUCCH-ConfigDedicated.c \
|
||||
PUSCH-ConfigCommon.c \
|
||||
PUSCH-ConfigDedicated.c \
|
||||
UL-ReferenceSignalsPUSCH.c \
|
||||
RACH-ConfigCommon.c \
|
||||
RACH-ConfigDedicated.c \
|
||||
RadioResourceConfigCommonSIB.c \
|
||||
RadioResourceConfigCommon.c \
|
||||
BCCH-Config.c \
|
||||
PCCH-Config.c \
|
||||
UL-CyclicPrefixLength.c \
|
||||
RadioResourceConfigDedicated.c \
|
||||
SRB-ToAddModList.c \
|
||||
SRB-ToAddMod.c \
|
||||
DRB-ToAddModList.c \
|
||||
DRB-ToAddMod.c \
|
||||
DRB-ToReleaseList.c \
|
||||
RLC-Config.c \
|
||||
UL-AM-RLC.c \
|
||||
DL-AM-RLC.c \
|
||||
UL-UM-RLC.c \
|
||||
DL-UM-RLC.c \
|
||||
SN-FieldLength.c \
|
||||
T-PollRetransmit.c \
|
||||
PollPDU.c \
|
||||
PollByte.c \
|
||||
T-Reordering.c \
|
||||
T-StatusProhibit.c \
|
||||
SchedulingRequestConfig.c \
|
||||
SoundingRS-UL-ConfigCommon.c \
|
||||
SoundingRS-UL-ConfigDedicated.c \
|
||||
SPS-Config.c \
|
||||
SPS-ConfigDL.c \
|
||||
SPS-ConfigUL.c \
|
||||
N1-PUCCH-AN-PersistentList.c \
|
||||
TDD-Config.c \
|
||||
TimeAlignmentTimer.c \
|
||||
TPC-PDCCH-Config.c \
|
||||
TPC-Index.c \
|
||||
UplinkPowerControlCommon.c \
|
||||
UplinkPowerControlDedicated.c \
|
||||
DeltaFList-PUCCH.c \
|
||||
NextHopChainingCount.c \
|
||||
SecurityAlgorithmConfig.c \
|
||||
ShortMAC-I.c \
|
||||
AdditionalSpectrumEmission.c \
|
||||
ARFCN-ValueCDMA2000.c \
|
||||
ARFCN-ValueEUTRA.c \
|
||||
ARFCN-ValueGERAN.c \
|
||||
ARFCN-ValueUTRA.c \
|
||||
BandclassCDMA2000.c \
|
||||
BandIndicatorGERAN.c \
|
||||
CarrierFreqCDMA2000.c \
|
||||
CarrierFreqGERAN.c \
|
||||
CarrierFreqsGERAN.c \
|
||||
ExplicitListOfARFCNs.c \
|
||||
CDMA2000-Type.c \
|
||||
CellIdentity.c \
|
||||
CellIndexList.c \
|
||||
CellIndex.c \
|
||||
CellReselectionPriority.c \
|
||||
CSFB-RegistrationParam1XRTT.c \
|
||||
CellGlobalIdEUTRA.c \
|
||||
CellGlobalIdUTRA.c \
|
||||
CellGlobalIdGERAN.c \
|
||||
CellGlobalIdCDMA2000.c \
|
||||
MobilityControlInfo.c \
|
||||
CarrierBandwidthEUTRA.c \
|
||||
CarrierFreqEUTRA.c \
|
||||
MobilityParametersCDMA2000.c \
|
||||
MobilityStateParameters.c \
|
||||
PhysCellId.c \
|
||||
PhysCellIdRange.c \
|
||||
PhysCellIdCDMA2000.c \
|
||||
PhysCellIdGERAN.c \
|
||||
PhysCellIdUTRA-FDD.c \
|
||||
PhysCellIdUTRA-TDD.c \
|
||||
PLMN-Identity.c \
|
||||
MCC.c \
|
||||
MNC.c \
|
||||
MCC-MNC-Digit.c \
|
||||
PreRegistrationInfoHRPD.c \
|
||||
SecondaryPreRegistrationZoneIdListHRPD.c \
|
||||
PreRegistrationZoneIdHRPD.c \
|
||||
Q-RxLevMin.c \
|
||||
Q-OffsetRange.c \
|
||||
Q-OffsetRangeInterRAT.c \
|
||||
ReselectionThreshold.c \
|
||||
SpeedStateScaleFactors.c \
|
||||
SystemTimeInfoCDMA2000.c \
|
||||
TrackingAreaCode.c \
|
||||
T-Reselection.c \
|
||||
AllowedMeasBandwidth.c \
|
||||
Hysteresis.c \
|
||||
MeasConfig.c \
|
||||
MeasIdToRemoveList.c \
|
||||
MeasObjectToRemoveList.c \
|
||||
ReportConfigToRemoveList.c \
|
||||
MeasGapConfig.c \
|
||||
MeasId.c \
|
||||
MeasIdToAddModList.c \
|
||||
MeasIdToAddMod.c \
|
||||
MeasObjectCDMA2000.c \
|
||||
CellsToAddModListCDMA2000.c \
|
||||
CellsToAddModCDMA2000.c \
|
||||
MeasObjectEUTRA.c \
|
||||
CellsToAddModList.c \
|
||||
CellsToAddMod.c \
|
||||
BlackCellsToAddModList.c \
|
||||
BlackCellsToAddMod.c \
|
||||
MeasObjectGERAN.c \
|
||||
MeasObjectId.c \
|
||||
MeasObjectToAddModList.c \
|
||||
MeasObjectToAddMod.c \
|
||||
MeasObjectUTRA.c \
|
||||
CellsToAddModListUTRA-FDD.c \
|
||||
CellsToAddModUTRA-FDD.c \
|
||||
CellsToAddModListUTRA-TDD.c \
|
||||
CellsToAddModUTRA-TDD.c \
|
||||
MeasResults.c \
|
||||
MeasResultListEUTRA.c \
|
||||
MeasResultEUTRA.c \
|
||||
MeasResultListUTRA.c \
|
||||
MeasResultUTRA.c \
|
||||
MeasResultListGERAN.c \
|
||||
MeasResultGERAN.c \
|
||||
MeasResultsCDMA2000.c \
|
||||
MeasResultListCDMA2000.c \
|
||||
MeasResultCDMA2000.c \
|
||||
PLMN-IdentityList2.c \
|
||||
QuantityConfig.c \
|
||||
QuantityConfigEUTRA.c \
|
||||
QuantityConfigUTRA.c \
|
||||
QuantityConfigGERAN.c \
|
||||
QuantityConfigCDMA2000.c \
|
||||
ReportConfigEUTRA.c \
|
||||
ThresholdEUTRA.c \
|
||||
ReportConfigId.c \
|
||||
ReportConfigInterRAT.c \
|
||||
ThresholdUTRA.c \
|
||||
ThresholdGERAN.c \
|
||||
ThresholdCDMA2000.c \
|
||||
ReportConfigToAddModList.c \
|
||||
ReportConfigToAddMod.c \
|
||||
ReportInterval.c \
|
||||
RSRP-Range.c \
|
||||
RSRQ-Range.c \
|
||||
TimeToTrigger.c \
|
||||
C-RNTI.c \
|
||||
DedicatedInfoCDMA2000.c \
|
||||
DedicatedInfoNAS.c \
|
||||
FilterCoefficient.c \
|
||||
MMEC.c \
|
||||
NeighCellConfig.c \
|
||||
RAND-CDMA2000.c \
|
||||
RAT-Type.c \
|
||||
RRC-TransactionIdentifier.c \
|
||||
S-TMSI.c \
|
||||
UE-CapabilityRAT-ContainerList.c \
|
||||
UE-CapabilityRAT-Container.c \
|
||||
UE-EUTRA-Capability.c \
|
||||
AccessStratumRelease.c \
|
||||
PDCP-Parameters.c \
|
||||
PhyLayerParameters.c \
|
||||
RF-Parameters.c \
|
||||
SupportedBandListEUTRA.c \
|
||||
SupportedBandEUTRA.c \
|
||||
MeasParameters.c \
|
||||
BandListEUTRA.c \
|
||||
BandInfoEUTRA.c \
|
||||
InterFreqBandList.c \
|
||||
InterFreqBandInfo.c \
|
||||
InterRAT-BandList.c \
|
||||
InterRAT-BandInfo.c \
|
||||
IRAT-ParametersUTRA-FDD.c \
|
||||
SupportedBandListUTRA-FDD.c \
|
||||
SupportedBandUTRA-FDD.c \
|
||||
IRAT-ParametersUTRA-TDD128.c \
|
||||
SupportedBandListUTRA-TDD128.c \
|
||||
SupportedBandUTRA-TDD128.c \
|
||||
IRAT-ParametersUTRA-TDD384.c \
|
||||
SupportedBandListUTRA-TDD384.c \
|
||||
SupportedBandUTRA-TDD384.c \
|
||||
IRAT-ParametersUTRA-TDD768.c \
|
||||
SupportedBandListUTRA-TDD768.c \
|
||||
SupportedBandUTRA-TDD768.c \
|
||||
IRAT-ParametersGERAN.c \
|
||||
SupportedBandListGERAN.c \
|
||||
SupportedBandGERAN.c \
|
||||
IRAT-ParametersCDMA2000-HRPD.c \
|
||||
SupportedBandListHRPD.c \
|
||||
IRAT-ParametersCDMA2000-1XRTT.c \
|
||||
SupportedBandList1XRTT.c \
|
||||
UE-TimersAndConstants.c
|
||||
|
||||
ASN_MODULE_HEADERS= \
|
||||
BCCH-BCH-Message.h \
|
||||
BCCH-BCH-MessageType.h \
|
||||
BCCH-DL-SCH-Message.h \
|
||||
BCCH-DL-SCH-MessageType.h \
|
||||
PCCH-Message.h \
|
||||
PCCH-MessageType.h \
|
||||
DL-CCCH-Message.h \
|
||||
DL-CCCH-MessageType.h \
|
||||
DL-DCCH-Message.h \
|
||||
DL-DCCH-MessageType.h \
|
||||
UL-CCCH-Message.h \
|
||||
UL-CCCH-MessageType.h \
|
||||
UL-DCCH-Message.h \
|
||||
UL-DCCH-MessageType.h \
|
||||
CounterCheck.h \
|
||||
CounterCheck-r8-IEs.h \
|
||||
DRB-CountMSB-InfoList.h \
|
||||
DRB-CountMSB-Info.h \
|
||||
CounterCheckResponse.h \
|
||||
CounterCheckResponse-r8-IEs.h \
|
||||
DRB-CountInfoList.h \
|
||||
DRB-CountInfo.h \
|
||||
CSFBParametersRequestCDMA2000.h \
|
||||
CSFBParametersRequestCDMA2000-r8-IEs.h \
|
||||
CSFBParametersResponseCDMA2000.h \
|
||||
CSFBParametersResponseCDMA2000-r8-IEs.h \
|
||||
DLInformationTransfer.h \
|
||||
DLInformationTransfer-r8-IEs.h \
|
||||
HandoverFromEUTRAPreparationRequest.h \
|
||||
HandoverFromEUTRAPreparationRequest-r8-IEs.h \
|
||||
MasterInformationBlock.h \
|
||||
MeasurementReport.h \
|
||||
MeasurementReport-r8-IEs.h \
|
||||
MobilityFromEUTRACommand.h \
|
||||
MobilityFromEUTRACommand-r8-IEs.h \
|
||||
Handover.h \
|
||||
CellChangeOrder.h \
|
||||
SI-OrPSI-GERAN.h \
|
||||
SystemInfoListGERAN.h \
|
||||
Paging.h \
|
||||
PagingRecordList.h \
|
||||
PagingRecord.h \
|
||||
PagingUE-Identity.h \
|
||||
IMSI.h \
|
||||
IMSI-Digit.h \
|
||||
RRCConnectionReconfiguration.h \
|
||||
RRCConnectionReconfiguration-r8-IEs.h \
|
||||
SecurityConfigHO.h \
|
||||
RRCConnectionReconfigurationComplete.h \
|
||||
RRCConnectionReconfigurationComplete-r8-IEs.h \
|
||||
RRCConnectionReestablishment.h \
|
||||
RRCConnectionReestablishment-r8-IEs.h \
|
||||
RRCConnectionReestablishmentComplete.h \
|
||||
RRCConnectionReestablishmentComplete-r8-IEs.h \
|
||||
RRCConnectionReestablishmentReject.h \
|
||||
RRCConnectionReestablishmentReject-r8-IEs.h \
|
||||
RRCConnectionReestablishmentRequest.h \
|
||||
RRCConnectionReestablishmentRequest-r8-IEs.h \
|
||||
ReestabUE-Identity.h \
|
||||
ReestablishmentCause.h \
|
||||
RRCConnectionReject.h \
|
||||
RRCConnectionReject-r8-IEs.h \
|
||||
RRCConnectionRelease.h \
|
||||
RRCConnectionRelease-r8-IEs.h \
|
||||
ReleaseCause.h \
|
||||
RedirectedCarrierInfo.h \
|
||||
IdleModeMobilityControlInfo.h \
|
||||
FreqPriorityListEUTRA.h \
|
||||
FreqPriorityEUTRA.h \
|
||||
FreqsPriorityListGERAN.h \
|
||||
FreqsPriorityGERAN.h \
|
||||
FreqPriorityListUTRA-FDD.h \
|
||||
FreqPriorityUTRA-FDD.h \
|
||||
FreqPriorityListUTRA-TDD.h \
|
||||
FreqPriorityUTRA-TDD.h \
|
||||
BandClassPriorityListHRPD.h \
|
||||
BandClassPriorityHRPD.h \
|
||||
BandClassPriorityList1XRTT.h \
|
||||
BandClassPriority1XRTT.h \
|
||||
RRCConnectionRequest.h \
|
||||
RRCConnectionRequest-r8-IEs.h \
|
||||
InitialUE-Identity.h \
|
||||
EstablishmentCause.h \
|
||||
RRCConnectionSetup.h \
|
||||
RRCConnectionSetup-r8-IEs.h \
|
||||
RRCConnectionSetupComplete.h \
|
||||
RRCConnectionSetupComplete-r8-IEs.h \
|
||||
RegisteredMME.h \
|
||||
SecurityModeCommand.h \
|
||||
SecurityModeCommand-r8-IEs.h \
|
||||
SecurityConfigSMC.h \
|
||||
SecurityModeComplete.h \
|
||||
SecurityModeComplete-r8-IEs.h \
|
||||
SecurityModeFailure.h \
|
||||
SecurityModeFailure-r8-IEs.h \
|
||||
SystemInformation.h \
|
||||
SystemInformation-r8-IEs.h \
|
||||
SystemInformationBlockType1.h \
|
||||
PLMN-IdentityList.h \
|
||||
PLMN-IdentityInfo.h \
|
||||
SchedulingInfoList.h \
|
||||
SchedulingInfo.h \
|
||||
SIB-MappingInfo.h \
|
||||
SIB-Type.h \
|
||||
UECapabilityEnquiry.h \
|
||||
UECapabilityEnquiry-r8-IEs.h \
|
||||
UE-CapabilityRequest.h \
|
||||
UECapabilityInformation.h \
|
||||
UECapabilityInformation-r8-IEs.h \
|
||||
ULHandoverPreparationTransfer.h \
|
||||
ULHandoverPreparationTransfer-r8-IEs.h \
|
||||
ULInformationTransfer.h \
|
||||
ULInformationTransfer-r8-IEs.h \
|
||||
SystemInformationBlockType2.h \
|
||||
AC-BarringConfig.h \
|
||||
MBSFN-SubframeConfigList.h \
|
||||
MBSFN-SubframeConfig.h \
|
||||
SystemInformationBlockType3.h \
|
||||
SystemInformationBlockType4.h \
|
||||
IntraFreqNeighCellList.h \
|
||||
IntraFreqNeighCellInfo.h \
|
||||
IntraFreqBlackCellList.h \
|
||||
SystemInformationBlockType5.h \
|
||||
InterFreqCarrierFreqList.h \
|
||||
InterFreqCarrierFreqInfo.h \
|
||||
InterFreqNeighCellList.h \
|
||||
InterFreqNeighCellInfo.h \
|
||||
InterFreqBlackCellList.h \
|
||||
SystemInformationBlockType6.h \
|
||||
CarrierFreqListUTRA-FDD.h \
|
||||
CarrierFreqUTRA-FDD.h \
|
||||
CarrierFreqListUTRA-TDD.h \
|
||||
CarrierFreqUTRA-TDD.h \
|
||||
SystemInformationBlockType7.h \
|
||||
CarrierFreqsInfoListGERAN.h \
|
||||
CarrierFreqsInfoGERAN.h \
|
||||
SystemInformationBlockType8.h \
|
||||
CellReselectionParametersCDMA2000.h \
|
||||
NeighCellListCDMA2000.h \
|
||||
NeighCellCDMA2000.h \
|
||||
NeighCellsPerBandclassListCDMA2000.h \
|
||||
NeighCellsPerBandclassCDMA2000.h \
|
||||
PhysCellIdListCDMA2000.h \
|
||||
BandClassListCDMA2000.h \
|
||||
BandClassInfoCDMA2000.h \
|
||||
SystemInformationBlockType9.h \
|
||||
SystemInformationBlockType10.h \
|
||||
SystemInformationBlockType11.h \
|
||||
AntennaInfoCommon.h \
|
||||
AntennaInfoDedicated.h \
|
||||
CQI-ReportConfig.h \
|
||||
CQI-ReportPeriodic.h \
|
||||
DRB-Identity.h \
|
||||
LogicalChannelConfig.h \
|
||||
MAC-MainConfig.h \
|
||||
DRX-Config.h \
|
||||
PDCP-Config.h \
|
||||
PDSCH-ConfigCommon.h \
|
||||
PDSCH-ConfigDedicated.h \
|
||||
PHICH-Config.h \
|
||||
PhysicalConfigDedicated.h \
|
||||
P-Max.h \
|
||||
PRACH-ConfigSIB.h \
|
||||
PRACH-Config.h \
|
||||
PRACH-ConfigInfo.h \
|
||||
PresenceAntennaPort1.h \
|
||||
PUCCH-ConfigCommon.h \
|
||||
PUCCH-ConfigDedicated.h \
|
||||
PUSCH-ConfigCommon.h \
|
||||
PUSCH-ConfigDedicated.h \
|
||||
UL-ReferenceSignalsPUSCH.h \
|
||||
RACH-ConfigCommon.h \
|
||||
RACH-ConfigDedicated.h \
|
||||
RadioResourceConfigCommonSIB.h \
|
||||
RadioResourceConfigCommon.h \
|
||||
BCCH-Config.h \
|
||||
PCCH-Config.h \
|
||||
UL-CyclicPrefixLength.h \
|
||||
RadioResourceConfigDedicated.h \
|
||||
SRB-ToAddModList.h \
|
||||
SRB-ToAddMod.h \
|
||||
DRB-ToAddModList.h \
|
||||
DRB-ToAddMod.h \
|
||||
DRB-ToReleaseList.h \
|
||||
RLC-Config.h \
|
||||
UL-AM-RLC.h \
|
||||
DL-AM-RLC.h \
|
||||
UL-UM-RLC.h \
|
||||
DL-UM-RLC.h \
|
||||
SN-FieldLength.h \
|
||||
T-PollRetransmit.h \
|
||||
PollPDU.h \
|
||||
PollByte.h \
|
||||
T-Reordering.h \
|
||||
T-StatusProhibit.h \
|
||||
SchedulingRequestConfig.h \
|
||||
SoundingRS-UL-ConfigCommon.h \
|
||||
SoundingRS-UL-ConfigDedicated.h \
|
||||
SPS-Config.h \
|
||||
SPS-ConfigDL.h \
|
||||
SPS-ConfigUL.h \
|
||||
N1-PUCCH-AN-PersistentList.h \
|
||||
TDD-Config.h \
|
||||
TimeAlignmentTimer.h \
|
||||
TPC-PDCCH-Config.h \
|
||||
TPC-Index.h \
|
||||
UplinkPowerControlCommon.h \
|
||||
UplinkPowerControlDedicated.h \
|
||||
DeltaFList-PUCCH.h \
|
||||
NextHopChainingCount.h \
|
||||
SecurityAlgorithmConfig.h \
|
||||
ShortMAC-I.h \
|
||||
AdditionalSpectrumEmission.h \
|
||||
ARFCN-ValueCDMA2000.h \
|
||||
ARFCN-ValueEUTRA.h \
|
||||
ARFCN-ValueGERAN.h \
|
||||
ARFCN-ValueUTRA.h \
|
||||
BandclassCDMA2000.h \
|
||||
BandIndicatorGERAN.h \
|
||||
CarrierFreqCDMA2000.h \
|
||||
CarrierFreqGERAN.h \
|
||||
CarrierFreqsGERAN.h \
|
||||
ExplicitListOfARFCNs.h \
|
||||
CDMA2000-Type.h \
|
||||
CellIdentity.h \
|
||||
CellIndexList.h \
|
||||
CellIndex.h \
|
||||
CellReselectionPriority.h \
|
||||
CSFB-RegistrationParam1XRTT.h \
|
||||
CellGlobalIdEUTRA.h \
|
||||
CellGlobalIdUTRA.h \
|
||||
CellGlobalIdGERAN.h \
|
||||
CellGlobalIdCDMA2000.h \
|
||||
MobilityControlInfo.h \
|
||||
CarrierBandwidthEUTRA.h \
|
||||
CarrierFreqEUTRA.h \
|
||||
MobilityParametersCDMA2000.h \
|
||||
MobilityStateParameters.h \
|
||||
PhysCellId.h \
|
||||
PhysCellIdRange.h \
|
||||
PhysCellIdCDMA2000.h \
|
||||
PhysCellIdGERAN.h \
|
||||
PhysCellIdUTRA-FDD.h \
|
||||
PhysCellIdUTRA-TDD.h \
|
||||
PLMN-Identity.h \
|
||||
MCC.h \
|
||||
MNC.h \
|
||||
MCC-MNC-Digit.h \
|
||||
PreRegistrationInfoHRPD.h \
|
||||
SecondaryPreRegistrationZoneIdListHRPD.h \
|
||||
PreRegistrationZoneIdHRPD.h \
|
||||
Q-RxLevMin.h \
|
||||
Q-OffsetRange.h \
|
||||
Q-OffsetRangeInterRAT.h \
|
||||
ReselectionThreshold.h \
|
||||
SpeedStateScaleFactors.h \
|
||||
SystemTimeInfoCDMA2000.h \
|
||||
TrackingAreaCode.h \
|
||||
T-Reselection.h \
|
||||
AllowedMeasBandwidth.h \
|
||||
Hysteresis.h \
|
||||
MeasConfig.h \
|
||||
MeasIdToRemoveList.h \
|
||||
MeasObjectToRemoveList.h \
|
||||
ReportConfigToRemoveList.h \
|
||||
MeasGapConfig.h \
|
||||
MeasId.h \
|
||||
MeasIdToAddModList.h \
|
||||
MeasIdToAddMod.h \
|
||||
MeasObjectCDMA2000.h \
|
||||
CellsToAddModListCDMA2000.h \
|
||||
CellsToAddModCDMA2000.h \
|
||||
MeasObjectEUTRA.h \
|
||||
CellsToAddModList.h \
|
||||
CellsToAddMod.h \
|
||||
BlackCellsToAddModList.h \
|
||||
BlackCellsToAddMod.h \
|
||||
MeasObjectGERAN.h \
|
||||
MeasObjectId.h \
|
||||
MeasObjectToAddModList.h \
|
||||
MeasObjectToAddMod.h \
|
||||
MeasObjectUTRA.h \
|
||||
CellsToAddModListUTRA-FDD.h \
|
||||
CellsToAddModUTRA-FDD.h \
|
||||
CellsToAddModListUTRA-TDD.h \
|
||||
CellsToAddModUTRA-TDD.h \
|
||||
MeasResults.h \
|
||||
MeasResultListEUTRA.h \
|
||||
MeasResultEUTRA.h \
|
||||
MeasResultListUTRA.h \
|
||||
MeasResultUTRA.h \
|
||||
MeasResultListGERAN.h \
|
||||
MeasResultGERAN.h \
|
||||
MeasResultsCDMA2000.h \
|
||||
MeasResultListCDMA2000.h \
|
||||
MeasResultCDMA2000.h \
|
||||
PLMN-IdentityList2.h \
|
||||
QuantityConfig.h \
|
||||
QuantityConfigEUTRA.h \
|
||||
QuantityConfigUTRA.h \
|
||||
QuantityConfigGERAN.h \
|
||||
QuantityConfigCDMA2000.h \
|
||||
ReportConfigEUTRA.h \
|
||||
ThresholdEUTRA.h \
|
||||
ReportConfigId.h \
|
||||
ReportConfigInterRAT.h \
|
||||
ThresholdUTRA.h \
|
||||
ThresholdGERAN.h \
|
||||
ThresholdCDMA2000.h \
|
||||
ReportConfigToAddModList.h \
|
||||
ReportConfigToAddMod.h \
|
||||
ReportInterval.h \
|
||||
RSRP-Range.h \
|
||||
RSRQ-Range.h \
|
||||
TimeToTrigger.h \
|
||||
C-RNTI.h \
|
||||
DedicatedInfoCDMA2000.h \
|
||||
DedicatedInfoNAS.h \
|
||||
FilterCoefficient.h \
|
||||
MMEC.h \
|
||||
NeighCellConfig.h \
|
||||
RAND-CDMA2000.h \
|
||||
RAT-Type.h \
|
||||
RRC-TransactionIdentifier.h \
|
||||
S-TMSI.h \
|
||||
UE-CapabilityRAT-ContainerList.h \
|
||||
UE-CapabilityRAT-Container.h \
|
||||
UE-EUTRA-Capability.h \
|
||||
AccessStratumRelease.h \
|
||||
PDCP-Parameters.h \
|
||||
PhyLayerParameters.h \
|
||||
RF-Parameters.h \
|
||||
SupportedBandListEUTRA.h \
|
||||
SupportedBandEUTRA.h \
|
||||
MeasParameters.h \
|
||||
BandListEUTRA.h \
|
||||
BandInfoEUTRA.h \
|
||||
InterFreqBandList.h \
|
||||
InterFreqBandInfo.h \
|
||||
InterRAT-BandList.h \
|
||||
InterRAT-BandInfo.h \
|
||||
IRAT-ParametersUTRA-FDD.h \
|
||||
SupportedBandListUTRA-FDD.h \
|
||||
SupportedBandUTRA-FDD.h \
|
||||
IRAT-ParametersUTRA-TDD128.h \
|
||||
SupportedBandListUTRA-TDD128.h \
|
||||
SupportedBandUTRA-TDD128.h \
|
||||
IRAT-ParametersUTRA-TDD384.h \
|
||||
SupportedBandListUTRA-TDD384.h \
|
||||
SupportedBandUTRA-TDD384.h \
|
||||
IRAT-ParametersUTRA-TDD768.h \
|
||||
SupportedBandListUTRA-TDD768.h \
|
||||
SupportedBandUTRA-TDD768.h \
|
||||
IRAT-ParametersGERAN.h \
|
||||
SupportedBandListGERAN.h \
|
||||
SupportedBandGERAN.h \
|
||||
IRAT-ParametersCDMA2000-HRPD.h \
|
||||
SupportedBandListHRPD.h \
|
||||
IRAT-ParametersCDMA2000-1XRTT.h \
|
||||
SupportedBandList1XRTT.h \
|
||||
UE-TimersAndConstants.h
|
||||
|
||||
ASN_MODULE_HEADERS+=BOOLEAN.h
|
||||
ASN_MODULE_SOURCES+=BOOLEAN.c
|
||||
ASN_MODULE_HEADERS+=INTEGER.h
|
||||
ASN_MODULE_HEADERS+=NativeEnumerated.h
|
||||
ASN_MODULE_SOURCES+=INTEGER.c
|
||||
ASN_MODULE_HEADERS+=NULL.h
|
||||
ASN_MODULE_SOURCES+=NULL.c
|
||||
ASN_MODULE_SOURCES+=NativeEnumerated.c
|
||||
ASN_MODULE_HEADERS+=NativeInteger.h
|
||||
ASN_MODULE_SOURCES+=NativeInteger.c
|
||||
ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h
|
||||
ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c
|
||||
ASN_MODULE_HEADERS+=asn_SET_OF.h
|
||||
ASN_MODULE_SOURCES+=asn_SET_OF.c
|
||||
ASN_MODULE_HEADERS+=constr_CHOICE.h
|
||||
ASN_MODULE_SOURCES+=constr_CHOICE.c
|
||||
ASN_MODULE_HEADERS+=constr_SEQUENCE.h
|
||||
ASN_MODULE_SOURCES+=constr_SEQUENCE.c
|
||||
ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h
|
||||
ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c
|
||||
ASN_MODULE_HEADERS+=constr_SET_OF.h
|
||||
ASN_MODULE_SOURCES+=constr_SET_OF.c
|
||||
ASN_MODULE_HEADERS+=asn_application.h
|
||||
ASN_MODULE_HEADERS+=asn_system.h
|
||||
ASN_MODULE_HEADERS+=asn_codecs.h
|
||||
ASN_MODULE_HEADERS+=asn_internal.h
|
||||
ASN_MODULE_HEADERS+=OCTET_STRING.h
|
||||
ASN_MODULE_SOURCES+=OCTET_STRING.c
|
||||
ASN_MODULE_HEADERS+=BIT_STRING.h
|
||||
ASN_MODULE_SOURCES+=BIT_STRING.c
|
||||
ASN_MODULE_SOURCES+=asn_codecs_prim.c
|
||||
ASN_MODULE_HEADERS+=asn_codecs_prim.h
|
||||
ASN_MODULE_HEADERS+=ber_tlv_length.h
|
||||
ASN_MODULE_SOURCES+=ber_tlv_length.c
|
||||
ASN_MODULE_HEADERS+=ber_tlv_tag.h
|
||||
ASN_MODULE_SOURCES+=ber_tlv_tag.c
|
||||
ASN_MODULE_HEADERS+=ber_decoder.h
|
||||
ASN_MODULE_SOURCES+=ber_decoder.c
|
||||
ASN_MODULE_HEADERS+=der_encoder.h
|
||||
ASN_MODULE_SOURCES+=der_encoder.c
|
||||
ASN_MODULE_HEADERS+=constr_TYPE.h
|
||||
ASN_MODULE_SOURCES+=constr_TYPE.c
|
||||
ASN_MODULE_HEADERS+=constraints.h
|
||||
ASN_MODULE_SOURCES+=constraints.c
|
||||
ASN_MODULE_HEADERS+=xer_support.h
|
||||
ASN_MODULE_SOURCES+=xer_support.c
|
||||
ASN_MODULE_HEADERS+=xer_decoder.h
|
||||
ASN_MODULE_SOURCES+=xer_decoder.c
|
||||
ASN_MODULE_HEADERS+=xer_encoder.h
|
||||
ASN_MODULE_SOURCES+=xer_encoder.c
|
||||
ASN_MODULE_HEADERS+=per_support.h
|
||||
ASN_MODULE_SOURCES+=per_support.c
|
||||
ASN_MODULE_HEADERS+=per_decoder.h
|
||||
ASN_MODULE_SOURCES+=per_decoder.c
|
||||
ASN_MODULE_HEADERS+=per_encoder.h
|
||||
ASN_MODULE_SOURCES+=per_encoder.c
|
||||
ASN_MODULE_HEADERS+=per_opentype.h
|
||||
ASN_MODULE_SOURCES+=per_opentype.c
|
||||
ASN_CONVERTER_SOURCES+=converter-sample.c
|
||||
|
||||
|
||||
lib_LTLIBRARIES=libsomething.la
|
||||
libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
|
||||
|
||||
# This file may be used as an input for make(3)
|
||||
# Remove the lines below to convert it into a pure .am file
|
||||
TARGET = progname
|
||||
CFLAGS += -I.
|
||||
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): ${OBJS}
|
||||
$(CC) $(CFLAGS) -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
rm -f $(OBJS)
|
||||
|
||||
regen: regenerate-from-asn1-source
|
||||
|
||||
regenerate-from-asn1-source:
|
||||
asn1c -gen-PER -fcompound-names -fnative-types -fskeletons-copy ./ASN1_files/EUTRA-RRC-Definitions.asn
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
noinst_LIBRARIES = libsqlite.a
|
||||
|
||||
libsqlite_a_SOURCES = sqlite3.c sqlite3.h
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
noinst_LIBRARIES = libtcpip.a
|
||||
|
||||
libtcpip_a_SOURCES = storage.h storage.cpp
|
||||
|
||||
@@ -1,638 +0,0 @@
|
||||
/************************************************************************
|
||||
** This file is part of the network simulator Shawn. **
|
||||
** Copyright (C) 2004-2007 by the SwarmNet (www.swarmnet.de) project **
|
||||
** Shawn is free software; you can redistribute it and/or modify it **
|
||||
** under the terms of the BSD License. Refer to the shawn-licence.txt **
|
||||
** file in the root of the Shawn source tree for further details. **
|
||||
************************************************************************/
|
||||
|
||||
#ifdef SHAWN
|
||||
#include <apps/tcpip/socket.h>
|
||||
#include <sys/simulation/simulation_controller.h>
|
||||
#else
|
||||
#include "socket.h"
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_TCPIP
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
|
||||
#include <winsock2.h>
|
||||
|
||||
#ifndef vsnprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <string.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
#ifdef SHAWN
|
||||
extern "C" void init_tcpip( shawn::SimulationController& sc )
|
||||
{
|
||||
// std::cout << "tcpip init" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace tcpip
|
||||
{
|
||||
#ifdef WIN32
|
||||
bool Socket::init_windows_sockets_ = true;
|
||||
bool Socket::windows_sockets_initialized_ = false;
|
||||
int Socket::instance_count_ = 0;
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Socket::
|
||||
Socket(std::string host, int port)
|
||||
: host_( host ),
|
||||
port_( port ),
|
||||
socket_(-1),
|
||||
server_socket_(-1),
|
||||
blocking_(true)
|
||||
{
|
||||
verbose_ = false;
|
||||
init();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Socket::
|
||||
Socket(int port)
|
||||
: host_(""),
|
||||
port_( port ),
|
||||
socket_(-1),
|
||||
server_socket_(-1),
|
||||
blocking_(true)
|
||||
{
|
||||
verbose_ = false;
|
||||
init();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
init()
|
||||
{
|
||||
#ifdef WIN32
|
||||
instance_count_++;
|
||||
|
||||
if( init_windows_sockets_ && !windows_sockets_initialized_ )
|
||||
{
|
||||
WSAData wsaData;
|
||||
if( WSAStartup(MAKEWORD(1, 1), &wsaData) != 0 )
|
||||
BailOnSocketError("Unable to init WSA Sockets");
|
||||
windows_sockets_initialized_ = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Socket::
|
||||
~Socket()
|
||||
{
|
||||
// Close first an existing client connection ...
|
||||
close();
|
||||
#ifdef WIN32
|
||||
instance_count_--;
|
||||
#endif
|
||||
|
||||
// ... then the server socket
|
||||
if( server_socket_ >= 0 )
|
||||
{
|
||||
#ifdef WIN32
|
||||
::closesocket( server_socket_ );
|
||||
#else
|
||||
::close( server_socket_ );
|
||||
#endif
|
||||
server_socket_ = -1;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
if( server_socket_ == -1 && socket_ == -1
|
||||
&& init_windows_sockets_ && instance_count_ == 0 )
|
||||
WSACleanup();
|
||||
windows_sockets_initialized_ = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
BailOnSocketError( std::string context)
|
||||
const throw( SocketException )
|
||||
{
|
||||
#ifdef WIN32
|
||||
int e = WSAGetLastError();
|
||||
std::string msg = GetWinsockErrorString( e );
|
||||
#else
|
||||
std::string msg = strerror( errno );
|
||||
#endif
|
||||
throw SocketException( context + ": " + msg );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
int
|
||||
Socket::
|
||||
port()
|
||||
{
|
||||
return port_;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
bool
|
||||
Socket::
|
||||
datawaiting(int sock)
|
||||
const throw()
|
||||
{
|
||||
fd_set fds;
|
||||
FD_ZERO( &fds );
|
||||
FD_SET( sock, &fds );
|
||||
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
|
||||
int r = select( sock+1, &fds, NULL, NULL, &tv);
|
||||
|
||||
if (r < 0)
|
||||
BailOnSocketError("tcpip::Socket::datawaiting @ select");
|
||||
|
||||
if( FD_ISSET( sock, &fds ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
bool
|
||||
Socket::
|
||||
atoaddr( std::string address, struct in_addr& addr)
|
||||
{
|
||||
struct hostent* host;
|
||||
struct in_addr saddr;
|
||||
|
||||
// First try nnn.nnn.nnn.nnn form
|
||||
saddr.s_addr = inet_addr(address.c_str());
|
||||
if (saddr.s_addr != static_cast<unsigned int>(-1))
|
||||
{
|
||||
addr = saddr;
|
||||
return true;
|
||||
}
|
||||
|
||||
host = gethostbyname(address.c_str());
|
||||
if( host ) {
|
||||
addr = *((struct in_addr*)host->h_addr_list[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
accept()
|
||||
throw( SocketException )
|
||||
{
|
||||
if( socket_ >= 0 )
|
||||
return;
|
||||
|
||||
struct sockaddr_in client_addr;
|
||||
#ifdef WIN32
|
||||
int addrlen = sizeof(client_addr);
|
||||
#else
|
||||
socklen_t addrlen = sizeof(client_addr);
|
||||
#endif
|
||||
|
||||
if( server_socket_ < 0 )
|
||||
{
|
||||
struct sockaddr_in self;
|
||||
|
||||
//Create the server socket
|
||||
server_socket_ = static_cast<int>(socket( AF_INET, SOCK_STREAM, 0 ));
|
||||
if( server_socket_ < 0 )
|
||||
BailOnSocketError("tcpip::Socket::accept() @ socket");
|
||||
|
||||
//"Address already in use" error protection
|
||||
{
|
||||
int reuseaddr = 1;
|
||||
|
||||
#ifdef WIN32
|
||||
//setsockopt(server_socket_, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuseaddr, sizeof(reuseaddr));
|
||||
// No address reuse in Windows!!!
|
||||
#else
|
||||
setsockopt(server_socket_, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Initialize address/port structure
|
||||
memset(&self, 0, sizeof(self));
|
||||
self.sin_family = AF_INET;
|
||||
self.sin_port = htons(port_);
|
||||
self.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
// Assign a port number to the socket
|
||||
if ( bind(server_socket_, (struct sockaddr*)&self, sizeof(self)) != 0 )
|
||||
BailOnSocketError("tcpip::Socket::accept() Unable to create listening socket");
|
||||
|
||||
|
||||
// Make it a "listening socket"
|
||||
if ( listen(server_socket_, 10) == -1 )
|
||||
BailOnSocketError("tcpip::Socket::accept() Unable to listen on server socket");
|
||||
|
||||
// Make the newly created socket blocking or not
|
||||
set_blocking(blocking_);
|
||||
}
|
||||
|
||||
socket_ = static_cast<int>(::accept(server_socket_, (struct sockaddr*)&client_addr, &addrlen));
|
||||
|
||||
if( socket_ >= 0 )
|
||||
{
|
||||
int x = 1;
|
||||
setsockopt(socket_, IPPROTO_TCP, TCP_NODELAY, (const char*)&x, sizeof(x));
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
set_blocking(bool blocking)
|
||||
throw(SocketException )
|
||||
{
|
||||
blocking_ = blocking;
|
||||
|
||||
if( server_socket_ > 0 )
|
||||
{
|
||||
#ifdef WIN32
|
||||
ULONG NonBlock = blocking_ ? 0 : 1;
|
||||
if (ioctlsocket(server_socket_, FIONBIO, &NonBlock) == SOCKET_ERROR)
|
||||
BailOnSocketError("tcpip::Socket::set_blocking() Unable to initialize non blocking I/O");
|
||||
#else
|
||||
long arg = fcntl(server_socket_, F_GETFL, NULL);
|
||||
if (blocking_)
|
||||
{
|
||||
arg &= ~O_NONBLOCK;
|
||||
} else {
|
||||
arg |= O_NONBLOCK;
|
||||
}
|
||||
fcntl(server_socket_, F_SETFL, arg);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
connect()
|
||||
throw( SocketException )
|
||||
{
|
||||
in_addr addr;
|
||||
if( !atoaddr( host_.c_str(), addr) )
|
||||
BailOnSocketError("tcpip::Socket::connect() @ Invalid network address");
|
||||
|
||||
sockaddr_in address;
|
||||
memset( (char*)&address, 0, sizeof(address) );
|
||||
address.sin_family = AF_INET;
|
||||
address.sin_port = htons( port_ );
|
||||
address.sin_addr.s_addr = addr.s_addr;
|
||||
|
||||
socket_ = static_cast<int>(socket( PF_INET, SOCK_STREAM, 0 ));
|
||||
if( socket_ < 0 )
|
||||
BailOnSocketError("tcpip::Socket::connect() @ socket");
|
||||
|
||||
if( ::connect( socket_, (sockaddr const*)&address, sizeof(address) ) < 0 )
|
||||
BailOnSocketError("tcpip::Socket::connect() @ connect");
|
||||
|
||||
if( socket_ >= 0 )
|
||||
{
|
||||
int x = 1;
|
||||
setsockopt(socket_, IPPROTO_TCP, TCP_NODELAY, (const char*)&x, sizeof(x));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
close()
|
||||
{
|
||||
// Close client-connection
|
||||
if( socket_ >= 0 )
|
||||
{
|
||||
#ifdef WIN32
|
||||
::closesocket( socket_ );
|
||||
#else
|
||||
::close( socket_ );
|
||||
#endif
|
||||
|
||||
socket_ = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void
|
||||
Socket::
|
||||
send( std::vector<unsigned char> b)
|
||||
throw( SocketException )
|
||||
{
|
||||
if( socket_ < 0 ) return;
|
||||
|
||||
size_t numbytes = b.size();
|
||||
unsigned char *const buf = new unsigned char[numbytes];
|
||||
|
||||
for(size_t i = 0; i < numbytes; ++i)
|
||||
{
|
||||
buf[i] = b[i];
|
||||
}
|
||||
|
||||
if (verbose_)
|
||||
{
|
||||
cerr << "Send " << numbytes << " bytes via tcpip::Socket: [";
|
||||
for(size_t i = 0; i < numbytes; ++i)
|
||||
{
|
||||
buf[i] = b[i];
|
||||
cerr << " " << (int)b[i] << " ";
|
||||
}
|
||||
cerr << "]" << endl;
|
||||
}
|
||||
|
||||
unsigned char const *buf_ptr = buf;
|
||||
while( numbytes > 0 )
|
||||
{
|
||||
#ifdef WIN32
|
||||
int n = ::send( socket_, (const char*)buf_ptr, static_cast<int>(numbytes), 0 );
|
||||
#else
|
||||
int n = ::send( socket_, buf_ptr, numbytes, 0 );
|
||||
#endif
|
||||
if( n<0 )
|
||||
{
|
||||
// BailOnSocketError definitely throws an exception so clear up heap
|
||||
delete[] buf;
|
||||
BailOnSocketError( "send failed" );
|
||||
}
|
||||
|
||||
numbytes -= n;
|
||||
buf_ptr += n;
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void
|
||||
Socket::
|
||||
sendExact( const Storage &b)
|
||||
throw( SocketException )
|
||||
{
|
||||
int length = static_cast<int>(b.size());
|
||||
Storage length_storage;
|
||||
length_storage.writeInt(length + 4);
|
||||
vector<unsigned char> msg;
|
||||
msg.insert(msg.end(), length_storage.begin(), length_storage.end());
|
||||
msg.insert(msg.end(), b.begin(), b.end());
|
||||
send(msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
vector<unsigned char>
|
||||
Socket::
|
||||
receive(int bufSize)
|
||||
throw( SocketException )
|
||||
{
|
||||
vector<unsigned char> b;
|
||||
|
||||
if( socket_ < 0 )
|
||||
connect();
|
||||
|
||||
if( !datawaiting( socket_) )
|
||||
return b;
|
||||
|
||||
unsigned char const * const buf = new unsigned char[bufSize];
|
||||
int a = recv( socket_, (char*)buf, bufSize, 0 );
|
||||
|
||||
if( a <= 0 )
|
||||
{
|
||||
// BailOnSocketError definitely throws an exception so clear up heap
|
||||
delete[] buf;
|
||||
BailOnSocketError( "tcpip::Socket::receive() @ recv" );
|
||||
}
|
||||
|
||||
b.resize(a);
|
||||
for(int i = 0; i < a; ++i)
|
||||
{
|
||||
b[i] = buf[i];
|
||||
}
|
||||
|
||||
if (verbose_)
|
||||
{
|
||||
cerr << "Rcvd " << a << " bytes via tcpip::Socket: [";
|
||||
for(int i = 0; i < a; ++i)
|
||||
{
|
||||
cerr << " " << (int)b[i] << " ";
|
||||
}
|
||||
cerr << "]" << endl;
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
return b;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
|
||||
bool
|
||||
Socket::
|
||||
receiveExact( Storage &msg )
|
||||
throw( SocketException )
|
||||
{
|
||||
/* receive length of vector */
|
||||
unsigned char * const bufLength = new unsigned char[4];
|
||||
int bytesRead = 0;
|
||||
int readThisTime = 0;
|
||||
|
||||
while (bytesRead<4)
|
||||
{
|
||||
readThisTime = recv( socket_, (char*)(bufLength + bytesRead), 4-bytesRead, 0 );
|
||||
|
||||
if( readThisTime <= 0 )
|
||||
{
|
||||
// BailOnSocketError definitely throws an exception so clear up heap
|
||||
delete[] bufLength;
|
||||
BailOnSocketError( "tcpip::Socket::receive() @ recv" );
|
||||
}
|
||||
|
||||
bytesRead += readThisTime;
|
||||
}
|
||||
Storage length_storage(bufLength,4);
|
||||
int NN = length_storage.readInt() - 4;
|
||||
|
||||
/* receive vector */
|
||||
unsigned char * const buf = new unsigned char[NN];
|
||||
bytesRead = 0;
|
||||
readThisTime = 0;
|
||||
|
||||
while (bytesRead<NN)
|
||||
{
|
||||
readThisTime = recv( socket_, (char*)(buf + bytesRead), NN-bytesRead, 0 );
|
||||
|
||||
if( readThisTime <= 0 )
|
||||
{
|
||||
// BailOnSocketError definitely throws an exception so clear up heap
|
||||
delete[] bufLength;
|
||||
delete[] buf;
|
||||
BailOnSocketError( "tcpip::Socket::receive() @ recv" );
|
||||
}
|
||||
|
||||
bytesRead += readThisTime;
|
||||
}
|
||||
msg.reset();
|
||||
msg.writePacket(buf, NN);
|
||||
|
||||
if (verbose_)
|
||||
{
|
||||
cerr << "Rcvd Storage with " << 4 + NN << " bytes via tcpip::Socket: [";
|
||||
for (int i=0; i < 4; ++i)
|
||||
{
|
||||
cerr << " " << (int)bufLength[i] << " ";
|
||||
}
|
||||
for (int i=0; i < NN; ++i)
|
||||
{
|
||||
cerr << " " << (int)buf[i] << " ";
|
||||
}
|
||||
cerr << "]" << endl;
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
delete[] bufLength;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
bool
|
||||
Socket::
|
||||
has_client_connection()
|
||||
const
|
||||
{
|
||||
return socket_ >= 0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
bool
|
||||
Socket::
|
||||
is_blocking()
|
||||
throw()
|
||||
{
|
||||
return blocking_;
|
||||
}
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
// ----------------------------------------------------------------------
|
||||
std::string
|
||||
Socket::
|
||||
GetWinsockErrorString(int err)
|
||||
const
|
||||
{
|
||||
|
||||
switch( err)
|
||||
{
|
||||
case 0: return "No error";
|
||||
case WSAEINTR: return "Interrupted system call";
|
||||
case WSAEBADF: return "Bad file number";
|
||||
case WSAEACCES: return "Permission denied";
|
||||
case WSAEFAULT: return "Bad address";
|
||||
case WSAEINVAL: return "Invalid argument";
|
||||
case WSAEMFILE: return "Too many open sockets";
|
||||
case WSAEWOULDBLOCK: return "Operation would block";
|
||||
case WSAEINPROGRESS: return "Operation now in progress";
|
||||
case WSAEALREADY: return "Operation already in progress";
|
||||
case WSAENOTSOCK: return "Socket operation on non-socket";
|
||||
case WSAEDESTADDRREQ: return "Destination address required";
|
||||
case WSAEMSGSIZE: return "Message too long";
|
||||
case WSAEPROTOTYPE: return "Protocol wrong type for socket";
|
||||
case WSAENOPROTOOPT: return "Bad protocol option";
|
||||
case WSAEPROTONOSUPPORT: return "Protocol not supported";
|
||||
case WSAESOCKTNOSUPPORT: return "Socket type not supported";
|
||||
case WSAEOPNOTSUPP: return "Operation not supported on socket";
|
||||
case WSAEPFNOSUPPORT: return "Protocol family not supported";
|
||||
case WSAEAFNOSUPPORT: return "Address family not supported";
|
||||
case WSAEADDRINUSE: return "Address already in use";
|
||||
case WSAEADDRNOTAVAIL: return "Can't assign requested address";
|
||||
case WSAENETDOWN: return "Network is down";
|
||||
case WSAENETUNREACH: return "Network is unreachable";
|
||||
case WSAENETRESET: return "Net Socket reset";
|
||||
case WSAECONNABORTED: return "Software caused tcpip::Socket abort";
|
||||
case WSAECONNRESET: return "Socket reset by peer";
|
||||
case WSAENOBUFS: return "No buffer space available";
|
||||
case WSAEISCONN: return "Socket is already connected";
|
||||
case WSAENOTCONN: return "Socket is not connected";
|
||||
case WSAESHUTDOWN: return "Can't send after socket shutdown";
|
||||
case WSAETOOMANYREFS: return "Too many references, can't splice";
|
||||
case WSAETIMEDOUT: return "Socket timed out";
|
||||
case WSAECONNREFUSED: return "Socket refused";
|
||||
case WSAELOOP: return "Too many levels of symbolic links";
|
||||
case WSAENAMETOOLONG: return "File name too long";
|
||||
case WSAEHOSTDOWN: return "Host is down";
|
||||
case WSAEHOSTUNREACH: return "No route to host";
|
||||
case WSAENOTEMPTY: return "Directory not empty";
|
||||
case WSAEPROCLIM: return "Too many processes";
|
||||
case WSAEUSERS: return "Too many users";
|
||||
case WSAEDQUOT: return "Disc quota exceeded";
|
||||
case WSAESTALE: return "Stale NFS file handle";
|
||||
case WSAEREMOTE: return "Too many levels of remote in path";
|
||||
case WSASYSNOTREADY: return "Network system is unavailable";
|
||||
case WSAVERNOTSUPPORTED: return "Winsock version out of range";
|
||||
case WSANOTINITIALISED: return "WSAStartup not yet called";
|
||||
case WSAEDISCON: return "Graceful shutdown in progress";
|
||||
case WSAHOST_NOT_FOUND: return "Host not found";
|
||||
case WSANO_DATA: return "No host data of that type was found";
|
||||
}
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
#endif // WIN32
|
||||
|
||||
} // namespace tcpip
|
||||
|
||||
#endif // BUILD_TCPIP
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Source $Source: $
|
||||
* Version $Revision: 385 $
|
||||
* Date $Date: 2010-01-13 16:10:20 +0100 (Wed, 13 Jan 2010) $
|
||||
*-----------------------------------------------------------------------
|
||||
* $Log: $
|
||||
*-----------------------------------------------------------------------*/
|
||||
@@ -1,149 +0,0 @@
|
||||
/************************************************************************
|
||||
** This file is part of the network simulator Shawn. **
|
||||
** Copyright (C) 2004-2007 by the SwarmNet (www.swarmnet.de) project **
|
||||
** Shawn is free software; you can redistribute it and/or modify it **
|
||||
** under the terms of the BSD License. Refer to the shawn-licence.txt **
|
||||
** file in the root of the Shawn source tree for further details. **
|
||||
************************************************************************/
|
||||
|
||||
#ifndef __SHAWN_APPS_TCPIP_SOCKET_H
|
||||
#define __SHAWN_APPS_TCPIP_SOCKET_H
|
||||
|
||||
#ifdef SHAWN
|
||||
#include <shawn_config.h>
|
||||
#include "_apps_enable_cmake.h"
|
||||
#ifdef ENABLE_TCPIP
|
||||
#define BUILD_TCPIP
|
||||
#endif
|
||||
#else
|
||||
#define BUILD_TCPIP
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BUILD_TCPIP
|
||||
|
||||
// Get Storage
|
||||
#ifdef SHAWN
|
||||
#include <apps/tcpip/storage.h>
|
||||
#else
|
||||
#include "storage.h"
|
||||
#endif
|
||||
|
||||
#ifdef SHAWN
|
||||
namespace shawn
|
||||
{
|
||||
class SimulationController;
|
||||
}
|
||||
|
||||
// Dummy function is called when Shawn Simulation starts. Does nothing up to now.
|
||||
extern "C" void init_tcpip( shawn::SimulationController& );
|
||||
#endif
|
||||
|
||||
// Disable exception handling warnings
|
||||
#ifdef WIN32
|
||||
#pragma warning( disable : 4290 )
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
struct in_addr;
|
||||
|
||||
namespace tcpip
|
||||
{
|
||||
|
||||
class SocketException: public std::exception
|
||||
{
|
||||
private:
|
||||
std::string what_;
|
||||
public:
|
||||
SocketException( std::string what ) throw() {
|
||||
what_ = what;
|
||||
//std::cerr << "tcpip::SocketException: " << what << std::endl << std::flush;
|
||||
}
|
||||
|
||||
virtual const char* what() const throw() {
|
||||
return what_.c_str();
|
||||
}
|
||||
|
||||
~SocketException() throw() {}
|
||||
};
|
||||
|
||||
class Socket
|
||||
{
|
||||
friend class Response;
|
||||
public:
|
||||
/// Constructor that prepare to connect to host:port
|
||||
Socket(std::string host, int port);
|
||||
|
||||
/// Constructor that prepare for accepting a connection on given port
|
||||
Socket(int port);
|
||||
|
||||
/// Destructor
|
||||
~Socket();
|
||||
|
||||
/// Connects to host_:port_
|
||||
void connect() throw( SocketException );
|
||||
|
||||
/// Wait for a incoming connection to port_
|
||||
void accept() throw( SocketException );
|
||||
|
||||
void send( const std::vector<unsigned char> ) throw( SocketException );
|
||||
void sendExact( const Storage & ) throw( SocketException );
|
||||
std::vector<unsigned char> receive( int bufSize = 2048 ) throw( SocketException );
|
||||
bool receiveExact( Storage &) throw( SocketException );
|
||||
void close();
|
||||
int port();
|
||||
void set_blocking(bool) throw( SocketException );
|
||||
bool is_blocking() throw();
|
||||
bool has_client_connection() const;
|
||||
|
||||
// If verbose, each send and received data is written to stderr
|
||||
bool verbose() {
|
||||
return verbose_;
|
||||
}
|
||||
void set_verbose(bool newVerbose) {
|
||||
verbose_ = newVerbose;
|
||||
}
|
||||
|
||||
private:
|
||||
void init();
|
||||
void BailOnSocketError( std::string ) const throw( SocketException );
|
||||
#ifdef WIN32
|
||||
std::string GetWinsockErrorString(int err) const;
|
||||
#endif
|
||||
bool atoaddr(std::string, struct in_addr& addr);
|
||||
bool datawaiting(int sock) const throw();
|
||||
|
||||
std::string host_;
|
||||
int port_;
|
||||
int socket_;
|
||||
int server_socket_;
|
||||
bool blocking_;
|
||||
|
||||
bool verbose_;
|
||||
#ifdef WIN32
|
||||
static bool init_windows_sockets_;
|
||||
static bool windows_sockets_initialized_;
|
||||
static int instance_count_;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace tcpip
|
||||
|
||||
#endif // BUILD_TCPIP
|
||||
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Source $Source: $
|
||||
* Version $Revision: 197 $
|
||||
* Date $Date: 2008-04-29 17:40:51 +0200 (Tue, 29 Apr 2008) $
|
||||
*-----------------------------------------------------------------------
|
||||
* $Log:$
|
||||
*-----------------------------------------------------------------------*/
|
||||
@@ -1,145 +0,0 @@
|
||||
#ifdef UNITTESTS
|
||||
|
||||
#include "MiniCppUnit.hxx"
|
||||
#include "storage.h"
|
||||
#include "socket.h"
|
||||
#include <math.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
|
||||
#define ADDRINUSE
|
||||
#define PORT 8888
|
||||
|
||||
#define TEST_CHAR UCHAR_MAX
|
||||
#define TEST_BYTE UCAHR_MAX
|
||||
#define TEST_STRING "Test-String(ÄÖÜäöü?ß&%$§!+#~*')"
|
||||
#define TEST_SHORT SHRT_MAX
|
||||
#define TEST_INT INT_MAX
|
||||
#define TEST_FLOAT FLT_MAX
|
||||
#define TEST_DOUBLE DBL_MAX
|
||||
|
||||
|
||||
class socketUnitTests : public TestFixture<socketUnitTests>
|
||||
{
|
||||
public:
|
||||
TEST_FIXTURE( socketUnitTests )
|
||||
, currentMode_(undefined),
|
||||
server_socket_( PORT ) ,
|
||||
client_socket_( "localhost" , PORT )
|
||||
|
||||
{
|
||||
TEST_CASE( openConnection );
|
||||
|
||||
TEST_CASE( receiveStorage );
|
||||
TEST_CASE( sendStorage );
|
||||
|
||||
TEST_CASE( closeConnection );
|
||||
}
|
||||
|
||||
void openConnection()
|
||||
{
|
||||
try {
|
||||
server_socket_.set_blocking(false);
|
||||
server_socket_.accept();
|
||||
currentMode_ = server;
|
||||
}
|
||||
catch(tcpip::SocketException e) {
|
||||
if (e.what() == "tcpip::Socket::accept() Unable to create listening socket: Address already in use"){
|
||||
currentMode_ = client;
|
||||
}else{
|
||||
FAIL( "Server socket accept() failed!" );
|
||||
}
|
||||
}
|
||||
|
||||
if (currentMode_ == server)
|
||||
{
|
||||
server_socket_.set_blocking(true);
|
||||
std::cout << Assert::yellow() << "Listening on port " << PORT << ". Please start another instance of this program on host.\n" << Assert::normal();
|
||||
server_socket_.accept();
|
||||
}
|
||||
if (currentMode_ == client){
|
||||
try {
|
||||
client_socket_.connect();
|
||||
}
|
||||
catch (tcpip::SocketException e){
|
||||
FAIL( "Client socket.connect() failed!" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void closeConnection()
|
||||
{
|
||||
try {
|
||||
if (currentMode_ == client) client_socket_.close();
|
||||
}
|
||||
catch (tcpip::SocketException e){
|
||||
FAIL( "Client socket close() failed!" );
|
||||
}
|
||||
|
||||
try {
|
||||
if (currentMode_ == server) server_socket_.close();
|
||||
}
|
||||
catch (tcpip::SocketException e){
|
||||
FAIL( "Server socket close() failed!" );
|
||||
}
|
||||
}
|
||||
|
||||
void receiveStorage()
|
||||
{
|
||||
if (currentMode_ == client) return;
|
||||
|
||||
tcpip::Storage received_message;
|
||||
|
||||
try {
|
||||
server_socket_.receiveExact(received_message);
|
||||
|
||||
ASSERT_EQUALS( static_cast<int>(TEST_CHAR),
|
||||
static_cast<int>(received_message.readChar()) );
|
||||
ASSERT_EQUALS( TEST_STRING, received_message.readString() );
|
||||
ASSERT_EQUALS( TEST_SHORT, received_message.readShort() );
|
||||
ASSERT_EQUALS( TEST_INT, received_message.readInt() );
|
||||
ASSERT_EQUALS( TEST_FLOAT, received_message.readFloat() );
|
||||
ASSERT_EQUALS( TEST_DOUBLE, received_message.readDouble() );
|
||||
}
|
||||
catch (tcpip::SocketException e) {
|
||||
FAIL( "Server socket receiveExact() failed!" );
|
||||
}
|
||||
}
|
||||
|
||||
void sendStorage()
|
||||
{
|
||||
if (currentMode_ == server) return;
|
||||
|
||||
tcpip::Storage send_message;
|
||||
|
||||
try {
|
||||
send_message.writeChar( TEST_CHAR );
|
||||
send_message.writeString( TEST_STRING );
|
||||
send_message.writeShort( TEST_SHORT );
|
||||
send_message.writeInt( TEST_INT );
|
||||
send_message.writeFloat( TEST_FLOAT );
|
||||
send_message.writeDouble( TEST_DOUBLE );
|
||||
|
||||
client_socket_.sendExact(send_message);
|
||||
}
|
||||
catch (tcpip::SocketException e) {
|
||||
FAIL( "Client socket sendExact() failed!" );
|
||||
}
|
||||
}
|
||||
|
||||
//...
|
||||
private:
|
||||
enum mode{undefined = -1, client, server};
|
||||
mode currentMode_;
|
||||
tcpip::Socket server_socket_;
|
||||
tcpip::Socket client_socket_;
|
||||
};
|
||||
|
||||
//Register fixture
|
||||
REGISTER_FIXTURE( socketUnitTests );
|
||||
|
||||
#endif
|
||||
@@ -1,416 +0,0 @@
|
||||
/************************************************************************
|
||||
** This file is part of the network simulator Shawn. **
|
||||
** Copyright (C) 2004-2007 by the SwarmNet (www.swarmnet.de) project **
|
||||
** Shawn is free software; you can redistribute it and/or modify it **
|
||||
** under the terms of the BSD License. Refer to the shawn-licence.txt **
|
||||
** file in the root of the Shawn source tree for further details. **
|
||||
************************************************************************
|
||||
** **
|
||||
** \author Axel Wegener <wegener@itm.uni-luebeck.de> **
|
||||
** \author Bjoern Hendriks <hendriks@ibr.cs.tu-bs.de> **
|
||||
** **
|
||||
************************************************************************/
|
||||
|
||||
#include "storage.h"
|
||||
|
||||
#ifdef BUILD_TCPIP
|
||||
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
//#define NULLITER static_cast<list<unsigned char>::iterator>(0)
|
||||
|
||||
namespace tcpip
|
||||
{
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Storage::Storage()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Storage::Storage(unsigned char packet[], int length)
|
||||
{
|
||||
// Length is calculated, if -1, or given
|
||||
if (length == -1) length = sizeof(packet) / sizeof(unsigned char);
|
||||
|
||||
store.reserve(length);
|
||||
// Get the content
|
||||
for(int i = 0; i < length; ++i) store.push_back(packet[i]);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::init()
|
||||
{
|
||||
// Initialize local variables
|
||||
iter_ = store.begin();
|
||||
|
||||
short a = 0x0102;
|
||||
unsigned char *p_a = reinterpret_cast<unsigned char*>(&a);
|
||||
bigEndian_ = (p_a[0] == 0x01); // big endian?
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
Storage::~Storage()
|
||||
{}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
bool Storage::valid_pos()
|
||||
{
|
||||
return (iter_ != store.end()); // this implies !store.empty()
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
unsigned int Storage::position() const
|
||||
{
|
||||
// According to C++ standard std::distance will simply compute the iterators
|
||||
// difference for random access iterators as std::vector provides.
|
||||
return std::distance(store.begin(), iter_);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::reset()
|
||||
{
|
||||
store.clear();
|
||||
iter_ = store.begin();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Reads a char form the array
|
||||
* @return The read char (between 0 and 255)
|
||||
*/
|
||||
unsigned char Storage::readChar() throw(std::invalid_argument)
|
||||
{
|
||||
if ( !valid_pos() )
|
||||
{
|
||||
throw std::invalid_argument("Storage::readChar(): invalid position");
|
||||
}
|
||||
return readCharUnsafe();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void Storage::writeChar(unsigned char value) throw()
|
||||
{
|
||||
store.push_back(value);
|
||||
iter_ = store.begin();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Reads a byte form the array
|
||||
* @return The read byte (between -128 and 127)
|
||||
*/
|
||||
int Storage::readByte() throw(std::invalid_argument)
|
||||
{
|
||||
int i = static_cast<int>(readChar());
|
||||
if (i < 128) return i;
|
||||
else return (i - 256);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void Storage::writeByte(int value) throw(std::invalid_argument)
|
||||
{
|
||||
if (value < -128 || value > 127)
|
||||
{
|
||||
throw std::invalid_argument("Storage::writeByte(): Invalid value, not in [-128, 127]");
|
||||
}
|
||||
writeChar( static_cast<unsigned char>( (value+256) % 256 ) );
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Reads an unsigned byte form the array
|
||||
* @return The read byte (between 0 and 255)
|
||||
*/
|
||||
int Storage::readUnsignedByte() throw(std::invalid_argument)
|
||||
{
|
||||
return static_cast<int>(readChar());
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void Storage::writeUnsignedByte(int value) throw(std::invalid_argument)
|
||||
{
|
||||
if (value < 0 || value > 255)
|
||||
{
|
||||
throw std::invalid_argument("Storage::writeUnsignedByte(): Invalid value, not in [0, 255]");
|
||||
}
|
||||
writeChar( static_cast<unsigned char>( value ));
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
/**
|
||||
* Reads a string form the array
|
||||
* @return The read string
|
||||
*/
|
||||
std::string Storage::readString() throw(std::invalid_argument)
|
||||
{
|
||||
int len = readInt();
|
||||
checkReadSafe(len);
|
||||
StorageType::const_iterator end = iter_;
|
||||
std::advance(end, len);
|
||||
const string tmp(iter_, end);
|
||||
iter_ = end;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Writes a string into the array;
|
||||
* @param s The string to be written
|
||||
*/
|
||||
void Storage::writeString(const std::string &s) throw()
|
||||
{
|
||||
writeInt(static_cast<int>(s.length()));
|
||||
|
||||
store.insert(store.end(), s.begin(), s.end());
|
||||
iter_ = store.begin();
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
/**
|
||||
* Reads a string list form the array
|
||||
* @return The read string
|
||||
*/
|
||||
std::vector<std::string> Storage::readStringList() throw(std::invalid_argument)
|
||||
{
|
||||
std::vector<std::string> tmp;
|
||||
const int len = readInt();
|
||||
tmp.reserve(len);
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
tmp.push_back(readString());
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Writes a string into the array;
|
||||
* @param s The string to be written
|
||||
*/
|
||||
void Storage::writeStringList(const std::vector<std::string> &s) throw()
|
||||
{
|
||||
writeInt(static_cast<int>(s.size()));
|
||||
for (std::vector<std::string>::const_iterator it = s.begin(); it!=s.end() ; it++)
|
||||
{
|
||||
writeString(*it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Restores an integer, which was split up in two bytes according to the
|
||||
* specification, it must have been split by its row byte representation
|
||||
* with MSBF-order
|
||||
*
|
||||
* @return the unspoiled integer value (between -32768 and 32767)
|
||||
*/
|
||||
int Storage::readShort() throw(std::invalid_argument)
|
||||
{
|
||||
short value = 0;
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
readByEndianess(p_value, 2);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writeShort( int value ) throw(std::invalid_argument)
|
||||
{
|
||||
if (value < -32768 || value > 32767)
|
||||
{
|
||||
throw std::invalid_argument("Storage::writeShort(): Invalid value, not in [-32768, 32767]");
|
||||
}
|
||||
|
||||
short svalue = static_cast<short>(value);
|
||||
unsigned char *p_svalue = reinterpret_cast<unsigned char*>(&svalue);
|
||||
writeByEndianess(p_svalue, 2);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* restores an integer, which was split up in four bytes acording to the
|
||||
* specification, it must have been split by its row byte representation
|
||||
* with MSBF-order
|
||||
*
|
||||
* @return the unspoiled integer value (between -2.147.483.648 and 2.147.483.647)
|
||||
*/
|
||||
int Storage::readInt() throw(std::invalid_argument)
|
||||
{
|
||||
int value = 0;
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
readByEndianess(p_value, 4);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writeInt( int value ) throw()
|
||||
{
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
writeByEndianess(p_value, 4);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* restores a float , which was split up in four bytes acording to the
|
||||
* specification, it must have been split by its row byte representation
|
||||
* with MSBF-order
|
||||
*
|
||||
* @return the unspoiled float value
|
||||
*/
|
||||
float Storage::readFloat() throw(std::invalid_argument)
|
||||
{
|
||||
float value = 0;
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
readByEndianess(p_value, 4);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writeFloat( float value ) throw()
|
||||
{
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
writeByEndianess(p_value, 4);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writeDouble( double value ) throw ()
|
||||
{
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
writeByEndianess(p_value, 8);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
double Storage::readDouble( ) throw (std::invalid_argument)
|
||||
{
|
||||
double value = 0;
|
||||
unsigned char *p_value = reinterpret_cast<unsigned char*>(&value);
|
||||
readByEndianess(p_value, 8);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writePacket(unsigned char* packet, int length)
|
||||
{
|
||||
store.insert(store.end(), &(packet[0]), &(packet[length]));
|
||||
iter_ = store.begin(); // reserve() invalidates iterators
|
||||
}
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::readPacket(unsigned char* packet)
|
||||
{
|
||||
for (unsigned int i = 0; i < store.size(); i++) {
|
||||
packet[i] = readCharUnsafe();
|
||||
}
|
||||
}
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writeStorage(tcpip::Storage& other)
|
||||
{
|
||||
// the compiler cannot deduce to use a const_iterator as source
|
||||
store.insert<StorageType::const_iterator>(store.end(), other.iter_, other.store.end());
|
||||
iter_ = store.begin();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::checkReadSafe(unsigned int num) const throw(std::invalid_argument)
|
||||
{
|
||||
if (std::distance(iter_, store.end()) < num)
|
||||
{
|
||||
std::ostringstream msg;
|
||||
msg << "tcpip::Storage::readIsSafe: want to read " << num << " bytes from Storage, "
|
||||
<< "but only " << std::distance(iter_, store.end()) << " remaining";
|
||||
throw std::invalid_argument(msg.str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
unsigned char Storage::readCharUnsafe()
|
||||
{
|
||||
char hb = *iter_;
|
||||
++iter_;
|
||||
return hb;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::writeByEndianess(const unsigned char * begin, unsigned int size)
|
||||
{
|
||||
const unsigned char * end = &(begin[size]);
|
||||
if (bigEndian_)
|
||||
store.insert(store.end(), begin, end);
|
||||
else
|
||||
store.insert(store.end(), std::reverse_iterator<const unsigned char *>(end), std::reverse_iterator<const unsigned char *>(begin));
|
||||
iter_ = store.begin();
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
void Storage::readByEndianess(unsigned char * array, int size)
|
||||
{
|
||||
checkReadSafe(size);
|
||||
if (bigEndian_)
|
||||
{
|
||||
for (int i = 0; i < size; ++i)
|
||||
array[i] = readCharUnsafe();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = size - 1; i >= 0; --i)
|
||||
array[i] = readCharUnsafe();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // BUILD_TCPIP
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Source $Source: $
|
||||
* Version $Revision: 426 $
|
||||
* Date $Date: 2010-05-31 12:05:13 +0200 (Mon, 31 May 2010) $
|
||||
*-----------------------------------------------------------------------
|
||||
* $Log: $
|
||||
*-----------------------------------------------------------------------*/
|
||||
@@ -1,136 +0,0 @@
|
||||
/************************************************************************
|
||||
** This file is part of the network simulator Shawn. **
|
||||
** Copyright (C) 2004-2007 by the SwarmNet (www.swarmnet.de) project **
|
||||
** Shawn is free software; you can redistribute it and/or modify it **
|
||||
** under the terms of the BSD License. Refer to the shawn-licence.txt **
|
||||
** file in the root of the Shawn source tree for further details. **
|
||||
************************************************************************
|
||||
** **
|
||||
** \author Axel Wegener <wegener@itm.uni-luebeck.de> **
|
||||
** \author Bjoern Hendriks <hendriks@ibr.cs.tu-bs.de> **
|
||||
** **
|
||||
************************************************************************/
|
||||
#ifndef __SHAWN_APPS_TCPIP_STORAGE_H
|
||||
#define __SHAWN_APPS_TCPIP_STORAGE_H
|
||||
|
||||
#ifdef SHAWN
|
||||
#include <shawn_config.h>
|
||||
#include "_apps_enable_cmake.h"
|
||||
#ifdef ENABLE_TCPIP
|
||||
#define BUILD_TCPIP
|
||||
#endif
|
||||
#else
|
||||
#define BUILD_TCPIP
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BUILD_TCPIP
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace tcpip
|
||||
{
|
||||
|
||||
class Storage
|
||||
{
|
||||
|
||||
public:
|
||||
typedef std::vector<unsigned char> StorageType;
|
||||
|
||||
private:
|
||||
StorageType store;
|
||||
StorageType::const_iterator iter_;
|
||||
|
||||
// sortation of bytes forwards or backwards?
|
||||
bool bigEndian_;
|
||||
|
||||
/// Used in constructors to initialize local variables
|
||||
void init();
|
||||
|
||||
/// Check if the next \p num bytes can be read safely
|
||||
void checkReadSafe(unsigned int num) const throw(std::invalid_argument);
|
||||
/// Read a byte \em without validity check
|
||||
unsigned char readCharUnsafe();
|
||||
/// Write \p size elements of array \p begin according to endianess
|
||||
void writeByEndianess(const unsigned char * begin, unsigned int size);
|
||||
/// Read \p size elements into \p array according to endianess
|
||||
void readByEndianess(unsigned char * array, int size);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/// Standard Constructor
|
||||
Storage();
|
||||
|
||||
/// Constructor, that fills the storage with an char array. If length is -1, the whole array is handed over
|
||||
Storage(unsigned char[], int length=-1);
|
||||
|
||||
// Destructor
|
||||
virtual ~Storage();
|
||||
|
||||
virtual bool valid_pos();
|
||||
virtual unsigned int position() const;
|
||||
|
||||
void reset();
|
||||
|
||||
virtual unsigned char readChar() throw(std::invalid_argument);
|
||||
virtual void writeChar(unsigned char) throw();
|
||||
|
||||
virtual int readByte() throw(std::invalid_argument);
|
||||
virtual void writeByte(int) throw(std::invalid_argument);
|
||||
// virtual void writeByte(unsigned char) throw();
|
||||
|
||||
virtual int readUnsignedByte() throw(std::invalid_argument);
|
||||
virtual void writeUnsignedByte(int) throw(std::invalid_argument);
|
||||
|
||||
virtual std::string readString() throw(std::invalid_argument);
|
||||
virtual void writeString(const std::string& s) throw();
|
||||
|
||||
virtual std::vector<std::string> readStringList() throw(std::invalid_argument);
|
||||
virtual void writeStringList(const std::vector<std::string> &s) throw();
|
||||
|
||||
virtual int readShort() throw(std::invalid_argument);
|
||||
virtual void writeShort(int) throw(std::invalid_argument);
|
||||
|
||||
virtual int readInt() throw(std::invalid_argument);
|
||||
virtual void writeInt(int) throw();
|
||||
|
||||
virtual float readFloat() throw(std::invalid_argument);
|
||||
virtual void writeFloat( float ) throw();
|
||||
|
||||
virtual double readDouble() throw(std::invalid_argument);
|
||||
virtual void writeDouble( double ) throw();
|
||||
|
||||
virtual void writePacket(unsigned char* packet, int length);
|
||||
virtual void readPacket(unsigned char* packet);
|
||||
|
||||
virtual void writeStorage(tcpip::Storage& store);
|
||||
|
||||
// Some enabled functions of the underlying std::list
|
||||
StorageType::size_type size() const {
|
||||
return store.size();
|
||||
}
|
||||
|
||||
StorageType::const_iterator begin() const {
|
||||
return store.begin();
|
||||
}
|
||||
StorageType::const_iterator end() const {
|
||||
return store.end();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace tcpip
|
||||
|
||||
#endif // BUILD_TCPIP
|
||||
|
||||
#endif
|
||||
/*-----------------------------------------------------------------------
|
||||
* Source $Source: $
|
||||
* Version $Revision: 426 $
|
||||
* Date $Date: 2010-05-31 12:05:13 +0200 (Mon, 31 May 2010) $
|
||||
*-----------------------------------------------------------------------
|
||||
* $Log: $
|
||||
*-----------------------------------------------------------------------*/
|
||||
@@ -1,350 +0,0 @@
|
||||
/*
|
||||
* This file provides test cases for the tcpip package, that can be executed by MiniCppUnit
|
||||
*
|
||||
* Author: Axel Wegener
|
||||
*/
|
||||
|
||||
#ifdef UNITTESTS
|
||||
|
||||
#include "MiniCppUnit.hxx"
|
||||
#include "storage.h"
|
||||
//#include "socket.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
class tcpipUnitTests : public TestFixture<tcpipUnitTests>
|
||||
{
|
||||
public:
|
||||
TEST_FIXTURE( tcpipUnitTests )
|
||||
{
|
||||
TEST_CASE( testStorageChar );
|
||||
TEST_CASE( testStorageByte );
|
||||
TEST_CASE( testStorageString );
|
||||
TEST_CASE( testStorageShort );
|
||||
TEST_CASE( testStorageInt );
|
||||
TEST_CASE( testStorageFloat );
|
||||
TEST_CASE( testStorageDouble );
|
||||
TEST_CASE( testStorageMixed );
|
||||
TEST_CASE( testStorageReset );
|
||||
TEST_CASE( testStorageValidPos );
|
||||
TEST_CASE( testStorageLoadCharArray );
|
||||
TEST_CASE( testStorageCharToInt );
|
||||
TEST_CASE( testStorageByteShortInt );
|
||||
}
|
||||
|
||||
void testStorageChar()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
s1.writeChar('\0');
|
||||
s1.writeChar('Ü');
|
||||
s1.writeChar('\n');
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT( s1.readChar() == '\0' );
|
||||
ASSERT( (char) s1.readChar() == 'Ü' );
|
||||
ASSERT( s1.readChar() == '\n' );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageByte()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
s1.writeByte(0);
|
||||
s1.writeByte(-128);
|
||||
s1.writeByte(127);
|
||||
/*
|
||||
bool err = false;
|
||||
try
|
||||
{
|
||||
s1.writeByte(128);
|
||||
}
|
||||
catch (std::invalid_argument e)
|
||||
{
|
||||
err = true;
|
||||
}
|
||||
catch ( ... ) {}
|
||||
if (!err) FAIL("Storage::writeByte allowed an input value of 128");
|
||||
|
||||
err = false;
|
||||
try
|
||||
{
|
||||
s1.writeByte(-129);
|
||||
}
|
||||
catch (std::invalid_argument e)
|
||||
{
|
||||
err = true;
|
||||
}
|
||||
if (!err) FAIL("Storage::writeByte allowed an input value of -129");
|
||||
*/
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( 0, s1.readByte() );
|
||||
ASSERT_EQUALS( -128, s1.readByte() );
|
||||
ASSERT_EQUALS( 127, s1.readByte() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageString()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
s1.writeString("Dies ist ein TestString");
|
||||
s1.writeString("");
|
||||
s1.writeString("2. Text mit Sonderzeichen ü ö ß \n\0");
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( "Dies ist ein TestString", s1.readString() );
|
||||
ASSERT_EQUALS( "", s1.readString() );
|
||||
ASSERT_EQUALS( "2. Text mit Sonderzeichen ü ö ß \n\0", s1.readString() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageShort()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
s1.writeShort(0);
|
||||
s1.writeShort(32767);
|
||||
s1.writeShort(-32768);
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( 0, s1.readShort() );
|
||||
ASSERT_EQUALS( 32767, s1.readShort() );
|
||||
ASSERT_EQUALS( -32768, s1.readShort() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageInt()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
s1.writeInt(0);
|
||||
s1.writeInt(-32768);
|
||||
s1.writeInt(32767);
|
||||
s1.writeInt(INT_MIN);
|
||||
s1.writeInt(INT_MAX);
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( 0, s1.readInt() );
|
||||
ASSERT_EQUALS( -32768, s1.readInt() );
|
||||
ASSERT_EQUALS( 32767, s1.readInt() );
|
||||
ASSERT_EQUALS( INT_MIN, s1.readInt() );
|
||||
ASSERT_EQUALS( INT_MAX, s1.readInt() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageFloat()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
float f1 = (float) 0.000002;
|
||||
float f2 = (float) 0.000001;
|
||||
|
||||
s1.writeFloat(0.0);
|
||||
s1.writeFloat(f1);
|
||||
s1.writeFloat(f2);
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( (float) 0.0, s1.readFloat() );
|
||||
ASSERT_EQUALS( f1, s1.readFloat() );
|
||||
ASSERT_EQUALS( f2, s1.readFloat() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageDouble()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
double d1 = 0.000002;
|
||||
double d2 = 0.000001;
|
||||
|
||||
s1.writeDouble(0.0);
|
||||
s1.writeDouble(d1);
|
||||
s1.writeDouble(d2);
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( 0.0, s1.readDouble() );
|
||||
ASSERT_EQUALS( d1, s1.readDouble() );
|
||||
ASSERT_EQUALS( d2, s1.readDouble() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageMixed()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
double d1 = 0.000002;
|
||||
|
||||
s1.writeFloat(0.0);
|
||||
s1.writeDouble(d1);
|
||||
s1.writeString("\0");
|
||||
s1.writeShort(42);
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( (float) 0.0, s1.readFloat() );
|
||||
ASSERT_EQUALS( d1, s1.readDouble() );
|
||||
ASSERT_EQUALS( "\0", s1.readString() );
|
||||
ASSERT_EQUALS( 42, s1.readShort() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageReset()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
|
||||
double d1 = 0.000002;
|
||||
|
||||
s1.reset();
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
|
||||
s1.writeFloat(0.0);
|
||||
s1.writeDouble(d1);
|
||||
s1.writeString("\0");
|
||||
s1.writeShort(42);
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
s1.reset();
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
|
||||
s1.writeString("Test");
|
||||
|
||||
ASSERT_EQUALS( true, s1.valid_pos() );
|
||||
ASSERT_EQUALS( "Test", s1.readString() );
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
|
||||
s1.reset();
|
||||
ASSERT( 0 == s1.size() );
|
||||
}
|
||||
|
||||
void testSocketConnect()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void testStorageValidPos()
|
||||
{
|
||||
tcpip::Storage s1;
|
||||
ASSERT_EQUALS( false, s1.valid_pos() );
|
||||
|
||||
tcpip::Storage s2;
|
||||
s2.writeFloat(1.0);
|
||||
ASSERT_EQUALS( true, s2.valid_pos() );
|
||||
|
||||
s2.reset();
|
||||
ASSERT_EQUALS( false, s2.valid_pos() );
|
||||
}
|
||||
|
||||
void testStorageLoadCharArray()
|
||||
{
|
||||
tcpip::Storage sHallo;
|
||||
sHallo.writeString("Hallo du!");
|
||||
|
||||
unsigned char cBuffer[100];
|
||||
unsigned int i=0;
|
||||
while ( sHallo.valid_pos() && i < sizeof(cBuffer) )
|
||||
{
|
||||
cBuffer[i] = sHallo.readChar();
|
||||
i++;
|
||||
}
|
||||
|
||||
tcpip::Storage s1(cBuffer, i);
|
||||
|
||||
ASSERT_EQUALS( "Hallo du!", s1.readString() );
|
||||
|
||||
}
|
||||
void testStorageCharToInt()
|
||||
{
|
||||
tcpip::Storage s;
|
||||
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(0, (int)s.size());
|
||||
|
||||
s.writeChar(0);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(1, (int)s.size());
|
||||
|
||||
s.writeChar(0);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(2, (int)s.size());
|
||||
|
||||
s.writeChar(0);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(3, (int)s.size());
|
||||
|
||||
s.writeChar(4);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(4, (int)s.size());
|
||||
|
||||
int n = s.readInt();
|
||||
|
||||
ASSERT_EQUALS(4, (int)s.position());
|
||||
ASSERT_EQUALS(4, (int)s.size());
|
||||
ASSERT_EQUALS(4, n);
|
||||
|
||||
s.reset();
|
||||
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(0, (int)s.size());
|
||||
|
||||
s.writeChar(0);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(1, (int)s.size());
|
||||
|
||||
s.writeChar(0);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(2, (int)s.size());
|
||||
|
||||
s.writeChar(0);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(3, (int)s.size());
|
||||
|
||||
s.writeChar(4);
|
||||
ASSERT_EQUALS(0, (int)s.position());
|
||||
ASSERT_EQUALS(4, (int)s.size());
|
||||
|
||||
n = s.readInt();
|
||||
|
||||
ASSERT_EQUALS(4, (int)s.position());
|
||||
ASSERT_EQUALS(4, (int)s.size());
|
||||
ASSERT_EQUALS(4, n);
|
||||
|
||||
}
|
||||
|
||||
void testStorageByteShortInt()
|
||||
{
|
||||
tcpip::Storage s;
|
||||
return;
|
||||
try {
|
||||
// s.writeByte(-128);
|
||||
s.writeByte(127);
|
||||
|
||||
// ASSERT_EQUALS(-128, s.readByte());
|
||||
ASSERT_EQUALS(127, s.readByte());
|
||||
|
||||
}
|
||||
catch (std::string s)
|
||||
{
|
||||
std::cerr << s << std::endl;
|
||||
}
|
||||
|
||||
/* int max = 255;
|
||||
int min = 0;
|
||||
|
||||
byte b;
|
||||
int i;
|
||||
|
||||
b = (byte) min;
|
||||
i = b;
|
||||
ASSERT_EQUALS(0, i);
|
||||
|
||||
b = (byte) max;
|
||||
i = b;
|
||||
ASSERT_EQUALS(255, i);
|
||||
*/
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_FIXTURE( tcpipUnitTests );
|
||||
|
||||
#endif
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
platform.h
|
||||
-------------------
|
||||
***************************************************************************/
|
||||
#ifndef __PLATFORM_H__
|
||||
# define __PLATFORM_H__
|
||||
# include "platform_dim.h"
|
||||
# include "platform_defines.h"
|
||||
#endif
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
platform_constants.h
|
||||
-------------------
|
||||
***************************************************************************/
|
||||
#ifndef __PLATFORM_CONSTANTS_H__
|
||||
# define __PLATFORM_CONSTANTS_H__
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
platform_defines.h
|
||||
-------------------
|
||||
***************************************************************************/
|
||||
#ifndef __PLATFORM_DEFINES_H__
|
||||
# define __PLATFORM_DEFINES_H__
|
||||
|
||||
// RLC_MODE
|
||||
# define RLC_NONE 0
|
||||
# define RLC_MODE_AM 1
|
||||
# define RLC_MODE_TM 2
|
||||
# define RLC_MODE_UM 3
|
||||
# define RLC_MODE_UM_BIDIRECTIONAL 3
|
||||
# define RLC_MODE_UM_UNIDIRECTIONAL_UL 4
|
||||
# define RLC_MODE_UM_UNIDIRECTIONAL_DL 5
|
||||
|
||||
|
||||
# define COMMAND_ACTION_NULL 0
|
||||
# define COMMAND_ACTION_ADD 1
|
||||
# define COMMAND_ACTION_REMOVE 2
|
||||
# define COMMAND_ACTION_MODIFY 3
|
||||
|
||||
# define COMMAND_OBJECT_SIGNALLING_RADIO_BEARER 1
|
||||
# define COMMAND_OBJECT_DATA_RADIO_BEARER 2
|
||||
# define COMMAND_OBJECT_MOBILE 3
|
||||
|
||||
# define COMMAND_EQUIPMENT_MOBILE_TERMINAL 2
|
||||
# define COMMAND_EQUIPMENT_RADIO_GATEWAY 1
|
||||
|
||||
// ASN1 TYPES INCLUDES
|
||||
#include "PhysCellId.h"
|
||||
#include "TransactionId.h"
|
||||
#include "OpenAir-RRM-Response-Reason.h"
|
||||
#include "OpenAir-RRM-Response-Status.h"
|
||||
|
||||
|
||||
typedef unsigned char class_of_service_t;
|
||||
typedef unsigned char quality_t;
|
||||
typedef unsigned int kbit_rate_t;
|
||||
typedef unsigned int packet_size_t;
|
||||
|
||||
typedef unsigned char mobile_id_t;
|
||||
typedef TransactionId_t transaction_id_t;
|
||||
typedef PhysCellId_t cell_id_t;
|
||||
typedef unsigned char rb_id_t;
|
||||
|
||||
typedef unsigned char msg_type_t;
|
||||
typedef unsigned short msg_length_t;
|
||||
typedef unsigned long int frame_t;
|
||||
typedef OpenAir_RRM_Response_Status_t msg_response_status_t;
|
||||
typedef OpenAir_RRM_Response_Reason_t msg_response_reason_t;
|
||||
|
||||
typedef unsigned char rlc_mode_t;
|
||||
typedef unsigned char logical_channel_priority_t;
|
||||
typedef unsigned char logical_channel_group_t;
|
||||
|
||||
typedef unsigned short t_reordering_t;
|
||||
|
||||
#endif
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RRM_H
|
||||
# define _RRM_H
|
||||
|
||||
|
||||
#define MAX_RB_PER_MOBILE 11
|
||||
#define MAX_MOBILE_PER_ENODE_B 32
|
||||
#define MAX_ENODE_B_PER_MOBILE 3
|
||||
#define MAX_ENODE_B 32
|
||||
|
||||
|
||||
#define MAX_DRB 11
|
||||
#define MAX_SRB 2
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Asn1Utils.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
#define ASN1_UTILS_SERIALIZE_BUFFER_SIZE 512
|
||||
|
||||
static uint8_t g_asn1_utils_serialize_buffer[ASN1_UTILS_SERIALIZE_BUFFER_SIZE];
|
||||
//-----------------------------------------------------------------
|
||||
DRB_Identity_t* Asn1Utils::Clone(DRB_Identity_t* asn1_objP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (asn1_objP != NULL) {
|
||||
|
||||
DRB_Identity_t *clone = static_cast<DRB_Identity_t*>(CALLOC(1,sizeof(DRB_Identity_t)));
|
||||
*clone = *asn1_objP;
|
||||
return clone;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
DRB_ToAddMod_t* Asn1Utils::Clone(DRB_ToAddMod_t* asn1_objP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (asn1_objP != NULL) {
|
||||
//------------------------------------------------------------------------------
|
||||
// ENCODING
|
||||
//------------------------------------------------------------------------------
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&g_asn1_utils_serialize_buffer[0], 0, ASN1_UTILS_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DRB_ToAddMod,
|
||||
(void*)asn1_objP,
|
||||
&g_asn1_utils_serialize_buffer[0],
|
||||
ASN1_UTILS_SERIALIZE_BUFFER_SIZE);
|
||||
cout <<"[RRM][Asn1Utils::Clone(DRB_ToAddMod_t*)] asn_DEF_DRB_ToAddMod Encoded "<< enc_rval.encoded <<" bits (" << (enc_rval.encoded+7)/8 << " bytes)" << endl;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cerr << "[RRM][Asn1Utils::Clone(DRB_ToAddMod_t*)] asn_DEF_DRB_ToAddMod encoding FAILED, EXITING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// DECODING
|
||||
//------------------------------------------------------------------------------
|
||||
asn_dec_rval_t rval;
|
||||
asn_codec_ctx_t *opt_codec_ctx = 0;
|
||||
DRB_ToAddMod_t *clone = 0;
|
||||
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_DRB_ToAddMod,/* Type to decode */
|
||||
(void **)&clone, /* Pointer to a target structure's pointer */
|
||||
&g_asn1_utils_serialize_buffer[0], /* Data to be decoded */
|
||||
ASN1_UTILS_SERIALIZE_BUFFER_SIZE, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
|
||||
if (rval.code != RC_OK) {
|
||||
cerr << "[RRM][Asn1Utils::Clone(DRB_ToAddMod_t*)] ASN1 : ERROR IN ASN1 DECODING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
return clone;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
SRB_ToAddMod_t* Asn1Utils::Clone(SRB_ToAddMod_t* asn1_objP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (asn1_objP != NULL) {
|
||||
//------------------------------------------------------------------------------
|
||||
// ENCODING
|
||||
//------------------------------------------------------------------------------
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&g_asn1_utils_serialize_buffer[0], 0, ASN1_UTILS_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_SRB_ToAddMod,
|
||||
(void*)asn1_objP,
|
||||
&g_asn1_utils_serialize_buffer[0],
|
||||
ASN1_UTILS_SERIALIZE_BUFFER_SIZE);
|
||||
cout <<"[RRM][Asn1Utils::Clone(SRB_ToAddMod_t*)] asn_DEF_SRB_ToAddMod Encoded "<< enc_rval.encoded <<" bits (" << (enc_rval.encoded+7)/8 << " bytes)" << endl;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cerr << "[RRM][Asn1Utils::Clone(SRB_ToAddMod_t*)] asn_DEF_SRB_ToAddMod encoding FAILED, EXITING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// DECODING
|
||||
//------------------------------------------------------------------------------
|
||||
asn_dec_rval_t rval;
|
||||
asn_codec_ctx_t *opt_codec_ctx = 0;
|
||||
SRB_ToAddMod_t *clone = 0;
|
||||
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_SRB_ToAddMod,/* Type to decode */
|
||||
(void **)&clone, /* Pointer to a target structure's pointer */
|
||||
&g_asn1_utils_serialize_buffer[0], /* Data to be decoded */
|
||||
ASN1_UTILS_SERIALIZE_BUFFER_SIZE, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
|
||||
if (rval.code != RC_OK) {
|
||||
cerr << "[RRM][Asn1Utils::Clone(SRB_ToAddMod_t*)] ASN1 : ERROR IN ASN1 DECODING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
return clone;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
MAC_MainConfig_t* Asn1Utils::Clone(MAC_MainConfig_t* asn1_objP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (asn1_objP != NULL) {
|
||||
//------------------------------------------------------------------------------
|
||||
// ENCODING
|
||||
//------------------------------------------------------------------------------
|
||||
asn_enc_rval_t enc_rval;
|
||||
memset(&g_asn1_utils_serialize_buffer[0], 0, ASN1_UTILS_SERIALIZE_BUFFER_SIZE);
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_MAC_MainConfig,
|
||||
(void*)asn1_objP,
|
||||
&g_asn1_utils_serialize_buffer[0],
|
||||
ASN1_UTILS_SERIALIZE_BUFFER_SIZE);
|
||||
cout <<"[RRM][Asn1Utils::Clone(MAC_MainConfig_t*)] asn_DEF_MAC_MainConfig Encoded "<< enc_rval.encoded <<" bits (" << (enc_rval.encoded+7)/8 << " bytes)" << endl;
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
cerr << "[RRM][Asn1Utils::Clone(MAC_MainConfig_t*)] asn_DEF_MAC_MainConfig encoding FAILED, EXITING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// DECODING
|
||||
//------------------------------------------------------------------------------
|
||||
asn_dec_rval_t rval;
|
||||
asn_codec_ctx_t *opt_codec_ctx = 0;
|
||||
MAC_MainConfig_t *clone = 0;
|
||||
|
||||
rval = uper_decode(opt_codec_ctx,
|
||||
&asn_DEF_MAC_MainConfig,/* Type to decode */
|
||||
(void **)&clone, /* Pointer to a target structure's pointer */
|
||||
&g_asn1_utils_serialize_buffer[0], /* Data to be decoded */
|
||||
ASN1_UTILS_SERIALIZE_BUFFER_SIZE, /* Size of data buffer */
|
||||
0, /* Number of unused leading bits, 0..7 */
|
||||
0); /* Number of unused tailing bits, 0..7 */
|
||||
|
||||
if (rval.code != RC_OK) {
|
||||
cerr << "[RRM][Asn1Utils::Clone(MAC_MainConfig_t*)] ASN1 : ERROR IN ASN1 DECODING" << endl;
|
||||
throw asn1_encoding_error();
|
||||
}
|
||||
return clone;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _ASN1UTILS_H
|
||||
# define _ASN1UTILS_H
|
||||
|
||||
# include "PhysicalConfigDedicated.h"
|
||||
# include "RadioResourceConfigDedicated.h"
|
||||
# include "DRB-ToAddMod.h"
|
||||
# include "SRB-ToAddMod.h"
|
||||
# include "MAC-MainConfig.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Asn1Utils
|
||||
{
|
||||
public:
|
||||
|
||||
Asn1Utils () {};
|
||||
~Asn1Utils ();
|
||||
|
||||
static DRB_Identity_t* Clone(DRB_Identity_t*);
|
||||
static DRB_ToAddMod_t* Clone(DRB_ToAddMod_t*);
|
||||
static SRB_ToAddMod_t* Clone(SRB_ToAddMod_t*);
|
||||
static MAC_MainConfig_t* Clone(MAC_MainConfig_t*);
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "Command.h"
|
||||
#include "Exceptions.h"
|
||||
//----------------------------------------------------------------------------
|
||||
Command::Command(unsigned char equipment_typeP, unsigned char equipment_idP, unsigned char actionP, unsigned char object_typeP, unsigned char object_idP) :
|
||||
m_equipment_type(equipment_typeP),m_equipment_id(equipment_idP),m_action(actionP), m_object_type(object_typeP), m_object_id(object_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Storage();
|
||||
m_is_data_written = false;
|
||||
this->writeChar(m_equipment_type);
|
||||
this->writeChar(m_equipment_id);
|
||||
this->writeChar(m_action);
|
||||
this->writeChar(m_object_type);
|
||||
this->writeChar(m_object_id);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
Command::Command(tcpip::Storage& storageP, size_t* sizeP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
Storage();
|
||||
m_is_data_written = false;
|
||||
if (*sizeP >= 7) {
|
||||
m_equipment_type = storageP.readChar();
|
||||
m_equipment_id = storageP.readChar();
|
||||
m_action = storageP.readChar();
|
||||
m_object_type = storageP.readChar();
|
||||
m_object_id = storageP.readChar();
|
||||
|
||||
this->writeChar(m_equipment_type);
|
||||
this->writeChar(m_equipment_id);
|
||||
this->writeChar(m_action);
|
||||
this->writeChar(m_object_type);
|
||||
this->writeChar(m_object_id);
|
||||
|
||||
unsigned short size = storageP.readShort();
|
||||
this->writeShort(size);
|
||||
*sizeP = *sizeP - 7;
|
||||
if (size > 0) {
|
||||
if (*sizeP >= size) {
|
||||
for (int i = 0; i < size ; i++) {
|
||||
this->writeChar(storageP.readChar());
|
||||
}
|
||||
} else {
|
||||
throw command_deserialize_length_error();
|
||||
}
|
||||
*sizeP = *sizeP - size;
|
||||
}
|
||||
m_is_data_written = true;
|
||||
} else {
|
||||
throw command_deserialize_length_error();
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void Command::AddData(tcpip::Storage& storageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (!m_is_data_written) {
|
||||
m_is_data_written = true;
|
||||
//this->writeShort(storageP.size()); already done in storageP
|
||||
this->writeStorage(storageP);
|
||||
} else {
|
||||
throw command_data_overwrite_error();
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
unsigned int Command::size() const
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
if (m_is_data_written) {
|
||||
return Storage::size();
|
||||
} else {
|
||||
return Storage::size() + 2;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Command::Serialize(unsigned char* packetP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
//std::cout << "[Command] Serialize()" << ToString() << std::endl;
|
||||
if (!m_is_data_written) {
|
||||
this->writeShort(0);
|
||||
}
|
||||
readPacket(packetP);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Command::ToString()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
stringstream result;
|
||||
result << EquipmentType2String() << " ID: " << (unsigned int)m_equipment_id << " " << Action2String() << " " << ObjectType2String() << " ID: " << (unsigned int)m_object_id << " CONFIG SIZE: " << (size() - 7);
|
||||
return result.str();
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Command::EquipmentType2String() {
|
||||
//----------------------------------------------------------------------------
|
||||
switch (m_equipment_type) {
|
||||
case COMMAND_EQUIPMENT_RADIO_GATEWAY: {
|
||||
return "COMMAND_EQUIPMENT_RADIO_GATEWAY" ;
|
||||
break;
|
||||
}
|
||||
case COMMAND_EQUIPMENT_MOBILE_TERMINAL: {
|
||||
return "COMMAND_EQUIPMENT_MOBILE_TERMINAL";
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return "COMMAND_EQUIPMENT_UNKNOWN";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Command::Action2String() {
|
||||
//----------------------------------------------------------------------------
|
||||
switch (m_action) {
|
||||
case COMMAND_ACTION_NULL: {
|
||||
return "ACTION_NULL" ;
|
||||
break;
|
||||
}
|
||||
case COMMAND_ACTION_ADD: {
|
||||
return "ACTION_ADD";
|
||||
break;
|
||||
}
|
||||
case COMMAND_ACTION_REMOVE: {
|
||||
return "ACTION_REMOVE";
|
||||
break;
|
||||
}
|
||||
case COMMAND_ACTION_MODIFY: {
|
||||
return "ACTION_MODIFY";
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return "ACTION_UNKNOWN";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Command::ObjectType2String() {
|
||||
//----------------------------------------------------------------------------
|
||||
switch (m_object_type) {
|
||||
case COMMAND_OBJECT_SIGNALLING_RADIO_BEARER: {
|
||||
return "OBJECT_SIGNALLING_RADIO_BEARER" ;
|
||||
break;
|
||||
}
|
||||
case COMMAND_OBJECT_DATA_RADIO_BEARER: {
|
||||
return "OBJECT_DATA_RADIO_BEARER";
|
||||
break;
|
||||
}
|
||||
case COMMAND_OBJECT_MOBILE: {
|
||||
return "OBJECT_MOBILE";
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return "OBJECT_UNKNOWN";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
# ifndef _COMMAND_H
|
||||
# define _COMMAND_H
|
||||
|
||||
# include "platform.h"
|
||||
# include "storage.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace tcpip;
|
||||
|
||||
class Command : public Storage
|
||||
{
|
||||
public:
|
||||
//typedef boost::shared_ptr<ENodeB> ENodeBPtr;
|
||||
|
||||
Command (): m_equipment_type(0u),m_equipment_id(0u),m_action(0u), m_object_type(0u), m_object_id(0u) {
|
||||
Storage();
|
||||
};
|
||||
Command (unsigned char equipment_typeP, unsigned char equipment_idP, unsigned char actionP, unsigned char object_typeP, unsigned char object_idP);
|
||||
Command(tcpip::Storage& storageP, size_t* sizeP);
|
||||
|
||||
void AddData(tcpip::Storage&);
|
||||
void Serialize(unsigned char* packetP);
|
||||
unsigned int size() const;
|
||||
|
||||
~Command () {
|
||||
reset();
|
||||
};
|
||||
|
||||
unsigned char GetEquipmentType() {
|
||||
return m_equipment_type;
|
||||
};
|
||||
unsigned char GetEquipmentId() {
|
||||
return m_equipment_id;
|
||||
};
|
||||
unsigned char GetAction() {
|
||||
return m_action;
|
||||
};
|
||||
unsigned char GetEntityType() {
|
||||
return m_object_type;
|
||||
};
|
||||
unsigned char GetEntityId() {
|
||||
return m_object_id;
|
||||
};
|
||||
|
||||
std::string ToString();
|
||||
std::string EquipmentType2String();
|
||||
std::string Action2String();
|
||||
std::string ObjectType2String();
|
||||
protected:
|
||||
unsigned char m_equipment_type;
|
||||
unsigned char m_equipment_id;
|
||||
unsigned char m_action;
|
||||
unsigned char m_object_type;
|
||||
unsigned char m_object_id;
|
||||
|
||||
bool m_is_data_written;
|
||||
};
|
||||
# endif
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "DataRadioBearer.h"
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _DATARADIOBEARER_H
|
||||
# define _DATARADIOBEARER_H
|
||||
|
||||
# include <boost/ptr_container/ptr_map.hpp>
|
||||
# include <map>
|
||||
//# include <boost/shared_ptr.hpp>
|
||||
|
||||
# include "Message.h"
|
||||
# include "LogicalChannel.h"
|
||||
# include "RadioBearer.h"
|
||||
# include "DRB-ToAddMod.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class DataRadioBearer: public RadioBearer
|
||||
{
|
||||
public:
|
||||
//typedef boost::shared_ptr<ENodeB> ENodeBPtr;
|
||||
|
||||
DataRadioBearer ():m_id(0u) {};
|
||||
DataRadioBearer (unsigned int);
|
||||
~DataRadioBearer ();
|
||||
|
||||
friend inline bool operator>( const DataRadioBearer& l, const DataRadioBearer r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const DataRadioBearer& l, const DataRadioBearer r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
unsigned int m_id;
|
||||
|
||||
|
||||
DRB_ToAddMod_t m_drb_to_add_mod;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,664 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ENodeB.h"
|
||||
#include "Exceptions.h"
|
||||
#include "Asn1Utils.h"
|
||||
|
||||
//static uint8_t g_message_serialize_buffer[MESSAGE_SERIALIZE_BUFFER_SIZE];
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
ENodeB::ENodeB(cell_id_t idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
m_drb_to_add_mod[i][j] = NULL;
|
||||
m_tx_id_pending_drb_to_add_mod[i][j] = -1;
|
||||
m_pending_drb_to_release[i][j] = NULL;
|
||||
m_tx_id_pending_drb_to_release[i][j] = -1;
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
m_srb_to_add_mod[i][j] = NULL;
|
||||
m_tx_id_pending_srb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
//m_radio_resource_config_dedicated = NULL;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRM_RRC_Message_t* ENodeB::AddUserRequest(Mobile* mobileP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
RRM_RRC_Message_t* message;
|
||||
|
||||
AddSignallingRadioBearer1(mobileP->GetId(), transaction_idP);
|
||||
message = static_cast<RRM_RRC_Message_t*>(CALLOC(1,sizeof(RRM_RRC_Message_t)));
|
||||
|
||||
message->message.present = RRM_RRC_MessageType_PR_c1;
|
||||
message->message.choice.c1.present = RRM_RRC_MessageType__c1_PR_rrcAddUserResponse;
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.transactionId = transaction_idP;
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Status = OpenAir_RRM_Response_Status_success;
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Reason = OpenAir_RRM_Response_Reason_ok;
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.e_NodeB_Identity.physCellId = m_id;
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.c_RNTI = mobileP->GetId();;
|
||||
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.radioResourceConfigDedicatedE_NodeB = GetASN1RadioResourceConfigDedicated(transaction_idP);
|
||||
message->message.choice.c1.choice.rrcAddUserResponse.radioResourceConfigDedicatedMobile = mobileP->GetASN1RadioResourceConfigDedicated(transaction_idP);
|
||||
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)message);
|
||||
|
||||
return message;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRM_RRC_Message_t* ENodeB::AddUserConfirm(Mobile* mobileP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Commit transaction here
|
||||
mobileP->CommitTransaction(transaction_idP);
|
||||
CommitTransaction(transaction_idP);
|
||||
//----------------------------------------------------------------------
|
||||
// Then send a reconfiguration message to the RRC
|
||||
//
|
||||
AddSignallingRadioBearer2(mobileP->GetId(), transaction_idP);
|
||||
AddDefaultDataRadioBearer(mobileP->GetId(), transaction_idP);
|
||||
mobileP->AddSignallingRadioBearer2(m_id, transaction_idP);
|
||||
mobileP->AddDefaultDataRadioBearer(m_id, transaction_idP);
|
||||
|
||||
RRM_RRC_Message_t* message = static_cast<RRM_RRC_Message_t*>(CALLOC(1,sizeof(RRM_RRC_Message_t)));
|
||||
|
||||
message->message.present = RRM_RRC_MessageType_PR_c1;
|
||||
message->message.choice.c1.present = RRM_RRC_MessageType__c1_PR_rrcUserReconfiguration;
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.transactionId = transaction_idP;
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.rrm_Response_Status = OpenAir_RRM_Response_Status_success;
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.rrm_Response_Reason = OpenAir_RRM_Response_Reason_ok;
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.e_NodeB_Identity.physCellId = m_id;
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.c_RNTI = mobileP->GetId();
|
||||
// ENodeB
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.radioResourceConfigDedicatedE_NodeB = GetASN1RadioResourceConfigDedicated(transaction_idP);
|
||||
// Mobile
|
||||
message->message.choice.c1.choice.rrcUserReconfiguration.radioResourceConfigDedicatedMobile = mobileP->GetASN1RadioResourceConfigDedicated(transaction_idP);
|
||||
xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)message);
|
||||
|
||||
return message;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void ENodeB::UserReconfigurationComplete(Mobile* mobileP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Commit transaction here
|
||||
mobileP->CommitTransaction(transaction_idP);
|
||||
CommitTransaction(transaction_idP);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRM_RRC_Message_t* ENodeB::RemoveUserRequest(Mobile* mobileP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
RRM_RRC_Message_t* message;
|
||||
return message;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void ENodeB::AddSignallingRadioBearer1(mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cout << "[RRM] ENodeB::AddSignallingRadioBearer1(mobile="<< mobile_idP << " transaction_id="<< transaction_idP << endl;
|
||||
SRB_ToAddMod_t* srb1 = static_cast<SRB_ToAddMod_t*>(CALLOC(1,sizeof(SRB_ToAddMod_t)));
|
||||
srb1->srb_Identity = 1;
|
||||
srb1->rlc_Config = static_cast<SRB_ToAddMod::SRB_ToAddMod__rlc_Config*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__rlc_Config)));
|
||||
srb1->rlc_Config->present = SRB_ToAddMod__rlc_Config_PR_explicitValue;
|
||||
srb1->rlc_Config->choice.explicitValue.present = RLC_Config_PR_am;
|
||||
srb1->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
srb1->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = PollPDU_p4;
|
||||
srb1->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = PollByte_kB25;
|
||||
srb1->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
|
||||
|
||||
srb1->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms100;
|
||||
srb1->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms5;
|
||||
|
||||
|
||||
srb1->logicalChannelConfig = static_cast<SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig)));
|
||||
srb1->logicalChannelConfig->present = SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
|
||||
srb1->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters = static_cast<LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters*>(CALLOC(1,sizeof(LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters)));
|
||||
|
||||
srb1->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->priority = 1;
|
||||
srb1->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
srb1->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
srb1->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup = 0;
|
||||
|
||||
m_pending_srb_to_add_mod[srb1->srb_Identity-1][mobile_idP] = srb1;
|
||||
m_tx_id_pending_srb_to_add_mod[srb1->srb_Identity-1][mobile_idP] = transaction_idP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void ENodeB::AddSignallingRadioBearer2(mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cout << "[RRM] ENodeB::AddSignallingRadioBearer2(mobile="<< mobile_idP << " transaction_id="<< transaction_idP << endl;
|
||||
SRB_ToAddMod_t* srb2 = static_cast<SRB_ToAddMod_t*>(CALLOC(1,sizeof(SRB_ToAddMod_t)));
|
||||
srb2->srb_Identity = 2;
|
||||
srb2->rlc_Config = static_cast<SRB_ToAddMod::SRB_ToAddMod__rlc_Config*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__rlc_Config)));
|
||||
srb2->rlc_Config->present = SRB_ToAddMod__rlc_Config_PR_explicitValue;
|
||||
srb2->rlc_Config->choice.explicitValue.present = RLC_Config_PR_am;
|
||||
srb2->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
srb2->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = PollPDU_p4;
|
||||
srb2->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = PollByte_kB25;
|
||||
srb2->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
|
||||
|
||||
srb2->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms100;
|
||||
srb2->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms5;
|
||||
|
||||
|
||||
srb2->logicalChannelConfig = static_cast<SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig)));
|
||||
srb2->logicalChannelConfig->present = SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
|
||||
srb2->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters = static_cast<LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters*>(CALLOC(1,sizeof(LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters)));
|
||||
|
||||
srb2->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->priority = 1;
|
||||
srb2->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
srb2->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
srb2->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup = 0;
|
||||
|
||||
m_pending_srb_to_add_mod[srb2->srb_Identity-1][mobile_idP] = srb2;
|
||||
m_tx_id_pending_srb_to_add_mod[srb2->srb_Identity-1][mobile_idP] = transaction_idP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void ENodeB::AddDefaultDataRadioBearer(mobile_id_t mobile_idP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cout << "[RRM] ENodeB::AddDefaultDataRadioBearer(mobile="<< mobile_idP << " transaction_id="<< transaction_idP << endl;
|
||||
|
||||
DRB_ToAddMod_t* drb = static_cast<DRB_ToAddMod_t*>(CALLOC(1,sizeof(DRB_ToAddMod_t)));
|
||||
drb->drb_Identity = 3;
|
||||
drb->rlc_Config = static_cast<RLC_Config_t*>(CALLOC(1,sizeof(RLC_Config_t)));
|
||||
drb->rlc_Config->present = RLC_Config_PR_am;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.pollPDU = PollPDU_p4;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.pollByte = PollByte_kB25;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
|
||||
|
||||
drb->rlc_Config->choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms100;
|
||||
drb->rlc_Config->choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms5;
|
||||
|
||||
|
||||
drb->logicalChannelConfig = static_cast<LogicalChannelConfig_t*>(CALLOC(1,sizeof(LogicalChannelConfig_t)));
|
||||
drb->logicalChannelConfig->ul_SpecificParameters = static_cast<LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters*>(CALLOC(1,sizeof(LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters)));
|
||||
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->priority = 1;
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0;
|
||||
|
||||
m_pending_drb_to_add_mod[drb->drb_Identity-1][mobile_idP] = drb;
|
||||
m_tx_id_pending_drb_to_add_mod[drb->drb_Identity-1][mobile_idP] = transaction_idP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void ENodeB::RemoveAllDataRadioBearers(Mobile* mobileP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
/*
|
||||
for (int i = 3 ; i < MAX_RB_PER_MOBILE; i++) {
|
||||
mobile_id_t mobile_id = mobileP->GetId();
|
||||
if (m_radio_bearer_array[i][mobile_id] != NULL) {
|
||||
Command* command = new Command(COMMAND_EQUIPMENT_RADIO_GATEWAY,
|
||||
m_id,
|
||||
COMMAND_ACTION_REMOVE,
|
||||
COMMAND_OBJECT_DATA_RADIO_BEARER,
|
||||
i + (mobile_id * MAX_RB_PER_MOBILE));
|
||||
transactionP->AddCommand(command);
|
||||
RadioBearer* rb = m_radio_bearer_array[i][mobile_id];
|
||||
m_radio_bearer_array[i][mobile_id] = NULL;
|
||||
delete rb;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
ENodeB::~ENodeB()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
//if (!m_radio_bearer_map.empty()) m_radio_bearer_map.clear();
|
||||
//if (!m_mobile_map.empty()) m_mobile_map.clear();
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
if (m_drb_to_add_mod[i][j] != NULL) {
|
||||
asn_DEF_DRB_ToAddMod.free_struct(&asn_DEF_DRB_ToAddMod, m_drb_to_add_mod[i][j], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
if (m_srb_to_add_mod[i][j] != NULL) {
|
||||
asn_DEF_SRB_ToAddMod.free_struct(&asn_DEF_SRB_ToAddMod, m_srb_to_add_mod[i][j], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*if (m_radio_resource_config_dedicated != NULL) {
|
||||
asn_DEF_RadioResourceConfigDedicated.free_struct(&asn_DEF_RadioResourceConfigDedicated, m_radio_resource_config_dedicated, 0);
|
||||
}*/
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void ENodeB::CommitTransaction(transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
// Look if there is a transaction for removing a DRB
|
||||
if (m_tx_id_pending_drb_to_release[i][j] == transaction_idP) {
|
||||
if (m_drb_to_add_mod[i][j] == NULL) {
|
||||
throw transaction_overwrite_error();
|
||||
} else {
|
||||
cerr << "[RRM] ENodeB::CommitTransaction(" << transaction_idP << ") free_struct m_drb_to_add_mod["<< i << "][" << j << "]" << endl;
|
||||
asn_DEF_DRB_ToAddMod.free_struct( &asn_DEF_DRB_ToAddMod, m_drb_to_add_mod[i][j],0);
|
||||
m_drb_to_add_mod[i][j] = NULL;
|
||||
}
|
||||
m_tx_id_pending_drb_to_release[i][j] = -1;
|
||||
}
|
||||
if (m_tx_id_pending_drb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (m_drb_to_add_mod[i][j] == NULL) {
|
||||
m_drb_to_add_mod[i][j] = m_pending_drb_to_add_mod[i][j];
|
||||
cerr << "[RRM] ENodeB::CommitTransaction(" << transaction_idP << ") add struct m_pending_drb_to_add_mod["<< i << "][" << j << "]" << endl;
|
||||
m_pending_drb_to_add_mod[i][j] = NULL;
|
||||
} else {
|
||||
throw transaction_overwrite_error();
|
||||
}
|
||||
m_tx_id_pending_drb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
if (m_tx_id_pending_srb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (m_srb_to_add_mod[i][j] == NULL) {
|
||||
m_srb_to_add_mod[i][j] = m_pending_srb_to_add_mod[i][j];
|
||||
cerr << "[RRM] ENodeB::CommitTransaction(" << transaction_idP << ") add struct m_pending_srb_to_add_mod["<< i << "][" << j << "]" << endl;
|
||||
m_pending_srb_to_add_mod[i][j] = NULL;
|
||||
} else {
|
||||
throw transaction_overwrite_error();
|
||||
}
|
||||
m_tx_id_pending_srb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioResourceConfigDedicated_t* ENodeB::GetASN1RadioResourceConfigDedicated(transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
RadioResourceConfigDedicated_t* config = static_cast<RadioResourceConfigDedicated_t*>(CALLOC(1,sizeof(RadioResourceConfigDedicated_t)));
|
||||
|
||||
config->srb_ToAddModList = NULL;
|
||||
config->drb_ToReleaseList = NULL;
|
||||
config->drb_ToAddModList = NULL;
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
// Look if there is a transaction for removing a DRB
|
||||
if (m_tx_id_pending_drb_to_release[i][j] == transaction_idP) {
|
||||
if (config->drb_ToReleaseList == NULL) {
|
||||
config->drb_ToReleaseList = static_cast<DRB_ToReleaseList_t*>(CALLOC(1,sizeof(DRB_ToReleaseList_t)));
|
||||
}
|
||||
cerr << "[RRM] ENodeB::GetASN1RadioResourceConfigDedicated(" << transaction_idP << ") Releasing DRB "<< m_pending_drb_to_release[i][j] << endl;
|
||||
ASN_SEQUENCE_ADD(&config->drb_ToReleaseList->list,Asn1Utils::Clone(&m_pending_drb_to_release[i][j]));
|
||||
}
|
||||
if (m_tx_id_pending_drb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (config->drb_ToAddModList == NULL) {
|
||||
config->drb_ToAddModList = static_cast<DRB_ToAddModList_t*>(CALLOC(1,sizeof(DRB_ToAddModList_t)));
|
||||
}
|
||||
cerr << "[RRM] ENodeB::GetASN1RadioResourceConfigDedicated(" << transaction_idP << ") Adding DRB "<< m_pending_drb_to_add_mod[i][j] << endl;
|
||||
ASN_SEQUENCE_ADD(&config->drb_ToAddModList->list, Asn1Utils::Clone(m_pending_drb_to_add_mod[i][j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_MOBILE_PER_ENODE_B; j++) {
|
||||
if (m_tx_id_pending_srb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (config->srb_ToAddModList == NULL) {
|
||||
config->srb_ToAddModList = static_cast<SRB_ToAddModList_t*>(CALLOC(1,sizeof(SRB_ToAddModList_t)));
|
||||
}
|
||||
cerr << "[RRM] ENodeB::GetASN1RadioResourceConfigDedicated(" << transaction_idP << ") Adding SRB "<< m_pending_srb_to_add_mod[i][j] << endl;
|
||||
ASN_SEQUENCE_ADD(&config->srb_ToAddModList->list, Asn1Utils::Clone(m_pending_srb_to_add_mod[i][j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config->mac_MainConfig = static_cast<RadioResourceConfigDedicated::RadioResourceConfigDedicated__mac_MainConfig*>(CALLOC(1,sizeof(RadioResourceConfigDedicated::RadioResourceConfigDedicated__mac_MainConfig)));
|
||||
config->mac_MainConfig->present = RadioResourceConfigDedicated__mac_MainConfig_PR_defaultValue;
|
||||
return config;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRM_RRC_Message_t* ENodeB::GetRRMRRCConfigurationMessage(transaction_id_t transaction_idP) {
|
||||
//-----------------------------------------------------------------
|
||||
RRM_RRC_Message_t* message;
|
||||
SystemInformation_t* system_information;
|
||||
SystemInformationBlockType1_t* sib1;
|
||||
|
||||
message = static_cast<RRM_RRC_Message_t*>(CALLOC(1,sizeof(RRM_RRC_Message_t)));
|
||||
system_information = static_cast<SystemInformation_t*>(CALLOC(1,sizeof(SystemInformation_t)));
|
||||
sib1 = static_cast<SystemInformationBlockType1_t*>(CALLOC(1,sizeof(SystemInformationBlockType1_t)));
|
||||
|
||||
message->message.present = RRM_RRC_MessageType_PR_c1;
|
||||
message->message.choice.c1.present = RRM_RRC_MessageType__c1_PR_rrcSystemConfigurationResponse;
|
||||
message->message.choice.c1.choice.rrcSystemConfigurationResponse.e_NodeB_Identity.physCellId = m_id;
|
||||
message->message.choice.c1.choice.rrcSystemConfigurationResponse.transactionId = transaction_idP;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SIB1 CONSTRUCTION
|
||||
//-----------------------------------------------------------------------------
|
||||
PLMN_IdentityInfo_t* PLMN_identity_info;
|
||||
MCC_MNC_Digit_t* dummy;
|
||||
SchedulingInfo_t* schedulingInfo;
|
||||
SIB_Type_t* sib_type;
|
||||
|
||||
|
||||
memset(sib1,0,sizeof(SystemInformationBlockType1_t));
|
||||
|
||||
PLMN_identity_info = static_cast<PLMN_IdentityInfo_t*>(CALLOC(1,sizeof(PLMN_IdentityInfo_t)));
|
||||
schedulingInfo = static_cast<SchedulingInfo_t*>(CALLOC(1,sizeof(SchedulingInfo_t)));
|
||||
sib_type = static_cast<SIB_Type_t*>(CALLOC(1,sizeof(SIB_Type_t)));
|
||||
|
||||
memset(PLMN_identity_info,0,sizeof(PLMN_IdentityInfo_t));
|
||||
memset(schedulingInfo,0,sizeof(SchedulingInfo_t));
|
||||
memset(sib_type,0,sizeof(SIB_Type_t));
|
||||
|
||||
PLMN_identity_info->plmn_Identity.mcc = static_cast<MCC_t*>(CALLOC(1,sizeof(MCC_t)));
|
||||
memset(PLMN_identity_info->plmn_Identity.mcc,0,sizeof(MCC_t));
|
||||
|
||||
asn_set_empty(&PLMN_identity_info->plmn_Identity.mcc->list);//.size=0;
|
||||
|
||||
|
||||
dummy = static_cast<MCC_MNC_Digit_t*>(CALLOC(1,sizeof(MCC_MNC_Digit_t)));
|
||||
*dummy=2;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mcc->list, dummy);
|
||||
|
||||
dummy = static_cast<MCC_MNC_Digit_t*>(CALLOC(1,sizeof(MCC_MNC_Digit_t)));
|
||||
*dummy=6;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mcc->list, dummy);
|
||||
|
||||
dummy = static_cast<MCC_MNC_Digit_t*>(CALLOC(1,sizeof(MCC_MNC_Digit_t)));
|
||||
*dummy=2;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mcc->list, dummy);
|
||||
|
||||
|
||||
//dummy=2;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mcc->list, &dummy);
|
||||
//dummy=6;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mcc->list, &dummy);
|
||||
//dummy=2;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mcc->list, &dummy);
|
||||
|
||||
asn_set_empty(&PLMN_identity_info->plmn_Identity.mnc.list);//.size=0;
|
||||
//PLMN_identity_info->plmn_Identity.mnc.list.size=0;
|
||||
//PLMN_identity_info->plmn_Identity.mnc.list.count=0;
|
||||
|
||||
dummy = static_cast<MCC_MNC_Digit_t*>(CALLOC(1,sizeof(MCC_MNC_Digit_t)));
|
||||
*dummy=8;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mnc.list, dummy);
|
||||
|
||||
dummy = static_cast<MCC_MNC_Digit_t*>(CALLOC(1,sizeof(MCC_MNC_Digit_t)));
|
||||
*dummy=8;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mnc.list, dummy);
|
||||
|
||||
//dummy=8;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mnc.list,&dummy);
|
||||
//dummy=0;ASN_SEQUENCE_ADD(&PLMN_identity_info->plmn_Identity.mnc.list,&dummy);
|
||||
//assign_enum(&PLMN_identity_info->cellReservedForOperatorUse,PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved);
|
||||
PLMN_identity_info->cellReservedForOperatorUse=PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
|
||||
|
||||
|
||||
message->message.choice.c1.choice.rrcSystemConfigurationResponse.systemInformationBlockType1 = sib1;
|
||||
|
||||
ASN_SEQUENCE_ADD(&sib1->cellAccessRelatedInfo.plmn_IdentityList.list,PLMN_identity_info);
|
||||
|
||||
|
||||
// 16 bits
|
||||
sib1->cellAccessRelatedInfo.trackingAreaCode.buf = static_cast<uint8_t*>(MALLOC(2));
|
||||
sib1->cellAccessRelatedInfo.trackingAreaCode.buf[0]=0x00;
|
||||
sib1->cellAccessRelatedInfo.trackingAreaCode.buf[1]=0x10;
|
||||
sib1->cellAccessRelatedInfo.trackingAreaCode.size=2;
|
||||
sib1->cellAccessRelatedInfo.trackingAreaCode.bits_unused=0;
|
||||
|
||||
// 28 bits
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.buf = static_cast<uint8_t*>(MALLOC(8));
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.buf[0]=0x01;
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.buf[1]=0x48;
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.buf[2]=0x0f;
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.buf[3]=0x03;
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.size=4;
|
||||
sib1->cellAccessRelatedInfo.cellIdentity.bits_unused=4;
|
||||
|
||||
// assign_enum(&sib1->cellAccessRelatedInfo.cellBarred,SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred);
|
||||
sib1->cellAccessRelatedInfo.cellBarred=SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred;
|
||||
|
||||
// assign_enum(&sib1->cellAccessRelatedInfo.intraFreqReselection,SystemInformationBlockType1__cellAccessRelatedInfo__intraFreqReselection_allowed);
|
||||
sib1->cellAccessRelatedInfo.intraFreqReselection=SystemInformationBlockType1__cellAccessRelatedInfo__intraFreqReselection_allowed;
|
||||
sib1->cellAccessRelatedInfo.csg_Indication=0;
|
||||
|
||||
sib1->cellSelectionInfo.q_RxLevMin=-70;
|
||||
sib1->cellSelectionInfo.q_RxLevMinOffset=NULL;
|
||||
|
||||
sib1->freqBandIndicator = 2;
|
||||
|
||||
// assign_enum(&schedulingInfo.si_Periodicity,SchedulingInfo__si_Periodicity_rf8);
|
||||
schedulingInfo->si_Periodicity=SchedulingInfo__si_Periodicity_rf8;
|
||||
|
||||
// assign_enum(&sib_type,SIB_Type_sibType3);
|
||||
*sib_type=SIB_Type_sibType3;
|
||||
|
||||
ASN_SEQUENCE_ADD(&schedulingInfo->sib_MappingInfo.list,sib_type);
|
||||
ASN_SEQUENCE_ADD(&sib1->schedulingInfoList.list,schedulingInfo);
|
||||
|
||||
sib1->tdd_Config = static_cast<TDD_Config*>(CALLOC(1,sizeof(struct TDD_Config)));
|
||||
|
||||
//assign_enum(&sib1->tdd_Config->subframeAssignment,TDD_Config__subframeAssignment_sa3);
|
||||
sib1->tdd_Config->subframeAssignment=TDD_Config__subframeAssignment_sa3;
|
||||
|
||||
// assign_enum(&sib1->tdd_Config->specialSubframePatterns,TDD_Config__specialSubframePatterns_ssp0);
|
||||
sib1->tdd_Config->specialSubframePatterns=TDD_Config__specialSubframePatterns_ssp0;
|
||||
|
||||
// assign_enum(&sib1->si_WindowLength,SystemInformationBlockType1__si_WindowLength_ms10);
|
||||
sib1->si_WindowLength=SystemInformationBlockType1__si_WindowLength_ms10;
|
||||
sib1->systemInfoValueTag=0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SIB2 CONSTRUCTION
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part;
|
||||
|
||||
sib2_part = static_cast<SystemInformation_r8_IEs__sib_TypeAndInfo__Member*>(CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)));
|
||||
memset(sib2_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
|
||||
|
||||
sib2_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2;
|
||||
|
||||
sib2_part->choice.sib2.ac_BarringInfo = NULL;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles,RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
|
||||
//calloc(1,sizeof(*sib2_part->choice.sib2.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig));
|
||||
// assign_enum(&sib2_part->choice.sib2.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA,
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep, RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep=RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower,RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_116 );
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower=RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_116;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax,RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize,RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf4);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf4;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer,RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer=RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48;
|
||||
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4;
|
||||
|
||||
// BCCH-Config
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff,BCCH_Config__modificationPeriodCoeff_n2);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=BCCH_Config__modificationPeriodCoeff_n2;
|
||||
|
||||
// PCCH-Config
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.pcch_Config.defaultPagingCycle,PCCH_Config__defaultPagingCycle_rf128);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pcch_Config.defaultPagingCycle=PCCH_Config__defaultPagingCycle_rf128;
|
||||
|
||||
// assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.pcch_Config.nB,PCCH_Config__nB_oneT);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT;
|
||||
|
||||
// PRACH-Config
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.prach_Config.rootSequenceIndex=384;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex = 3;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag = 0;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig = 12;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset = 2;
|
||||
|
||||
// PDSCH-Config
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=15;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0;
|
||||
|
||||
// PUSCH-Config
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB=1;
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode,PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode=PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset=0;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM=0;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled=1;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH=0;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled=0;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift=0;
|
||||
|
||||
// PUCCH-Config
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift,PUCCH_ConfigCommon__deltaPUCCH_Shift_ds1);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift=PUCCH_ConfigCommon__deltaPUCCH_Shift_ds1;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI = 1;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = 0;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = 32;
|
||||
|
||||
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0;
|
||||
|
||||
// uplinkPowerControlCommon
|
||||
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -96;
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.alpha,UplinkPowerControlCommon__alpha_al1);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.alpha=UplinkPowerControlCommon__alpha_al1;
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -117;
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1, DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1=DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0;
|
||||
// assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b, DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b=DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2, DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2=DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a, DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a=DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b, DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0;
|
||||
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 6;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.radioResourceConfigCommon.ul_CyclicPrefixLength, UL_CyclicPrefixLength_len1);
|
||||
sib2_part->choice.sib2.radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.ue_TimersAndConstants.t300, UE_TimersAndConstants__t300_ms1000);
|
||||
sib2_part->choice.sib2.ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.ue_TimersAndConstants.t301, UE_TimersAndConstants__t301_ms1000);
|
||||
sib2_part->choice.sib2.ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.ue_TimersAndConstants.t310, UE_TimersAndConstants__t310_ms1000);
|
||||
sib2_part->choice.sib2.ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.ue_TimersAndConstants.n310, UE_TimersAndConstants__n310_n20);
|
||||
sib2_part->choice.sib2.ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n20;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.ue_TimersAndConstants.t311, UE_TimersAndConstants__t311_ms1000);
|
||||
sib2_part->choice.sib2.ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms1000;
|
||||
|
||||
//assign_enum(&sib2_part->choice.sib2.ue_TimersAndConstants.n311, UE_TimersAndConstants__n311_n1);
|
||||
sib2_part->choice.sib2.ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1;
|
||||
|
||||
sib2_part->choice.sib2.freqInfo.additionalSpectrumEmission = 1;
|
||||
sib2_part->choice.sib2.freqInfo.ul_CarrierFreq = NULL;
|
||||
sib2_part->choice.sib2.freqInfo.ul_Bandwidth = NULL;
|
||||
sib2_part->choice.sib2.mbsfn_SubframeConfigList = NULL;
|
||||
//assign_enum(&sib2_part->choice.sib2.timeAlignmentTimerCommon,TimeAlignmentTimer_sf5120);
|
||||
sib2_part->choice.sib2.timeAlignmentTimerCommon=TimeAlignmentTimer_sf5120;
|
||||
//-----------------------------------------------------------------------------
|
||||
// SIB3 CONSTRUCTION
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib3_part;
|
||||
|
||||
sib3_part = static_cast<SystemInformation_r8_IEs__sib_TypeAndInfo__Member*>(CALLOC(1,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member)));
|
||||
memset(sib3_part,0,sizeof(struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
|
||||
sib3_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3;
|
||||
|
||||
// assign_enum(&sib3_part->choice.sib3cellReselectionInfoCommon.q_Hyst,SystemInformationBlockType3__cellReselectionInfoCommon__q_Hyst_dB4);
|
||||
sib3_part->choice.sib3.cellReselectionInfoCommon.q_Hyst=SystemInformationBlockType3__cellReselectionInfoCommon__q_Hyst_dB4;
|
||||
|
||||
sib3_part->choice.sib3.cellReselectionInfoCommon.speedStateReselectionPars=NULL;
|
||||
|
||||
sib3_part->choice.sib3.cellReselectionServingFreqInfo.s_NonIntraSearch=NULL;
|
||||
sib3_part->choice.sib3.cellReselectionServingFreqInfo.threshServingLow=31;
|
||||
sib3_part->choice.sib3.cellReselectionServingFreqInfo.cellReselectionPriority=7;
|
||||
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.q_RxLevMin = -70;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.p_Max = NULL;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.s_IntraSearch = static_cast<ReselectionThreshold_t*>(CALLOC(1,sizeof(sib3_part->choice.sib3.intraFreqCellReselectionInfo.s_IntraSearch)));
|
||||
*sib3_part->choice.sib3.intraFreqCellReselectionInfo.s_IntraSearch = 31;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.allowedMeasBandwidth=static_cast<AllowedMeasBandwidth_t*>(CALLOC(1,sizeof(*sib3_part->choice.sib3.intraFreqCellReselectionInfo.allowedMeasBandwidth)));
|
||||
|
||||
// assign_enum(sib3_part->choice.sib3.intraFreqCellReselectionInfo.allowedMeasBandwidth,AllowedMeasBandwidth_mbw6);
|
||||
*sib3_part->choice.sib3.intraFreqCellReselectionInfo.allowedMeasBandwidth=AllowedMeasBandwidth_mbw6;
|
||||
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.presenceAntennaPort1 = 0;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.neighCellConfig.buf = static_cast<uint8_t*>(CALLOC(8,1));
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.neighCellConfig.size = 1;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.neighCellConfig.buf[0] = 1;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.neighCellConfig.bits_unused = 6;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.t_ReselectionEUTRA = 1;
|
||||
sib3_part->choice.sib3.intraFreqCellReselectionInfo.t_ReselectionEUTRA_SF = (struct SpeedStateScaleFactors *)NULL;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SIB AGGREGATION
|
||||
//-----------------------------------------------------------------------------
|
||||
memset((void*)system_information,0,sizeof(SystemInformation_t));
|
||||
|
||||
message->message.choice.c1.choice.rrcSystemConfigurationResponse.systemInformation = system_information;
|
||||
|
||||
system_information->criticalExtensions.present = SystemInformation__criticalExtensions_PR_systemInformation_r8;
|
||||
system_information->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
|
||||
// asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0;
|
||||
// systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0;
|
||||
ASN_SEQUENCE_ADD(&system_information->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib2_part);
|
||||
ASN_SEQUENCE_ADD(&system_information->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list,sib3_part);
|
||||
|
||||
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)message);
|
||||
|
||||
return message;
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _ENODEB_H
|
||||
# define _ENODEB_H
|
||||
|
||||
# include "RRM-RRC-Message.h"
|
||||
# include "RadioResourceConfigCommon.h"
|
||||
# include "E-NodeB-Identity.h"
|
||||
# include "PhysicalConfigDedicated.h"
|
||||
# include "RadioResourceConfigDedicated.h"
|
||||
# include "DRB-ToAddMod.h"
|
||||
# include "SRB-ToAddMod.h"
|
||||
# include "MAC-MainConfig.h"
|
||||
# include "RRCSystemConfigurationResponse.h"
|
||||
# include "RRCConnectionReconfiguration.h"
|
||||
# include "SystemInformationBlockType1.h"
|
||||
# include "SystemInformationBlockType2.h"
|
||||
# include "SystemInformationBlockType3.h"
|
||||
# include "SystemInformation.h"
|
||||
|
||||
//# include <boost/ptr_container/ptr_map.hpp>
|
||||
//# include <map>
|
||||
# include "Message.h"
|
||||
# include "Mobile.h"
|
||||
# include "RadioBearer.h"
|
||||
# include "platform.h"
|
||||
# include "Transaction.h"
|
||||
# include "LogicalChannelConfig.h"
|
||||
# include "RRCUserReconfiguration.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
class ENodeB
|
||||
{
|
||||
public:
|
||||
|
||||
ENodeB ():m_id(0u) {};
|
||||
ENodeB (cell_id_t);
|
||||
~ENodeB ();
|
||||
|
||||
friend inline bool operator>( const ENodeB& l, const ENodeB r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const ENodeB& l, const ENodeB r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
cell_id_t GetId() {
|
||||
return m_id;
|
||||
};
|
||||
|
||||
void CommitTransaction(transaction_id_t transaction_idP);
|
||||
RadioResourceConfigDedicated_t* GetASN1RadioResourceConfigDedicated(transaction_id_t transaction_idP);
|
||||
RRM_RRC_Message_t* GetRRMRRCConfigurationMessage(transaction_id_t transaction_idP);
|
||||
|
||||
RRM_RRC_Message_t* AddUserRequest (Mobile* mobileP, transaction_id_t transaction_idP);
|
||||
RRM_RRC_Message_t* AddUserConfirm (Mobile* mobileP, transaction_id_t transaction_idP);
|
||||
RRM_RRC_Message_t* RemoveUserRequest(Mobile* mobileP, transaction_id_t transaction_idP);
|
||||
void UserReconfigurationComplete(Mobile* mobileP, transaction_id_t transaction_idP);
|
||||
void RemoveAllDataRadioBearers (Mobile* mobileP, transaction_id_t transaction_idP);
|
||||
|
||||
/*void AddDataRadioBearer(Mobile* mobileP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
unsigned short traffic_class,
|
||||
unsigned short delay,
|
||||
unsigned int guaranted_bit_rate_uplink,
|
||||
unsigned int max_bit_rate_uplink,
|
||||
unsigned int guaranted_bit_rate_downlink,
|
||||
unsigned int max_bit_rate_downlink,
|
||||
Transaction* transactionP);*/
|
||||
|
||||
/*void RemoveDataRadioBearer(Mobile* mobileP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
Transaction* transactionP);*/
|
||||
|
||||
protected:
|
||||
void AddSignallingRadioBearer1(mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
void AddSignallingRadioBearer2(mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
void AddDefaultDataRadioBearer(mobile_id_t mobile_idP, transaction_id_t transaction_idP);
|
||||
|
||||
|
||||
//boost::ptr_map<mobile_id_t ,Mobile > m_mobile_map;
|
||||
//RadioBearer* m_radio_bearer_array[MAX_RB_PER_MOBILE][MAX_MOBILE_PER_ENODE_B];
|
||||
cell_id_t m_id;
|
||||
|
||||
|
||||
// ASN1 AUTO GENERATED STRUCTS COMPLIANT WITH 3GPP
|
||||
MAC_MainConfig_t m_mac_main_config;
|
||||
DRB_ToAddMod_t* m_drb_to_add_mod[MAX_DRB][MAX_MOBILE_PER_ENODE_B];
|
||||
SRB_ToAddMod_t* m_srb_to_add_mod[MAX_SRB][MAX_MOBILE_PER_ENODE_B];
|
||||
// FOR TRANSACTIONS
|
||||
DRB_Identity_t m_pending_drb_to_release[MAX_DRB][MAX_MOBILE_PER_ENODE_B];
|
||||
transaction_id_t m_tx_id_pending_drb_to_release[MAX_DRB][MAX_MOBILE_PER_ENODE_B];
|
||||
|
||||
DRB_ToAddMod_t* m_pending_drb_to_add_mod[MAX_DRB][MAX_MOBILE_PER_ENODE_B];
|
||||
transaction_id_t m_tx_id_pending_drb_to_add_mod[MAX_DRB][MAX_MOBILE_PER_ENODE_B];
|
||||
|
||||
SRB_ToAddMod_t* m_pending_srb_to_add_mod[MAX_SRB][MAX_MOBILE_PER_ENODE_B];
|
||||
transaction_id_t m_tx_id_pending_srb_to_add_mod[MAX_SRB][MAX_MOBILE_PER_ENODE_B];
|
||||
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _EXCEPTIONS_H
|
||||
# define _EXCEPTIONS_H
|
||||
|
||||
#include <boost/exception/all.hpp>
|
||||
|
||||
struct enodeb_not_connected_error: virtual boost::exception { };
|
||||
struct enodeb_already_connected_error: virtual boost::exception { };
|
||||
struct enodeb_identifier_out_of_bounds: virtual boost::exception { };
|
||||
struct radio_bearer_identifier_out_of_bounds: virtual boost::exception { };
|
||||
struct too_many_enodeb_for_mobile: virtual boost::exception { };
|
||||
struct mobile_not_connected_error: virtual boost::exception { };
|
||||
struct mobile_already_connected_error: virtual boost::exception { };
|
||||
struct null_transaction_error: virtual boost::exception { };
|
||||
struct no_such_transaction_error: virtual boost::exception { };
|
||||
struct no_such_radio_bearer_error: virtual boost::exception { };
|
||||
struct transaction_overwrite_error: virtual boost::exception { };
|
||||
struct transaction_already_exist_error: virtual boost::exception { };
|
||||
struct command_deserialize_length_error: virtual boost::exception { };
|
||||
struct command_data_overwrite_error: virtual boost::exception { };
|
||||
struct asn1_encoding_error: virtual boost::exception { };
|
||||
|
||||
struct test_scenario_message_response_type_error: virtual boost::exception { };
|
||||
|
||||
typedef boost::error_info<struct tag_enodeb_id,unsigned int> enodeb_id_info;
|
||||
typedef boost::error_info<struct tag_mobile_id,unsigned int> mobile_id_info;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "LogicalChannel.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
LogicalChannel::LogicalChannel(unsigned int idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
LogicalChannel::~LogicalChannel()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
//if (!m_radio_bearer_map.empty()) m_radio_bearer_map.clear();
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _LOGICALCHANNEL_H
|
||||
# define _LOGICALCHANNEL_H
|
||||
|
||||
# include <boost/ptr_container/ptr_map.hpp>
|
||||
# include <map>
|
||||
//# include <boost/shared_ptr.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class LogicalChannel
|
||||
{
|
||||
public:
|
||||
typedef enum LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate {
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps0 = 0,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8 = 1,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps16 = 2,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps32 = 3,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps64 = 4,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps128 = 5,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps256 = 6,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity= 7,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare8 = 8,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare7 = 9,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare6 = 10,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare5 = 11,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare4 = 12,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare3 = 13,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare2 = 14,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_spare1 = 15
|
||||
} e_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate;
|
||||
|
||||
typedef enum LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration {
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50 = 0,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms100 = 1,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms150 = 2,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms300 = 3,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms500 = 4,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000 = 5,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_spare2 = 6,
|
||||
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_spare1 = 7
|
||||
} e_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration;
|
||||
|
||||
|
||||
|
||||
//typedef boost::shared_ptr<ENodeB> ENodeBPtr;
|
||||
|
||||
LogicalChannel ():m_id(0u) {};
|
||||
LogicalChannel (unsigned int);
|
||||
~LogicalChannel ();
|
||||
|
||||
friend inline bool operator>( const LogicalChannel& l, const LogicalChannel r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const LogicalChannel& l, const LogicalChannel r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
unsigned int m_id;
|
||||
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,337 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Asn1Utils.h"
|
||||
#include "Mobile.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
Mobile::Mobile(mobile_id_t idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
memset(&m_mac_main_config, 0, sizeof(MAC_MainConfig_t));
|
||||
//memset(&m_physical_config_dedicated, 0, sizeof(PhysicalConfigDedicated_t));
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
m_drb_to_add_mod[i][j] = NULL;
|
||||
m_pending_drb_to_add_mod[i][j] = NULL;
|
||||
m_pending_drb_to_release[i][j] = -1;
|
||||
m_tx_id_pending_drb_to_add_mod[i][j] = -1;
|
||||
m_tx_id_pending_drb_to_release[i][j] = -1;
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
m_srb_to_add_mod[i][j] = NULL;
|
||||
m_pending_srb_to_add_mod[i][j] = NULL;
|
||||
m_tx_id_pending_srb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
m_cell_index2_cell_id[j] = 255;
|
||||
}
|
||||
for (int j = 0 ; j < MAX_ENODE_B; j++) {
|
||||
m_cell_id2_cell_index[j] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
Mobile::Mobile(cell_id_t cell_idP, mobile_id_t idP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
memset(&m_mac_main_config, 0, sizeof(MAC_MainConfig_t));
|
||||
//memset(&m_physical_config_dedicated, 0, sizeof(PhysicalConfigDedicated_t));
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
m_drb_to_add_mod[i][j] = NULL;
|
||||
m_pending_drb_to_add_mod[i][j] = NULL;
|
||||
m_pending_drb_to_release[i][j] = -1;
|
||||
m_tx_id_pending_drb_to_add_mod[i][j] = -1;
|
||||
m_tx_id_pending_drb_to_release[i][j] = -1;
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
m_srb_to_add_mod[i][j] = NULL;
|
||||
m_pending_srb_to_add_mod[i][j] = NULL;
|
||||
m_tx_id_pending_srb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
m_cell_index2_cell_id[j] = 255;
|
||||
}
|
||||
for (int j = 0 ; j < MAX_ENODE_B; j++) {
|
||||
m_cell_id2_cell_index[j] = 255;
|
||||
}
|
||||
signed int cell_index = FindCellIndex(cell_idP);
|
||||
AddSignallingRadioBearer1(cell_index, transaction_idP);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
signed int Mobile::FindCellIndex(cell_id_t cell_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if ( cell_idP >= MAX_ENODE_B) {
|
||||
throw enodeb_identifier_out_of_bounds();
|
||||
}
|
||||
|
||||
// already registered
|
||||
if ((m_cell_id2_cell_index[cell_idP] >= 0) && (m_cell_id2_cell_index[cell_idP] < MAX_ENODE_B)) {
|
||||
return m_cell_id2_cell_index[cell_idP];
|
||||
}
|
||||
// find an index for the new enodeb
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
if (!((m_cell_index2_cell_id[j] >= 0) && (m_cell_index2_cell_id[j] < MAX_ENODE_B))) {
|
||||
m_cell_id2_cell_index[cell_idP] = j;
|
||||
m_cell_index2_cell_id[j] = cell_idP;
|
||||
return j;
|
||||
}
|
||||
}
|
||||
throw too_many_enodeb_for_mobile();
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void Mobile::AddSignallingRadioBearer1(signed int cell_indexP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
SRB_ToAddMod_t* srb = static_cast<SRB_ToAddMod_t*>(CALLOC(1,sizeof(SRB_ToAddMod_t)));
|
||||
srb->srb_Identity = 1;
|
||||
srb->rlc_Config = static_cast<SRB_ToAddMod::SRB_ToAddMod__rlc_Config*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__rlc_Config)));
|
||||
srb->rlc_Config->present = SRB_ToAddMod__rlc_Config_PR_explicitValue;
|
||||
srb->rlc_Config->choice.explicitValue.present = RLC_Config_PR_am;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = PollPDU_p4;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = PollByte_kB25;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
|
||||
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms100;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms5;
|
||||
|
||||
|
||||
srb->logicalChannelConfig = static_cast<SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig)));
|
||||
srb->logicalChannelConfig->present = SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters = static_cast<LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters*>(CALLOC(1,sizeof(LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters)));
|
||||
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->priority = 1;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup = 0;
|
||||
|
||||
m_pending_srb_to_add_mod[srb->srb_Identity-1][cell_indexP] = srb;
|
||||
m_tx_id_pending_srb_to_add_mod[srb->srb_Identity-1][cell_indexP] = transaction_idP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void Mobile::AddSignallingRadioBearer2(signed int cell_indexP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
SRB_ToAddMod_t* srb = static_cast<SRB_ToAddMod_t*>(CALLOC(1,sizeof(SRB_ToAddMod_t)));
|
||||
srb->srb_Identity = 2;
|
||||
srb->rlc_Config = static_cast<SRB_ToAddMod::SRB_ToAddMod__rlc_Config*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__rlc_Config)));
|
||||
srb->rlc_Config->present = SRB_ToAddMod__rlc_Config_PR_explicitValue;
|
||||
srb->rlc_Config->choice.explicitValue.present = RLC_Config_PR_am;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = PollPDU_p4;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = PollByte_kB25;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
|
||||
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms100;
|
||||
srb->rlc_Config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms5;
|
||||
|
||||
|
||||
srb->logicalChannelConfig = static_cast<SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig*>(CALLOC(1,sizeof(SRB_ToAddMod::SRB_ToAddMod__logicalChannelConfig)));
|
||||
srb->logicalChannelConfig->present = SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters = static_cast<LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters*>(CALLOC(1,sizeof(LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters)));
|
||||
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->priority = 1;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
srb->logicalChannelConfig->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup = 0;
|
||||
|
||||
m_pending_srb_to_add_mod[srb->srb_Identity-1][cell_indexP] = srb;
|
||||
m_tx_id_pending_srb_to_add_mod[srb->srb_Identity-1][cell_indexP] = transaction_idP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void Mobile::AddDefaultDataRadioBearer(signed int cell_indexP, transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
|
||||
DRB_ToAddMod_t* drb = static_cast<DRB_ToAddMod_t*>(CALLOC(1,sizeof(DRB_ToAddMod_t)));
|
||||
drb->drb_Identity = 3;
|
||||
drb->rlc_Config = static_cast<RLC_Config_t*>(CALLOC(1,sizeof(RLC_Config_t)));
|
||||
drb->rlc_Config->present = RLC_Config_PR_am;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.pollPDU = PollPDU_p4;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.pollByte = PollByte_kB25;
|
||||
drb->rlc_Config->choice.am.ul_AM_RLC.maxRetxThreshold = UL_AM_RLC__maxRetxThreshold_t32;
|
||||
|
||||
drb->rlc_Config->choice.am.dl_AM_RLC.t_Reordering = T_Reordering_ms100;
|
||||
drb->rlc_Config->choice.am.dl_AM_RLC.t_StatusProhibit = T_StatusProhibit_ms5;
|
||||
|
||||
|
||||
drb->logicalChannelConfig = static_cast<LogicalChannelConfig_t*>(CALLOC(1,sizeof(LogicalChannelConfig_t)));
|
||||
drb->logicalChannelConfig->ul_SpecificParameters = static_cast<LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters*>(CALLOC(1,sizeof(LogicalChannelConfig::LogicalChannelConfig__ul_SpecificParameters)));
|
||||
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->priority = 1;
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate = LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->bucketSizeDuration = LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
drb->logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup = 0;
|
||||
|
||||
m_pending_drb_to_add_mod[drb->drb_Identity-1][cell_indexP] = drb;
|
||||
m_tx_id_pending_drb_to_add_mod[drb->drb_Identity-1][cell_indexP] = transaction_idP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void Mobile::CommitTransaction(transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
// Look if there is a transaction for removing a DRB
|
||||
if (m_tx_id_pending_drb_to_release[i][j] == transaction_idP) {
|
||||
if (m_drb_to_add_mod[i][j] == NULL) {
|
||||
throw transaction_overwrite_error();
|
||||
} else {
|
||||
asn_DEF_DRB_ToAddMod.free_struct( &asn_DEF_DRB_ToAddMod, m_drb_to_add_mod[i][j],0);
|
||||
cerr << "[RRM] Mobile::CommitTransaction(" << transaction_idP << ") free struct m_drb_to_add_mod["<< i << "][" << j << "]" << endl;
|
||||
m_drb_to_add_mod[i][j] = NULL;
|
||||
}
|
||||
m_tx_id_pending_drb_to_release[i][j] = -1;
|
||||
}
|
||||
if (m_tx_id_pending_drb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (m_drb_to_add_mod[i][j] == NULL) {
|
||||
m_drb_to_add_mod[i][j] = m_pending_drb_to_add_mod[i][j];
|
||||
cerr << "[RRM] Mobile::CommitTransaction(" << transaction_idP << ") add struct m_pending_drb_to_add_mod["<< i << "][" << j << "]" << endl;
|
||||
m_pending_drb_to_add_mod[i][j] = NULL;
|
||||
} else {
|
||||
throw transaction_overwrite_error();
|
||||
}
|
||||
m_tx_id_pending_drb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
if (m_tx_id_pending_srb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (m_srb_to_add_mod[i][j] == NULL) {
|
||||
m_srb_to_add_mod[i][j] = m_pending_srb_to_add_mod[i][j];
|
||||
cerr << "[RRM] Mobile::CommitTransaction(" << transaction_idP << ") add struct m_pending_srb_to_add_mod["<< i << "][" << j << "]" << endl;
|
||||
m_pending_srb_to_add_mod[i][j] = NULL;
|
||||
} else {
|
||||
throw transaction_overwrite_error();
|
||||
}
|
||||
m_tx_id_pending_srb_to_add_mod[i][j] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioResourceConfigDedicated_t* Mobile::GetASN1RadioResourceConfigDedicated(transaction_id_t transaction_idP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
RadioResourceConfigDedicated_t* config = static_cast<RadioResourceConfigDedicated_t*>(CALLOC(1,sizeof(RadioResourceConfigDedicated_t)));
|
||||
|
||||
config->srb_ToAddModList = NULL;
|
||||
config->drb_ToReleaseList = NULL;
|
||||
config->drb_ToAddModList = NULL;
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
// Look if there is a transaction for removing a DRB
|
||||
if (m_tx_id_pending_drb_to_release[i][j] == transaction_idP) {
|
||||
if (config->drb_ToReleaseList == NULL) {
|
||||
config->drb_ToReleaseList = static_cast<DRB_ToReleaseList_t*>(CALLOC(1,sizeof(DRB_ToReleaseList_t)));
|
||||
}
|
||||
cerr << "[RRM] Mobile::GetASN1RadioResourceConfigDedicated(" << transaction_idP << ") Releasing DRB "<< m_pending_drb_to_release[i][j] << endl;
|
||||
ASN_SEQUENCE_ADD(&config->drb_ToReleaseList->list,Asn1Utils::Clone(&m_pending_drb_to_release[i][j]));
|
||||
}
|
||||
if (m_tx_id_pending_drb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (config->drb_ToAddModList == NULL) {
|
||||
config->drb_ToAddModList = static_cast<DRB_ToAddModList_t*>(CALLOC(1,sizeof(DRB_ToAddModList_t)));
|
||||
}
|
||||
cerr << "[RRM] Mobile::GetASN1RadioResourceConfigDedicated(" << transaction_idP << ") Adding DRB "<< m_pending_drb_to_add_mod[i][j] << endl;
|
||||
ASN_SEQUENCE_ADD(&config->drb_ToAddModList->list, Asn1Utils::Clone(m_pending_drb_to_add_mod[i][j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
if (m_tx_id_pending_srb_to_add_mod[i][j] == transaction_idP) {
|
||||
if (config->srb_ToAddModList == NULL) {
|
||||
config->srb_ToAddModList = static_cast<SRB_ToAddModList_t*>(CALLOC(1,sizeof(SRB_ToAddModList_t)));
|
||||
}
|
||||
cerr << "[RRM] Mobile::GetASN1RadioResourceConfigDedicated(" << transaction_idP << ") Adding SRB "<< m_pending_srb_to_add_mod[i][j] << endl;
|
||||
ASN_SEQUENCE_ADD(&config->srb_ToAddModList->list, Asn1Utils::Clone(m_pending_srb_to_add_mod[i][j]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config->mac_MainConfig = static_cast<RadioResourceConfigDedicated::RadioResourceConfigDedicated__mac_MainConfig*>(CALLOC(1,sizeof(RadioResourceConfigDedicated::RadioResourceConfigDedicated__mac_MainConfig)));
|
||||
config->mac_MainConfig->present = RadioResourceConfigDedicated__mac_MainConfig_PR_defaultValue;
|
||||
return config;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void Mobile::RemoveDataRadioBearer(ENodeB* e_node_bP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
Transaction* transactionP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
signed int cell_index = m_cell_id2_cell_index[e_node_bP->GetId()];
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Mobile::~Mobile()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
asn_DEF_MAC_MainConfig.free_struct(&asn_DEF_MAC_MainConfig, &m_mac_main_config, 1);
|
||||
//asn_DEF_PhysicalConfigDedicated.free_struct(&asn_DEF_PhysicalConfigDedicated, &m_physical_config_dedicated, 1);
|
||||
|
||||
for (int i = 0 ; i < MAX_DRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
if (m_drb_to_add_mod[i][j] != NULL) {
|
||||
asn_DEF_DRB_ToAddMod.free_struct(&asn_DEF_DRB_ToAddMod, m_drb_to_add_mod[i][j], 0);
|
||||
}
|
||||
if (m_pending_drb_to_add_mod[i][j] != NULL) {
|
||||
asn_DEF_DRB_ToAddMod.free_struct(&asn_DEF_DRB_ToAddMod, m_pending_drb_to_add_mod[i][j], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0 ; i < MAX_SRB; i++) {
|
||||
for (int j = 0 ; j < MAX_ENODE_B_PER_MOBILE; j++) {
|
||||
if (m_srb_to_add_mod[i][j] != NULL) {
|
||||
asn_DEF_SRB_ToAddMod.free_struct(&asn_DEF_SRB_ToAddMod, m_srb_to_add_mod[i][j], 0);
|
||||
}
|
||||
if (m_pending_srb_to_add_mod[i][j] != NULL) {
|
||||
asn_DEF_SRB_ToAddMod.free_struct(&asn_DEF_SRB_ToAddMod, m_pending_srb_to_add_mod[i][j], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _MOBILE_H
|
||||
# define _MOBILE_H
|
||||
|
||||
# include <boost/ptr_container/ptr_map.hpp>
|
||||
# include <map>
|
||||
//# include <boost/shared_ptr.hpp>
|
||||
|
||||
# include "PhysicalConfigDedicated.h"
|
||||
# include "RadioResourceConfigDedicated.h"
|
||||
# include "DRB-ToAddMod.h"
|
||||
# include "SRB-ToAddMod.h"
|
||||
# include "MAC-MainConfig.h"
|
||||
|
||||
# include "Message.h"
|
||||
# include "Transaction.h"
|
||||
# include "platform.h"
|
||||
# include "RadioBearer.h"
|
||||
|
||||
|
||||
class ENodeB;
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Mobile
|
||||
{
|
||||
public:
|
||||
//typedef boost::shared_ptr<ENodeB> ENodeBPtr;
|
||||
|
||||
Mobile (mobile_id_t);
|
||||
Mobile () {
|
||||
Mobile(0u);
|
||||
};
|
||||
Mobile(cell_id_t , mobile_id_t , transaction_id_t );
|
||||
~Mobile ();
|
||||
|
||||
friend inline bool operator>( const Mobile& l, const Mobile r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const Mobile& l, const Mobile r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
mobile_id_t GetId() {
|
||||
return m_id;
|
||||
};
|
||||
void CommitTransaction(transaction_id_t transaction_idP);
|
||||
RadioResourceConfigDedicated_t* GetASN1RadioResourceConfigDedicated(transaction_id_t transaction_idP);
|
||||
void AddSignallingRadioBearer2(signed int cell_indexP, transaction_id_t transaction_idP);
|
||||
void AddDefaultDataRadioBearer(signed int cell_indexP, transaction_id_t transaction_idP);
|
||||
|
||||
/*void AddDataRadioBearer(ENodeB* e_node_bP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
unsigned short m_traffic_class,
|
||||
unsigned short m_delay,
|
||||
unsigned int m_guaranted_bit_rate_uplink,
|
||||
unsigned int m_max_bit_rate_uplink,
|
||||
unsigned int m_guaranted_bit_rate_downlink,
|
||||
unsigned int m_max_bit_rate_downlink,
|
||||
Transaction* transactionP);*/
|
||||
|
||||
void RemoveDataRadioBearer(ENodeB* e_node_bP,
|
||||
rb_id_t radio_bearer_idP,
|
||||
Transaction* transactionP);
|
||||
protected:
|
||||
signed int FindCellIndex(cell_id_t cell_idP);
|
||||
|
||||
void AddSignallingRadioBearer1(signed int cell_indexP, transaction_id_t transaction_idP);
|
||||
//void AddSignallingRadioBearer1(signed int cell_indexP, Transaction* transactionP);
|
||||
//void AddSignallingRadioBearer2(signed int cell_indexP, Transaction* transactionP);
|
||||
//void AddDefaultDataRadioBearer(signed int cell_indexP, Transaction* transactionP);
|
||||
|
||||
|
||||
signed int m_cell_id2_cell_index[MAX_ENODE_B];
|
||||
cell_id_t m_cell_index2_cell_id[MAX_ENODE_B_PER_MOBILE];
|
||||
//boost::ptr_map<mobile_id_t ,Mobile > m_mobile_map;
|
||||
//RadioBearer* m_radio_bearer_array[MAX_RB_PER_MOBILE][MAX_ENODE_B_PER_MOBILE];
|
||||
mobile_id_t m_id;
|
||||
|
||||
// ASN1 AUTO GENERATED STRUCTS COMPLIANT WITH 3GPP
|
||||
MAC_MainConfig_t m_mac_main_config;
|
||||
DRB_ToAddMod_t* m_drb_to_add_mod[MAX_DRB][MAX_ENODE_B_PER_MOBILE];
|
||||
SRB_ToAddMod_t* m_srb_to_add_mod[MAX_SRB][MAX_ENODE_B_PER_MOBILE];
|
||||
|
||||
// FOR TRANSACTIONS
|
||||
DRB_Identity_t m_pending_drb_to_release[MAX_DRB][MAX_ENODE_B_PER_MOBILE];
|
||||
transaction_id_t m_tx_id_pending_drb_to_release[MAX_DRB][MAX_ENODE_B_PER_MOBILE];
|
||||
|
||||
DRB_ToAddMod_t* m_pending_drb_to_add_mod[MAX_DRB][MAX_ENODE_B_PER_MOBILE];
|
||||
transaction_id_t m_tx_id_pending_drb_to_add_mod[MAX_DRB][MAX_ENODE_B_PER_MOBILE];
|
||||
|
||||
SRB_ToAddMod_t* m_pending_srb_to_add_mod[MAX_SRB][MAX_ENODE_B_PER_MOBILE];
|
||||
transaction_id_t m_tx_id_pending_srb_to_add_mod[MAX_SRB][MAX_ENODE_B_PER_MOBILE];
|
||||
|
||||
};
|
||||
# include "ENodeB.h"
|
||||
# endif
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "RadioBearer.h"
|
||||
#include "Command.h"
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
RadioBearer::RadioBearer (rb_id_t idP,
|
||||
T_PollRetransmit_t t_poll_retransmitP,
|
||||
PollPDU_t poll_pduP,
|
||||
PollByte_t poll_byteP,
|
||||
long max_retx_thresholdP,
|
||||
T_Reordering_t t_reorderingP,
|
||||
T_StatusProhibit_t t_status_prohibitP,
|
||||
long priorityP,
|
||||
long prioritized_bit_rateP,
|
||||
long bucket_size_durationP,
|
||||
long logical_channel_groupP,
|
||||
Command* cmdP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
m_rlc_mode = RLC_MODE_AM;
|
||||
|
||||
m_t_poll_retransmit = t_poll_retransmitP;
|
||||
m_poll_pdu = poll_pduP;
|
||||
m_poll_byte = poll_byteP;
|
||||
m_max_retx_threshold = max_retx_thresholdP;
|
||||
m_t_reordering = t_reorderingP;
|
||||
m_t_status_prohibit = t_status_prohibitP;
|
||||
|
||||
|
||||
m_priority = priorityP;
|
||||
m_prioritized_bit_rate = prioritized_bit_rateP;
|
||||
m_bucket_size_duration = bucket_size_durationP;
|
||||
m_logical_channel_group = logical_channel_groupP;
|
||||
|
||||
tcpip::Storage storage;
|
||||
storage.writeShort(20);
|
||||
storage.writeChar(m_id);
|
||||
storage.writeChar(m_rlc_mode);
|
||||
|
||||
storage.writeShort(m_t_poll_retransmit);
|
||||
storage.writeShort(m_poll_pdu);
|
||||
storage.writeShort(m_poll_byte);
|
||||
storage.writeShort(m_max_retx_threshold);
|
||||
storage.writeShort(m_t_reordering);
|
||||
storage.writeShort(m_t_status_prohibit);
|
||||
|
||||
storage.writeChar(m_priority);
|
||||
storage.writeShort(m_prioritized_bit_rate);
|
||||
storage.writeShort(m_bucket_size_duration);
|
||||
storage.writeChar(m_logical_channel_group);
|
||||
cmdP->AddData(storage);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioBearer::RadioBearer (rb_id_t idP,
|
||||
rlc_mode_t rlc_modeP,
|
||||
SN_FieldLength_t e_sn_field_lengthP,
|
||||
T_Reordering_t t_reorderingP,
|
||||
long priorityP,
|
||||
long prioritized_bit_rateP,
|
||||
long bucket_size_durationP,
|
||||
long logical_channel_groupP,
|
||||
Command* cmdP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
m_rlc_mode = rlc_modeP;
|
||||
|
||||
m_sn_field_length = e_sn_field_lengthP;
|
||||
m_t_reordering = t_reorderingP;
|
||||
|
||||
m_priority = priorityP;
|
||||
m_prioritized_bit_rate = prioritized_bit_rateP;
|
||||
m_bucket_size_duration = bucket_size_durationP;
|
||||
m_logical_channel_group = logical_channel_groupP;
|
||||
|
||||
|
||||
tcpip::Storage storage;
|
||||
storage.writeShort(11);
|
||||
storage.writeChar(m_id);
|
||||
storage.writeChar(m_rlc_mode);
|
||||
storage.writeChar(m_sn_field_length);
|
||||
storage.writeShort(m_t_reordering);
|
||||
storage.writeChar(m_priority);
|
||||
storage.writeShort(m_prioritized_bit_rate);
|
||||
storage.writeShort(m_bucket_size_duration);
|
||||
storage.writeChar(m_logical_channel_group);
|
||||
cmdP->AddData(storage);
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioBearer::RadioBearer (rb_id_t idP,
|
||||
SN_FieldLength_t e_sn_field_lengthP,
|
||||
long priorityP,
|
||||
long prioritized_bit_rateP,
|
||||
long bucket_size_durationP,
|
||||
long logical_channel_groupP,
|
||||
Command* cmdP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_id = idP;
|
||||
m_rlc_mode = RLC_MODE_UM_UNIDIRECTIONAL_UL;
|
||||
|
||||
m_sn_field_length = e_sn_field_lengthP;
|
||||
|
||||
m_priority = priorityP;
|
||||
m_prioritized_bit_rate = prioritized_bit_rateP;
|
||||
m_bucket_size_duration = bucket_size_durationP;
|
||||
m_logical_channel_group = logical_channel_groupP;
|
||||
|
||||
tcpip::Storage storage;
|
||||
storage.writeShort(9);
|
||||
storage.writeChar(m_id);
|
||||
storage.writeChar(m_rlc_mode);
|
||||
storage.writeChar(m_sn_field_length);
|
||||
storage.writeChar(m_priority);
|
||||
storage.writeShort(m_prioritized_bit_rate);
|
||||
storage.writeShort(m_bucket_size_duration);
|
||||
storage.writeChar(m_logical_channel_group);
|
||||
cmdP->AddData(storage);
|
||||
}
|
||||
/*//-----------------------------------------------------------------
|
||||
void RadioBearer::SetLogicalChannelParameters(logical_channel_priority_t priorityP,
|
||||
e_lc_config_prioritised_bit_rate_t prioritized_bit_rateP,
|
||||
e_lc_config_bucket_size_duration_t bucket_size_durationP,
|
||||
logical_channel_group_t logical_channel_groupP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_priority = priorityP;
|
||||
m_prioritized_bit_rate = prioritized_bit_rateP;
|
||||
m_bucket_size_duration = bucket_size_durationP;
|
||||
m_logical_channel_group = logical_channel_groupP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RadioBearer::SetRlcUmParameters(rlc_mode_t rlc_modeP, e_sn_field_length_t e_sn_field_lengthP, t_reordering_t t_reorderingP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_rlc_mode = rlc_modeP;
|
||||
m_t_reordering = t_reorderingP;
|
||||
m_sn_field_length = e_sn_field_lengthP;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RadioBearer::SetRlcAmParameters(
|
||||
e_t_poll_retransmit_t t_poll_retransmitP,
|
||||
e_poll_pdu_t poll_pduP,
|
||||
e_poll_byte_t poll_byteP,
|
||||
e_ul_am_rlc_max_retx_threshold_t max_retx_thresholdP,
|
||||
e_t_reordering_t t_reorderingP,
|
||||
e_t_status_prohibit_t t_status_prohibitP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
m_rlc_mode = RLC_MODE_AM;
|
||||
m_t_poll_retransmit = t_poll_retransmitP;
|
||||
m_poll_pdu = poll_pduP;
|
||||
m_poll_byte = poll_byteP;
|
||||
m_max_retx_threshold = max_retx_thresholdP;
|
||||
m_t_reordering = t_reorderingP;
|
||||
m_t_status_prohibit = t_status_prohibitP;
|
||||
}*/
|
||||
//-----------------------------------------------------------------
|
||||
RadioBearer::~RadioBearer()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RADIOBEARER_H
|
||||
# define _RADIOBEARER_H
|
||||
|
||||
# include <boost/ptr_container/ptr_map.hpp>
|
||||
# include <map>
|
||||
//# include <boost/shared_ptr.hpp>
|
||||
|
||||
# include "Message.h"
|
||||
# include "LogicalChannel.h"
|
||||
# include "platform.h"
|
||||
# include "Command.h"
|
||||
# include "RLC-Config.h"
|
||||
# include "PDCP-Config.h"
|
||||
# include "LogicalChannelConfig.h"
|
||||
using namespace std;
|
||||
|
||||
class RadioBearer
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RadioBearer ():m_id(0u) {};
|
||||
RadioBearer (rb_id_t,
|
||||
T_PollRetransmit_t,
|
||||
PollPDU_t,
|
||||
PollByte_t,
|
||||
long,
|
||||
T_Reordering_t,
|
||||
T_StatusProhibit_t,
|
||||
long ,
|
||||
long ,
|
||||
long ,
|
||||
long,
|
||||
Command*);
|
||||
|
||||
// RLC_UM BIDIRECTIONAL OR UNIDIRECTIONAL DL
|
||||
RadioBearer (rb_id_t,
|
||||
rlc_mode_t,
|
||||
SN_FieldLength_t,
|
||||
T_Reordering_t,
|
||||
long ,
|
||||
long ,
|
||||
long ,
|
||||
long,
|
||||
Command*);
|
||||
|
||||
// RLC_UM BIDIRECTIONAL OR UNIDIRECTIONAL UL
|
||||
RadioBearer (rb_id_t,
|
||||
SN_FieldLength_t,
|
||||
long ,
|
||||
long ,
|
||||
long ,
|
||||
long,
|
||||
Command*);
|
||||
|
||||
~RadioBearer ();
|
||||
|
||||
friend inline bool operator>( const RadioBearer& l, const RadioBearer r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const RadioBearer& l, const RadioBearer r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
void SetLogicalChannelParameters(logical_channel_priority_t ,
|
||||
long ,
|
||||
long ,
|
||||
long);
|
||||
|
||||
void SetRlcUmParameters(rlc_mode_t,
|
||||
SN_FieldLength_t ,
|
||||
T_StatusProhibit_t );
|
||||
|
||||
void SetRlcAmParameters(T_PollRetransmit_t,
|
||||
PollPDU_t,
|
||||
PollByte_t,
|
||||
long,
|
||||
T_Reordering_t,
|
||||
T_StatusProhibit_t);
|
||||
|
||||
rb_id_t GetId() {
|
||||
return m_id;
|
||||
};
|
||||
|
||||
private:
|
||||
rb_id_t m_id;
|
||||
//pdcp_config_t m_pdcp_config;
|
||||
rlc_mode_t m_rlc_mode;
|
||||
|
||||
// RLC UM parameters
|
||||
SN_FieldLength_t m_sn_field_length;
|
||||
|
||||
// RLC AM parameters
|
||||
T_PollRetransmit_t m_t_poll_retransmit;
|
||||
PollPDU_t m_poll_pdu;
|
||||
PollByte_t m_poll_byte;
|
||||
long m_max_retx_threshold;
|
||||
T_StatusProhibit_t m_t_status_prohibit;
|
||||
|
||||
// COMMOM RLC parameters
|
||||
T_Reordering_t m_t_reordering;
|
||||
|
||||
long m_priority;
|
||||
long m_prioritized_bit_rate;
|
||||
long m_bucket_size_duration;
|
||||
long m_logical_channel_group;
|
||||
|
||||
|
||||
// ASN1 AUTO GENERATED STRUCTS COMPLIANT WITH 3GPP
|
||||
//PDCP_Config_t m_pdcp_config;
|
||||
//RLC_Config_t m_rlc_config;
|
||||
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,306 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "RadioResources.h"
|
||||
#include "Exceptions.h"
|
||||
#include "Transactions.h"
|
||||
|
||||
|
||||
RadioResources* RadioResources::s_instance = 0;
|
||||
// temporary to be improved later (is RRC send his cell id or RRM assign one?)
|
||||
cell_id_t RadioResources::s_cell_id_generator = 0;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
RRM2RRCMessageConnectionResponse* RadioResources::Request(RRC2RRMMessageConnectionRequest &requestP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = RadioResources::s_cell_id_generator++;
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
throw enodeb_already_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
} else {
|
||||
fprintf(stderr, "[RadioResources] Adding new ENodeB %d\n", e_node_b_id);
|
||||
m_e_node_b_map.insert(std::pair<cell_id_t,ENodeB*>(e_node_b_id, new ENodeB(e_node_b_id)));
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
RRM_RRC_Message_t* asn1_message = e_Node_b->GetRRMRRCConfigurationMessage(requestP.GetTransactionId());
|
||||
RRM2RRCMessageConnectionResponse *response = new RRM2RRCMessageConnectionResponse(requestP.GetTransactionId(),OpenAir_RRM_Response_Status_success, OpenAir_RRM_Response_Reason_ok, asn1_message);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRM2RRCMessageAddUserResponse* RadioResources::Request(RRC2RRMMessageAddUserRequest &requestP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = requestP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = requestP.GetMobileId();
|
||||
if (IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_already_connected_error() << mobile_id_info(mobile_id);
|
||||
} else {
|
||||
fprintf(stderr, "[RadioResources] Adding new Mobile %d\n", mobile_id);
|
||||
//Transaction* transaction = new Transaction(requestP.GetTransactionId());
|
||||
// keep track of the transaction among message exchanges between RRC and RRM
|
||||
//Transactions::Instance()->AddTransaction(transaction);
|
||||
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
|
||||
Mobile* mobile = new Mobile(e_node_b_id, mobile_id,requestP.GetTransactionId());
|
||||
|
||||
RRM_RRC_Message_t* asn1_message = e_Node_b->AddUserRequest(mobile, requestP.GetTransactionId());
|
||||
|
||||
m_mobile_local_map.insert(std::pair<mobile_node_local_key_t ,Mobile*>(std::pair<cell_id_t,mobile_id_t>(e_node_b_id, mobile_id), mobile));
|
||||
|
||||
RRM2RRCMessageAddUserResponse *response = new RRM2RRCMessageAddUserResponse(requestP.GetTransactionId(),OpenAir_RRM_Response_Status_success, OpenAir_RRM_Response_Reason_ok, asn1_message);
|
||||
return response;
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RRM2RRCMessageUserReconfiguration* RadioResources::Request(RRC2RRMMessageAddUserConfirm &confirmP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = confirmP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = confirmP.GetMobileId();
|
||||
if (!IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_not_connected_error() << mobile_id_info(mobile_id);
|
||||
} else {
|
||||
fprintf(stderr, "[RadioResources] Confirming new Mobile %d\n", mobile_id);
|
||||
fprintf(stderr, "[RadioResources] Reconfiguring new Mobile %d\n", mobile_id);
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
|
||||
Mobile* mobile = GetMobile(e_node_b_id, mobile_id);
|
||||
|
||||
RRM_RRC_Message_t* asn1_message = e_Node_b->AddUserConfirm(mobile, confirmP.GetTransactionId());
|
||||
|
||||
//m_mobile_local_map.insert(std::pair<mobile_node_local_key_t ,Mobile*>(std::pair<cell_id_t,mobile_id_t>(e_node_b_id, mobile_id), mobile));
|
||||
|
||||
RRM2RRCMessageUserReconfiguration *response = new RRM2RRCMessageUserReconfiguration(confirmP.GetTransactionId(),OpenAir_RRM_Response_Status_success, OpenAir_RRM_Response_Reason_ok, asn1_message);
|
||||
return response;
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
void RadioResources::Request(RRC2RRMMessageUserReconfigurationComplete &completeP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = completeP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = completeP.GetMobileId();
|
||||
if (!IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_not_connected_error() << mobile_id_info(mobile_id);
|
||||
} else {
|
||||
fprintf(stderr, "[RadioResources] Confirming new Mobile %d\n", mobile_id);
|
||||
fprintf(stderr, "[RadioResources] Reconfiguring new Mobile %d\n", mobile_id);
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
|
||||
Mobile* mobile = GetMobile(e_node_b_id, mobile_id);
|
||||
|
||||
e_Node_b->UserReconfigurationComplete(mobile, completeP.GetTransactionId());
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transaction* RadioResources::Request(RRC2RRMMessageRemoveUserRequest &requestP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = requestP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = requestP.GetMobileId();
|
||||
if (!IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_not_connected_error() << mobile_id_info(mobile_id);
|
||||
}else {
|
||||
fprintf(stderr, "[RadioResources] Removing mobile %d\n", mobile_id);
|
||||
Transaction* transaction = new Transaction(requestP.GetTransactionId());
|
||||
// Do not keep track of the transaction
|
||||
//Transactions::Instance()->AddTransaction(transaction);
|
||||
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
|
||||
Mobile* mobile = GetMobile(e_node_b_id, mobile_id);
|
||||
|
||||
e_Node_b->RemoveUserRequest(mobile,requestP.GetTransactionId());
|
||||
|
||||
return transaction;
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transaction* RadioResources::Request(RRC2RRMMessageAddRadioAccessBearerRequest &requestP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = requestP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = requestP.GetMobileId();
|
||||
if (!IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_not_connected_error() << mobile_id_info(mobile_id);
|
||||
} else {
|
||||
fprintf(stderr, "[RadioResources] Adding new DRB %d\n", requestP.GetRadioBearerId());
|
||||
Transaction* transaction = new Transaction(requestP.GetTransactionId());
|
||||
// keep track of the transaction among message exchanges between RRC and RRM
|
||||
Transactions::Instance()->AddTransaction(transaction);
|
||||
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
|
||||
Mobile* mobile = GetMobile(e_node_b_id, mobile_id);
|
||||
|
||||
/*e_Node_b->AddDataRadioBearer(mobile,
|
||||
requestP.GetRadioBearerId(),
|
||||
requestP.GetTrafficClass(),
|
||||
requestP.GetDelay(),
|
||||
requestP.GetGuarantedBitRateUplink(),
|
||||
requestP.GetMaxBitRateUplink(),
|
||||
requestP.GetGuarantedBitRateDownlink(),
|
||||
requestP.GetMaxBitRateDownlink(),
|
||||
transaction);*/
|
||||
|
||||
return transaction;
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transaction* RadioResources::Request(RRC2RRMMessageAddRadioAccessBearerConfirm &confirmP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = confirmP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = confirmP.GetMobileId();
|
||||
if (!IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_not_connected_error() << mobile_id_info(mobile_id);
|
||||
} else {
|
||||
// TO DO CHECK RADIO BEARER
|
||||
fprintf(stderr, "[RadioResources] Confirming new DRB %d\n", confirmP.GetRadioBearerId());
|
||||
Transaction* transaction = Transactions::Instance()->GetTransaction(confirmP.GetTransactionId());
|
||||
transaction->Commit(); transaction = NULL;
|
||||
Transactions::Instance()->RemoveTransaction(confirmP.GetTransactionId());
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transaction* RadioResources::Request(RRC2RRMMessageRemoveRadioAccessBearerRequest &requestP)
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
cell_id_t e_node_b_id = requestP.GetENodeBId();
|
||||
if (IsENodeBRegistered(e_node_b_id)) {
|
||||
mobile_id_t mobile_id = requestP.GetMobileId();
|
||||
if (!IsMobileRegistered(e_node_b_id, mobile_id)) {
|
||||
throw mobile_not_connected_error() << mobile_id_info(mobile_id);
|
||||
} else {
|
||||
fprintf(stderr, "[RadioResources] Removing DRB %d\n", requestP.GetRadioBearerId());
|
||||
Transaction* transaction = new Transaction(requestP.GetTransactionId());
|
||||
// Do not keep track of the transaction
|
||||
//Transactions::Instance()->AddTransaction(transaction);
|
||||
|
||||
ENodeB* const e_Node_b = this->GetENodeB(e_node_b_id);
|
||||
|
||||
Mobile* mobile = GetMobile(e_node_b_id, mobile_id);
|
||||
|
||||
/*e_Node_b->RemoveDataRadioBearer(mobile,
|
||||
requestP.GetRadioBearerId(),
|
||||
transaction);*/
|
||||
|
||||
return transaction;
|
||||
}
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_id);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
ENodeB* const RadioResources::GetENodeB(cell_id_t e_node_b_idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
map<cell_id_t ,ENodeB*>::iterator it;
|
||||
it=m_e_node_b_map.find(e_node_b_idP);
|
||||
if (it != m_e_node_b_map.end()) {
|
||||
return it->second;
|
||||
} else {
|
||||
throw enodeb_not_connected_error() << enodeb_id_info(e_node_b_idP);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
bool RadioResources::IsENodeBRegistered(cell_id_t idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
map<cell_id_t ,ENodeB*>::iterator it;
|
||||
it=m_e_node_b_map.find(idP);
|
||||
if (it != m_e_node_b_map.end()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
Mobile* const RadioResources::GetMobile(cell_id_t e_node_b_idP, mobile_id_t mobile_idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
map<mobile_node_local_key_t,Mobile*>::iterator it;
|
||||
it=m_mobile_local_map.find(std::pair<cell_id_t,mobile_id_t>(e_node_b_idP, mobile_idP));
|
||||
if (it != m_mobile_local_map.end()) {
|
||||
return it->second;
|
||||
} else {
|
||||
throw mobile_not_connected_error();
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
bool RadioResources::IsMobileRegistered(cell_id_t e_node_b_idP, mobile_id_t mobile_idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
map<mobile_node_local_key_t,Mobile*>::iterator it;
|
||||
it=m_mobile_local_map.find(std::pair<cell_id_t,mobile_id_t>(e_node_b_idP, mobile_idP));
|
||||
if (it != m_mobile_local_map.end()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioResources* RadioResources::Instance()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (RadioResources::s_instance == 0) {
|
||||
RadioResources::s_instance = new RadioResources;
|
||||
}
|
||||
return s_instance;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioResources::RadioResources()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
RadioResources::~RadioResources()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (!m_e_node_b_map.empty()) m_e_node_b_map.clear();
|
||||
if (!m_mobile_local_map.empty()) m_mobile_local_map.clear();
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _RADIORESOURCES_H
|
||||
# define _RADIORESOURCES_H
|
||||
|
||||
# include "RRM-RRC-Message.h"
|
||||
# include <map>
|
||||
//# include <boost/ptr_container/ptr_map.hpp>
|
||||
# include "platform_defines.h"
|
||||
# include "Message.h"
|
||||
# include "ENodeB.h"
|
||||
# include "RRC2RRMMessageConnectionRequest.h"
|
||||
# include "RRM2RRCMessageConnectionResponse.h"
|
||||
# include "RRC2RRMMessageAddUserRequest.h"
|
||||
# include "RRM2RRCMessageAddUserResponse.h"
|
||||
# include "RRC2RRMMessageAddUserConfirm.h"
|
||||
# include "RRM2RRCMessageUserReconfiguration.h"
|
||||
# include "RRC2RRMMessageUserReconfigurationComplete.h"
|
||||
# include "RRC2RRMMessageRemoveUserRequest.h"
|
||||
# include "RRC2RRMMessageAddRadioAccessBearerRequest.h"
|
||||
# include "RRC2RRMMessageAddRadioAccessBearerConfirm.h"
|
||||
# include "RRC2RRMMessageRemoveRadioAccessBearerRequest.h"
|
||||
# include "platform.h"
|
||||
# include "Transaction.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class RadioResources
|
||||
{
|
||||
public:
|
||||
|
||||
//static const int MAX_MOBILES_PER_ENODE_B = 16;
|
||||
//static const int MAX_RADIO_BEARERS_PER_MOBILE = 16;
|
||||
//static const int MAX_RADIO_BEARERS_PER_ENODE_B = 256;
|
||||
|
||||
// mobile_id_t is local to the cell here
|
||||
typedef std::pair<cell_id_t,mobile_id_t> mobile_node_local_key_t;
|
||||
|
||||
|
||||
static RadioResources *Instance ();
|
||||
~RadioResources ();
|
||||
|
||||
bool IsENodeBRegistered(cell_id_t idP);
|
||||
ENodeB* const GetENodeB(cell_id_t idP);
|
||||
bool IsMobileRegistered(cell_id_t e_node_b_idP, mobile_id_t mobile_idP);
|
||||
Mobile* const GetMobile(cell_id_t e_node_b_idP, mobile_id_t mobile_idP);
|
||||
|
||||
void AddENodeB(cell_id_t idP);
|
||||
RRM2RRCMessageConnectionResponse* Request(RRC2RRMMessageConnectionRequest &requestP);
|
||||
RRM2RRCMessageAddUserResponse* Request(RRC2RRMMessageAddUserRequest &requestP);
|
||||
RRM2RRCMessageUserReconfiguration* Request(RRC2RRMMessageAddUserConfirm &requestP);
|
||||
void Request(RRC2RRMMessageUserReconfigurationComplete &confirmP);
|
||||
Transaction* Request(RRC2RRMMessageRemoveUserRequest &requestP);
|
||||
Transaction* Request(RRC2RRMMessageAddRadioAccessBearerRequest &requestP);
|
||||
Transaction* Request(RRC2RRMMessageAddRadioAccessBearerConfirm &confirmP);
|
||||
Transaction* Request(RRC2RRMMessageRemoveRadioAccessBearerRequest &requestP);
|
||||
private:
|
||||
RadioResources ();
|
||||
|
||||
static RadioResources *s_instance;
|
||||
static cell_id_t s_cell_id_generator;
|
||||
map<cell_id_t,ENodeB*> m_e_node_b_map;
|
||||
map<mobile_node_local_key_t,Mobile*> m_mobile_local_map;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "SignallingRadioBearer.h"
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _SIGNALLINGRADIOBEARER_H
|
||||
# define _SIGNALLINGRADIOBEARER_H
|
||||
|
||||
# include <boost/ptr_container/ptr_map.hpp>
|
||||
# include <map>
|
||||
//# include <boost/shared_ptr.hpp>
|
||||
|
||||
# include "Message.h"
|
||||
# include "LogicalChannel.h"
|
||||
# include "RadioBearer.h"
|
||||
# include "SRB-ToAddMod.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class SignallingRadioBearer: public RadioBearer
|
||||
{
|
||||
public:
|
||||
//typedef boost::shared_ptr<ENodeB> ENodeBPtr;
|
||||
|
||||
SignallingRadioBearer ():m_id(0u) {};
|
||||
SignallingRadioBearer (unsigned int);
|
||||
~SignallingRadioBearer ();
|
||||
|
||||
friend inline bool operator>( const SignallingRadioBearer& l, const SignallingRadioBearer r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const SignallingRadioBearer& l, const SignallingRadioBearer r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
unsigned int m_id;
|
||||
|
||||
|
||||
SRB_ToAddMod_t m_srb_to_add_mod;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "Transaction.h"
|
||||
//----------------------------------------------------------------------------
|
||||
Transaction::Transaction (transaction_id_t transaction_idP): m_id(transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
m_commands_vector.reserve(16);
|
||||
fprintf(stderr, "[Transaction] new Transaction %d\n", transaction_idP);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
Transaction::Transaction (transaction_id_t transaction_idP, tcpip::Storage& storageP, packet_size_t sizeP): m_id(transaction_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
fprintf(stderr, "[Transaction] new Transaction %d\n", transaction_idP);
|
||||
m_commands_vector.reserve(16);
|
||||
while (sizeP > 0) {
|
||||
Command* command = new Command(storageP, &sizeP);
|
||||
AddCommand(command);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void Transaction::AddCommand (Command* commandP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
fprintf(stderr, "[Transaction][%d] AddCommand() %s\n", m_id, commandP->ToString().c_str());
|
||||
m_commands_vector.push_back(commandP);
|
||||
}
|
||||
// Serialize Transaction in packet
|
||||
//----------------------------------------------------------------------------
|
||||
void Transaction::Serialize(unsigned char* packetP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
int cursor = 0;
|
||||
fprintf(stderr, "[Transaction][%d] Serialize()\n", m_id);
|
||||
|
||||
vector<Command*>::const_iterator ci;
|
||||
for(ci=m_commands_vector.begin(); ci!=m_commands_vector.end(); ci++)
|
||||
{
|
||||
Command* command = *ci;
|
||||
int size = command->size();
|
||||
command->Serialize(&packetP[cursor]);
|
||||
cursor += size;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
std::string Transaction::ToString()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
stringstream result;
|
||||
result << "Transaction " << (unsigned int)m_id << ":\n";
|
||||
vector<Command*>::const_iterator ci;
|
||||
for(ci=m_commands_vector.begin(); ci!=m_commands_vector.end(); ci++)
|
||||
{
|
||||
result << "\t" << (*ci)->ToString() << "\n";
|
||||
}
|
||||
return result.str();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
packet_size_t Transaction::Size() const {
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
if (m_commands_vector.empty()) return 0;
|
||||
packet_size_t size = 0;
|
||||
for (unsigned int i = 0; i < m_commands_vector.size(); i++) {
|
||||
if (m_commands_vector.at(i) != NULL) {
|
||||
size += m_commands_vector[i]->size();
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "[Transaction][%d] Size() = %d\n", m_id, size);
|
||||
return size;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
Transaction::~Transaction()
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
fprintf(stderr, "[Transaction][%d] ~Transaction()\n", m_id);
|
||||
vector<Command*>::const_iterator ci;
|
||||
for(ci=m_commands_vector.begin(); ci!=m_commands_vector.end(); ci++)
|
||||
{
|
||||
Command* command = *ci;
|
||||
delete command;
|
||||
}
|
||||
m_commands_vector.clear();
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _TRANSACTION_H
|
||||
# define _TRANSACTION_H
|
||||
|
||||
# include <vector>
|
||||
# include "Message.h"
|
||||
# include "Command.h"
|
||||
# include "platform.h"
|
||||
# include "storage.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Transaction
|
||||
{
|
||||
public:
|
||||
//typedef boost::shared_ptr<ENodeB> ENodeBPtr;
|
||||
|
||||
Transaction ():m_id(0u) {};
|
||||
Transaction (transaction_id_t);
|
||||
Transaction (transaction_id_t , tcpip::Storage& , packet_size_t );
|
||||
~Transaction ();
|
||||
|
||||
void AddCommand (Command*);
|
||||
friend inline bool operator>( const Transaction& l, const Transaction r ) {
|
||||
return l.m_id > r.m_id;
|
||||
}
|
||||
friend inline bool operator==( const Transaction& l, const Transaction r ) {
|
||||
return l.m_id == r.m_id;
|
||||
}
|
||||
|
||||
|
||||
void Commit() {};
|
||||
void Rollback() {};
|
||||
transaction_id_t GetId() {
|
||||
return m_id;
|
||||
};
|
||||
|
||||
|
||||
std::string ToString();
|
||||
|
||||
void Serialize(unsigned char* packetP);
|
||||
packet_size_t Size() const;
|
||||
|
||||
protected:
|
||||
transaction_id_t m_id;
|
||||
vector<Command*> m_commands_vector;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "Transactions.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
|
||||
Transactions* Transactions::s_instance = 0;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
Transaction* const Transactions::GetTransaction(transaction_id_t idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
map<transaction_id_t ,Transaction*>::iterator it;
|
||||
it=m_transaction_map.find(idP);
|
||||
if (it != m_transaction_map.end()) {
|
||||
return it->second;
|
||||
} else {
|
||||
throw no_such_transaction_error();
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
bool Transactions::IsTransactionRegistered(transaction_id_t idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
map<transaction_id_t ,Transaction*>::iterator it;
|
||||
it=m_transaction_map.find(idP);
|
||||
if (it != m_transaction_map.end()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void Transactions::RemoveTransaction(transaction_id_t idP) {
|
||||
//----------------------------------------------------------------------------
|
||||
unsigned int n = m_transaction_map.erase(idP);
|
||||
fprintf(stderr, "[Transactions] Transaction %d removed(%d)\n", idP, n);
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void Transactions::AddTransaction(Transaction* txP) {
|
||||
//----------------------------------------------------------------------------
|
||||
if (txP == NULL) {
|
||||
throw null_transaction_error();
|
||||
}
|
||||
transaction_id_t tx_id = txP->GetId();
|
||||
if (IsTransactionRegistered(tx_id)) {
|
||||
throw transaction_already_exist_error();
|
||||
} else {
|
||||
fprintf(stderr, "[Transactions] Adding new Transaction %d\n", tx_id);
|
||||
m_transaction_map.insert(std::pair<transaction_id_t,Transaction*>(tx_id, txP));
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transactions* Transactions::Instance()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (Transactions::s_instance == 0) {
|
||||
Transactions::s_instance = new Transactions;
|
||||
}
|
||||
return s_instance;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transactions::Transactions()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
Transactions::~Transactions()
|
||||
//-----------------------------------------------------------------
|
||||
{
|
||||
if (!m_transaction_map.empty()) m_transaction_map.clear();
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
# ifndef _TRANSACTIONS_H
|
||||
# define _TRANSACTIONS_H
|
||||
|
||||
# include <map>
|
||||
# include "Message.h"
|
||||
# include "Transaction.h"
|
||||
# include "platform.h"
|
||||
using namespace std;
|
||||
|
||||
class Transactions
|
||||
{
|
||||
public:
|
||||
|
||||
static Transactions *Instance ();
|
||||
~Transactions ();
|
||||
|
||||
bool IsTransactionRegistered(transaction_id_t idP);
|
||||
void AddTransaction(Transaction* txP);
|
||||
void RemoveTransaction(transaction_id_t idP);
|
||||
Transaction* const GetTransaction(transaction_id_t idP);
|
||||
|
||||
private:
|
||||
Transactions ();
|
||||
|
||||
static Transactions *s_instance;
|
||||
map<transaction_id_t,Transaction*> m_transaction_map;
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
// ===========================================================================
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
// ===========================================================================
|
||||
#include "RRCMessageHandler.h"
|
||||
// ===========================================================================
|
||||
static bool quit = false;
|
||||
// ===========================================================================
|
||||
void sigint(int)
|
||||
// ===========================================================================
|
||||
{
|
||||
quit = true;
|
||||
}
|
||||
// ===========================================================================
|
||||
int main(int argc,char *argv[])
|
||||
// ===========================================================================
|
||||
{
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
signal(SIGINT, sigint);
|
||||
|
||||
// start RRC server
|
||||
RRCMessageHandler::Instance();
|
||||
RRCMessageHandler::Instance()->Join(&quit);
|
||||
fprintf(stderr, "\nRRM LTE Exiting...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,299 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <typeinfo>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "TestScenario.h"
|
||||
#include "Message.h"
|
||||
#include "RRC2RRMMessageConnectionRequest.h"
|
||||
#include "RRC2RRMMessageAddUserRequest.h"
|
||||
#include "RRC2RRMMessageAddUserConfirm.h"
|
||||
#include "RRC2RRMMessageAddRadioAccessBearerRequest.h"
|
||||
#include "RRC2RRMMessageAddRadioAccessBearerConfirm.h"
|
||||
#include "RRC2RRMMessageRemoveRadioAccessBearerRequest.h"
|
||||
#include "RRC2RRMMessageRemoveUserRequest.h"
|
||||
#include "RRC2RRMMessageUserReconfigurationComplete.h"
|
||||
#include "RRM2RRCMessageConnectionResponse.h"
|
||||
#include "RRM2RRCMessageAddUserResponse.h"
|
||||
#include "RRM2RRCMessageAddRadioAccessBearerResponse.h"
|
||||
#include "RRM2RRCMessageRemoveRadioAccessBearerResponse.h"
|
||||
#include "RRM2RRCMessageRemoveUserResponse.h"
|
||||
#include "RRM2RRCMessageUserReconfiguration.h"
|
||||
#include "RRMMessageHandler.h"
|
||||
#include "Exceptions.h"
|
||||
//----------------------------------------------------------------------------
|
||||
int TestScenario::s_step = 0;
|
||||
int TestScenario::s_scenario_id = 0;
|
||||
|
||||
int test_scenario_all_is_ok_transaction_id = 0;
|
||||
int test_scenario_all_is_ok_cell_id = 0;
|
||||
int test_scenario_all_is_ok_mobile_id = 1;
|
||||
int test_scenario_all_is_ok_rb_id = 6 + test_scenario_all_is_ok_mobile_id*MAX_RB_PER_MOBILE;
|
||||
int test_scenario_all_is_ok_rb2_id = 7 + test_scenario_all_is_ok_mobile_id*MAX_RB_PER_MOBILE;
|
||||
//----------------------------------------------------------------------------
|
||||
void TestScenario::Start(const int scenario_idP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
TestScenario::s_scenario_id = scenario_idP;
|
||||
|
||||
switch (TestScenario::s_scenario_id) {
|
||||
|
||||
case TestScenario::SCENARIO_ALL_IS_OK:
|
||||
|
||||
{
|
||||
TestScenario::s_step = 0;
|
||||
RRC2RRMMessageConnectionRequest connection_request("0::1", 33334, ++test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, connection_request.GetSerializedMessageBuffer(), connection_request.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageConnectionRequest sent..." << std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
std::cerr << "TestScenario::Start() UNKNOWN SCENARIO" << std::endl;
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void TestScenario::notifyRxMessage(Message* messageP)
|
||||
//----------------------------------------------------------------------------
|
||||
{
|
||||
std::cout << "[TestScenario] notifyRxMessage()" << std::endl;
|
||||
switch (TestScenario::s_scenario_id){
|
||||
|
||||
case TestScenario::SCENARIO_ALL_IS_OK:
|
||||
|
||||
switch (TestScenario::s_step) {
|
||||
case 0:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageConnectionResponse");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageConnectionResponse* message = static_cast<RRM2RRCMessageConnectionResponse*>(messageP);
|
||||
assert(message->GetStatus() == OpenAir_RRM_Response_Status_success);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
|
||||
RRC2RRMMessageAddUserRequest add_user_request("0::1", 33334, test_scenario_all_is_ok_cell_id, test_scenario_all_is_ok_mobile_id, ++test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, add_user_request.GetSerializedMessageBuffer(), add_user_request.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageAddUserRequest sent..." << std::endl;
|
||||
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageConnectionResponse received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageAddUserResponse");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageAddUserResponse* message = static_cast<RRM2RRCMessageAddUserResponse*>(messageP);
|
||||
assert(message->GetStatus() == OpenAir_RRM_Response_Status_success);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
assert(message->GetMobileId() == test_scenario_all_is_ok_mobile_id);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
|
||||
//for (int i = 0; i < 1000 ; i++) {
|
||||
|
||||
RRC2RRMMessageAddUserConfirm add_user_confirm("0::1", 33334, test_scenario_all_is_ok_cell_id, test_scenario_all_is_ok_mobile_id, test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, add_user_confirm.GetSerializedMessageBuffer(), add_user_confirm.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageAddUserConfirm sent..." << std::endl;
|
||||
//std::cout << "i = " << i << std::endl;
|
||||
//}
|
||||
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageAddUserResponse received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageUserReconfiguration");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageUserReconfiguration* message = static_cast<RRM2RRCMessageUserReconfiguration*>(messageP);
|
||||
assert(message->GetStatus() == OpenAir_RRM_Response_Status_success);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
assert(message->GetMobileId() == test_scenario_all_is_ok_mobile_id);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
std::cout << "Msg RRM2RRCMessageUserReconfiguration OK" << std::endl;
|
||||
|
||||
RRC2RRMMessageUserReconfigurationComplete reconfiguration_complete("0::1", 33334,
|
||||
test_scenario_all_is_ok_cell_id,
|
||||
test_scenario_all_is_ok_mobile_id,
|
||||
test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, reconfiguration_complete.GetSerializedMessageBuffer(), reconfiguration_complete.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageUserReconfigurationComplete sent..." << std::endl;
|
||||
|
||||
cout << "End of scenario" << endl;
|
||||
exit(0);
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageUserReconfiguration received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageAddRadioAccessBearerResponse");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse* message = static_cast<RRM2RRCMessageAddRadioAccessBearerResponse*>(messageP);
|
||||
assert(message->GetStatus() == Message::STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
assert(message->GetMobileId() == test_scenario_all_is_ok_mobile_id);
|
||||
assert(message->GetRadioBearerId() == test_scenario_all_is_ok_rb_id);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm confirm("0::1", 33334, test_scenario_all_is_ok_cell_id, test_scenario_all_is_ok_mobile_id, test_scenario_all_is_ok_rb_id, test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, confirm.GetSerializedMessageBuffer(), confirm.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageAddRadioAccessBearerConfirm sent..." << std::endl;
|
||||
|
||||
test_scenario_all_is_ok_transaction_id += 1;
|
||||
RRC2RRMMessageRemoveRadioAccessBearerRequest request("0::1", 33334,
|
||||
test_scenario_all_is_ok_cell_id,
|
||||
test_scenario_all_is_ok_mobile_id,
|
||||
test_scenario_all_is_ok_rb_id,
|
||||
test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, request.GetSerializedMessageBuffer(), request.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageRemoveRadioAccessBearerRequest sent..." << std::endl;
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageAddRadioAccessBearerResponse received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageRemoveRadioAccessBearerResponse");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageRemoveRadioAccessBearerResponse* message = static_cast<RRM2RRCMessageRemoveRadioAccessBearerResponse*>(messageP);
|
||||
assert(message->GetStatus() == Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
assert(message->GetMobileId() == test_scenario_all_is_ok_mobile_id);
|
||||
assert(message->GetRadioBearerId() == test_scenario_all_is_ok_rb_id);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
|
||||
test_scenario_all_is_ok_transaction_id += 1;
|
||||
RRC2RRMMessageAddRadioAccessBearerRequest add_rb_request("0::1", 33334,
|
||||
test_scenario_all_is_ok_cell_id,
|
||||
test_scenario_all_is_ok_mobile_id,
|
||||
test_scenario_all_is_ok_rb2_id,
|
||||
3, //traffic_class
|
||||
100, //delay
|
||||
128, //guaranted_bit_rate_uplink
|
||||
256, //max_bit_rate_uplink
|
||||
512, //guaranted_bit_rate_downlink
|
||||
768, //max_bit_rate_downlink
|
||||
test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, add_rb_request.GetSerializedMessageBuffer(), add_rb_request.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageAddRadioAccessBearerRequest sent..." << std::endl;
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageRemoveRadioAccessBearerResponse received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageAddRadioAccessBearerResponse");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageAddRadioAccessBearerResponse* message = static_cast<RRM2RRCMessageAddRadioAccessBearerResponse*>(messageP);
|
||||
assert(message->GetStatus() == Message::STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
assert(message->GetMobileId() == test_scenario_all_is_ok_mobile_id);
|
||||
assert(message->GetRadioBearerId() == test_scenario_all_is_ok_rb2_id);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
|
||||
RRC2RRMMessageAddRadioAccessBearerConfirm confirm("0::1", 33334, test_scenario_all_is_ok_cell_id, test_scenario_all_is_ok_mobile_id, test_scenario_all_is_ok_rb2_id, test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, confirm.GetSerializedMessageBuffer(), confirm.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageAddRadioAccessBearerConfirm sent..." << std::endl;
|
||||
|
||||
test_scenario_all_is_ok_transaction_id += 1;
|
||||
RRC2RRMMessageRemoveUserRequest request("0::1", 33334,
|
||||
test_scenario_all_is_ok_cell_id,
|
||||
test_scenario_all_is_ok_mobile_id,
|
||||
test_scenario_all_is_ok_transaction_id);
|
||||
RRMMessageHandler::Instance()->Send2Peer("0::1", 33333, request.GetSerializedMessageBuffer(), request.GetSerializedMessageSize());
|
||||
std::cout << "Msg RRC2RRMMessageRemoveUserRequest sent..." << std::endl;
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageAddRadioAccessBearerResponse received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
std::string type_id_message(typeid(*messageP).name());
|
||||
std::size_t found=type_id_message.find("RRM2RRCMessageRemoveUserResponse");
|
||||
if (found != std::string::npos) {
|
||||
TestScenario::s_step += 1;
|
||||
|
||||
RRM2RRCMessageRemoveUserResponse* message = static_cast<RRM2RRCMessageRemoveUserResponse*>(messageP);
|
||||
assert(message->GetStatus() == Message::STATUS_REMOVE_USER_SUCCESSFULL);
|
||||
assert(message->GetReason() == OpenAir_RRM_Response_Reason_ok);
|
||||
assert(message->GetENodeBId() == test_scenario_all_is_ok_cell_id);
|
||||
assert(message->GetMobileId() == test_scenario_all_is_ok_mobile_id);
|
||||
assert(message->GetTransactionId() == test_scenario_all_is_ok_transaction_id);
|
||||
|
||||
std::cout << "END OF SCENARIO" << std::endl;
|
||||
} else {
|
||||
std::cout << "TestScenario::Start() UNKNOWN RRM2RRCMessageRemoveUserResponse received" << std::endl;
|
||||
throw test_scenario_message_response_type_error();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
std::cerr << "TestScenario::notifyRxMessage() SCENARIO_ALL_IS_OK UNKNOWN STEP" << std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
std::cerr << "TestScenario::notifyRxMessage() UNKNOWN SCENARIO" << std::endl;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _TESTSCENARIO_H
|
||||
# define _TESTSCENARIO_H
|
||||
# include "Message.h"
|
||||
# include "platform.h"
|
||||
|
||||
|
||||
|
||||
class TestScenario
|
||||
{
|
||||
public:
|
||||
static const int SCENARIO_ALL_IS_OK = 1;
|
||||
|
||||
static void Start(const int scenario_idP);
|
||||
static void notifyRxMessage(Message*);
|
||||
|
||||
private:
|
||||
TestScenario ();
|
||||
~TestScenario ();
|
||||
static int s_step;
|
||||
static int s_scenario_id;
|
||||
};
|
||||
# endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user