98 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkErrorModel", EnumValue(em));
99 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkErrorModel", EnumValue(em));
105 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
106 BooleanValue(
false));
107 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_ConstantAssignmentProvided",
108 BooleanValue(
false));
109 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_ConstantAssignmentProvided",
110 BooleanValue(
false));
111 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
113 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_RbdcAllowed",
114 BooleanValue(
false));
115 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_RbdcAllowed",
116 BooleanValue(
false));
117 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_RbdcAllowed",
118 BooleanValue(
false));
119 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
120 BooleanValue(
false));
121 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_VolumeAllowed",
122 BooleanValue(
false));
123 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_VolumeAllowed",
124 BooleanValue(
false));
125 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_VolumeAllowed",
126 BooleanValue(
false));
127 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
128 BooleanValue(
false));
131 Ptr<SatHelper> helper = CreateObject<SatHelper>(
137 NodeContainer gwUsers = Singleton<SatTopology>::Get()->GetGwUserNodes();
142 CbrHelper cbr(
"ns3::UdpSocketFactory",
143 Address(InetSocketAddress(helper->GetUserAddress(gwUsers.Get(0)), port)));
144 cbr.SetAttribute(
"Interval", StringValue(
"1s"));
146 ApplicationContainer utApps = cbr.Install(Singleton<SatTopology>::Get()->GetUtUserNodes());
147 utApps.Start(Seconds(1.0));
148 utApps.Stop(Seconds(2.1));
151 PacketSinkHelper sink(
"ns3::UdpSocketFactory",
152 Address(InetSocketAddress(helper->GetUserAddress(gwUsers.Get(0)), port)));
154 ApplicationContainer gwApps = sink.Install(gwUsers);
155 gwApps.Start(Seconds(1.0));
156 gwApps.Stop(Seconds(3.0));
158 Simulator::Stop(Seconds(11));
161 Simulator::Destroy();
163 Ptr<PacketSink> receiver = DynamicCast<PacketSink>(gwApps.Get(0));
164 Ptr<CbrApplication> sender = DynamicCast<CbrApplication>(utApps.Get(0));
169 NS_TEST_ASSERT_MSG_NE(sender->GetSent(), (uint32_t)0,
"Nothing sent !");
170 NS_TEST_ASSERT_MSG_EQ(receiver->GetTotalRx(), sender->GetSent(),
"Packets were lost !");