A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
flent-application.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 Georgia Institute of Technology
3 * Copyright (c) 2020 Harsha Sharma : Flent application
4 * Copyright (c) 2021 NITK Surathkal
5 *
6 * SPDX-License-Identifier: GPL-2.0-only
7 *
8 * Author: Harsha Sharma <harshasha256@gmail.com>
9 * (adapted from bulk-send-application.cc and
10 * packet-sink-application.cc written by George F. Riley)
11 *
12 * Modified by: Ameya Deshpande <ameyanrd@outlook.com>
13 * Bhaskar Kataria <bhaskar.k7920@gmail.com> (Post processing of raw data)
14 */
15
16#include "flent-application.h"
17
18#include "nlohmann/json.hpp"
19
20#include "ns3/address.h"
21#include "ns3/application-container.h"
22#include "ns3/boolean.h"
23#include "ns3/ipv4-l3-protocol.h"
24#include "ns3/loopback-net-device.h"
25#include "ns3/string.h"
26#include "ns3/tcp-socket-factory.h"
27#include "ns3/trace-helper.h"
28#include "ns3/uinteger.h"
29
30#include <chrono>
31#include <filesystem>
32#include <fstream>
33#include <iomanip>
34#include <iostream>
35#include <sstream>
36
37namespace ns3
38{
39
40/**
41 * Flent output document, in JSON format.
42 */
44{
45 nlohmann::json json; //!< Flent output document
46};
47
48/**
49 * @brief Default base port used by the FlentApplication to configure and bind remote peer sinks.
50 */
51constexpr uint16_t DEFAULT_PORT = 9020;
52
53NS_LOG_COMPONENT_DEFINE("FlentApplication");
54
56
59{
60 static TypeId tid =
61 TypeId("ns3::FlentApplication")
63 .SetGroupName("Applications")
64 .AddConstructor<FlentApplication>()
65 .AddAttribute("TestName",
66 "Name of the Flent test to be run",
67 StringValue(""),
70 .AddAttribute("Length",
71 "Test length",
72 TimeValue(Seconds(60)),
75 .AddAttribute("HostAddress",
76 "The address of the remote host",
80 .AddAttribute("LocalBindAddress",
81 "The address of the local host",
85 .AddAttribute("ImageText",
86 "Text to be included in the plot",
87 StringValue(""),
90 .AddAttribute("OutputFilename",
91 "Path to the .flent output file. "
92 "The path can be absolute or relative to the working directory. "
93 "If it is empty (the default), the file is written as "
94 "'TestName.flent' in the working directory.",
95 StringValue(""),
98 .AddAttribute("T0",
99 "Absolute start time, as an offset from the Unix epoch, used to "
100 "anchor all timestamps in the output file. The default "
101 "corresponds to 2026-01-01T00:00:00Z. Any fixed value keeps the "
102 "output byte-for-byte reproducible across runs. Ignored if "
103 "UseWallClockT0 is true.",
104 TimeValue(Seconds(1767225600)),
107 .AddAttribute("UseWallClockT0",
108 "If true, read the system wall clock once at application start "
109 "and use it in place of the T0 attribute as the timestamp "
110 "anchor. Output files are then not reproducible across runs.",
111 BooleanValue(false),
114 .AddAttribute("StepSize",
115 "Measurement data point size",
119 return tid;
120}
121
123 : m_output(std::make_unique<Output>())
124{
125}
126
128
129void
131{
132 NS_LOG_FUNCTION(this);
133
134 if (m_localBindAddress.IsInvalid())
135 {
136 Ptr<Ipv4L3Protocol> ip = m_node->GetObject<Ipv4L3Protocol>();
137 if (ip)
138 {
139 for (uint32_t deviceId = 0; deviceId < m_node->GetNDevices(); deviceId++)
140 {
141 Ptr<NetDevice> device = m_node->GetDevice(deviceId);
142
144 {
145 continue;
146 }
147
148 // If this is not a loopback device add the IP address to the map
149 int32_t interfaceIndex = (ip)->GetInterfaceForDevice(device);
150
151 if (interfaceIndex != -1)
152 {
153 m_localBindAddress = ip->GetAddress(interfaceIndex, 0).GetLocal();
154 break;
155 }
156 }
157 }
158 }
159
160 // Override the Stop Time set for the Application Container
162
164}
165
166void
168{
169 NS_LOG_FUNCTION(this);
170
171 m_ping = nullptr;
172
173 for (auto& p : m_packetSinkUp)
174 {
175 p = nullptr;
176 }
177
178 for (auto& p : m_packetSinkDown)
179 {
180 p = nullptr;
181 }
182
183 for (auto& p : m_bulkSendUp)
184 {
185 p = nullptr;
186 }
187
188 for (auto& p : m_bulkSendDown)
189 {
190 p = nullptr;
191 }
192
193 for (auto& p : m_udpServer)
194 {
195 p = nullptr;
196 }
197
198 for (auto& p : m_udpClient)
199 {
200 p = nullptr;
201 }
202
203 // chain up
205}
206
207std::string
209{
210 std::chrono::duration<double> duration(m_currTime);
211 auto wholeSeconds = std::chrono::duration_cast<std::chrono::seconds>(duration);
212 auto microseconds =
213 std::chrono::duration_cast<std::chrono::microseconds>(duration - wholeSeconds);
214
215 std::chrono::system_clock::time_point tp(wholeSeconds);
216 std::time_t t = std::chrono::system_clock::to_time_t(tp);
217
218 std::ostringstream oss;
219 oss << std::put_time(std::gmtime(&t), "%Y-%m-%dT%H:%M:%S") << "." << std::setfill('0')
220 << std::setw(6) << microseconds.count() << "Z";
221
222 return oss.str();
223}
224
225void
227{
228 auto& j = m_output->json;
229 std::string outputPath = m_outputFilename.empty() ? m_testName + ".flent" : m_outputFilename;
230 std::string dataFilename = std::filesystem::path(outputPath).filename().string();
231
232 std::ostringstream oss;
234 {
236 }
238 {
240 }
241 else
242 {
243 NS_FATAL_ERROR("HostAddress must be an Ipv4Address or InetSocketAddress");
244 }
245 std::string hostName = oss.str();
246
247 std::ostringstream ossLocal;
249 std::string localHost = ossLocal.str();
250
251 std::string timeStr = GetUtcFormatTime();
252
253 nlohmann::json title = nullptr;
254 if (!m_imageText.empty())
255 {
256 title = m_imageText;
257 }
258
259 j["metadata"] = {
260 {"BATCH_NAME", nullptr},
261 {"BATCH_TIME", nullptr},
262 {"BATCH_TITLE", nullptr},
263 {"BATCH_UUID", nullptr},
264 {"DATA_FILENAME", dataFilename},
265 {"EGRESS_INFO", {{"bql", {{"tx-0", ""}}}}},
266 {"classes", nullptr},
267 {"driver", nullptr},
268 {"iface", nullptr},
269 {"link_params", {{"qlen", nullptr}}},
270 {"offloads",
271 {{"generic-receive-offload", nullptr},
272 {"generic-segmentation-offload", nullptr},
273 {"large-receive-offload", nullptr},
274 {"tcp-segmentation", nullptr},
275 {"udp-fragmentation", nullptr}}},
276 {"qdiscs",
277 {{"id", nullptr},
278 {"name", nullptr},
279 {"params",
280 {{"ecn", nullptr},
281 {"flows", nullptr},
282 {"interval", nullptr},
283 {"limit", nullptr},
284 {"memory_limit", nullptr},
285 {"quantum", nullptr},
286 {"refcnt", nullptr},
287 {"target", nullptr}}},
288 {"parent", nullptr}}},
289 {"FAILED_RUNNERS", nullptr},
290 {"FLENT_VERSION", nullptr},
291 {"HOST", hostName},
292 {"HOSTS", nlohmann::json::array({hostName})},
293 {"HTTP_GETTER_DNS", nullptr},
294 {"HTTP_GETTER_URLLIST", nullptr},
295 {"HTTP_GETTER_WORKERS", nullptr},
296 {"IP_VERSION", 4},
297 {"KERNEL_NAME", "ns-3"},
298 {"KERNEL_RELEASE", "ns-3"},
299 {"LENGTH", m_length.GetSeconds()},
300 {"LOCAL_HOST", localHost},
301 {"MODULE_VERSIONS", nullptr},
302 {"NAME", m_testName},
303 {"NOTE", nullptr},
304 {"REMOTE_METADATA", nullptr},
305 {"STEP_SIZE", m_stepSize.GetSeconds()},
306 {"TIME", timeStr},
307 {"T0", timeStr},
308 {"TEST_PARAMETERS", nlohmann::json::object()},
309 {"TITLE", title},
310 {"TOTAL_LENGTH", m_stopTime.GetSeconds()},
311 };
312
313 j["version"] = 4;
314}
315
318{
319 NS_LOG_FUNCTION(this << hostAddress);
320
321 for (auto it = NodeList::Begin(); it != NodeList::End(); ++it)
322 {
323 Ptr<Node> node = *it;
324 Ptr<Ipv4L3Protocol> ip = node->GetObject<Ipv4L3Protocol>();
325
326 if (!ip)
327 {
328 continue;
329 }
330
331 for (uint32_t deviceId = 0; deviceId < node->GetNDevices(); deviceId++)
332 {
333 int32_t interfaceIndex = (ip)->GetInterfaceForDevice(node->GetDevice(deviceId));
334
335 if (interfaceIndex == -1)
336 {
337 continue;
338 }
339
340 uint32_t numberOfAddresses = ip->GetNAddresses(interfaceIndex);
341 for (uint32_t addressIndex = 0; addressIndex < numberOfAddresses; addressIndex++)
342 {
343 Ipv4InterfaceAddress ifAddr = ip->GetAddress(interfaceIndex, addressIndex);
344 Ipv4Address addr = ifAddr.GetAddress();
345
346 if (addr == hostAddress)
347 {
348 return node;
349 }
350 }
351 }
352 }
353
354 return nullptr;
355}
356
357void
359{
360 m_bytesSent[idx] += packet->GetSize();
361}
362
363void
365 Ptr<const Packet> packet,
366 const Address& address)
367{
368 m_bytesReceived[idx] += packet->GetSize();
369}
370
371void
373{
374 nlohmann::json data;
375 data["seq"] = seq;
377 data["val"] = rtt.GetSeconds() * 1000;
378 m_output->json["raw_values"]["Ping (ms) ICMP"].push_back(data);
379}
380
381void
383 Ptr<const Packet> packet,
384 const Address& address,
385 const Address& localAddress,
386 const SeqTsEchoHeader& header)
387{
388 constexpr std::array<const char*, 3> udpFlows = {"Ping (ms) UDP BE",
389 "Ping (ms) UDP BK",
390 "Ping (ms) UDP EF"};
391
392 nlohmann::json data;
393 Time t = header.GetTsValue();
394 double rtt = t.GetSeconds() * 1000;
395 data["dur"] = m_stepSize.GetSeconds();
397 data["val"] = rtt;
398 m_output->json["raw_values"][udpFlows[idx]].push_back(data);
399}
400
401void
403{
404 nlohmann::json data;
405 double goodput = (m_bytesSent[i] * 8.0 / m_stepSize.GetSeconds() / 1e6);
406 data["dur"] = m_stepSize.GetSeconds();
408 data["val"] = goodput;
409 m_output->json["raw_values"][name].push_back(data);
410 m_bytesSent[i] = 0;
412 {
414 }
415}
416
417void
419{
420 nlohmann::json data;
421 double goodput = (m_bytesReceived[i] * 8.0 / m_stepSize.GetSeconds() / 1e6);
422 data["dur"] = m_stepSize.GetSeconds();
424 data["val"] = goodput;
425 m_output->json["raw_values"][name].push_back(data);
426 m_bytesReceived[i] = 0;
428 {
430 }
431}
432
433void
435{
436 NS_LOG_DEBUG("Filling x values");
437 double stepSize = m_stepSize.GetSeconds();
438 NS_LOG_DEBUG(stepSize);
439
440 int totalSteps = int(std::ceil(m_stopTime.GetSeconds() / stepSize));
441
442 for (int step = 0; step < totalSteps; step += 1)
443 {
444 NS_LOG_DEBUG(step);
445 m_output->json["x_values"].push_back(step * stepSize);
446 }
447}
448
449void
451{
452 NS_LOG_DEBUG("Process Raw values");
453 int steps = int(std::ceil(m_stopTime.GetSeconds() / m_stepSize.GetSeconds()));
454
455 for (int s = 0; s < steps; s++)
456 {
457 double t = m_currTime + (m_stepSize.GetSeconds() * s);
458
459 for (auto itrName = m_output->json["raw_values"].begin();
460 itrName != m_output->json["raw_values"].end();
461 itrName++)
462 {
463 const std::string& rawValueName = itrName.key();
464 double maxDist = m_stepSize.GetSeconds() * 5.0;
465
466 if (itrName.value().empty() || itrName.value().is_null())
467 {
468 m_output->json["results"][rawValueName].push_back(nullptr);
469 continue;
470 }
471
472 bool hasPrev = false;
473 bool hasNext = false;
474 double tPrev = 0.0;
475 double vPrev = 0.0;
476 double tNext = 0.0;
477 double vNext = 0.0;
478
479 auto& arr = m_output->json["raw_values"][rawValueName];
480 auto prev = arr.end();
481
482 for (auto itrValues = arr.begin(); itrValues != arr.end();
483 prev = itrValues, itrValues++)
484 {
485 if ((*itrValues)["t"].get<double>() > t)
486 {
487 if (prev != arr.end())
488 {
489 tPrev = (*prev)["t"].get<double>();
490 vPrev = (*prev)["val"].get<double>();
491 hasPrev = true;
492 }
493 else
494 {
495 maxDist = m_stepSize.GetSeconds() * 0.5;
496 }
497
498 tNext = (*itrValues)["t"].get<double>();
499 vNext = (*itrValues)["val"].get<double>();
500 hasNext = true;
501 break;
502 }
503 }
504
505 bool last = false;
506 if (!hasNext)
507 {
508 auto lastItr = std::prev(arr.end());
509 tNext = (*lastItr)["t"].get<double>();
510 vNext = (*lastItr)["val"].get<double>();
511 hasNext = true;
512 last = true;
513 }
514
515 if (std::fabs(t - tNext) <= maxDist)
516 {
517 if (!hasPrev)
518 {
519 // 0.0 means no data yet - push null
520 if (vNext == 0.0)
521 {
522 m_output->json["results"][rawValueName].push_back(nullptr);
523 }
524 else if (last)
525 {
526 auto& resultArr = m_output->json["results"][rawValueName];
527 bool alreadyRecorded = !resultArr.empty() && (resultArr.back() == vNext ||
528 resultArr.back().is_null());
529 if (alreadyRecorded)
530 {
531 m_output->json["results"][rawValueName].push_back(nullptr);
532 }
533 else
534 {
535 m_output->json["results"][rawValueName].push_back(vNext);
536 }
537 }
538 else
539 {
540 m_output->json["results"][rawValueName].push_back(vNext);
541 }
542 }
543 else
544 {
545 // Don't interpolate across a zero boundary
546 if (vPrev == 0.0 || vNext == 0.0)
547 {
548 m_output->json["results"][rawValueName].push_back(nullptr);
549 }
550 else
551 {
552 double dvDt = (vNext - vPrev) / (tNext - tPrev);
553 m_output->json["results"][rawValueName].push_back(vPrev +
554 dvDt * (t - tPrev));
555 }
556 }
557 }
558 else
559 {
560 m_output->json["results"][rawValueName].push_back(nullptr);
561 }
562 }
563 }
564}
565
566// Application Methods
567void
569{
570 NS_LOG_FUNCTION(this);
572 {
573 auto sinceEpoch = std::chrono::system_clock::now().time_since_epoch();
574 m_currTime = std::chrono::duration_cast<std::chrono::nanoseconds>(sinceEpoch).count() / 1e9;
575 }
576 else
577 {
578 m_currTime = m_t0.GetSeconds();
579 }
580 AddMetadata();
581
582 Ipv4Address hostIpv4Address;
583 uint16_t basePort = DEFAULT_PORT;
584
586 {
588 hostIpv4Address = inetAddr.GetIpv4();
589 basePort = inetAddr.GetPort();
590 }
592 {
593 hostIpv4Address = Ipv4Address::ConvertFrom(m_hostAddress);
594 }
595 else
596 {
597 NS_FATAL_ERROR("HostAddress must be an Ipv4Address or InetSocketAddress");
598 }
599
600 Ptr<Node> hostNode = GetHostNode(hostIpv4Address);
601
602 if (!hostNode)
603 {
604 NS_FATAL_ERROR("Couldn't find dest node given the IP " << hostIpv4Address);
605 }
606
607 m_output->json["raw_values"]["Ping (ms) ICMP"] = nlohmann::json::array();
608 m_output->json["results"]["Ping (ms) ICMP"] = nlohmann::json::array();
609 m_output->json["x_values"] = nlohmann::json::array();
610
611 if (m_testName == "tcp_download")
612 {
615 "Interval",
617 hostNode->AddApplication(m_ping);
618 }
619 else
620 {
622 AddressValue(hostIpv4Address),
623 "Interval",
625 m_node->AddApplication(m_ping);
626 }
627
628 m_ping->SetStartTime(m_startTime);
629 m_ping->SetStopTime(m_stopTime);
630 m_ping->TraceConnectWithoutContext("Rtt",
632
633 if (m_testName == "tcp_upload")
634 {
635 InetSocketAddress clientAddress = InetSocketAddress(hostIpv4Address, basePort);
637 m_bulkSendUp[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
638 m_bulkSendUp[0]->SetAttribute("Remote", AddressValue(clientAddress));
639 m_bulkSendUp[0]->SetAttribute("MaxBytes", UintegerValue(0));
640 m_node->AddApplication(m_bulkSendUp[0]);
641 m_bulkSendUp[0]->SetStartTime(m_startTime + Seconds(5));
642 m_bulkSendUp[0]->SetStopTime(m_stopTime - Seconds(5));
643 m_output->json["results"]["TCP upload"] = nlohmann::json::array();
644 m_output->json["raw_values"]["TCP upload"] = nlohmann::json::array();
645 nlohmann::json data;
646 data["dur"] = m_stepSize.GetSeconds();
648 data["val"] = 0;
649 m_output->json["raw_values"]["TCP upload"].push_back(data);
650 m_bulkSendUp[0]->TraceConnectWithoutContext(
651 "Tx",
655 this,
656 "TCP upload",
657 0);
658
659 Address sinkAddress(InetSocketAddress(Ipv4Address::GetAny(), basePort));
661 m_packetSinkUp[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
662 m_packetSinkUp[0]->SetAttribute("Local", AddressValue(sinkAddress));
663 hostNode->AddApplication(m_packetSinkUp[0]);
664 m_packetSinkUp[0]->SetStartTime(m_startTime + Seconds(5));
665 m_packetSinkUp[0]->SetStopTime(m_stopTime - Seconds(5));
666 }
667 else if (m_testName == "tcp_download")
668 {
670
671 Address sinkAddress(InetSocketAddress(Ipv4Address::GetAny(), basePort - 10));
673 m_packetSinkDown[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
674 m_packetSinkDown[0]->SetAttribute("Local", AddressValue(sinkAddress));
675 m_node->AddApplication(m_packetSinkDown[0]);
676 m_packetSinkDown[0]->SetStartTime(m_startTime + Seconds(5));
677 m_packetSinkDown[0]->SetStopTime(m_stopTime - Seconds(5));
678 m_packetSinkDown[0]->TraceConnectWithoutContext(
679 "Rx",
681 m_output->json["results"]["TCP download"] = nlohmann::json::array();
682 m_output->json["raw_values"]["TCP download"] = nlohmann::json::array();
683 nlohmann::json data;
684 data["dur"] = m_stepSize.GetSeconds();
686 data["val"] = 0;
687 m_output->json["raw_values"]["TCP download"].push_back(data);
690 this,
691 "TCP download",
692 0);
693
694 InetSocketAddress localBindAddress = InetSocketAddress(localBindAddr, basePort - 10);
696 m_bulkSendDown[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
697 m_bulkSendDown[0]->SetAttribute("Remote", AddressValue(localBindAddress));
698 m_bulkSendDown[0]->SetAttribute("MaxBytes", UintegerValue(0));
699 hostNode->AddApplication(m_bulkSendDown[0]);
700 m_bulkSendDown[0]->SetStartTime(m_startTime + Seconds(5));
701 m_bulkSendDown[0]->SetStopTime(m_stopTime - Seconds(5));
702 }
703 else if (m_testName == "rrul")
704 {
706
707 uint16_t port = basePort - 20;
709 m_udpServer[0]->SetAttribute("Port", UintegerValue(port));
710 m_udpServer[0]->SetAttribute("EnableSeqTsEchoHeader", BooleanValue(true));
711 hostNode->AddApplication(m_udpServer[0]);
712 m_udpServer[0]->SetStartTime(m_startTime);
713 m_udpServer[0]->SetStopTime(m_stopTime);
714 uint32_t packetSize = 1024;
715 uint32_t maxPacketCount = 10000;
717 m_udpClient[0]->SetAttribute("Remote",
718 AddressValue(InetSocketAddress(hostIpv4Address, port)));
719 m_udpClient[0]->SetAttribute("MaxPackets", UintegerValue(maxPacketCount));
720 m_udpClient[0]->SetAttribute("Interval", TimeValue(m_stepSize));
721 m_udpClient[0]->SetAttribute("PacketSize", UintegerValue(packetSize));
722 m_udpClient[0]->SetAttribute("EnableSeqTsEchoHeader", BooleanValue(true));
723 m_udpClient[0]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DscpDefault << 2));
724 m_node->AddApplication(m_udpClient[0]);
725 m_udpClient[0]->SetStartTime(m_startTime);
726 m_udpClient[0]->SetStopTime(m_stopTime);
727 m_output->json["raw_values"]["Ping (ms) UDP BE"] = nlohmann::json::array();
728 m_output->json["results"]["Ping (ms) UDP BE"] = nlohmann::json::array();
729 m_udpClient[0]->TraceConnectWithoutContext(
730 "RxWithSeqTsEchoHeader",
732
733 port = basePort - 19;
735 m_udpServer[1]->SetAttribute("Port", UintegerValue(port));
736 m_udpServer[1]->SetAttribute("EnableSeqTsEchoHeader", BooleanValue(true));
737 hostNode->AddApplication(m_udpServer[1]);
738 m_udpServer[1]->SetStartTime(m_startTime);
739 m_udpServer[1]->SetStopTime(m_stopTime);
741 m_udpClient[1]->SetAttribute("Remote",
742 AddressValue(InetSocketAddress(hostIpv4Address, port)));
743 m_udpClient[1]->SetAttribute("MaxPackets", UintegerValue(maxPacketCount));
744 m_udpClient[1]->SetAttribute("Interval", TimeValue(m_stepSize));
745 m_udpClient[1]->SetAttribute("PacketSize", UintegerValue(packetSize));
746 m_udpClient[1]->SetAttribute("EnableSeqTsEchoHeader", BooleanValue(true));
747 m_udpClient[1]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS1 << 2));
748 m_node->AddApplication(m_udpClient[1]);
749 m_udpClient[1]->SetStartTime(m_startTime);
750 m_udpClient[1]->SetStopTime(m_stopTime);
751 m_output->json["raw_values"]["Ping (ms) UDP BK"] = nlohmann::json::array();
752 m_output->json["results"]["Ping (ms) UDP BK"] = nlohmann::json::array();
753 m_udpClient[1]->TraceConnectWithoutContext(
754 "RxWithSeqTsEchoHeader",
756
757 port = basePort - 18;
759 m_udpServer[2]->SetAttribute("Port", UintegerValue(port));
760 m_udpServer[2]->SetAttribute("EnableSeqTsEchoHeader", BooleanValue(true));
761 hostNode->AddApplication(m_udpServer[2]);
762 m_udpServer[2]->SetStartTime(m_startTime);
763 m_udpServer[2]->SetStopTime(m_stopTime);
765 m_udpClient[2]->SetAttribute("Remote",
766 AddressValue(InetSocketAddress(hostIpv4Address, port)));
767 m_udpClient[2]->SetAttribute("MaxPackets", UintegerValue(maxPacketCount));
768 m_udpClient[2]->SetAttribute("Interval", TimeValue(m_stepSize));
769 m_udpClient[2]->SetAttribute("PacketSize", UintegerValue(packetSize));
770 m_udpClient[2]->SetAttribute("EnableSeqTsEchoHeader", BooleanValue(true));
771 m_udpClient[2]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_EF << 2));
772 m_node->AddApplication(m_udpClient[2]);
773 m_udpClient[2]->SetStartTime(m_startTime);
774 m_udpClient[2]->SetStopTime(m_stopTime);
775 m_output->json["raw_values"]["Ping (ms) UDP EF"] = nlohmann::json::array();
776 m_output->json["results"]["Ping (ms) UDP EF"] = nlohmann::json::array();
777 m_udpClient[2]->TraceConnectWithoutContext(
778 "RxWithSeqTsEchoHeader",
780
781 // Download BE
782 Address sinkAddress(InetSocketAddress(Ipv4Address::GetAny(), basePort - 10));
784 m_packetSinkDown[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
785 m_packetSinkDown[0]->SetAttribute("Local", AddressValue(sinkAddress));
786 m_packetSinkDown[0]->SetAttribute("Tos",
788 m_node->AddApplication(m_packetSinkDown[0]);
789 m_packetSinkDown[0]->SetStartTime(m_startTime + Seconds(5));
790 m_packetSinkDown[0]->SetStopTime(m_stopTime - Seconds(5));
791 m_packetSinkDown[0]->TraceConnectWithoutContext(
792 "Rx",
794 m_output->json["results"]["TCP download BE"] = nlohmann::json::array();
795 m_output->json["raw_values"]["TCP download BE"] = nlohmann::json::array();
796 nlohmann::json data;
797 data["dur"] = m_stepSize.GetSeconds();
799 data["val"] = 0;
800 m_output->json["raw_values"]["TCP download BE"].push_back(data);
803 this,
804 "TCP download BE",
805 0);
806 InetSocketAddress localBindAddress = InetSocketAddress(localIpv4Address, basePort - 10);
808 m_bulkSendDown[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
809 m_bulkSendDown[0]->SetAttribute("Remote", AddressValue(localBindAddress));
810 m_bulkSendDown[0]->SetAttribute("MaxBytes", UintegerValue(0));
811 m_bulkSendDown[0]->SetAttribute("Tos",
813 hostNode->AddApplication(m_bulkSendDown[0]);
814 m_bulkSendDown[0]->SetStartTime(m_startTime + Seconds(5));
815 m_bulkSendDown[0]->SetStopTime(m_stopTime - Seconds(5));
816
817 // Upload BE
818 InetSocketAddress hostAddress = InetSocketAddress(hostIpv4Address, basePort);
820 m_bulkSendUp[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
821 m_bulkSendUp[0]->SetAttribute("Remote", AddressValue(hostAddress));
822 m_bulkSendUp[0]->SetAttribute("MaxBytes", UintegerValue(0));
823 m_bulkSendUp[0]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DscpDefault << 2));
824 m_node->AddApplication(m_bulkSendUp[0]);
825 m_bulkSendUp[0]->SetStartTime(m_startTime + Seconds(5));
826 m_bulkSendUp[0]->SetStopTime(m_stopTime - Seconds(5));
827 m_output->json["results"]["TCP upload BE"] = nlohmann::json::array();
828 m_output->json["raw_values"]["TCP upload BE"] = nlohmann::json::array();
829 nlohmann::json data_up;
830 data_up["dur"] = m_stepSize.GetSeconds();
831 data_up["t"] = (Simulator::Now().GetSeconds() + m_currTime);
832 data_up["val"] = 0;
833 m_output->json["raw_values"]["TCP upload BE"].push_back(data_up);
834 m_bulkSendUp[0]->TraceConnectWithoutContext(
835 "Tx",
839 this,
840 "TCP upload BE",
841 0);
842 Address sinkAddressUp(InetSocketAddress(Ipv4Address::GetAny(), basePort));
844 m_packetSinkUp[0]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
845 m_packetSinkUp[0]->SetAttribute("Local", AddressValue(sinkAddressUp));
846 m_packetSinkUp[0]->SetAttribute("Tos",
848 hostNode->AddApplication(m_packetSinkUp[0]);
849 m_packetSinkUp[0]->SetStartTime(m_startTime + Seconds(5));
850 m_packetSinkUp[0]->SetStopTime(m_stopTime - Seconds(5));
851
852 // Download BK
853 Address sinkAddress2(InetSocketAddress(Ipv4Address::GetAny(), basePort - 9));
855 m_packetSinkDown[1]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
856 m_packetSinkDown[1]->SetAttribute("Local", AddressValue(sinkAddress2));
857 m_packetSinkDown[1]->SetAttribute("Tos",
859 m_node->AddApplication(m_packetSinkDown[1]);
860 m_packetSinkDown[1]->SetStartTime(m_startTime + Seconds(5));
861 m_packetSinkDown[1]->SetStopTime(m_stopTime - Seconds(5));
862 m_packetSinkDown[1]->TraceConnectWithoutContext(
863 "Rx",
865 m_output->json["results"]["TCP download BK"] = nlohmann::json::array();
866 m_output->json["raw_values"]["TCP download BK"] = nlohmann::json::array();
867 nlohmann::json data2;
868 data2["dur"] = m_stepSize.GetSeconds();
869 data2["t"] = (Simulator::Now().GetSeconds() + m_currTime);
870 data2["val"] = 0;
871 m_output->json["raw_values"]["TCP download BK"].push_back(data2);
874 this,
875 "TCP download BK",
876 1);
877 InetSocketAddress localBindAddress2 = InetSocketAddress(localIpv4Address, basePort - 9);
879 m_bulkSendDown[1]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
880 m_bulkSendDown[1]->SetAttribute("Remote", AddressValue(localBindAddress2));
881 m_bulkSendDown[1]->SetAttribute("MaxBytes", UintegerValue(0));
882 m_bulkSendDown[1]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS1 << 2));
883 hostNode->AddApplication(m_bulkSendDown[1]);
884 m_bulkSendDown[1]->SetStartTime(m_startTime + Seconds(5));
885 m_bulkSendDown[1]->SetStopTime(m_stopTime - Seconds(5));
886
887 // Upload BK
888 hostAddress = InetSocketAddress(hostIpv4Address, basePort + 1);
890 m_bulkSendUp[1]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
891 m_bulkSendUp[1]->SetAttribute("Remote", AddressValue(hostAddress));
892 m_bulkSendUp[1]->SetAttribute("MaxBytes", UintegerValue(0));
893 m_bulkSendUp[1]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS1 << 2));
894 m_node->AddApplication(m_bulkSendUp[1]);
895 m_bulkSendUp[1]->SetStartTime(m_startTime + Seconds(5));
896 m_bulkSendUp[1]->SetStopTime(m_stopTime - Seconds(5));
897 m_output->json["results"]["TCP upload BK"] = nlohmann::json::array();
898 m_output->json["raw_values"]["TCP upload BK"] = nlohmann::json::array();
899 nlohmann::json data_up2;
900 data_up2["dur"] = m_stepSize.GetSeconds();
901 data_up2["t"] = (Simulator::Now().GetSeconds() + m_currTime);
902 data_up2["val"] = 0;
903 m_output->json["raw_values"]["TCP upload BK"].push_back(data_up2);
904 m_bulkSendUp[1]->TraceConnectWithoutContext(
905 "Tx",
909 this,
910 "TCP upload BK",
911 1);
912 Address sinkAddressUp2(InetSocketAddress(Ipv4Address::GetAny(), basePort + 1));
914 m_packetSinkUp[1]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
915 m_packetSinkUp[1]->SetAttribute("Local", AddressValue(sinkAddressUp2));
916 m_packetSinkUp[1]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS1 << 2));
917 hostNode->AddApplication(m_packetSinkUp[1]);
918 m_packetSinkUp[1]->SetStartTime(m_startTime + Seconds(5));
919 m_packetSinkUp[1]->SetStopTime(m_stopTime - Seconds(5));
920
921 // Download CS5
922 Address sinkAddress3(InetSocketAddress(Ipv4Address::GetAny(), basePort - 8));
924 m_packetSinkDown[2]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
925 m_packetSinkDown[2]->SetAttribute("Local", AddressValue(sinkAddress3));
926 m_packetSinkDown[2]->SetAttribute("Tos",
928 m_node->AddApplication(m_packetSinkDown[2]);
929 m_packetSinkDown[2]->SetStartTime(m_startTime + Seconds(5));
930 m_packetSinkDown[2]->SetStopTime(m_stopTime - Seconds(5));
931 m_packetSinkDown[2]->TraceConnectWithoutContext(
932 "Rx",
934 m_output->json["results"]["TCP download CS5"] = nlohmann::json::array();
935 m_output->json["raw_values"]["TCP download CS5"] = nlohmann::json::array();
936 nlohmann::json data3;
937 data3["dur"] = m_stepSize.GetSeconds();
938 data3["t"] = (Simulator::Now().GetSeconds() + m_currTime);
939 data3["val"] = 0;
940 m_output->json["raw_values"]["TCP download CS5"].push_back(data3);
943 this,
944 "TCP download CS5",
945 2);
946 InetSocketAddress localBindAddress3 = InetSocketAddress(localIpv4Address, basePort - 8);
948 m_bulkSendDown[2]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
949 m_bulkSendDown[2]->SetAttribute("Remote", AddressValue(localBindAddress3));
950 m_bulkSendDown[2]->SetAttribute("MaxBytes", UintegerValue(0));
951 m_bulkSendDown[2]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS5 << 2));
952 hostNode->AddApplication(m_bulkSendDown[2]);
953 m_bulkSendDown[2]->SetStartTime(m_startTime + Seconds(5));
954 m_bulkSendDown[2]->SetStopTime(m_stopTime - Seconds(5));
955
956 // Upload CS5
957 hostAddress = InetSocketAddress(hostIpv4Address, basePort + 2);
959 m_bulkSendUp[2]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
960 m_bulkSendUp[2]->SetAttribute("Remote", AddressValue(hostAddress));
961 m_bulkSendUp[2]->SetAttribute("MaxBytes", UintegerValue(0));
962 m_bulkSendUp[2]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS5 << 2));
963 m_node->AddApplication(m_bulkSendUp[2]);
964 m_bulkSendUp[2]->SetStartTime(m_startTime + Seconds(5));
965 m_bulkSendUp[2]->SetStopTime(m_stopTime - Seconds(5));
966 m_output->json["results"]["TCP upload CS5"] = nlohmann::json::array();
967 m_output->json["raw_values"]["TCP upload CS5"] = nlohmann::json::array();
968 nlohmann::json data_up3;
969 data_up3["dur"] = m_stepSize.GetSeconds();
970 data_up3["t"] = (Simulator::Now().GetSeconds() + m_currTime);
971 data_up3["val"] = 0;
972 m_output->json["raw_values"]["TCP upload CS5"].push_back(data_up3);
973 m_bulkSendUp[2]->TraceConnectWithoutContext(
974 "Tx",
978 this,
979 "TCP upload CS5",
980 2);
981 Address sinkAddressUp3(InetSocketAddress(Ipv4Address::GetAny(), basePort + 2));
983 m_packetSinkUp[2]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
984 m_packetSinkUp[2]->SetAttribute("Local", AddressValue(sinkAddressUp3));
985 m_packetSinkUp[2]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_CS5 << 2));
986 hostNode->AddApplication(m_packetSinkUp[2]);
987 m_packetSinkUp[2]->SetStartTime(m_startTime + Seconds(5));
988 m_packetSinkUp[2]->SetStopTime(m_stopTime - Seconds(5));
989
990 // Download EF
991 Address sinkAddress4(InetSocketAddress(Ipv4Address::GetAny(), basePort - 7));
993 m_packetSinkDown[3]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
994 m_packetSinkDown[3]->SetAttribute("Local", AddressValue(sinkAddress4));
995 m_packetSinkDown[3]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_EF << 2));
996 m_node->AddApplication(m_packetSinkDown[3]);
997 m_packetSinkDown[3]->SetStartTime(m_startTime + Seconds(5));
998 m_packetSinkDown[3]->SetStopTime(m_stopTime - Seconds(5));
999 m_packetSinkDown[3]->TraceConnectWithoutContext(
1000 "Rx",
1002 m_output->json["results"]["TCP download EF"] = nlohmann::json::array();
1003 m_output->json["raw_values"]["TCP download EF"] = nlohmann::json::array();
1004 nlohmann::json data4;
1005 data4["dur"] = m_stepSize.GetSeconds();
1006 data4["t"] = (Simulator::Now().GetSeconds() + m_currTime);
1007 data4["val"] = 0;
1008 m_output->json["raw_values"]["TCP download EF"].push_back(data4);
1011 this,
1012 "TCP download EF",
1013 3);
1014 InetSocketAddress localBindAddress4 = InetSocketAddress(localIpv4Address, basePort - 7);
1016 m_bulkSendDown[3]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
1017 m_bulkSendDown[3]->SetAttribute("Remote", AddressValue(localBindAddress4));
1018 m_bulkSendDown[3]->SetAttribute("MaxBytes", UintegerValue(0));
1019 m_bulkSendDown[3]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_EF << 2));
1020 hostNode->AddApplication(m_bulkSendDown[3]);
1021 m_bulkSendDown[3]->SetStartTime(m_startTime + Seconds(5));
1022 m_bulkSendDown[3]->SetStopTime(m_stopTime - Seconds(5));
1023
1024 // Upload EF
1025 hostAddress = InetSocketAddress(hostIpv4Address, basePort + 3);
1027 m_bulkSendUp[3]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
1028 m_bulkSendUp[3]->SetAttribute("Remote", AddressValue(hostAddress));
1029 m_bulkSendUp[3]->SetAttribute("MaxBytes", UintegerValue(0));
1030 m_bulkSendUp[3]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_EF << 2));
1031 m_node->AddApplication(m_bulkSendUp[3]);
1032 m_bulkSendUp[3]->SetStartTime(m_startTime + Seconds(5));
1033 m_bulkSendUp[3]->SetStopTime(m_stopTime - Seconds(5));
1034 m_output->json["results"]["TCP upload EF"] = nlohmann::json::array();
1035 m_output->json["raw_values"]["TCP upload EF"] = nlohmann::json::array();
1036 nlohmann::json data_up4;
1037 data_up4["dur"] = m_stepSize.GetSeconds();
1038 data_up4["t"] = (Simulator::Now().GetSeconds() + m_currTime);
1039 data_up4["val"] = 0;
1040 m_output->json["raw_values"]["TCP upload EF"].push_back(data_up4);
1041 m_bulkSendUp[3]->TraceConnectWithoutContext(
1042 "Tx",
1046 this,
1047 "TCP upload EF",
1048 3);
1049 Address sinkAddressUp4(InetSocketAddress(Ipv4Address::GetAny(), basePort + 3));
1051 m_packetSinkUp[3]->SetAttribute("Protocol", StringValue("ns3::TcpSocketFactory"));
1052 m_packetSinkUp[3]->SetAttribute("Local", AddressValue(sinkAddressUp4));
1053 m_packetSinkUp[3]->SetAttribute("Tos", UintegerValue(Ipv4Header::DscpType::DSCP_EF << 2));
1054 hostNode->AddApplication(m_packetSinkUp[3]);
1055 m_packetSinkUp[3]->SetStartTime(m_startTime + Seconds(5));
1056 m_packetSinkUp[3]->SetStopTime(m_stopTime - Seconds(5));
1057 }
1058}
1059
1060void
1062{
1063 NS_LOG_FUNCTION(this);
1064 FillXValues();
1066
1067 std::string outputPath = m_outputFilename.empty() ? m_testName + ".flent" : m_outputFilename;
1068 std::ofstream out(outputPath);
1069 if (!out.is_open())
1070 {
1071 NS_FATAL_ERROR("Could not open output file: " << outputPath);
1072 }
1073
1074 out << m_output->json.dump(1) << std::endl;
1075 out.close();
1076}
1077
1078} // namespace ns3
a polymophic address class
Definition address.h:114
void DoInitialize() override
Initialize() implementation.
void DoDispose() override
Destructor implementation.
Time m_startTime
The simulation time that the application will start.
Time m_stopTime
The simulation time that the application will end.
Ptr< Node > m_node
The node that this application is installed on.
Flent is a network benchmarking tool.
std::string GetUtcFormatTime() const
Calculate the Time in UTC time format from the number of seconds.
double m_currTime
Derived epoch anchor in seconds.
~FlentApplication() override
std::array< Ptr< BulkSendApplication >, 4 > m_bulkSendUp
BulkSend Applications for Upload flows (tcp_upload, rrul tests).
void StopApplication() override
Application specific shutdown code.
std::array< uint32_t, 4 > m_bytesReceived
receive data counters
std::string m_imageText
Text to be included in plot.
std::array< Ptr< UdpEchoClient >, 3 > m_udpClient
UdpEchoClient Applications.
Time m_t0
Epoch anchor for output timestamps (see T0 attribute).
std::array< uint32_t, 4 > m_bytesSent
sent data counters
void FillXValues()
Fill x_values parameter in Flent file.
void ProcessRawValues()
Process raw values and add the processed result in the Flent file.
void TraceReceivedUdpPing(std::size_t idx, Ptr< const Packet > packet, const Address &address, const Address &localAddress, const SeqTsEchoHeader &header)
UDP Ping RTT Trace function.
std::array< Ptr< UdpEchoServer >, 3 > m_udpServer
UdpEchoServer Applications.
void TraceSentPacket(std::size_t idx, Ptr< const Packet > packet)
sink for packet transmissions.
bool m_useWallClockT0
Use the wall clock instead of m_t0 (see UseWallClockT0 attribute).
static TypeId GetTypeId()
Get the type ID.
std::unique_ptr< Output > m_output
Opaque JSON output document (defined in the .cc file).
std::array< Ptr< PacketSink >, 4 > m_packetSinkUp
PacketSink Applications for Upload flows (tcp_upload, rrul tests).
Time m_length
Test duration.
Time m_stepSize
Measurement data point step size.
void GoodputSamplingUpload(std::string name, int i)
Goodput calculation for the i-th flow based on the bytes sent.
std::string m_testName
Flent test name.
Address m_hostAddress
Host address.
Address m_localBindAddress
Local bind address.
void TraceReceivedPing(uint16_t seq, Time rtt)
Ping RTT Trace function.
std::array< Ptr< PacketSink >, 4 > m_packetSinkDown
PacketSink Applications for Download flows (tcp_download, rrul tests).
std::string m_outputFilename
Output file path (see OutputFilename attribute).
void DoInitialize() override
In this method, the following tasks are performed: 1) set the host node, which is derived from the ho...
Ptr< Ping > m_ping
Ping Application for latency measurement (ping, rrul tests).
void AddMetadata()
Add Flent metadata to the output document.
Ptr< Node > GetHostNode(Ipv4Address hostAddress) const
Iterates through the node list and finds the node pointer for the given hostAddress.
void TraceReceivedPacket(std::size_t idx, Ptr< const Packet > packet, const Address &address)
sink for packet received.
void StartApplication() override
Application specific startup code.
void GoodputSamplingDownload(std::string name, int i)
Goodput calculation for the i-th flow based on the bytes received.
std::array< Ptr< BulkSendApplication >, 4 > m_bulkSendDown
BulkSend Applications for Download flows (tcp_download, rrul tests).
an Inet address class
static bool IsMatchingType(const Address &address)
Ipv4Address GetIpv4() const
static InetSocketAddress ConvertFrom(const Address &address)
Returns an InetSocketAddress which corresponds to the input Address.
Ipv4 addresses are stored in host order in this class.
static Ipv4Address ConvertFrom(const Address &address)
static bool IsMatchingType(const Address &address)
static Ipv4Address GetAny()
a class to store IPv4 address information on an interface
Ipv4Address GetAddress() const
Get the local address.
Implement the IPv4 layer.
static Iterator Begin()
Definition node-list.cc:226
static Iterator End()
Definition node-list.cc:233
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
Packet header to carry sequence number and two timestamps.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:580
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:191
Hold variables of type string.
Definition string.h:45
Simulation virtual time values and global simulation resolution.
Definition nstime.h:95
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition nstime.h:398
a unique identifier for an interface.
Definition type-id.h:50
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1003
Hold an unsigned integer type.
Definition uinteger.h:34
uint16_t port
Definition dsdv-manet.cc:33
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition callback.h:690
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:201
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:267
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:627
Ptr< T > CreateObjectWithAttributes(Args... args)
Allocate an Object on the heap and initialize with a set of attributes.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1313
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1330
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition boolean.cc:113
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Definition nstime.h:1416
Ptr< const AttributeChecker > MakeAddressChecker()
Definition address.cc:167
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition ptr.h:643
Ptr< const AttributeChecker > MakeStringChecker()
Definition string.cc:19
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
Definition string.h:46
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition boolean.h:70
Ptr< const AttributeAccessor > MakeAddressAccessor(T1 a1)
Definition address.h:329
constexpr uint16_t DEFAULT_PORT
Default base port used by the FlentApplication to configure and bind remote peer sinks.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
Definition nstime.h:1436
STL namespace.
uint8_t data[writeSize]
Flent output document, in JSON format.
nlohmann::json json
Flent output document.
uint32_t prev
static const uint32_t packetSize
Packet size generated at the AP.