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
56namespace ns3
57{
58
61{
64};
65
68{
71};
72
75{
78 CR
79};
80
83{
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
108 {
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
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};
174};
175
179struct VendorSpecificValue : public SimpleRefCount<VendorSpecificValue>
180{
181 virtual ~VendorSpecificValue();
182};
183
189{
193};
194
200{
201 uint8_t m_logicalChannelIdentity{UINT8_MAX};
202 uint8_t m_logicalChannelGroup{UINT8_MAX};
203
206 {
211 } m_direction{NotValid};
212
215 {
219 } m_qosBearerType{NotValid_QosBearerType};
220
221 uint8_t m_qci{UINT8_MAX};
222 uint64_t m_eRabMaximulBitrateUl{UINT64_MAX};
223 uint64_t m_eRabMaximulBitrateDl{UINT64_MAX};
224 uint64_t m_eRabGuaranteedBitrateUl{UINT64_MAX};
225 uint64_t m_eRabGuaranteedBitrateDl{UINT64_MAX};
226};
227
233{
234 uint16_t m_rnti{UINT16_MAX};
235 uint16_t m_estimatedSize{UINT16_MAX};
236};
237
243{
244 uint16_t m_rnti{UINT16_MAX};
245
248 {
252 } m_phich{NotValid};
253};
254
259{
260 uint8_t m_logicalChannelIdentity{UINT8_MAX};
261 uint16_t m_size{UINT16_MAX};
262};
263
269{
270 uint16_t m_rnti{UINT16_MAX};
272 std::vector<enum CeBitmap_e> m_ceBitmap;
273 std::vector<std::vector<struct RlcPduListElement_s>> m_rlcPduList;
274};
275
280{
281 uint16_t m_rnti{UINT16_MAX};
282 uint8_t m_rbStart{UINT8_MAX};
283 uint8_t m_rbLen{UINT8_MAX};
284 uint16_t m_tbSize{UINT16_MAX};
285 uint8_t m_mcs{UINT8_MAX};
286 bool m_hopping{false};
287 int8_t m_tpc{INT8_MIN};
288 bool m_cqiRequest{false};
289 bool m_ulDelay{false};
290};
291
296{
297 uint16_t m_rnti{UINT16_MAX};
298 // uint32_t m_grant; // Substituted with type UlGrant_s
301};
302
307{
310 {
314 } m_type{NotValid};
315
316 uint8_t m_index{UINT8_MAX};
318};
319
324{
325 uint16_t m_rnti{UINT16_MAX};
326 std::vector<uint16_t> m_ulReception;
327
330 {
334 } m_receptionStatus{NotValid};
335
336 uint8_t m_tpc{UINT8_MAX};
337};
338
343{
344 uint16_t m_rnti{UINT16_MAX};
345};
346
351{
352 uint8_t m_phr{UINT8_MAX};
353 uint8_t m_crnti{UINT8_MAX};
354 std::vector<uint8_t> m_bufferStatus;
355};
356
361{
362 uint16_t m_rnti{UINT16_MAX};
363
366 {
371 } m_macCeType{NotValid};
373};
374
379{
380 uint8_t m_onDurationTimer{UINT8_MAX};
381 uint16_t m_drxInactivityTimer{UINT16_MAX};
382 uint16_t m_drxRetransmissionTimer{UINT16_MAX};
383 uint16_t m_longDrxCycle{UINT16_MAX};
384 uint16_t m_longDrxCycleStartOffset{UINT16_MAX};
385 uint16_t m_shortDrxCycle{UINT16_MAX};
386 uint8_t m_drxShortCycleTimer{UINT8_MAX};
387};
388
393{
394 uint16_t m_semiPersistSchedIntervalUl{UINT16_MAX};
395 uint16_t m_semiPersistSchedIntervalDl{UINT16_MAX};
396 uint8_t m_numberOfConfSpsProcesses{UINT8_MAX};
397 uint8_t m_n1PucchAnPersistentListSize{UINT8_MAX};
398 std::vector<uint16_t> m_n1PucchAnPersistentList;
399 uint8_t m_implicitReleaseAfter{UINT8_MAX};
400};
401
406{
407 enum SetupRelease_e m_action
408 {
409 setup
410 };
411
412 uint8_t m_schedInterval{UINT8_MAX};
413 uint8_t m_dsrTransMax{UINT8_MAX};
414};
415
420{
421 enum SetupRelease_e m_action
422 {
423 setup
424 };
425
426 uint16_t m_cqiSchedInterval{UINT16_MAX};
427 uint8_t m_riSchedInterval{UINT8_MAX};
428};
429
434{
435 bool m_halfDuplex{false};
436 bool m_intraSfHopping{false};
437 bool m_type2Sb1{false};
438 uint8_t m_ueCategory{UINT8_MAX};
439 bool m_resAllocType1{false};
440};
441
446{
447 uint16_t m_periodicity{UINT16_MAX};
448 uint16_t m_length{UINT16_MAX};
449};
450
455{
456 uint16_t m_sfn{UINT16_MAX};
457 uint16_t m_sib1Length{UINT16_MAX};
458 uint8_t m_siWindowLength{UINT8_MAX};
459 std::vector<struct SiMessageListElement_s> m_siMessageList;
460};
461
466{
467 uint16_t m_rnti{UINT16_MAX};
468 uint8_t m_harqProcessId{UINT8_MAX};
469
472 {
475 DTX
476 };
477 std::vector<enum HarqStatus_e> m_harqStatus;
478};
479
484{
485 uint8_t m_bwPartIndex{UINT8_MAX};
486 uint8_t m_sb{UINT8_MAX};
487 uint8_t m_cqi{UINT8_MAX};
488};
489
494{
495 uint8_t m_sbPmi{UINT8_MAX};
496 std::vector<uint8_t> m_sbCqi;
497};
498
503{
504 std::vector<uint8_t> m_sbList;
505 uint8_t m_sbPmi{UINT8_MAX};
506 std::vector<uint8_t> m_sbCqi;
507};
508
513{
515 std::vector<struct HigherLayerSelected_s> m_higherLayerSelected;
517};
518
523{
524 uint16_t m_rnti{UINT16_MAX};
525 uint8_t m_ri{UINT8_MAX};
526
529 {
540 } m_cqiType{NotValid};
541
542 std::vector<uint8_t> m_wbCqi;
543 uint8_t m_wbPmi{UINT8_MAX};
544
546};
547
552{
553 std::vector<uint16_t> m_sinr;
554
557 {
564 } m_type{NotValid};
565};
566
571{
572 uint8_t m_pagingIndex{UINT8_MAX};
573 uint16_t m_pagingMessageSize{UINT16_MAX};
574 uint8_t m_pagingSubframe{UINT8_MAX};
575};
576
577} // namespace ns3
578
579#endif /* FF_MAC_COMMON_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
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 builDataListElement.
std::vector< std::vector< struct RlcPduListElement_s > > m_rlcPduList
RLC PDU list.
struct DlDciListElement_s m_dci
DCI.
std::vector< enum CeBitmap_e > m_ceBitmap
CE bitmap.
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< enum 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.