if4_tools.h 2.19 KB
Newer Older
1
2
3
4
5
/*
 * 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
Cedric Roux's avatar
Cedric Roux committed
6
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 * 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
34
#ifndef __IF4_TOOLS_H__
#define __IF4_TOOLS_H__
35
#include "PHY/defs.h"
36

37
/// Macro for IF4 packet type
38
39
40
41
#define IF4p5_PACKET_TYPE 0x080A 
#define IF4p5_PULFFT 0x0019 
#define IF4p5_PDLFFT 0x0020
#define IF4p5_PRACH 0x0021
42
43
44
45
46
#define IF4p5_PRACH_BR_CE0 0x0022
#define IF4p5_PRACH_BR_CE1 0x0023
#define IF4p5_PRACH_BR_CE2 0x0024
#define IF4p5_PRACH_BR_CE3 0x0025
#define IF4p5_PULTICK 0x0026
Sandeep Kumar's avatar
Sandeep Kumar committed
47

48
struct IF4p5_header {  
49
  /// Type
50
  uint16_t type; 
51
  /// Sub-Type
52
  uint16_t sub_type;
53
  /// Reserved
54
  uint32_t rsvd;
55
  /// Frame Status
Sandeep Kumar's avatar
Sandeep Kumar committed
56
  uint32_t frame_status;
57

Sandeep Kumar's avatar
Sandeep Kumar committed
58
} __attribute__ ((__packed__));
59

60
61
typedef struct IF4p5_header IF4p5_header_t;
#define sizeof_IF4p5_header_t 12 
Sandeep Kumar's avatar
Sandeep Kumar committed
62

63
void gen_IF4p5_dl_header(IF4p5_header_t*, int, int);
64

65
void gen_IF4p5_ul_header(IF4p5_header_t*, uint16_t, int, int);
66

67
void gen_IF4p5_prach_header(IF4p5_header_t*, int, int);
68

69
void send_IF4p5(RU_t*, int, int, uint16_t);
70

71
void recv_IF4p5(RU_t*, int*, int*, uint16_t*, uint32_t*);
Sandeep Kumar's avatar
Sandeep Kumar committed
72

73
74
75
void malloc_IF4p5_buffer(RU_t*);

#endif