5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
traffic-generator-ngmn-ftp-multi.h
1// Copyright (c) 2022 CTTC
2// Copyright (c) 2023 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3//
4// SPDX-License-Identifier: GPL-2.0-only
5
6#ifndef TRAFFIC_GENERATOR_NGMN_FTP_MULTI
7#define TRAFFIC_GENERATOR_NGMN_FTP_MULTI
8
9#include "traffic-generator.h"
10
11#include "ns3/random-variable-stream.h"
12
13namespace ns3
14{
15
16class Address;
17class Socket;
18
35class TrafficGeneratorNgmnFtpTestCase;
36
38{
40
41 public:
46 static TypeId GetTypeId();
47 /*
48 * @brief Constructor
49 */
51 /*
52 * @brief Destructor
53 */
58 void SetPacketSize(uint32_t packetSize);
59
68 int64_t AssignStreams(int64_t stream) override;
69
70 protected:
71 // inherited
72 void DoDispose() override;
73 // inherited
74 void DoInitialize() override;
75
76 private:
77 // inherited from Application base class.
78 // Called at time specified by Start by the DoInitialize method
79 void StartApplication() override;
84 void PacketBurstSent() override;
88 void GenerateNextPacketBurstSize() override;
93 Time GetNextReadingTime();
98 uint32_t GetNextPacketSize() const override;
99
100 uint32_t m_maxFileSize;
101 Ptr<ExponentialRandomVariable> m_readingTime;
102 Ptr<LogNormalRandomVariable> m_fileSize;
103 double m_readingTimeMean{0.0};
104 double m_fileSizeMu{0.0};
105 double m_fileSizeSigma{
106 0.0};
107 uint32_t m_packetSize{0};
108};
109
110} // namespace ns3
111
112#endif /* TRAFFIC_GENERATOR_FTP_MULTI */
void SetPacketSize(uint32_t packetSize)
Sets the packet size.