mac_messages_types.h 3.81 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
 */

winckel's avatar
RRC:  
winckel committed
22
23
24
25
/*
 * mac_messages_types.h
 *
 *  Created on: Oct 24, 2013
nikaeinn's avatar
nikaeinn committed
26
 *      Author: winckel and Navid Nikaein
winckel's avatar
RRC:  
winckel committed
27
28
29
30
31
32
33
 */

#ifndef MAC_MESSAGES_TYPES_H_
#define MAC_MESSAGES_TYPES_H_

//-------------------------------------------------------------------------------------------//
// Defines to access message fields.
34
35
#define RRC_MAC_IN_SYNC_IND(mSGpTR)             (mSGpTR)->ittiMsg.rrc_mac_in_sync_ind
#define RRC_MAC_OUT_OF_SYNC_IND(mSGpTR)         (mSGpTR)->ittiMsg.rrc_mac_out_of_sync_ind
winckel's avatar
RRC:  
winckel committed
36

37
38
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
winckel's avatar
RRC:  
winckel committed
39

40
41
42
#define RRC_MAC_CCCH_DATA_REQ(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf
#define RRC_MAC_CCCH_DATA_IND(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind
winckel's avatar
RRC:  
winckel committed
43

44
45
#define RRC_MAC_MCCH_DATA_REQ(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_mcch_data_req
#define RRC_MAC_MCCH_DATA_IND(mSGpTR)           (mSGpTR)->ittiMsg.rrc_mac_mcch_data_ind
winckel's avatar
RRC:  
winckel committed
46
47

// Some constants from "LAYER2/MAC/defs.h"
48
49
50
#define BCCH_SDU_SIZE                           (512)
#define CCCH_SDU_SIZE                           (512)
#define MCCH_SDU_SIZE                           (512)
winckel's avatar
RRC:  
winckel committed
51

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
52

winckel's avatar
RRC:  
winckel committed
53
54
//-------------------------------------------------------------------------------------------//
// Messages between RRC and MAC layers
winckel's avatar
winckel committed
55
typedef struct RrcMacInSyncInd_s {
56
  uint32_t  frame;
gauthier's avatar
gauthier committed
57
  uint8_t   sub_frame;
58
  uint16_t  enb_index;
winckel's avatar
RRC:  
winckel committed
59
60
61
62
} RrcMacInSyncInd;

typedef RrcMacInSyncInd RrcMacOutOfSyncInd;

winckel's avatar
winckel committed
63
typedef struct RrcMacBcchDataReq_s {
64
65
66
67
  uint32_t  frame;
  uint32_t  sdu_size;
  uint8_t   sdu[BCCH_SDU_SIZE];
  uint8_t   enb_index;
winckel's avatar
RRC:  
winckel committed
68
69
} RrcMacBcchDataReq;

winckel's avatar
winckel committed
70
typedef struct RrcMacBcchDataInd_s {
71
  uint32_t  frame;
gauthier's avatar
gauthier committed
72
  uint8_t   sub_frame;
73
74
75
76
77
  uint32_t  sdu_size;
  uint8_t   sdu[BCCH_SDU_SIZE];
  uint8_t   enb_index;
  uint8_t   rsrq;
  uint8_t   rsrp;
winckel's avatar
RRC:  
winckel committed
78
79
} RrcMacBcchDataInd;

winckel's avatar
winckel committed
80
typedef struct RrcMacCcchDataReq_s {
81
82
83
84
  uint32_t  frame;
  uint32_t  sdu_size;
  uint8_t   sdu[CCCH_SDU_SIZE];
  uint8_t   enb_index;
winckel's avatar
RRC:  
winckel committed
85
86
} RrcMacCcchDataReq;

winckel's avatar
winckel committed
87
typedef struct RrcMacCcchDataCnf_s {
88
  uint8_t   enb_index;
winckel's avatar
RRC:  
winckel committed
89
90
} RrcMacCcchDataCnf;

winckel's avatar
winckel committed
91
typedef struct RrcMacCcchDataInd_s {
92
  uint32_t  frame;
gauthier's avatar
gauthier committed
93
  uint8_t   sub_frame;
94
  uint16_t  rnti;
95
96
97
  uint32_t  sdu_size;
  uint8_t   sdu[CCCH_SDU_SIZE];
  uint8_t   enb_index;
98
  int       CC_id;
winckel's avatar
RRC:  
winckel committed
99
100
} RrcMacCcchDataInd;

winckel's avatar
winckel committed
101
typedef struct RrcMacMcchDataReq_s {
102
103
104
105
106
  uint32_t  frame;
  uint32_t  sdu_size;
  uint8_t   sdu[MCCH_SDU_SIZE];
  uint8_t   enb_index;
  uint8_t   mbsfn_sync_area;
winckel's avatar
RRC:  
winckel committed
107
108
} RrcMacMcchDataReq;

winckel's avatar
winckel committed
109
typedef struct RrcMacMcchDataInd_s {
110
  uint32_t  frame;
gauthier's avatar
gauthier committed
111
  uint8_t   sub_frame;
112
113
114
115
  uint32_t  sdu_size;
  uint8_t   sdu[MCCH_SDU_SIZE];
  uint8_t   enb_index;
  uint8_t   mbsfn_sync_area;
winckel's avatar
RRC:  
winckel committed
116
117
118
} RrcMacMcchDataInd;

#endif /* MAC_MESSAGES_TYPES_H_ */