forked from wychotom/pszemeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common_header.h
148 lines (132 loc) · 2.46 KB
/
common_header.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#ifndef COMMON_HEADER_H
#define COMMON_HEADER_H
typedef long int clock_t;
typedef long unsigned int size_d;
struct MIB_MESSAGE;
struct RANDOM_ACCESS_PREAMBLE;
struct RANDOM_ACCESS_RESPONSE;
struct DRX_CONFIG;
struct DCI_MESSAGE;
struct UE_INFO;
struct UPLINK_CONTROL_INFORMATION;
struct RRC_CONN_REQUEST;
struct RRC_CONN_SETUP;
struct RRC_CONN_SETUP_COMPLETE;
enum establishment_causes
{
emergency,
high_priority_access,
mobile_terminating_access,
mobile_originating_signaling,
mobile_originating_data
};
enum ue_states
{
INIT_BROADCAST,
RANDOM_ACCESS_PREAMBLE,
RANDOM_ACCESS_RESPONSE,
RRC_REQUEST,
RRC_SETUP,
RRC_SETUP_COMPLETE,
CONNECTED,
CONN_RECEIVE,
CONN_SENDING
};
struct MIB_MESSAGE
{
int prach_port;
int broadcast_port;
int dl_sch_port;
int ul_sch_port;
int pdcch_port;
int pucch_port;
};
struct RANDOM_ACCESS_PREAMBLE
{
int RA_RNTI;
int preamble;
};
struct RANDOM_ACCESS_RESPONSE
{
int RA_RNTI;
int timing_advance;
int uplink_resource_grant;
int temporary_c_rnti;
};
struct DRX_CONFIG
{
int on_duration_timer;
int short_drx_timer;
int long_drx_timer;
int drx_cycle_type;
};
struct DCI_MESSAGE
{
int C_RNTI;
unsigned char format0_a_flag;
unsigned char freqency_hooping;
int riv;
int mcs;
unsigned char ndi;
int tpc;
int cyclic_shift;
unsigned char cqi_request;
struct DRX_CONFIG drx_config;
};
struct UE_INFO
{
enum ue_states UE_state;
int RNTI;
int timing_advance;
int uplink_resource_grant;
struct DRX_CONFIG uplink_power_control;
int ul_sch_config;
int srb_identity;
int drb_identity;
clock_t drx_cycle_start;
int battery_life;
};
struct UPLINK_CONTROL_INFORMATION
{
struct UE_INFO ue_info;
int C_RNTI;
int scheduling_request;
int harq_ack;
int cqi;
};
struct RRC_CONN_REQUEST
{
int C_RNTI;
int UE_identity;
int establishment_cause;
};
struct RRC_CONN_SETUP
{
int C_RNTI;
int srb_identity;
int drb_identity;
int dl_am_rlc;
int ul_am_rlc;
int ul_sch_config;
int phr_config;
struct DRX_CONFIG uplink_power_control;
};
struct RRC_CONN_SETUP_COMPLETE
{
int C_RNTI;
int PLMN_identity;
int old_tai;
int old_gummei;
int old_guti;
int ul_sch_config;
int phr_config;
int uplink_power_control;
};
struct FILE_DATA
{
int C_RNTI;
char file_name[20];
size_d size;
char data[150000];
};
#endif