rrc_messages_types.h 3.44 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
/*
 * rrc_messages_types.h
 *
 *  Created on: Oct 24, 2013
 *      Author: winckel
 */

#ifndef RRC_MESSAGES_TYPES_H_
#define RRC_MESSAGES_TYPES_H_

11
12
13
#include "BCCH-DL-SCH-Message.h"
#include "DL-CCCH-Message.h"
#include "DL-DCCH-Message.h"
14
#include "UE-EUTRA-Capability.h"
15
16
#include "UL-CCCH-Message.h"
#include "UL-DCCH-Message.h"
17
18
19
20

//-------------------------------------------------------------------------------------------//
// Defines to access message fields.

21
22
#define RRC_MAC_IN_SYNC_IND(mSGpTR)             (mSGpTR)->msg.rrc_mac_in_sync_ind
#define RRC_MAC_OUT_OF_SYNC_IND(mSGpTR)         (mSGpTR)->msg.rrc_mac_out_of_sync_ind
23
24

#define RRC_MAC_BCCH_DATA_REQ(mSGpTR)           (mSGpTR)->msg.rrc_mac_bcch_data_req
25
#define RRC_MAC_BCCH_DATA_IND(mSGpTR)           (mSGpTR)->msg.rrc_mac_bcch_data_ind
26
27
28

#define RRC_MAC_CCCH_DATA_REQ(mSGpTR)           (mSGpTR)->msg.rrc_mac_ccch_data_req
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR)           (mSGpTR)->msg.rrc_mac_ccch_data_cnf
29
#define RRC_MAC_CCCH_DATA_IND(mSGpTR)           (mSGpTR)->msg.rrc_mac_ccch_data_ind
30
31

#define RRC_MAC_MCCH_DATA_REQ(mSGpTR)           (mSGpTR)->msg.rrc_mac_mcch_data_req
32
#define RRC_MAC_MCCH_DATA_IND(mSGpTR)           (mSGpTR)->msg.rrc_mac_mcch_data_ind
33

34
35
#define RRC_DCCH_DATA_REQ(mSGpTR)               (mSGpTR)->msg.rrc_dcch_data_req
#define RRC_DCCH_DATA_IND(mSGpTR)               (mSGpTR)->msg.rrc_dcch_data_ind
36

37
38
39
40
41
// Some constants from "LAYER2/MAC/defs.h"
#define BCCH_SDU_SIZE                           (128)
#define CCCH_SDU_SIZE                           (128)
#define MCCH_SDU_SIZE                           (128)

42
43
44
45
46
47
typedef BCCH_DL_SCH_Message_t   RrcDlBcchMessage;
typedef DL_CCCH_Message_t       RrcDlCcchMessage;
typedef DL_DCCH_Message_t       RrcDlDcchMessage;
typedef UE_EUTRA_Capability_t   RrcUeEutraCapability;
typedef UL_CCCH_Message_t       RrcUlCcchMessage;
typedef UL_DCCH_Message_t       RrcUlDcchMessage;
48
49
50
51
52
53
54
55
56
57
58

//-------------------------------------------------------------------------------------------//
// Messages from MAC layer

typedef struct {
  uint32_t frame;
  uint16_t enb_index;
} RrcMacInSyncInd;

typedef RrcMacInSyncInd RrcMacOutOfSyncInd;

59
60
61
typedef struct {
  uint32_t frame;
  uint32_t sdu_size;
62
  uint8_t sdu[BCCH_SDU_SIZE];
63
64
65
  uint8_t enb_index;
} RrcMacBcchDataReq;

66
67
68
typedef struct {
  uint32_t frame;
  uint32_t sdu_size;
69
  uint8_t sdu[BCCH_SDU_SIZE];
70
71
72
  uint8_t enb_index;
} RrcMacBcchDataInd;

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
typedef struct {
  uint32_t frame;
  uint32_t sdu_size;
  uint8_t sdu[CCCH_SDU_SIZE];
  uint8_t enb_index;
} RrcMacCcchDataReq;

typedef struct {
  uint8_t enb_index;
} RrcMacCcchDataCnf;

typedef struct {
    uint32_t frame;
    uint32_t sdu_size;
    uint8_t sdu[CCCH_SDU_SIZE];
    uint8_t enb_index;
} RrcMacCcchDataInd;
90

91
typedef struct {
92
93
94
  uint32_t frame;
  uint32_t sdu_size;
  uint8_t sdu[MCCH_SDU_SIZE];
95
  uint8_t enb_index;
96
97
  uint8_t mbsfn_sync_area;
} RrcMacMcchDataReq;
98

99
100
101
typedef struct {
  uint32_t frame;
  uint32_t sdu_size;
102
  uint8_t sdu[MCCH_SDU_SIZE];
103
  uint8_t enb_index;
104
105
106
107
  uint8_t mbsfn_sync_area;
} RrcMacMcchDataInd;

//-------------------------------------------------------------------------------------------//
108
109
110
111
112
113
114
115
116
117
118
119
// Messages from/to PDCP layer

typedef struct {
  uint32_t frame;
  uint8_t enb_flag;
  uint32_t rb_id;
  uint32_t muip;
  uint32_t confirmp;
  uint32_t sdu_size;
  uint8_t *sdu_p;
  uint8_t mode;
} RrcDcchDataReq;
120
121
122
123
124
125
126
127
128
129

typedef struct {
  uint32_t frame;
  uint8_t dcch_index;
  uint32_t sdu_size;
  uint8_t *sdu_p;
  uint8_t ue_index;
} RrcDcchDataInd;

#endif /* RRC_MESSAGES_TYPES_H_ */