phy_procedures_nr_common.c 1.66 KB
Newer Older
Guy De Souza's avatar
Guy De Souza committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
/*
 * 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
 */

/*! \file phy_procedures_lte_eNB.c
* \brief Implementation of common utilities for eNB/UE procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
32

Guy De Souza's avatar
Guy De Souza committed
33
#include "sched_nr.h"
34
#include "PHY/INIT/phy_init.h"
Guy De Souza's avatar
Guy De Souza committed
35

36
nr_subframe_t nr_slot_select(nfapi_nr_config_request_t *cfg, unsigned char slot, int frame)
Guy De Souza's avatar
Guy De Souza committed
37
{
38
  if (cfg->subframe_config.duplex_mode.value == FDD || slot == NR_DOWNLINK_SLOT || nr_is_ssb_slot(cfg,slot,frame)==1)
Guy De Souza's avatar
Guy De Souza committed
39
    return(SF_DL);
40 41 42
  else if (slot == NR_UPLINK_SLOT)
    return (SF_UL);

laurent's avatar
laurent committed
43
  return -1;
44
}