Loading...
Searching...
No Matches
satellite-stats-delay-helper.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2014 Magister Solutions
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Budiarto Herman <budiarto.herman@magister.fi>
19 *
20 */
21
22#ifndef SATELLITE_STATS_DELAY_HELPER_H
23#define SATELLITE_STATS_DELAY_HELPER_H
24
26
27#include "ns3/address.h"
28#include "ns3/collector-map.h"
29#include "ns3/ptr.h"
30
31#include <list>
32#include <map>
33#include <utility>
34
35namespace ns3
36{
37
38// BASE CLASS /////////////////////////////////////////////////////////////////
39
40class SatHelper;
41class Node;
42class Time;
43class DataCollectionObject;
44class DistributionCollector;
45
51{
52 public:
53 // inherited from SatStatsHelper base class
54 SatStatsDelayHelper(Ptr<const SatHelper> satHelper);
55
59 virtual ~SatStatsDelayHelper();
60
64 static TypeId GetTypeId();
65
69 void SetAveragingMode(bool averagingMode);
70
74 bool GetAveragingMode() const;
75
80 void InstallProbes();
81
91 void RxDelayCallback(const Time& delay, const Address& from);
92
93 protected:
94 // inherited from SatStatsHelper base class
95 void DoInstall();
96
100 virtual void DoInstallProbes() = 0;
101
107 bool ConnectProbeToCollector(Ptr<Probe> probe, uint32_t identifier);
108
114 bool DisconnectProbeFromCollector(Ptr<Probe> probe, uint32_t identifier);
115
122 void PassSampleToCollector(const Time& delay, uint32_t identifier);
123
126
128 Ptr<DistributionCollector> m_averagingCollector;
129
131 Ptr<DataCollectionObject> m_aggregator;
132
133 private:
135
136}; // end of class SatStatsDelayHelper
137
138// FORWARD LINK APPLICATION-LEVEL /////////////////////////////////////////////
139
140class Probe;
141
160{
161 public:
162 // inherited from SatStatsHelper base class
163 SatStatsFwdAppDelayHelper(Ptr<const SatHelper> satHelper);
164
169
173 static TypeId GetTypeId();
174
184 static void RxCallback(Ptr<SatStatsFwdAppDelayHelper> helper,
185 uint32_t identifier,
186 Ptr<const Packet> packet,
187 const Address& from);
188
192 virtual void UpdateIdentifierOnProbes();
193
194 protected:
195 // inherited from SatStatsDelayHelper base class
196 void DoInstallProbes();
197
198 private:
200 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
201
202}; // end of class SatStatsFwdAppDelayHelper
203
204// FORWARD LINK DEVICE-LEVEL /////////////////////////////////////////////////////
205
224{
225 public:
226 // inherited from SatStatsHelper base class
227 SatStatsFwdDevDelayHelper(Ptr<const SatHelper> satHelper);
228
233
237 static TypeId GetTypeId();
238
242 virtual void UpdateIdentifierOnProbes();
243
244 protected:
245 // inherited from SatStatsDelayHelper base class
246 void DoInstallProbes();
247
248 private:
250 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
251
252}; // end of class SatStatsFwdDevDelayHelper
253
254// FORWARD LINK MAC-LEVEL /////////////////////////////////////////////////////
255
274{
275 public:
276 // inherited from SatStatsHelper base class
277 SatStatsFwdMacDelayHelper(Ptr<const SatHelper> satHelper);
278
283
287 static TypeId GetTypeId();
288
292 virtual void UpdateIdentifierOnProbes();
293
294 protected:
295 // inherited from SatStatsDelayHelper base class
296 void DoInstallProbes();
297
298 private:
300 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
301
302}; // end of class SatStatsFwdMacDelayHelper
303
304// FORWARD LINK PHY-LEVEL /////////////////////////////////////////////////////
305
324{
325 public:
326 // inherited from SatStatsHelper base class
327 SatStatsFwdPhyDelayHelper(Ptr<const SatHelper> satHelper);
328
333
337 static TypeId GetTypeId();
338
342 virtual void UpdateIdentifierOnProbes();
343
344 protected:
345 // inherited from SatStatsDelayHelper base class
346 void DoInstallProbes();
347
348 private:
350 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>> m_probes;
351
352}; // end of class SatStatsFwdPhyDelayHelper
353
354// RETURN LINK APPLICATION-LEVEL //////////////////////////////////////////////
355
374{
375 public:
376 // inherited from SatStatsHelper base class
377 SatStatsRtnAppDelayHelper(Ptr<const SatHelper> satHelper);
378
383
387 static TypeId GetTypeId();
388
396 void RxCallback(Ptr<const Packet> packet, const Address& from);
397
404 void Ipv4Callback(const Time& delay, const Address& from);
405
406 protected:
407 // inherited from SatStatsDelayHelper base class
408 void DoInstallProbes();
409
410 private:
419 void SaveIpv4AddressAndIdentifier(Ptr<Node> utUserNode);
420
422
423}; // end of class SatStatsRtnAppDelayHelper
424
425// RETURN LINK DEVICE-LEVEL //////////////////////////////////////////////
426
445{
446 public:
447 // inherited from SatStatsHelper base class
448 SatStatsRtnDevDelayHelper(Ptr<const SatHelper> satHelper);
449
454
458 static TypeId GetTypeId();
459
460 protected:
461 // inherited from SatStatsDelayHelper base class
462 void DoInstallProbes();
463
464}; // end of class SatStatsRtnDevDelayHelper
465
466// RETURN LINK MAC-LEVEL //////////////////////////////////////////////
467
486{
487 public:
488 // inherited from SatStatsHelper base class
489 SatStatsRtnMacDelayHelper(Ptr<const SatHelper> satHelper);
490
495
499 static TypeId GetTypeId();
500
501 protected:
502 // inherited from SatStatsDelayHelper base class
503 void DoInstallProbes();
504
505}; // end of class SatStatsRtnMacDelayHelper
506
507// RETURN LINK PHY-LEVEL //////////////////////////////////////////////
508
527{
528 public:
529 // inherited from SatStatsHelper base class
530 SatStatsRtnPhyDelayHelper(Ptr<const SatHelper> satHelper);
531
536
540 static TypeId GetTypeId();
541
542 protected:
543 // inherited from SatStatsDelayHelper base class
544 void DoInstallProbes();
545
546}; // end of class SatStatsRtnPhyDelayHelper
547
548} // end of namespace ns3
549
550#endif /* SATELLITE_STATS_DELAY_HELPER_H */
Build a satellite network set with needed objects and configuration.
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
void InstallProbes()
Set up several probes or other means of listeners and connect them to the collectors.
void SetAveragingMode(bool averagingMode)
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
void RxDelayCallback(const Time &delay, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
virtual void DoInstallProbes()=0
void PassSampleToCollector(const Time &delay, uint32_t identifier)
Find a collector with the right identifier and pass a sample data to it.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
bool m_averagingMode
AveragingMode attribute.
Ptr< DistributionCollector > m_averagingCollector
The final collector utilized in averaged output (histogram, PDF, and CDF).
bool DisconnectProbeFromCollector(Ptr< Probe > probe, uint32_t identifier)
Disconnect the probe from the right collector.
SatStatsDelayHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsDelayHelper()
/ Destructor.
bool ConnectProbeToCollector(Ptr< Probe > probe, uint32_t identifier)
Connect the probe to the right collector.
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
static void RxCallback(Ptr< SatStatsFwdAppDelayHelper > helper, uint32_t identifier, Ptr< const Packet > packet, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
SatStatsFwdAppDelayHelper(Ptr< const SatHelper > satHelper)
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual ~SatStatsFwdAppDelayHelper()
Destructor for SatStatsFwdAppDelayHelper.
SatStatsFwdDevDelayHelper(Ptr< const SatHelper > satHelper)
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
static TypeId GetTypeId()
inherited from ObjectBase base class
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
SatStatsFwdMacDelayHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdPhyDelayHelper(Ptr< const SatHelper > satHelper)
SatStatsHelper(Ptr< const SatHelper > satHelper)
Creates a new helper instance.
static TypeId GetTypeId()
inherited from ObjectBase base class
void Ipv4Callback(const Time &delay, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
void RxCallback(Ptr< const Packet > packet, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
SatStatsRtnAppDelayHelper(Ptr< const SatHelper > satHelper)
void SaveIpv4AddressAndIdentifier(Ptr< Node > utUserNode)
Save the IPv4 address and the proper identifier from the given UT user node.
SatStatsRtnDevDelayHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnMacDelayHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnPhyDelayHelper(Ptr< const SatHelper > satHelper)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.