phy_messages_types.h 4.56 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
Cédric Roux's avatar
Cédric 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
 */

winckel's avatar
winckel committed
22
23
24
25
26
27
28
29
30
31
/*
 * phy_messages_types.h
 *
 *  Created on: Dec 12, 2013
 *      Author: winckel
 */

#ifndef PHY_MESSAGES_TYPES_H_
#define PHY_MESSAGES_TYPES_H_

winckel's avatar
winckel committed
32
#include "PHY/impl_defs_lte.h"
33
34
35
#if ENABLE_RAL
#include "ral_messages_types.h" //LG: MIH moved from repository/trunk to repository/extras
#endif
winckel's avatar
winckel committed
36
37
//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
winckel's avatar
winckel committed
38
39
#define PHY_CONFIGURATION_REQ(mSGpTR)       (mSGpTR)->ittiMsg.phy_configuration_req

winckel's avatar
winckel committed
40
41
42
43
44
45
46
#define PHY_DEACTIVATE_REQ(mSGpTR)          (mSGpTR)->ittiMsg.phy_deactivate_req

#define PHY_FIND_CELL_REQ(mSGpTR)           (mSGpTR)->ittiMsg.phy_find_cell_req
#define PHY_FIND_NEXT_CELL_REQ(mSGpTR)      (mSGpTR)->ittiMsg.phy_find_next_cell_req

#define PHY_FIND_CELL_IND(mSGpTR)           (mSGpTR)->ittiMsg.phy_find_cell_ind

gauthier's avatar
gauthier committed
47
48
#define PHY_MEAS_THRESHOLD_REQ(mSGpTR)      (mSGpTR)->ittiMsg.phy_meas_threshold_req
#define PHY_MEAS_THRESHOLD_CONF(mSGpTR)     (mSGpTR)->ittiMsg.phy_meas_threshold_conf
49
#define PHY_MEAS_REPORT_IND(mSGpTR)         (mSGpTR)->ittiMsg.phy_meas_report_ind
winckel's avatar
winckel committed
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//-------------------------------------------------------------------------------------------//
#define MAX_REPORTED_CELL   10

/* Enhance absolute radio frequency channel number */
typedef uint16_t    Earfcn;

/* Physical cell identity, valid value are from 0 to 503 */
typedef int16_t     PhyCellId;

/* Reference signal received power, valid value are from 0 (rsrp < -140 dBm) to 97 (rsrp <= -44 dBm) */
typedef int8_t      Rsrp;

/* Reference signal received quality, valid value are from 0 (rsrq < -19.50 dB) to 34 (rsrq <= -3 dB) */
typedef int8_t      Rsrq;

typedef struct CellInfo_s {
66
67
68
69
  Earfcn      earfcn;
  PhyCellId   cell_id;
  Rsrp        rsrp;
  Rsrq        rsrq;
winckel's avatar
winckel committed
70
71
72
} CellInfo;

//-------------------------------------------------------------------------------------------//
winckel's avatar
winckel committed
73
74
// eNB: ENB_APP -> PHY messages
typedef struct PhyConfigurationReq_s {
knopp's avatar
knopp committed
75
76
77
78
79
80
81
82
  lte_frame_type_t        frame_type[MAX_NUM_CCs];
  lte_prefix_type_t       prefix_type[MAX_NUM_CCs];
  uint32_t                downlink_frequency[MAX_NUM_CCs];
  int32_t                 uplink_frequency_offset[MAX_NUM_CCs];
  int32_t                 nb_antennas_tx[MAX_NUM_CCs];
  int32_t                 nb_antennas_rx[MAX_NUM_CCs];
  int32_t                 tx_gain[MAX_NUM_CCs];
  int32_t                 rx_gain[MAX_NUM_CCs];
winckel's avatar
winckel committed
83
84
} PhyConfigurationReq;

winckel's avatar
winckel committed
85
86
87
88
89
// UE: RRC -> PHY messages
typedef struct PhyDeactivateReq_s {
} PhyDeactivateReq;

typedef struct PhyFindCellReq_s {
90
#   if ENABLE_RAL
91
  ral_transaction_id_t    transaction_id;
92
#   endif
93
94
  Earfcn                  earfcn_start;
  Earfcn                  earfcn_end;
winckel's avatar
winckel committed
95
96
97
98
99
} PhyFindCellReq;

typedef struct PhyFindNextCellReq_s {
} PhyFindNextCellReq;

100
typedef struct PhyMeasThresholdReq_s {
101
#   if ENABLE_RAL
102
103
  ral_transaction_id_t    transaction_id;
  ral_link_cfg_param_t    cfg_param;
104
#endif
105
106
107
} PhyMeasThresholdReq;

typedef struct PhyMeasReportInd_s {
108
#   if ENABLE_RAL
109
110
  ral_threshold_t         threshold;
  ral_link_param_t        link_param;
111
#endif
112
} PhyMeasReportInd;
gauthier's avatar
gauthier committed
113

winckel's avatar
winckel committed
114
115
// UE: PHY -> RRC messages
typedef struct PhyFindCellInd_s {
116
#   if ENABLE_RAL
117
  ral_transaction_id_t    transaction_id;
118
#   endif
119
120
  uint8_t                  cell_nb;
  CellInfo                 cells[MAX_REPORTED_CELL];
winckel's avatar
winckel committed
121
} PhyFindCellInd;
gauthier's avatar
gauthier committed
122
123

typedef struct PhyMeasThresholdConf_s {
124
#   if ENABLE_RAL
125
126
127
128
  ral_transaction_id_t    transaction_id;
  ral_status_t            status;
  uint8_t                 num_link_cfg_params;
  ral_link_cfg_status_t   cfg_status[RAL_MAX_LINK_CFG_PARAMS];
129
#endif
130
} PhyMeasThresholdConf;
winckel's avatar
winckel committed
131
#endif /* PHY_MESSAGES_TYPES_H_ */