23 #ifndef SAT_USER_HELPER_H
24 #define SAT_USER_HELPER_H
26 #include "ns3/csma-helper.h"
27 #include "ns3/ipv4-address-helper.h"
28 #include "ns3/node-container.h"
29 #include "ns3/satellite-enums.h"
30 #include "ns3/traced-callback.h"
40 class PropagationDelayModel;
100 std::string name1 =
"",
101 const AttributeValue& value1 = EmptyAttributeValue(),
102 std::string name2 =
"",
103 const AttributeValue& value2 = EmptyAttributeValue(),
104 std::string name3 =
"",
105 const AttributeValue& value3 = EmptyAttributeValue(),
106 std::string name4 =
"",
107 const AttributeValue& value4 = EmptyAttributeValue());
145 const Ipv4Mask& mask,
146 Ipv4Address base =
"0.0.0.1");
160 const Ipv4Mask& mask,
161 Ipv4Address base =
"0.0.0.1");
175 const Ipv4Mask& mask,
176 Ipv4Address base =
"0.0.0.1");
189 NodeContainer
InstallUt(NodeContainer ut, uint32_t users);
202 NodeContainer
InstallUt(Ptr<Node> ut, uint32_t users);
222 bool IsGwUser(Ptr<Node> node)
const;
252 NetDeviceContainer utNd,
254 Ptr<NetDevice> gwNd);
273 void UpdateGwRoutes(Address ut, Address oldGateway, Address newGateway);
ChannelType_t
Types of channel.
Build a set of user nodes and links channels between user nodes and satellite nodes.
std::map< Ptr< Node >, NodeContainer > UtUsersContainer_t
Define UT user container.
Callback< Ptr< PropagationDelayModel >, uint32_t, uint32_t, SatEnums::ChannelType_t > PropagationDelayCallback
Ipv4AddressHelper m_ipv4Gw
void InstallGw(uint32_t users)
void SetCsmaDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each CsmaNetDevice object created by the helper.
NetworkType m_subscriberNetworkType
std::map< Address, Ptr< NetDevice > > m_utDevices
Container of UT SatNetDevice accessible by MAC address.
void UpdateGwRoutes(Address ut, Address oldGateway, Address newGateway)
Update ARP cache and default route on the terrestrial network so packets are properly routed to the U...
void SetBeamBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
NetDeviceContainer InstallSatSimpleNetwork(const NodeContainer &c) const
Install satellite simple network.
static TypeId GetTypeId(void)
Derived from Object.
void InstallRouter(Ptr< Node > router)
Install IP router to to Gateways.
TracedCallback< std::string > m_creationTrace
Trace callback for creation traces.
std::map< Ptr< Node >, Ptr< Node > > m_utMap
Container of UT users and their corresponding UT.
void SetCsmaQueue(std::string type, std::string name1="", const AttributeValue &value1=EmptyAttributeValue(), std::string name2="", const AttributeValue &value2=EmptyAttributeValue(), std::string name3="", const AttributeValue &value3=EmptyAttributeValue(), std::string name4="", const AttributeValue &value4=EmptyAttributeValue())
Set the type and the attribute values to be associated with each Queue object in each CsmaNetDevice c...
std::map< Address, Ptr< SatArpCache > > m_arpCachesToGateway
Container of ARP tables to reach a gateway accessible by MAC address.
void SetCsmaChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each CsmaChannel object created by the helper.
std::string GetRouterInfo() const
Get router information.
void EnableCreationTraces(Ptr< OutputStreamWrapper > stream, CallbackBase &cb)
Enables creation traces to be written in given file.
NetDeviceContainer InstallBackboneNetwork(const NodeContainer &c) const
Install network between GW and Router (or users) or Router and its users.
void SetGwBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
Ipv4AddressHelper m_ipv4Beam
std::map< Address, Ptr< NetDevice > > m_gwDevices
Container of GW SatNetDevice accessible by MAC address.
Ptr< Node > GetRouter() const
NetworkType
Network types in user networks (subscriber or backbone)
@ NETWORK_TYPE_SAT_SIMPLE
void PopulateBeamRoutings(NodeContainer ut, NetDeviceContainer utNd, Ptr< Node > gw, Ptr< NetDevice > gwNd)
Set needed routings of satellite network and fill ARP cache for the network.
NetworkType m_backboneNetworkType
SatUserHelper::PropagationDelayCallback m_propagationDelayCallback
bool IsGwUser(Ptr< Node > node) const
Check if node is GW user or not.
TypeId GetInstanceTypeId(void) const
Derived from Object.
NodeContainer InstallUt(NodeContainer ut, uint32_t users)
void UpdateUtRoutes(Address ut, Address newGateway)
Update ARP cache and default route on an UT so packets are properly routed to the new GW as their nex...
SatUserHelper()
Create a SatUserHelper to make life easier when creating Users and their connections to satellite net...
Ipv4AddressHelper m_ipv4Ut
NetDeviceContainer InstallSubscriberNetwork(const NodeContainer &c) const
Install network between UT and its users.
void SetUtBaseAddress(const Ipv4Address &network, const Ipv4Mask &mask, Ipv4Address base="0.0.0.1")
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.