A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
sink-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
3
4
/*
5
* Copyright (c) 2020 DLTLT
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License version 2 as
9
* published by the Free Software Foundation;
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
* Corresponding author: Niki Hrovatin <niki.hrovatin@famnit.upr.si>
21
*/
22
23
24
#ifndef SINK_HELPER_H
25
#define SINK_HELPER_H
26
27
#include "ns3/sink.h"
28
29
#include "ns3/log.h"
30
#include "ns3/config.h"
31
#include "ns3/trace-helper.h"
32
#include "ns3/inet-socket-address.h"
33
#include "ns3/packet-socket-address.h"
34
#include "ns3/string.h"
35
#include "ns3/names.h"
36
#include <stdint.h>
37
#include <string>
38
#include "ns3/uinteger.h"
39
#include "ns3/object-factory.h"
40
#include "ns3/address.h"
41
#include "ns3/attribute.h"
42
#include "ns3/attribute-helper.h"
43
#include "ns3/net-device.h"
44
#include "ns3/node-container.h"
45
#include "ns3/application-container.h"
46
#include "ns3/application.h"
47
#include "ns3/outputmanager.h"
48
#include "ns3/onionvalidator.h"
49
50
namespace
ns3
{
51
66
class
SinkHelper
:
public
Object
67
{
68
public
:
73
static
TypeId
GetTypeId
(
void
);
74
80
SinkHelper
();
81
87
SinkHelper
(uint16_t numnodes, Ptr<OutputManager> outputManager,
88
Ptr<OnionValidator> onionValidator, uint16_t *m_onionPathLengths);
89
95
~SinkHelper
();
96
103
void
SetAttribute
(std::string name,
const
AttributeValue &value);
104
105
/*
106
* Install an ns3::Sink application on the node configured with all the attributes set with SetAttribute.
107
* \param NodeContainer
108
* \returns ApplicationContainer
109
*
110
*/
111
112
ApplicationContainer
Install
(NodeContainer c)
const
;
113
114
/*
115
*Install an ns3::SensorNode application on the node configured with all the attributes set with SetAttribute.
116
* \param node, the node on which an Sink will be installed
117
* \returns Ptr to the installed application
118
*/
119
120
Ptr<Application>
InstallPriv
(Ptr<Node> node)
const
;
121
122
private
:
123
uint16_t
m_numnodes
;
124
ObjectFactory
m_factory
;
125
Ptr<OutputManager>
m_outputManager
;
126
Ptr<OnionValidator>
m_onionValidator
;
127
uint16_t
128
m_onionTimeout
;
129
};
130
131
}
// namespace ns3
132
133
#endif
/* SINK_HELPER_H */
ns3
Definition:
sensornode-helper.cc:26
ns3::SinkHelper::InstallPriv
Ptr< Application > InstallPriv(Ptr< Node > node) const
Definition:
sink-helper.cc:77
ns3::SinkHelper::~SinkHelper
~SinkHelper()
Default constructor.
Definition:
sink-helper.cc:54
ns3::SinkHelper::SinkHelper
SinkHelper()
Default constructor.
Definition:
sink-helper.cc:39
ns3::SinkHelper::m_onionTimeout
uint16_t m_onionTimeout
A watchdog timer set to abort onion messagess, if the timer elepses before the onion returns back to ...
Definition:
sink-helper.h:128
ns3::SinkHelper::m_numnodes
uint16_t m_numnodes
Number of sensor nodes in the network.
Definition:
sink-helper.h:123
ns3::SinkHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Setter of individual attributes.
Definition:
sink-helper.cc:59
ns3::SinkHelper::m_factory
ObjectFactory m_factory
factory object
Definition:
sink-helper.h:124
ns3::SinkHelper
Helper class for the creation of Sink applications.
Definition:
sink-helper.h:66
ns3::SinkHelper::m_outputManager
Ptr< OutputManager > m_outputManager
Manage the output of the simulation.
Definition:
sink-helper.h:125
ns3::SinkHelper::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
sink-helper.cc:32
ns3::SinkHelper::m_onionValidator
Ptr< OnionValidator > m_onionValidator
Manage onions and when to abort them.
Definition:
sink-helper.h:126
ns3::SinkHelper::Install
ApplicationContainer Install(NodeContainer c) const
Definition:
sink-helper.cc:65
src
onion_routing_wsn
helper
sink-helper.h
Generated on Mon Feb 7 2022 13:31:58 for ns-3 by
1.8.17