A Discrete-Event Network Simulator
API
ff-mac-common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Manuel Requena <manuel.requena@cttc.es>
18  */
19 
20 #ifndef FF_MAC_COMMON_H
21 #define FF_MAC_COMMON_H
22 
23 #include <ns3/ptr.h>
24 #include <ns3/simple-ref-count.h>
25 
26 #include <vector>
27 
31 #define MAX_SCHED_CFG_LIST 10
32 #define MAX_LC_LIST 10
33 
34 #define MAX_RACH_LIST 30
35 #define MAX_DL_INFO_LIST 30
36 #define MAX_BUILD_DATA_LIST 30
37 #define MAX_BUILD_RAR_LIST 10
38 #define MAX_BUILD_BC_LIST 3
39 #define MAX_UL_INFO_LIST 30
40 #define MAX_DCI_LIST 30
41 #define MAX_PHICH_LIST 30
42 #define MAX_TB_LIST 2
43 #define MAX_RLC_PDU_LIST 30
44 #define MAX_NR_LCG 4
45 #define MAX_MBSFN_CONFIG 5
46 #define MAX_SI_MSG_LIST 32
47 #define MAX_SI_MSG_SIZE 65535
48 
49 #define MAX_CQI_LIST 30
50 #define MAX_UE_SELECTED_SB 6
51 #define MAX_HL_SB 25
52 #define MAX_SINR_RB_LIST 100
53 #define MAX_SR_LIST 30
54 #define MAX_MAC_CE_LIST 30
55 
56 namespace ns3
57 {
58 
61 {
63  FAILURE
64 };
65 
68 {
70  release
71 };
72 
75 {
76  TA,
77  DRX,
78  CR
79 };
80 
83 {
85  extended
86 };
87 
93 {
94  uint16_t m_rnti{UINT16_MAX};
95  uint32_t m_rbBitmap{UINT8_MAX};
96  uint8_t m_rbShift{UINT8_MAX};
97  uint8_t m_resAlloc{UINT8_MAX};
98  std::vector<uint16_t> m_tbsSize;
99  std::vector<uint8_t> m_mcs;
100  std::vector<uint8_t> m_ndi;
101  std::vector<uint8_t> m_rv;
102  uint8_t m_cceIndex{UINT8_MAX};
103  uint8_t m_aggrLevel{UINT8_MAX};
104  uint8_t m_precodingInfo{UINT8_MAX};
105 
107  enum Format_e
108  {
118  } m_format{NotValid_Dci_Format};
119 
120  uint8_t m_tpc{UINT8_MAX};
121  uint8_t m_harqProcess{UINT8_MAX};
122  uint8_t m_dai{UINT8_MAX};
123 
126  {
130  } m_vrbFormat{NotValid_VRB_Format};
131 
132  bool m_tbSwap{false};
133  bool m_spsRelease{false};
134  bool m_pdcchOrder{false};
135  uint8_t m_preambleIndex{UINT8_MAX};
136  uint8_t m_prachMaskIndex{UINT8_MAX};
137 
139  enum Ngap_e
140  {
144  } m_nGap{NotValid_Ngap};
145 
146  uint8_t m_tbsIdx{UINT8_MAX};
147  uint8_t m_dlPowerOffset{UINT8_MAX};
148  uint8_t m_pdcchPowerOffset{UINT8_MAX};
149 };
150 
156 {
157  uint16_t m_rnti{UINT16_MAX};
158  uint8_t m_rbStart{UINT8_MAX};
159  uint8_t m_rbLen{UINT8_MAX};
160  uint16_t m_tbSize{UINT16_MAX};
161  uint8_t m_mcs{UINT8_MAX};
162  uint8_t m_ndi{UINT8_MAX};
163  uint8_t m_cceIndex{UINT8_MAX};
164  uint8_t m_aggrLevel{UINT8_MAX};
165  uint8_t m_ueTxAntennaSelection{UINT8_MAX};
166  bool m_hopping{false};
167  uint8_t m_n2Dmrs{UINT8_MAX};
168  int8_t m_tpc{INT8_MIN};
169  bool m_cqiRequest{false};
170  uint8_t m_ulIndex{UINT8_MAX};
171  uint8_t m_dai{UINT8_MAX};
172  uint8_t m_freqHopping{UINT8_MAX};
173  int8_t m_pdcchPowerOffset{INT8_MIN};
174 };
175 
179 struct VendorSpecificValue : public SimpleRefCount<VendorSpecificValue>
180 {
181  virtual ~VendorSpecificValue();
182 };
183 
189 {
190  uint32_t m_type{UINT32_MAX};
191  uint32_t m_length{UINT32_MAX};
193 };
194 
200 {
201  uint8_t m_logicalChannelIdentity{UINT8_MAX};
202  uint8_t m_logicalChannelGroup{UINT8_MAX};
203 
206  {
210  NotValid
211  } m_direction{NotValid};
212 
215  {
220  } m_qosBearerType{NotValid_QosBearerType};
221 
222  uint8_t m_qci{UINT8_MAX};
223  uint64_t m_eRabMaximulBitrateUl{UINT64_MAX};
224  uint64_t m_eRabMaximulBitrateDl{UINT64_MAX};
225  uint64_t m_eRabGuaranteedBitrateUl{UINT64_MAX};
226  uint64_t m_eRabGuaranteedBitrateDl{UINT64_MAX};
227 };
228 
234 {
235  uint16_t m_rnti{UINT16_MAX};
236  uint16_t m_estimatedSize{UINT16_MAX};
237 };
238 
244 {
245  uint16_t m_rnti{UINT16_MAX};
246 
248  enum Phich_e
249  {
252  NotValid
253  } m_phich{NotValid};
254 };
255 
260 {
261  uint8_t m_logicalChannelIdentity{UINT8_MAX};
262  uint16_t m_size{UINT16_MAX};
263 };
264 
270 {
271  uint16_t m_rnti{UINT16_MAX};
272  struct DlDciListElement_s m_dci;
273  std::vector<CeBitmap_e> m_ceBitmap;
274  std::vector<std::vector<struct RlcPduListElement_s>> m_rlcPduList;
275 };
276 
280 struct UlGrant_s
281 {
282  uint16_t m_rnti{UINT16_MAX};
283  uint8_t m_rbStart{UINT8_MAX};
284  uint8_t m_rbLen{UINT8_MAX};
285  uint16_t m_tbSize{UINT16_MAX};
286  uint8_t m_mcs{UINT8_MAX};
287  bool m_hopping{false};
288  int8_t m_tpc{INT8_MIN};
289  bool m_cqiRequest{false};
290  bool m_ulDelay{false};
291 };
292 
297 {
298  uint16_t m_rnti{UINT16_MAX};
299  // uint32_t m_grant; // Substituted with type UlGrant_s
301  struct DlDciListElement_s m_dci;
302 };
303 
308 {
310  enum Type_e
311  {
314  NotValid
315  } m_type{NotValid};
316 
317  uint8_t m_index{UINT8_MAX};
318  struct DlDciListElement_s m_dci;
319 };
320 
325 {
326  uint16_t m_rnti{UINT16_MAX};
327  std::vector<uint16_t> m_ulReception;
328 
331  {
332  Ok,
334  NotValid
335  } m_receptionStatus{NotValid};
336 
337  uint8_t m_tpc{UINT8_MAX};
338 };
339 
344 {
345  uint16_t m_rnti{UINT16_MAX};
346 };
347 
352 {
353  uint8_t m_phr{UINT8_MAX};
354  uint8_t m_crnti{UINT8_MAX};
355  std::vector<uint8_t> m_bufferStatus;
356 };
357 
362 {
363  uint16_t m_rnti{UINT16_MAX};
364 
367  {
371  NotValid
372  } m_macCeType{NotValid};
373  struct MacCeValue_u m_macCeValue;
374 };
375 
380 {
381  uint8_t m_onDurationTimer{UINT8_MAX};
382  uint16_t m_drxInactivityTimer{UINT16_MAX};
383  uint16_t m_drxRetransmissionTimer{UINT16_MAX};
384  uint16_t m_longDrxCycle{UINT16_MAX};
385  uint16_t m_longDrxCycleStartOffset{UINT16_MAX};
386  uint16_t m_shortDrxCycle{UINT16_MAX};
387  uint8_t m_drxShortCycleTimer{UINT8_MAX};
388 };
389 
394 {
395  uint16_t m_semiPersistSchedIntervalUl{UINT16_MAX};
396  uint16_t m_semiPersistSchedIntervalDl{UINT16_MAX};
397  uint8_t m_numberOfConfSpsProcesses{UINT8_MAX};
398  uint8_t m_n1PucchAnPersistentListSize{UINT8_MAX};
399  std::vector<uint16_t> m_n1PucchAnPersistentList;
400  uint8_t m_implicitReleaseAfter{UINT8_MAX};
401 };
402 
407 {
408  enum SetupRelease_e m_action
409  {
410  setup
411  };
412 
413  uint8_t m_schedInterval{UINT8_MAX};
414  uint8_t m_dsrTransMax{UINT8_MAX};
415 };
416 
421 {
422  enum SetupRelease_e m_action
423  {
424  setup
425  };
426 
427  uint16_t m_cqiSchedInterval{UINT16_MAX};
428  uint8_t m_riSchedInterval{UINT8_MAX};
429 };
430 
435 {
436  bool m_halfDuplex{false};
437  bool m_intraSfHopping{false};
438  bool m_type2Sb1{false};
439  uint8_t m_ueCategory{UINT8_MAX};
440  bool m_resAllocType1{false};
441 };
442 
447 {
448  uint16_t m_periodicity{UINT16_MAX};
449  uint16_t m_length{UINT16_MAX};
450 };
451 
456 {
457  uint16_t m_sfn{UINT16_MAX};
458  uint16_t m_sib1Length{UINT16_MAX};
459  uint8_t m_siWindowLength{UINT8_MAX};
460  std::vector<struct SiMessageListElement_s> m_siMessageList;
461 };
462 
467 {
468  uint16_t m_rnti{UINT16_MAX};
469  uint8_t m_harqProcessId{UINT8_MAX};
470 
473  {
476  DTX
477  };
478 
479  std::vector<HarqStatus_e> m_harqStatus;
480 };
481 
485 struct BwPart_s
486 {
487  uint8_t m_bwPartIndex{UINT8_MAX};
488  uint8_t m_sb{UINT8_MAX};
489  uint8_t m_cqi{UINT8_MAX};
490 };
491 
496 {
497  uint8_t m_sbPmi{UINT8_MAX};
498  std::vector<uint8_t> m_sbCqi;
499 };
500 
505 {
506  std::vector<uint8_t> m_sbList;
507  uint8_t m_sbPmi{UINT8_MAX};
508  std::vector<uint8_t> m_sbCqi;
509 };
510 
515 {
516  struct UeSelected_s m_ueSelected;
517  std::vector<struct HigherLayerSelected_s> m_higherLayerSelected;
518  struct BwPart_s m_bwPart;
519 };
520 
525 {
526  uint16_t m_rnti{UINT16_MAX};
527  uint8_t m_ri{UINT8_MAX};
528 
531  {
541  NotValid
542  } m_cqiType{NotValid};
543 
544  std::vector<uint8_t> m_wbCqi;
545  uint8_t m_wbPmi{UINT8_MAX};
546 
548 };
549 
553 struct UlCqi_s
554 {
555  std::vector<uint16_t> m_sinr;
556 
558  enum Type_e
559  {
565  NotValid
566  } m_type{NotValid};
567 };
568 
573 {
574  uint8_t m_pagingIndex{UINT8_MAX};
575  uint16_t m_pagingMessageSize{UINT16_MAX};
576  uint8_t m_pagingSubframe{UINT8_MAX};
577 };
578 
579 } // namespace ns3
580 
581 #endif /* FF_MAC_COMMON_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
A template-based reference counting class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
SetupRelease_e
SetupRelease_e enumeration.
Definition: ff-mac-common.h:68
@ setup
Definition: ff-mac-common.h:69
@ release
Definition: ff-mac-common.h:70
Result_e
Result_e enumeration.
Definition: ff-mac-common.h:61
@ FAILURE
Definition: ff-mac-common.h:63
@ SUCCESS
Definition: ff-mac-common.h:62
CeBitmap_e
CeBitmap_e.
Definition: ff-mac-common.h:75
NormalExtended_e
NormalExtended_e enumeration.
Definition: ff-mac-common.h:83
@ normal
Definition: ff-mac-common.h:84
@ extended
Definition: ff-mac-common.h:85
See section 4.3.11 buildBroadcastListElement.
enum ns3::BuildBroadcastListElement_s::Type_e NotValid
the type
struct DlDciListElement_s m_dci
DCI.
See section 4.3.8 buildDataListElement.
std::vector< std::vector< struct RlcPduListElement_s > > m_rlcPduList
RLC PDU list.
std::vector< CeBitmap_e > m_ceBitmap
CE bitmap.
struct DlDciListElement_s m_dci
DCI.
See section 4.3.10 buildRARListElement.
struct DlDciListElement_s m_dci
DCI.
See section 4.3.28 bwPart.
uint8_t m_cqi
CQI.
uint8_t m_bwPartIndex
bw part index
uint8_t m_sb
sb
See section 4.3.19 cqiConfig.
uint8_t m_riSchedInterval
RI schedule interval.
uint16_t m_cqiSchedInterval
CQI schedule interval.
See section 4.3.24 cqiListElement.
std::vector< uint8_t > m_wbCqi
wb CQI
struct SbMeasResult_s m_sbMeasResult
sb measure result
CqiType_e
CqiType_e enumeration.
uint8_t m_wbPmi
wb PMI
enum ns3::CqiListElement_s::CqiType_e NotValid
CQI type.
uint16_t m_rnti
RNTI.
See section 4.3.1 dlDciListElement.
Definition: ff-mac-common.h:93
uint8_t m_prachMaskIndex
RACH mask index.
uint8_t m_cceIndex
Control Channel Element index.
std::vector< uint8_t > m_ndi
New data indicator.
enum ns3::DlDciListElement_s::VrbFormat_e NotValid_VRB_Format
the format
uint8_t m_dai
DL assignment index.
uint8_t m_precodingInfo
precoding info
uint8_t m_harqProcess
HARQ process.
uint32_t m_rbBitmap
RB bitmap.
Definition: ff-mac-common.h:95
bool m_pdcchOrder
cch order?
enum ns3::DlDciListElement_s::Ngap_e NotValid_Ngap
the gap
VrbFormat_e
Vrb Format enum.
enum ns3::DlDciListElement_s::Format_e NotValid_Dci_Format
the format
Format_e
Format enumeration.
uint8_t m_preambleIndex
preamble index
uint8_t m_dlPowerOffset
DL power offset.
uint8_t m_pdcchPowerOffset
CCH power offset.
std::vector< uint8_t > m_mcs
MCS.
Definition: ff-mac-common.h:99
uint8_t m_rbShift
RB shift.
Definition: ff-mac-common.h:96
uint8_t m_resAlloc
The type of resource allocation.
Definition: ff-mac-common.h:97
uint8_t m_aggrLevel
The aggregation level.
std::vector< uint16_t > m_tbsSize
The TBs size.
Definition: ff-mac-common.h:98
std::vector< uint8_t > m_rv
Redundancy version.
uint8_t m_tpc
Tx power control command.
uint8_t m_tbsIdx
tbs index
See section 4.3.23 dlInfoListElement.
uint8_t m_harqProcessId
HARQ process ID.
HarqStatus_e
HARQ status enum.
std::vector< HarqStatus_e > m_harqStatus
HARQ status.
See section 4.3.16 drxConfig.
uint16_t m_longDrxCycleStartOffset
long DRX cycle start offset
uint16_t m_drxInactivityTimer
inactivity timer
uint16_t m_longDrxCycle
long DRX cycle
uint8_t m_drxShortCycleTimer
short DRX cycle timer
uint16_t m_drxRetransmissionTimer
retransmission timer
uint16_t m_shortDrxCycle
short DRX cycle
uint8_t m_onDurationTimer
on duration timer
See section 4.3.27 higherLayerSelected.
std::vector< uint8_t > m_sbCqi
sb CQI
See section 4.3.4 logicalChannelConfigListElement.
enum ns3::LogicalChannelConfigListElement_s::QosBearerType_e NotValid_QosBearerType
the QOS bearer type
uint64_t m_eRabMaximulBitrateUl
ERAB maximum bit rate UL.
uint64_t m_eRabGuaranteedBitrateDl
ERAB guaranteed bit rate DL.
uint8_t m_logicalChannelGroup
logical channel group
uint64_t m_eRabGuaranteedBitrateUl
ERAB guaranteed bit rate UL.
enum ns3::LogicalChannelConfigListElement_s::Direction_e NotValid
the direction
uint8_t m_logicalChannelIdentity
logical channel identity
uint64_t m_eRabMaximulBitrateDl
ERAB maximum bit rate DL.
See section 4.3.14 macCEListElement.
struct MacCeValue_u m_macCeValue
MAC CE value.
MacCeType_e
MAC CE type enum.
enum ns3::MacCeListElement_s::MacCeType_e NotValid
MAC CE type.
See section 4.3.15 macCEValue.
std::vector< uint8_t > m_bufferStatus
buffer status
uint8_t m_crnti
NRTI.
See section 4.3.30 pagingInfoListElement.
uint8_t m_pagingSubframe
paging subframe
uint8_t m_pagingIndex
paging index
uint16_t m_pagingMessageSize
paging message size
See section 4.3.7 phichListElement.
enum ns3::PhichListElement_s::Phich_e NotValid
the phich
See section 4.3.6 rachListElement.
uint16_t m_estimatedSize
estimated size
See section 4.3.9 rlcPDU_ListElement.
uint8_t m_logicalChannelIdentity
logical channel identity
See section 4.3.25 sbMeasResult.
std::vector< struct HigherLayerSelected_s > m_higherLayerSelected
higher layer selected
struct BwPart_s m_bwPart
bw part
struct UeSelected_s m_ueSelected
UE selected.
See section 4.3.21 siConfiguration.
std::vector< struct SiMessageListElement_s > m_siMessageList
message list
uint16_t m_sib1Length
sib1 length
uint8_t m_siWindowLength
window length
See section 4.3.22 siMessageListElement.
uint16_t m_periodicity
periodicity
See section 4.3.17 spsConfig.
uint8_t m_implicitReleaseAfter
implicit release after
std::vector< uint16_t > m_n1PucchAnPersistentList
N1pu CCH persistent list.
uint8_t m_n1PucchAnPersistentListSize
N1pu CCH persistent list size.
uint16_t m_semiPersistSchedIntervalUl
UL semi persist schedule interval.
uint16_t m_semiPersistSchedIntervalDl
DL semi persist schedule interval.
uint8_t m_numberOfConfSpsProcesses
number of conf SPS process
See section 4.3.18 srConfig.
uint8_t m_dsrTransMax
trans max
uint8_t m_schedInterval
sched interval
See section 4.3.13 srListElement.
uint16_t m_rnti
RNTI.
See section 4.3.20 ueCapabilities.
bool m_type2Sb1
type 2Sb1
bool m_intraSfHopping
intra SF hopping
bool m_resAllocType1
alloc type 1
bool m_halfDuplex
half duplex
uint8_t m_ueCategory
UE category.
See section 4.3.26 ueSelected.
std::vector< uint8_t > m_sbList
sb list
uint8_t m_sbPmi
sb PMI
std::vector< uint8_t > m_sbCqi
sb CQI
See section 4.3.29 ulCQI.
enum ns3::UlCqi_s::Type_e NotValid
type
std::vector< uint16_t > m_sinr
SINR.
Type_e
Type_e enumeration.
See section 4.3.2 ulDciListElement.
int8_t m_pdcchPowerOffset
CCH power offset.
int8_t m_tpc
Tx power control command.
uint8_t m_dai
DL assignment index.
uint8_t m_cceIndex
Control Channel Element index.
uint8_t m_ulIndex
UL index.
uint8_t m_ueTxAntennaSelection
UE antenna selection.
bool m_cqiRequest
CQI request.
uint8_t m_n2Dmrs
n2 DMRS
uint8_t m_freqHopping
freq hopping
uint8_t m_aggrLevel
The aggregation level.
Substitutive structure for specifying BuildRarListElement_s::m_grant field.
bool m_ulDelay
UL delay?
int8_t m_tpc
Tx power control command.
bool m_cqiRequest
CQI request?
bool m_hopping
hopping?
uint16_t m_tbSize
size
uint8_t m_rbLen
length
uint8_t m_mcs
MCS.
uint8_t m_rbStart
start
uint16_t m_rnti
RNTI.
See section 4.3.12 ulInfoListElement.
ReceptionStatus_e
Reception status enum.
uint8_t m_tpc
Tx power control command.
enum ns3::UlInfoListElement_s::ReceptionStatus_e NotValid
the status
std::vector< uint16_t > m_ulReception
UL reception.
See section 4.3.3 vendorSpecificListElement.
Ptr< VendorSpecificValue > m_value
value
Base class for storing the values of vendor specific parameters.