satellite-on-off-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 Ltd
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: Sami Rantanen <sami.rantanen@magister.fi>
19  */
20 #ifndef SATELLITE_ON_OFF_HELPER_H
21 #define SATELLITE_ON_OFF_HELPER_H
22 
23 #include "ns3/address.h"
24 #include "ns3/application-container.h"
25 #include "ns3/attribute.h"
26 #include "ns3/node-container.h"
27 #include "ns3/object-factory.h"
28 #include "ns3/satellite-on-off-application.h"
29 
30 #include <stdint.h>
31 #include <string>
32 
33 namespace ns3
34 {
35 
36 class DataRate;
37 
44 {
45  public:
55  SatOnOffHelper(std::string protocol, Address address);
56 
63  void SetAttribute(std::string name, const AttributeValue& value);
64 
73  void SetConstantRate(DataRate dataRate, uint32_t packetSize = 512);
74 
83  ApplicationContainer Install(NodeContainer c) const;
84 
92  ApplicationContainer Install(Ptr<Node> node) const;
93 
94  private:
102  Ptr<Application> InstallPriv(Ptr<Node> node) const;
103 
104  ObjectFactory m_factory;
105 };
106 
107 } // namespace ns3
108 
109 #endif /* SAT_ON_OFF_HELPER_H */
A helper to make it easier to instantiate an ns3::SatOnOffApplication on a set of nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::SatOnOffApplication on each node of the input container configured with all the attri...
SatOnOffHelper(std::string protocol, Address address)
Create an SatOnOffHelper to make it easier to work with SatOnOffApplications.
ObjectFactory m_factory
Object factory.
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
void SetConstantRate(DataRate dataRate, uint32_t packetSize=512)
Helper function to set a constant rate source.
Ptr< Application > InstallPriv(Ptr< Node > node) const
Install an ns3::SatOnOffApplication on the node configured with all the attributes set with SetAttrib...
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.