5G-LENA nr-v3.0-33-g7aea1e4
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
three-gpp-ftp-m1-helper.h
1/* Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; */
2
3// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#ifndef THREE_GPP_FTP_M1_HELPER_H
8#define THREE_GPP_FTP_M1_HELPER_H
9
10#include <ns3/internet-apps-module.h>
11#include <ns3/internet-module.h>
12#include <ns3/network-module.h>
13#include <ns3/node.h>
14#include <ns3/traffic-generator-helper.h>
15
16namespace ns3
17{
18
54class ThreeGppFtpM1Helper : public Object
55{
56 public:
71 ThreeGppFtpM1Helper(ApplicationContainer* serverApps,
72 ApplicationContainer* clientApps,
73 NodeContainer* serverNodes,
74 NodeContainer* clientNodes,
75 Ipv4InterfaceContainer* serversIps);
79 ~ThreeGppFtpM1Helper() override;
80
85 static TypeId GetTypeId();
86
90 void Configure(uint16_t port,
91 Time serverStartTime,
92 Time clientStartTime,
93 Time clientStopTime,
94 double ftpLambda,
95 uint32_t ftpFileSize);
99 void Start();
100
109 int64_t AssignStreams(int64_t stream);
110
111 private:
115 void DoConfigureFtpServers();
119 void DoConfigureFtpClients();
123 void DoStartFileTransfer();
127 Time DoGetNextTime() const;
128
129 uint32_t m_lastClient{
130 0};
132 Ptr<ExponentialRandomVariable>
133 m_ftpArrivals;
134 Ptr<UniformRandomVariable>
135 m_startJitter;
137 uint16_t m_port{0};
138 Time m_clientStartTime{Seconds(0)};
139 Time m_clientStopTime{Seconds(0)};
140 double m_ftpLambda{0.0};
141 uint32_t m_ftpFileSize{0};
142 Time m_serverStartTime{Seconds(0)};
143 bool m_boolConfigured{
144 false};
145 ApplicationContainer* m_serverApps;
146 ApplicationContainer* m_clientApps;
147 NodeContainer* m_serverNodes;
148 NodeContainer* m_clientNodes;
149 Ipv4InterfaceContainer* m_serversIps;
150 ApplicationContainer m_pingApps;
151};
152
153}; // namespace ns3
154#endif // THREE_GPP_FTP_M1_HELPER_H
Helper for a correct setup of every FTP Model 1 applications.
static TypeId GetTypeId()
GetTypeId.
void Start()
Start to generate file transfers according to FTP Model 1.
void Configure(uint16_t port, Time serverStartTime, Time clientStartTime, Time clientStopTime, double ftpLambda, uint32_t ftpFileSize)
To be called before Start() function.
int64_t AssignStreams(int64_t stream)