5G-LENA nr-v3.3-81-g75c7590d
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-harq-process.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#pragma once
6
7#include "nr-phy-mac-common.h"
8
9#include <memory>
10#include <vector>
11
12namespace ns3
13{
30{
39 enum Status : uint8_t
40 {
44 };
45
49 HarqProcess() = default;
50
56 : m_active(other.m_active),
57 m_status(other.m_status),
58 m_timer(other.m_timer),
61 {
62 }
63
71 HarqProcess(bool active,
72 Status status,
73 uint8_t timer,
74 const std::shared_ptr<DciInfoElementTdma>& dci)
75 : m_active(active),
76 m_status(status),
77 m_timer(timer),
78 m_dciElement(dci)
79 {
80 }
81
85 void Erase()
86 {
87 m_active = false;
89 m_timer = 0;
90 m_dciElement.reset();
91 m_rlcPduInfo.clear();
92 }
93
94 bool m_active{false};
96 uint8_t m_timer{0};
97 std::shared_ptr<DciInfoElementTdma> m_dciElement{};
98 std::vector<RlcPduInfo> m_rlcPduInfo{};
99};
100
107static inline std::ostream&
108operator<<(std::ostream& os, const HarqProcess& item)
109{
110 if (item.m_active)
111 {
112 os << "is active, timer=" << static_cast<uint32_t>(item.m_timer)
113 << " Status: " << static_cast<uint32_t>(item.m_status);
114 }
115 return os;
116}
117
118} // namespace ns3
The HarqProcess struct.
bool m_active
False indicate that the process is not active.
Status m_status
Status of the process.
std::vector< RlcPduInfo > m_rlcPduInfo
vector of RLC PDU
uint8_t m_timer
Timer of the process (in slot)
HarqProcess(const HarqProcess &other)
HarqProcess copy constructor.
Status
Status of the process.
@ RECEIVED_FEEDBACK
Received feedback (NACK)
@ WAITING_FEEDBACK
Data transmitted, waiting the feedback.
@ INACTIVE
Inactive process.
HarqProcess(bool active, Status status, uint8_t timer, const std::shared_ptr< DciInfoElementTdma > &dci)
HarqProcess value-by-value constructor.
HarqProcess()=default
Default constructor.
std::shared_ptr< DciInfoElementTdma > m_dciElement
DCI element.
void Erase()
Reset the Process content.