if4_tools.h 2.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * 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
 */

22 23 24 25 26 27 28 29 30 31 32
/*! \file PHY/LTE_TRANSPORT/if4_tools.h
* \brief 
* \author S. Sandeep Kumar, Raymond Knopp
* \date 2016
* \version 0.1
* \company Eurecom
* \email: ee13b1025@iith.ac.in, knopp@eurecom.fr 
* \note
* \warning
*/

33
#include "PHY/defs.h"
34

35
/// Macro for IF4 packet type
36 37 38 39
#define IF4p5_PACKET_TYPE 0x080A 
#define IF4p5_PULFFT 0x0019 
#define IF4p5_PDLFFT 0x0020
#define IF4p5_PRACH 0x0021
40
#define IF4p5_PULTICK 0x0022
41

42
struct IF4p5_header {  
43
  /// Type
44
  uint16_t type; 
45
  /// Sub-Type
46
  uint16_t sub_type;
47
  /// Reserved
48
  uint32_t rsvd;
49
  /// Frame Status
50
  uint32_t frame_status;
51

Sandeep Kumar's avatar
Sandeep Kumar committed
52
} __attribute__ ((__packed__));
53

54 55
typedef struct IF4p5_header IF4p5_header_t;
#define sizeof_IF4p5_header_t 12 
56

57
void gen_IF4p5_dl_header(IF4p5_header_t*, int, int);
58

59
void gen_IF4p5_ul_header(IF4p5_header_t*, uint16_t, int, int);
60

61
void gen_IF4p5_prach_header(IF4p5_header_t*, int, int);
62

63
void send_IF4p5(PHY_VARS_eNB*, int, int, uint16_t, int);
64

65
void recv_IF4p5(PHY_VARS_eNB*, int*, int*, uint16_t*, uint32_t*);
66

67
void malloc_IF4p5_buffer(PHY_VARS_eNB*);