104 Config::SetDefault(
"ns3::SatUtHelper::FwdLinkErrorModel", EnumValue(em));
105 Config::SetDefault(
"ns3::SatGwHelper::RtnLinkErrorModel", EnumValue(em));
111 Config::SetDefault(
"ns3::SatBeamScheduler::ControlSlotsEnabled", BooleanValue(
true));
114 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
115 BooleanValue(
false));
116 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_ConstantAssignmentProvided",
117 BooleanValue(
false));
118 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_ConstantAssignmentProvided",
119 BooleanValue(
false));
120 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_ConstantAssignmentProvided",
121 BooleanValue(
false));
122 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_RbdcAllowed",
123 BooleanValue(
false));
124 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_RbdcAllowed",
125 BooleanValue(
false));
126 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_RbdcAllowed",
127 BooleanValue(
false));
128 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
129 BooleanValue(
false));
130 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_VolumeAllowed",
131 BooleanValue(
false));
132 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService1_VolumeAllowed",
133 BooleanValue(
false));
134 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService2_VolumeAllowed",
135 BooleanValue(
false));
136 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_VolumeAllowed",
140 Ptr<SatHelper> helper = CreateObject<SatHelper>(
146 NodeContainer gwUsers = Singleton<SatTopology>::Get()->GetGwUserNodes();
151 CbrHelper cbr(
"ns3::UdpSocketFactory",
152 Address(InetSocketAddress(helper->GetUserAddress(gwUsers.Get(0)), port)));
153 cbr.SetAttribute(
"Interval", StringValue(
"1s"));
155 ApplicationContainer utApps = cbr.Install(Singleton<SatTopology>::Get()->GetUtUserNodes());
156 utApps.Start(Seconds(1.0));
157 utApps.Stop(Seconds(2.1));
160 PacketSinkHelper sink(
"ns3::UdpSocketFactory",
161 Address(InetSocketAddress(helper->GetUserAddress(gwUsers.Get(0)), port)));
163 ApplicationContainer gwApps = sink.Install(gwUsers);
164 gwApps.Start(Seconds(1.0));
165 gwApps.Stop(Seconds(10.0));
167 Simulator::Stop(Seconds(11));
170 Simulator::Destroy();
172 Ptr<PacketSink> receiver = DynamicCast<PacketSink>(gwApps.Get(0));
173 Ptr<CbrApplication> sender = DynamicCast<CbrApplication>(utApps.Get(0));
178 NS_TEST_ASSERT_MSG_NE(sender->GetSent(), (uint32_t)0,
"Nothing sent !");
179 NS_TEST_ASSERT_MSG_EQ(receiver->GetTotalRx(), sender->GetSent(),
"Packets were lost !");