Commit 4c100a29 authored by Rohit Gupta's avatar Rohit Gupta

add license to autotest framework + delete files not used in project

parent b481bfd9
dev 1 128-ues 207-feature-ued-platform-support 256_QAM_demod 2cw_fairRRscd 340-fix-beamforming-for-multiple-antenna 342-isip-pcie-lib 375-syrtem-sdr-platform 383-ulsch-scheduler-optimization 387-fraunhofer-iis-transmission-mode-4 401-bug-related-to-nr-pucch-format-2-generator 408-reworked 408-ue-main-threads 445-LDPC-implementation-on-GPU 459-pusch-based-ta-updates 464-ru_beamforming_in_gpu 464-ru_beamforming_in_gpu-CPUsubfunction 472-add-pusch-dmrs-modes 481-ldpc-decoder-on-gpu 5g_fapi_scf Fix_SA_SIB1 LTE-sidelink LTE_TRX_on_single_port NCTU_CS_ISIP NCTU_CS_ISIP_CPU NCTU_CS_ISIP_GPU NCTU_OpinConnect_LDPC NR-PHY-MAC-IF-multi-UE NRPRACH_highSpeed_saankhya NRUE_usedlschparallel NR_10MHz NR_CSI_reporting NR_DCI_01 NR_DLUL_PF NR_DLUL_PF_4UL NR_DLUL_PF_rebased NR_DL_MIMO NR_DL_sched_fixes NR_DL_scheduler NR_FAPI_beamindex_SSB_RO NR_FAPI_beamindex_SSB_RO_SEMPROJ NR_FDD_FIX NR_FR2_RA NR_FR2_RRC_SSB NR_FR2_initsync_fixes NR_MAC_CE_GlobalEdge NR_MAC_Multi_Rach_GlobalEdge NR_MAC_Multi_Rach_GlobalEdge-old NR_MAC_SSB NR_MAC_SSB_RO_GlobalEdge NR_MAC_SSB_RO_UE_IDCC NR_MAC_SSB_RO_merge NR_MAC_TCI_UCI_GlobalEdge NR_MCS_BLER NR_NGAP NR_PDCP_noS1 NR_PUCCH_MultiUE NR_RA_cleanup NR_RA_updates NR_RRCConfiguragion_FR2 NR_RRCConfiguration NR_RRCConfiguration_FR2 NR_RRCConfiguration_S1U NR_RRCConfiguration_merge_develop NR_RRCConfiguration_sync_source NR_RRCConfiguration_trx_thread NR_RRC_CP_bugfix NR_RRC_PDCP NR_RRC_PRACH_procedures NR_RRC_PRACH_procedures_todevelop NR_RRC_PUSCH NR_RRC_TA NR_RRC_X2AP_AMBR_Change_Global_edge NR_RRC_X2AP_RemoveHardcodings_GlobalEdge NR_RRC_config_simplified NR_RRC_harq NR_RRC_harq_b NR_RRC_harq_hacks NR_RRC_harq_newdcipdu NR_SA_F1AP_5GRECORDS NR_SA_F1AP_5GRECORDS_lts NR_SA_F1AP_RFSIMULATOR NR_SA_F1AP_RFSIMULATOR2 NR_SA_F1AP_RFSIMULATOR2_SRB NR_SA_F1AP_RFSIMULATOR3 NR_SA_F1AP_RFSIMULATOR3_tmp NR_SA_F1AP_RFSIMULATOR3_wf NR_SA_F1AP_RFSIMULATOR_w5GCN NR_SA_F1AP_dev NR_SA_NGAP_RRC NR_SA_NGAP_RRC_wk42 NR_SA_itti_sim_wk48 NR_SA_itti_sim_wk48_hs NR_SA_itti_sim_wk48_hs1 NR_SA_w5GCN_new_gtpu NR_SCHED NR_SCHED_HARQ NR_SCHED_PDCCH_PUCCH_HARQ NR_SCHED_PDCCH_PUCCH_HARQ_rebased NR_SCHED_fixes NR_SRB_Config NR_TRX_on_single_port NR_TRX_on_single_port2 NR_UE_CONFIG_REQ_FIXES NR_UE_MAC_scheduler NR_UE_RA_fixes NR_UE_SA NR_UE_UL_DCI_improvements NR_UE_dlsch_bugfix NR_UE_enable_parallelization NR_UE_stability_fixes NR_UL_FAPI_programming NR_UL_SCFDMA_100MHz NR_UL_scheduler NR_UL_scheduler_rebased NR_UL_scheduling NR_Wireshark NR_beam_simulation NR_beamforming_test NR_gNB_SCF_Indication NR_ipaccess_testing NR_mac_uci_functions_rework NR_msg2_phytest NR_scheduling_CSIRS NR_scheduling_request NR_scheduling_request2 NR_scheduling_request3 NR_test_S1U_RRC_PRACH_procedures NR_ue_dlsch_dmrs_cdm New-Merge-sidelink-develop OpInConnect_ISIP PBCHNRTCFIX PUSCH_TA_update PerfumeOldTdd RA_CI_test RFquality RRC-measurements-merge2develop Saankhya_NRPRACH_HighSpeed UE_DL_DCI_hotfix UpdateRANRemoteUEReport add-dmrs-test add_iris_hw addoptions_nr_USRPdevice bch-fixes-bitmap benetel_5g_prach_fix benetel_config_file_fix benetel_driver_uldl_pf_merge benetel_driver_update benetel_fixes benetel_phase_rotation benetel_phase_rotation_old block_mmse_receiver_with_whitenning bsr-fix bugfix-find-uci bugfix-free-ra-process bugfix-minor-remove-wrong-log bugfix-nr-bands bugfix-nr-ldpc-post-processing bugfix-nr-ldpc-size-typo bugfix-nr-pdcp-sn-size bugfix-nr-rate-matching-assertion bugfix-nr-t-reordering bugfix-pdcch_order bugfix-x2-SgNBAdditionRequest bupt-sa-merge cce_indexing_fix cce_indexing_fix2 ci-deploy-asterix ci-deploy-docker-compose ci-new-docker-pipeline ci-rd-july-improvements ci-reduce-nb-vms ci-test ci-ul-iperf-from-trf-container ci-yacine ci_benetel_test ci_phytest ci_quectel_support ci_test_ra_fr2 ci_vm_resource_fix clean-5G-scope-round2 cleanup_softmodem_main constant_power container_fix container_v1.2.2 debug_branch_init_sync develop develop-CBRA-v3 develop-FeMBMS develop-NR_SA_F1AP_5GRECORDS develop-NR_SA_F1AP_5GRECORDS-v3 develop-SA-CBRA develop-SA-CBRA-CUDU develop-SA-CBRA-Msg5 develop-SA-CBRA-lts develop-SA-CBRA-ulsch-lts develop-SA-RA develop-SnT develop-aarch64build develop-ci develop-ci-fju develop-large-scale-emulations develop-m2ap develop-multi-RRUs develop-nb-iot develop-nb-iot-RRC develop-nb-iot-merge develop-nb-iot-merge-w-conflicts develop-nb-iot-ntust develop-nr develop-nr-adding-2018-09-asn1 develop-nr-fr2 develop-nr-fr2-rework develop-nr_cppcheck develop-oriecpriupdates develop-sib1 develop-sib1-local develop-sib1-lts develop-sib1-update develop-sib1-update-test1 develop-sib1-update-ue develop-sidekiq develop-vco3 develop_ci develop_inria_ci_deployment develop_inria_ci_deployment_gp develop_inria_ci_deployment_gp_b4merge develop_integration_2019_w44 develop_integration_2020_w15 develop_integration_2020_w19 develop_integration_w08 develop_jenkins_replay develop_stable dfts_alternatives disable_CSI_measrep dlsch-all-dlslots dlsch_encode_mthread dlsch_parallel dlsim-autotests docker-improvements-2021-april docker-no-cache-option documentation docupdate_tools dongzhanyi-zte-0001 dongzhanyi-zte-develop dongzhanyi-zte-develop2 dreibh/apt-auth-fix dreibh/device-load-fix dreibh/device-load-fix-develop-branch dreibh/doxygen-fix dual-connectivity dummy edrx enhance-rfsim enhancement-149-iqtxshift episys-merge episys/nsa_development extend_sharedlibusage extend_sharedlibusage2 fapi_for_dmrs_and_ptrs feat-mac-sock feature-21-TM7 feature-230-tm3_scheduler feature-247-tm89 feature-247-tm89-fixes feature-247-tm89-rebased feature-278-physical-layer-GPU-version feature-309-phy_procedures_eNB_TX_split_to_multi_threading feature-330-turbo_decoder_gpu feature-368-channel-simulator feature-4g-sched feature-68-enb-agent feature-flexran-cm-s1ap feature-nr-4g-nfapi-modifications feature-pdcp-task feature-send-rrc-message-for-wireshark-logging feature-support-clang-format feature/make-s1-mme-port-configurable feature/make-s1-mme-port-configurable-with-astyle-fixes feature_tm3 fembms-enb-ue fft_bench_hotfix finalize-oaicn-integration firas fix-ci-tun fix-clock-source fix-dirty-ue-same-machine fix-itti fix-itti-segv fix-l2-sim fix-limeSDR-compile fix-nr-pdcp-timer fix-nr-rlc-range-nack fix-quectel fix-realtime fix-segfault-flexran-isolated fix-softmodem-restart fix-warnings fix-x2-without-gnb fix_NR_DLUL_PF fix_NR_DLUL_PF_benchmark fix_coreset_dmrs_idx fix_do_ra_data fix_pdsch_low_prb fix_rb_corruption fix_reestablishment fix_rfsim_mimo fix_rrc_x2_ticking fixes-CE-RLC-PDU-size fixes-mac-sched-nfapi fixes-mac-sched-tun fixes-tun fixgtpu flexran-apps flexran-improvements flexran-repair-mme-mgmt flexran-report-split fr2-hw-test fujitsu_lte_contribution fujitsu_lte_contribution-128 gNB-nrUE-USRP gNB_mwc18_integration generate_push_ptrs git-dashboard gnb-freerun-txru gnb-n300-fixes gnb-only-test gnb-realtime-hotfix gnb-realtime-quickfix gnb-threadpool hack-exit-gnb-when-no-enb-nsa harq-hotfix hotfix-minor-remove-nr-rlc-cppcheck-error hotfix-nr-rlc-tick hotfix-ocp-executable hotfix-ue-musim-compilation hotfix_usrp_lib improve_build_nr_lte_merge improve_nr_modulation improve_ue_stability initial-nfapi-PNF-fixes integ-w13-test-rt-issue integration-develop-nr-2019w45 integration_2020_wk15 integration_2020_wk40 integration_2020_wk41 integration_2020_wk42_2 integration_2020_wk45 integration_2020_wk45_2 integration_2020_wk46 integration_2020_wk46_2 integration_2020_wk47 integration_2020_wk48 integration_2020_wk48_2 integration_2020_wk49 integration_2020_wk50 integration_2020_wk50_1 integration_2020_wk51 integration_2020_wk51_2 integration_2021_wk02 integration_2021_wk02_wMR988 integration_2021_wk04 integration_2021_wk05 integration_2021_wk06 integration_2021_wk06_MR978 integration_2021_wk06_b integration_2021_wk06_c integration_2021_wk08 integration_2021_wk08_2 integration_2021_wk08_MR963 integration_2021_wk09 integration_2021_wk09_b integration_2021_wk10 integration_2021_wk10_b integration_2021_wk11 integration_2021_wk12 integration_2021_wk12_b integration_2021_wk13_a integration_2021_wk13_b integration_2021_wk13_b_fix_tdas integration_2021_wk13_b_fixed integration_2021_wk13_c integration_2021_wk14_a integration_2021_wk15_a integration_2021_wk16 integration_2021_wk17_a integration_w5GC_CBRA_test inter-RRU inter-RRU-final inter-RRU-nr inter-RRU-oairu inter-rru-UE interoperability-test isip-turbo-decoder-dynamic isip-turbo-decoder-parallel isip_nr issue271_simulator issue392-simplify-s1-nos1step2_01 issue416_nfapicleanup issue_345_l2_fapi_simulator itti-enhancement l2-fixes large_scale_simulations ldpc-dec-layering ldpc-decoder-codegen ldpc-decoder-codegen2 ldpc-decoder-improvements ldpc-offload ldpc_short_codeword_fixes load_gnb lte-m-ue_type lte-ulsch-bugfix lte_uplink_improvement mac-fixes-wk45_2 mac-monitoring main_python master mbms-fix-develop-nr merging-2019-w51-to-develop-nr mex_mmse_receiver migrate-cpp-check-container minor-fix-doc-basic-sim mobipass-hack modify_fairRRscd_parallel mosaic5g-oai-ran mosaic5g-oai-sim msg4_phy_0303_lfq mu_allocate multi-L1 multi-RRUs multiple_ssb_sib1_bugfix nasmesh_kernel_5.8 new-gtpu new_nos1 new_pdcp new_rlc new_rlc_2020 new_rlc_in_mbms nfapi-L2-emulator nfapi-bugfix nfapi_improvement nfapi_nr_arch_mod nfapi_nr_develop nfapi_nr_develop_new ngap-dlul ngap-support ngap-w48-merge2 ngap-wf ngap-wf-1120 ngap-wf-1120-srb ngap-wf-1120-srb-gtp ngap-wf-1120-srb-gtp-hs ngap-wf-1120-srb-gtp-hs1 ngap-wf-1120-srb-gtp-hs2 ngap-wf-1120-srb-gtp-yhz ngap-wf-1203-yunsdr ngap-wf-liuyu ngap_lfq_1120 ngap_merge noCore nr-bsr-fix nr-coreset-bug-fix nr-dl-mimo-2layer nr-dlsch-multi-thread nr-dlsch-thread nr-dmrs-fixes nr-dual-connectivity nr-interdigital-test nr-ip-uplink-noS1 nr-mac-pdu-wireshark nr-mac-remove-ue-list nr-multiple-ssb nr-pdcp nr-pdcp-improvements nr-pdcp-nea2-security nr-pdcp-nia2-integrity nr-pdcp-srb-integrity nr-pdsch-extraction-bugfix nr-physim-update nr-ra-fix nr-rlc-am-bugfix-w44 nr-rlc-bugfix-w44 nr-ssb-measurements nr-stats-print nr-timing-measurement nr-timing-measurement-merge nr-ue-buffer-status nr-ue-slot-based nr-uldci nrPBCHTCFix nrPbchTcFix nrUE nrUE-hs nrUE-upper-layer nr_beamforming nr_bsr nr_ci_dlsim nr_csi_newbranch nr_dci_procedures nr_demo_wsa2019 nr_dl_dmrs_type2 nr_dl_pf nr_dl_pf2 nr_dl_ul_ptrs nr_dlsch_parallel_measurements nr_dlsim_plot nr_fapi_for_push_tmp nr_fdd_if_fix nr_fix_easycppcheck nr_flexible_NRBDL nr_improve_build_procedures nr_increase_tp nr_mib_vsa_test nr_pdcch_testing nr_pdcch_updates nr_pdsch_integration nr_polar_decoder_improvement nr_power_measurement_fixes nr_prach nr_prach_fr2 nr_pucch nr_pucch2 nr_segmentation_fixes nr_sim_fix nr_tdd_configuration nr_ue_msg3 nr_ue_pdcp_fix nr_ue_tti_cleanup nr_ul_pf nr_ul_scfdma nr_vcd nrue-multi-thread nrue_msg2_reception nsa-ue nsa_remove_band_hardcodings oai-sim oai-ubuntu-docker oai-ubuntu-docker-for-lmssdr oai_ue_mwc18_integration oairu oairu-dockerfile-support oc-docker-october-improvements ocp_simulator openxg/develop pdcp-benchmark pdsch-ch-est physim-build-deploy polar8 prb_based_dl_channel_estimation preprocessor_refactor-2 ptrs_rrc_config pucch2ab pucchsim-multiue pusch-mthread-scaling-fix pusch-retrans-fix-ue ra-dl-ul rau_rru_reciprocity_measurements recode_itti_from_scratch recursive-cmake reduce_memory_footprint release_v1_2_0_candidate remove-ci-workaround remove_nos1_hack_pdcp remove_x2_gnb_hardcoding repair-TA revert-f5c94279 revert-itti revert_memcpy rh-ci-add-ue-parallelization rh_ci_add_runtime_stats rh_ci_add_uldlharq_stats rh_ci_fix_autoterminate rh_ci_fr1_update rh_ci_gsheet_rt_monitoring rh_ci_nsa2jenkins rh_ci_nsa_test_n310 rh_ci_oc rh_ci_phy_test_improve rh_ci_py rh_ci_ra_fr2 rh_ci_rfsim_ra rh_ci_ue_parallel rh_doc_update_3 rh_fr1_newjenkins rh_fr1_update rh_gnb_compile_fix rh_wk50_debug rhel77-build rlc-v2-bugfix-status-reporting rlc-v2-tick rlc_v2_coverity_fixes rohan_ulsim2RxFix rrc-enb-phy-testmode rru-txwrite-modification ru-parallel-beamforming ru_rau_enhancement ru_rau_enhancement-external-timing runel runel-reverse-test s1-subnormal_rewrite s1_subnormal s1_subnormal-robert s1ap-bugfix-rab_setup sa-demo sa-demo-hs sa-merge-rrc-srb sa-msg4 sa-msg4-rrc sa-msg4-rrc-yihz sa-msg4-rrc-yihz-hs sa_rrc_yihz sanitize-address sanitize-v1 sanitize-v1-tmp sarma_pvnp_oai schedule-si-fix signal-delay sim-channels small-bugfixes-w40 small-config-change small_nr_bugfixes smallcleanup softmodem_cleanup split73 t-gnb-tracer tcri test-panos test-x310-perf test_nsa_gtpu_fix test_rt-fix_phy-test testing_2symb_pdcch testing_with_external_txdata thread-pool tm7-iris tools_5Gadapt tp-ota-test trx_thread_param trx_write_thread ue-csi ue-dci-false-detection ue-fixes ue-fixes-ota ue-pdsch-pusch-parallel ue-race-fix ue-updates-runel-test ue_adjust_gain ue_beam_selection ue_dlsch-multi-threading ue_dlsch_decoding_ldpc_offload ue_nfapi_mch ues_test_tmp uhd_priority_set_cleanup ul-freq-iq-samps-to-file ul_dl_dci_same_slot ul_harq ulsch_decode_mthread ulsim_changes update-to-2019-march-june-release usrp_fix_adc_shift_and_pps_sync usrp_gpio_test usrp_x400 wf-sa-rrc wireshark-T-hack-ueid wireshark-log-scheduling-requests wk11-with-phytest workaround-rebased workaround-restart-not-working x2-endc-processing x2-ho x2-ka-test x2_neighbor_6cells x2_tdd xiangwab xiangwan xw2 yihongzheng_srb zzs 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 2018.w31 2018.w29 2018.w25 2018.w19 2018.w15 2018.w12 2018.w11 2018.w10 2018.w09 2018.w08 2018.w07 2018.w06 2018.w05 2018.w04 2018.w03 2018.w02 2017.w48 2017.w46 2017.w43 2017.w42 2017.w34 2017.w30 2017.w25 2017.w24 2017.w22 2017.w20 2017.w19 2017.w15 2017.w14 2017.w13 2017.w12 2017.w11 2017.w10 2017.w09 2017.w08 2017.w07 2017.w06 2017.w05 2017.w04 2017.w03 2017.w02 2017.w01 2016.w50 2016.w49 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 v1B0.8 v1B0.7 v1B0.6 v1B0.5 v1B0.4 v1B0.3 v1B0.2 v1B0.1 v0.6.1 v0.6.1_tdd v0.6 v0.5.1_tdd v0.5 v0.4 osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB oai_nr_sync nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_1.0 benetel_enb_rel_1.0
No related merge requests found
#!/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
......
#!/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
......
#!/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
......
#!/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
......
#!/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"
......
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
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
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
SUBDIRS = src
EXTRA_DIST = README ChangeLog AUTHORS COPYING INSTALL NEWS
rrm$(EXEEXT):
$(MAKE) -C src $@
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 '{}' ';'
This diff is collapsed.
###################################
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
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()
This diff is collapsed.
/*
* 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
\ No newline at end of file
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
/*
* 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()
//----------------------------------------------------------------------------
{
}
/*
* 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
/*
* 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()
//----------------------------------------------------------------------------
{
}
/*
* 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
/*
* 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;
}
}
/*
* 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
/*
* 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);
}
}
/*
* 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
/*
* 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);
}
}
/*
* 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
/*
* 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()
//----------------------------------------------------------------------------
{
}
/*
* 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
/*
* 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()
//----------------------------------------------------------------------------
{
}
/*
* 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
/*
* 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;
}
}
/*
* 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
/*
* 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
}
/*
* 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
/*
* 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);
}
/*
* 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
/*
* 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;
}
}
/*
* 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
/*
* 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);
}
}
/*
* 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
This diff is collapsed.
This diff is collapsed.
noinst_LIBRARIES = libsqlite.a
libsqlite_a_SOURCES = sqlite3.c sqlite3.h
This diff is collapsed.
This diff is collapsed.
noinst_LIBRARIES = libtcpip.a
libtcpip_a_SOURCES = storage.h storage.cpp
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* 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"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment