A Discrete-Event Network Simulator
API
ff-mac-common.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Manuel Requena <manuel.requena@cttc.es>
19  */
20 
21 #ifndef FF_MAC_COMMON_H
22 #define FF_MAC_COMMON_H
23 
24 #include <ns3/simple-ref-count.h>
25 #include <ns3/ptr.h>
26 #include <vector>
27 
28 
32 #define MAX_SCHED_CFG_LIST 10
33 #define MAX_LC_LIST 10
34 
35 #define MAX_RACH_LIST 30
36 #define MAX_DL_INFO_LIST 30
37 #define MAX_BUILD_DATA_LIST 30
38 #define MAX_BUILD_RAR_LIST 10
39 #define MAX_BUILD_BC_LIST 3
40 #define MAX_UL_INFO_LIST 30
41 #define MAX_DCI_LIST 30
42 #define MAX_PHICH_LIST 30
43 #define MAX_TB_LIST 2
44 #define MAX_RLC_PDU_LIST 30
45 #define MAX_NR_LCG 4
46 #define MAX_MBSFN_CONFIG 5
47 #define MAX_SI_MSG_LIST 32
48 #define MAX_SI_MSG_SIZE 65535
49 
50 #define MAX_CQI_LIST 30
51 #define MAX_UE_SELECTED_SB 6
52 #define MAX_HL_SB 25
53 #define MAX_SINR_RB_LIST 100
54 #define MAX_SR_LIST 30
55 #define MAX_MAC_CE_LIST 30
56 
57 namespace ns3 {
58 
61 {
64 };
65 
68 {
71 };
72 
75 {
76  TA,
77  DRX,
79 };
80 
83 {
86 };
87 
88 
94 {
95  uint16_t m_rnti {UINT16_MAX};
96  uint32_t m_rbBitmap {UINT8_MAX};
97  uint8_t m_rbShift {UINT8_MAX};
98  uint8_t m_resAlloc {UINT8_MAX};
99  std::vector <uint16_t> m_tbsSize;
100  std::vector <uint8_t> m_mcs;
101  std::vector <uint8_t> m_ndi;
102  std::vector <uint8_t> m_rv;
103  uint8_t m_cceIndex {UINT8_MAX};
104  uint8_t m_aggrLevel {UINT8_MAX};
105  uint8_t m_precodingInfo {UINT8_MAX};
106  enum Format_e
108  {
110  } m_format {NotValid_Dci_Format};
111  uint8_t m_tpc {UINT8_MAX};
112  uint8_t m_harqProcess {UINT8_MAX};
113  uint8_t m_dai {UINT8_MAX};
114  enum VrbFormat_e
116  {
120  } m_vrbFormat {NotValid_VRB_Format};
121  bool m_tbSwap {false};
122  bool m_spsRelease {false};
123  bool m_pdcchOrder {false};
124  uint8_t m_preambleIndex {UINT8_MAX};
125  uint8_t m_prachMaskIndex {UINT8_MAX};
126  enum Ngap_e
128  {
130  } m_nGap {NotValid_Ngap};
131  uint8_t m_tbsIdx {UINT8_MAX};
132  uint8_t m_dlPowerOffset {UINT8_MAX};
133  uint8_t m_pdcchPowerOffset {UINT8_MAX};
134 };
135 
141 {
142  uint16_t m_rnti {UINT16_MAX};
143  uint8_t m_rbStart {UINT8_MAX};
144  uint8_t m_rbLen {UINT8_MAX};
145  uint16_t m_tbSize {UINT16_MAX};
146  uint8_t m_mcs {UINT8_MAX};
147  uint8_t m_ndi {UINT8_MAX};
148  uint8_t m_cceIndex {UINT8_MAX};
149  uint8_t m_aggrLevel {UINT8_MAX};
150  uint8_t m_ueTxAntennaSelection {UINT8_MAX};
151  bool m_hopping {false};
152  uint8_t m_n2Dmrs {UINT8_MAX};
153  int8_t m_tpc {INT8_MIN};
154  bool m_cqiRequest {false};
155  uint8_t m_ulIndex {UINT8_MAX};
156  uint8_t m_dai {UINT8_MAX};
157  uint8_t m_freqHopping {UINT8_MAX};
158  int8_t m_pdcchPowerOffset {INT8_MIN};
159 };
160 
164 struct VendorSpecificValue : public SimpleRefCount<VendorSpecificValue>
165 {
166  virtual ~VendorSpecificValue ();
167 
168 };
169 
175 {
176  uint32_t m_type {UINT32_MAX};
177  uint32_t m_length {UINT32_MAX};
179 };
180 
186 {
187  uint8_t m_logicalChannelIdentity {UINT8_MAX};
188  uint8_t m_logicalChannelGroup {UINT8_MAX};
189 
192  {
197  } m_direction {NotValid};
198 
201  {
205  } m_qosBearerType {NotValid_QosBearerType};
206 
207  uint8_t m_qci {UINT8_MAX};
208  uint64_t m_eRabMaximulBitrateUl {UINT64_MAX};
209  uint64_t m_eRabMaximulBitrateDl {UINT64_MAX};
210  uint64_t m_eRabGuaranteedBitrateUl {UINT64_MAX};
211  uint64_t m_eRabGuaranteedBitrateDl {UINT64_MAX};
212 };
213 
219 {
220  uint16_t m_rnti {UINT16_MAX};
221  uint16_t m_estimatedSize {UINT16_MAX};
222 };
223 
229 {
230  uint16_t m_rnti {UINT16_MAX};
231  enum Phich_e
233  {
235  } m_phich {NotValid};
236 };
237 
242 {
243  uint8_t m_logicalChannelIdentity {UINT8_MAX};
244  uint16_t m_size {UINT16_MAX};
245 };
246 
252 {
253  uint16_t m_rnti {UINT16_MAX};
255  std::vector <enum CeBitmap_e> m_ceBitmap;
256  std::vector < std::vector <struct RlcPduListElement_s> > m_rlcPduList;
257 };
258 
262 struct UlGrant_s
263 {
264  uint16_t m_rnti {UINT16_MAX};
265  uint8_t m_rbStart {UINT8_MAX};
266  uint8_t m_rbLen {UINT8_MAX};
267  uint16_t m_tbSize {UINT16_MAX};
268  uint8_t m_mcs {UINT8_MAX};
269  bool m_hopping {false};
270  int8_t m_tpc {INT8_MIN};
271  bool m_cqiRequest {false};
272  bool m_ulDelay {false};
273 };
274 
279 {
280  uint16_t m_rnti {UINT16_MAX};
281  //uint32_t m_grant; // Substituted with type UlGrant_s
284 };
285 
290 {
292  enum Type_e
293  {
295  } m_type {NotValid};
296  uint8_t m_index {UINT8_MAX};
298 };
299 
304 {
305  uint16_t m_rnti {UINT16_MAX};
306  std::vector <uint16_t> m_ulReception;
307  enum ReceptionStatus_e
309  {
311  } m_receptionStatus {NotValid};
312  uint8_t m_tpc {UINT8_MAX};
313 };
314 
319 {
320  uint16_t m_rnti {UINT16_MAX};
321 };
322 
327 {
328  uint8_t m_phr {UINT8_MAX};
329  uint8_t m_crnti {UINT8_MAX};
330  std::vector <uint8_t> m_bufferStatus;
331 };
332 
337 {
338  uint16_t m_rnti {UINT16_MAX};
339  enum MacCeType_e
341  {
343  } m_macCeType {NotValid};
345 };
346 
351 {
352  uint8_t m_onDurationTimer {UINT8_MAX};
353  uint16_t m_drxInactivityTimer {UINT16_MAX};
354  uint16_t m_drxRetransmissionTimer {UINT16_MAX};
355  uint16_t m_longDrxCycle {UINT16_MAX};
356  uint16_t m_longDrxCycleStartOffset {UINT16_MAX};
357  uint16_t m_shortDrxCycle {UINT16_MAX};
358  uint8_t m_drxShortCycleTimer {UINT8_MAX};
359 };
360 
365 {
366  uint16_t m_semiPersistSchedIntervalUl {UINT16_MAX};
367  uint16_t m_semiPersistSchedIntervalDl {UINT16_MAX};
368  uint8_t m_numberOfConfSpsProcesses {UINT8_MAX};
369  uint8_t m_n1PucchAnPersistentListSize {UINT8_MAX};
370  std::vector <uint16_t> m_n1PucchAnPersistentList;
371  uint8_t m_implicitReleaseAfter {UINT8_MAX};
372 };
373 
378 {
379  enum SetupRelease_e m_action {setup};
380  uint8_t m_schedInterval {UINT8_MAX};
381  uint8_t m_dsrTransMax {UINT8_MAX};
382 };
383 
388 {
389  enum SetupRelease_e m_action {setup};
390  uint16_t m_cqiSchedInterval {UINT16_MAX};
391  uint8_t m_riSchedInterval {UINT8_MAX};
392 };
393 
398 {
399  bool m_halfDuplex {false};
400  bool m_intraSfHopping {false};
401  bool m_type2Sb1 {false};
402  uint8_t m_ueCategory {UINT8_MAX};
403  bool m_resAllocType1 {false};
404 };
405 
410 {
411  uint16_t m_periodicity {UINT16_MAX};
412  uint16_t m_length {UINT16_MAX};
413 };
414 
419 {
420  uint16_t m_sfn {UINT16_MAX};
421  uint16_t m_sib1Length {UINT16_MAX};
422  uint8_t m_siWindowLength {UINT8_MAX};
423  std::vector <struct SiMessageListElement_s> m_siMessageList;
424 };
425 
430 {
431  uint16_t m_rnti {UINT16_MAX};
432  uint8_t m_harqProcessId {UINT8_MAX};
433  enum HarqStatus_e
435  {
437  };
438  std::vector <enum HarqStatus_e> m_harqStatus;
439 };
440 
444 struct BwPart_s
445 {
446  uint8_t m_bwPartIndex {UINT8_MAX};
447  uint8_t m_sb {UINT8_MAX};
448  uint8_t m_cqi {UINT8_MAX};
449 };
450 
455 {
456  uint8_t m_sbPmi {UINT8_MAX};
457  std::vector <uint8_t> m_sbCqi;
458 };
459 
464 {
465  std::vector <uint8_t> m_sbList;
466  uint8_t m_sbPmi {UINT8_MAX};
467  std::vector <uint8_t> m_sbCqi;
468 };
469 
474 {
476  std::vector <struct HigherLayerSelected_s> m_higherLayerSelected;
478 };
479 
484 {
485  uint16_t m_rnti {UINT16_MAX};
486  uint8_t m_ri {UINT8_MAX};
487  enum CqiType_e
489  {
491  } m_cqiType {NotValid};
492  std::vector <uint8_t> m_wbCqi;
493  uint8_t m_wbPmi {UINT8_MAX};
494 
496 };
497 
501 struct UlCqi_s
502 {
503  std::vector <uint16_t> m_sinr;
504  enum Type_e
506  {
513  } m_type {NotValid};
514 };
515 
520 {
521  uint8_t m_pagingIndex {UINT8_MAX};
522  uint16_t m_pagingMessageSize {UINT16_MAX};
523  uint8_t m_pagingSubframe {UINT8_MAX};
524 };
525 
526 } // namespace ns3
527 
528 #endif /* FF_MAC_COMMON_H */
See section 4.3.1 dlDciListElement.
Definition: ff-mac-common.h:93
enum ns3::LogicalChannelConfigListElement_s::QosBearerType_e NotValid_QosBearerType
the QOS bearer type
bool m_spsRelease
release?
bool m_pdcchOrder
cch order?
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
See section 4.3.25 sbMeasResult.
uint8_t m_rbShift
RB shift.
Definition: ff-mac-common.h:97
enum ns3::DlDciListElement_s::Ngap_e NotValid_Ngap
the gap
uint16_t m_rnti
RNTI.
uint8_t m_n1PucchAnPersistentListSize
N1pu CCH persistent list size.
uint16_t m_rnti
RNTI.
uint8_t m_logicalChannelIdentity
logical channel identity
uint8_t m_pdcchPowerOffset
CCH power offset.
bool m_halfDuplex
half duplex
See section 4.3.13 srListElement.
See section 4.3.19 cqiConfig.
bool m_ulDelay
UL delay?
std::vector< uint16_t > m_sinr
SINR.
uint16_t m_rnti
RNTI.
Definition: ff-mac-common.h:95
enum ns3::UlInfoListElement_s::ReceptionStatus_e NotValid
the status
uint8_t m_riSchedInterval
RI schedule interval.
uint16_t m_longDrxCycle
long DRX cycle
std::vector< uint8_t > m_mcs
MCS.
bool m_intraSfHopping
intra SF hopping
enum ns3::DlDciListElement_s::Format_e NotValid_Dci_Format
the format
See section 4.3.2 ulDciListElement.
enum ns3::UlCqi_s::Type_e NotValid
type
See section 4.3.24 cqiListElement.
struct MacCeValue_u m_macCeValue
MAC CE value.
See section 4.3.10 buildRARListElement.
See section 4.3.11 buildBroadcastListElement.
uint8_t m_cqi
CQI.
enum ns3::LogicalChannelConfigListElement_s::Direction_e NotValid
the direction
std::vector< std::vector< struct RlcPduListElement_s > > m_rlcPduList
RLC PDU list.
See section 4.3.12 ulInfoListElement.
bool m_cqiRequest
CQI request?
uint8_t m_tpc
Tx power control command.
uint64_t m_eRabGuaranteedBitrateDl
ERAB guaranteed bit rate DL.
uint8_t m_rbLen
length
uint16_t m_tbSize
size
uint8_t m_crnti
NRTI.
uint8_t m_harqProcess
HARQ process.
See section 4.3.28 bwPart.
HarqStatus_e
HARQ status enum.
See section 4.3.4 logicalChannelConfigListElement.
uint8_t m_tbsIdx
tbs index
struct UeSelected_s m_ueSelected
UE selected.
See section 4.3.7 phichListElement.
CqiType_e
CqiType_e enumeration.
uint8_t m_prachMaskIndex
RACH mask index.
uint8_t m_aggrLevel
The aggregation level.
uint8_t m_rbStart
start
uint8_t m_sbPmi
sb PMI
uint8_t m_schedInterval
sched interval
See section 4.3.27 higherLayerSelected.
uint8_t m_onDurationTimer
on duration timer
uint32_t m_rbBitmap
RB bitmap.
Definition: ff-mac-common.h:96
See section 4.3.20 ueCapabilities.
ReceptionStatus_e
Reception status enum.
bool m_cqiRequest
CQI request.
uint8_t m_rbLen
length
std::vector< uint8_t > m_ndi
New data indicator.
uint8_t m_pagingIndex
paging index
uint8_t m_cceIndex
Control Channel Element index.
uint64_t m_eRabGuaranteedBitrateUl
ERAB guaranteed bit rate UL.
uint8_t m_preambleIndex
preamble index
enum ns3::DlDciListElement_s::VrbFormat_e NotValid_VRB_Format
the format
See section 4.3.21 siConfiguration.
std::vector< uint16_t > m_ulReception
UL reception.
int8_t m_tpc
Tx power control command.
See section 4.3.30 pagingInfoListElement.
uint8_t m_dai
DL assignment index.
See section 4.3.26 ueSelected.
See section 4.3.17 spsConfig.
uint8_t m_aggrLevel
The aggregation level.
std::vector< uint8_t > m_sbCqi
sb CQI
uint8_t m_logicalChannelIdentity
logical channel identity
See section 4.3.3 vendorSpecifiListElement.
uint16_t m_semiPersistSchedIntervalDl
DL semi persist schedule interval.
Base class for storing the values of vendor specific parameters.
uint16_t m_shortDrxCycle
short DRX cycle
std::vector< uint8_t > m_sbCqi
sb CQI
See section 4.3.15 macCEValue.
See section 4.3.23 dlInfoListElement.
See section 4.3.14 macCEListElement.
Result_e
Result_e enumeration.
Definition: ff-mac-common.h:60
uint8_t m_tpc
Tx power control command.
NormalExtended_e
NormalExtended_e enumeration.
Definition: ff-mac-common.h:82
uint64_t m_eRabMaximulBitrateUl
ERAB maximum bit rate UL.
int8_t m_pdcchPowerOffset
CCH power offset.
Substitutive structure for specifying BuildRarListElement_s::m_grant field.
std::vector< uint16_t > m_tbsSize
The TBs size.
Definition: ff-mac-common.h:99
See section 4.3.9 rlcPDU_ListElement.
uint8_t m_wbPmi
wb PMI
uint8_t m_bwPartIndex
bw part index
uint16_t m_rnti
RNTI.
MacCeType_e
MAC CE type enum.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
enum ns3::CqiListElement_s::CqiType_e NotValid
CQI type.
uint16_t m_rnti
RNTI.
std::vector< uint8_t > m_wbCqi
wb CQI
std::vector< uint16_t > m_n1PucchAnPersistentList
N1pu CCH persistent list.
uint64_t m_eRabMaximulBitrateDl
ERAB maximum bit rate DL.
uint8_t m_freqHopping
freq hopping
struct SbMeasResult_s m_sbMeasResult
sb measure result
bool m_hopping
hopping?
std::vector< enum HarqStatus_e > m_harqStatus
HARQ status.
uint16_t m_longDrxCycleStartOffset
long DRX cycle start offset
uint8_t m_phr
phr
uint8_t m_dlPowerOffset
DL power offset.
uint8_t m_dsrTransMax
trans max
std::vector< uint8_t > m_sbList
sb list
std::vector< uint8_t > m_rv
Redundancy version.
uint8_t m_mcs
MCS.
struct BwPart_s m_bwPart
bw part
uint8_t m_ulIndex
UL index.
See section 4.3.6 rachListElement.
uint16_t m_periodicity
periodicity
See section 4.3.18 srConfig.
uint8_t m_harqProcessId
HARQ process ID.
uint8_t m_drxShortCycleTimer
short DRX cycle timer
Type_e
Type_e enumeration.
int8_t m_tpc
Tx power control command.
std::vector< uint8_t > m_bufferStatus
buffer status
Format_e
Format enumeration.
uint8_t m_n2Dmrs
n2 DMRS
uint8_t m_precodingInfo
precoding info
VrbFormat_e
Vrb Format enum.
See section 4.3.22 siMessageListElement.
struct DlDciListElement_s m_dci
DCI.
CeBitmap_e
CeBitmap_e.
Definition: ff-mac-common.h:74
uint8_t m_cceIndex
Control Channel Element index.
See section 4.3.16 drxConfig.
uint8_t m_siWindowLength
window length
enum ns3::MacCeListElement_s::MacCeType_e NotValid
MAC CE type.
uint8_t m_pagingSubframe
paging subframe
uint16_t m_drxRetransmissionTimer
retransmission timer
uint16_t m_semiPersistSchedIntervalUl
UL semi persist schedule interval.
enum ns3::PhichListElement_s::Phich_e NotValid
the phich
See section 4.3.29 ulCQI.
uint16_t m_estimatedSize
estimated size
uint8_t m_sb
sb
bool m_type2Sb1
type 2Sb1
uint8_t m_ueCategory
UE category.
uint16_t m_pagingMessageSize
paging message size
struct DlDciListElement_s m_dci
DCI.
uint8_t m_dai
DL assignment index.
Ptr< VendorSpecificValue > m_value
value
uint16_t m_sib1Length
sib1 length
struct DlDciListElement_s m_dci
DCI.
A template-based reference counting class.
std::vector< enum CeBitmap_e > m_ceBitmap
CE bitmap.
std::vector< struct HigherLayerSelected_s > m_higherLayerSelected
higher layer selected
uint8_t m_resAlloc
The type of resource allocation.
Definition: ff-mac-common.h:98
uint16_t m_drxInactivityTimer
inactivity timer
std::vector< struct SiMessageListElement_s > m_siMessageList
message list
uint16_t m_cqiSchedInterval
CQI schedule interval.
uint8_t m_implicitReleaseAfter
implicit release after
uint8_t m_ueTxAntennaSelection
UE antenna selection.
SetupRelease_e
SetupRelease_e enumeration.
Definition: ff-mac-common.h:67
uint8_t m_numberOfConfSpsProcesses
number of conf SPS process
See section 4.3.8 builDataListElement.
bool m_resAllocType1
alloc type 1
uint8_t m_logicalChannelGroup
logical channel group
enum ns3::BuildBroadcastListElement_s::Type_e NotValid
the type