/* * 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.1 (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 */ /*________________________openair_rrc_utils.c________________________ Authors : Hicham Anouar Company : EURECOM Emails : anouar@eurecom.fr ________________________________________________________________*/ #include "defs.h" #include "extern.h" //------------------------------------------------------------------------------------------------------------------// uint16_t find_free_dtch_position(uint8_t Mod_id, uint16_t UE_CH_index) { uint16_t i,j; if(UE_CH_index==0) { j=0; } else { j=1; } for(i=j; imacphy_exit("NO FREE DTCH LCHAN, exit"); return 0; } //-------------------------------------------------------------------------------------------// uint8_t rrc_find_free_ue_index(uint8_t Mod_id) { //-------------------------------------------------------------------------------------------// uint16_t i; for(i=1; i<=NB_CNX_CH; i++) if ( (CH_rrc_inst[Mod_id].Info.UE_info[i][0] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][1] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][2] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][3] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][4] == 0)) { return i; } return 0xff; } //-------------------------------------------------------------------------------------------// unsigned short rrc_find_ue_index(unsigned char Mod_id, L2_ID Mac_id) { //-------------------------------------------------------------------------------------------// unsigned char i; /* for(i=0;i<=NB_CNX_CH;i++) if( bcmp(Mac_id.L2_id,CH_rrc_inst[Mod_id].Info.UE_info[i].L2_id,sizeof(L2_ID))==0) return i; return i; */ } //-------------------------------------------------------------------------------------------// uint8_t rrc_is_node_isolated(uint8_t Mod_id) { //-------------------------------------------------------------------------------------------// /*uint8_t i; for(i=0;iHeader->Rv_tb_idx=0; // Rrc_buffer->W_idx=0; //Rrc_buffer->R_idx=0; }