28 #include "ns3/boolean.h"
29 #include "ns3/config.h"
31 #include "ns3/mobility-helper.h"
32 #include "ns3/satellite-env-variables.h"
33 #include "ns3/satellite-mobility-model.h"
34 #include "ns3/satellite-position-allocator.h"
35 #include "ns3/simulator.h"
36 #include "ns3/singleton.h"
37 #include "ns3/string.h"
39 #include <ns3/cbr-application.h>
40 #include <ns3/cbr-helper.h>
42 #include <ns3/lora-periodic-sender.h>
43 #include <ns3/lorawan-mac-header.h>
44 #include <ns3/packet-sink-helper.h>
45 #include <ns3/packet-sink.h>
46 #include <ns3/satellite-enums.h>
47 #include <ns3/satellite-helper.h>
48 #include <ns3/satellite-lora-conf.h>
49 #include <ns3/satellite-lorawan-net-device.h>
50 #include <ns3/satellite-topology.h>
51 #include <ns3/simulation-helper.h>
52 #include <ns3/uinteger.h>
75 virtual void DoRun(
void);
76 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
86 : TestCase(
"Test regenerative satellite lorawan with acks sent in first window."),
87 m_gwReceiveDate(Seconds(0)),
88 m_edReceiveDate(Seconds(0))
98 Ptr<const Packet> packet,
99 const Address& address)
116 Singleton<SatEnvVariables>::Get()->DoInitialize();
117 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-sat-lora-regenerative",
122 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
123 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
124 EnumValue(LorawanMacHeader::CONFIRMED_DATA_UP));
125 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
128 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
129 EnumValue(SatEnums::REGENERATION_NETWORK));
130 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
131 EnumValue(SatEnums::REGENERATION_NETWORK));
133 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
134 TimeValue(MilliSeconds(1500)));
135 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
136 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
137 TimeValue(MilliSeconds(400)));
138 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
139 TimeValue(MilliSeconds(500)));
140 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay", TimeValue(Seconds(1)));
141 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
144 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
145 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
146 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
147 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
148 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
149 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
153 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
154 BooleanValue(
false));
155 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
156 BooleanValue(
false));
159 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
160 EnumValue(SatPhyRxCarrierConf::EM_AVI));
161 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
162 EnumValue(SatPhyRxCarrierConf::EM_AVI));
163 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
164 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
165 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
166 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
167 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
168 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
171 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
172 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
173 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
174 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
176 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
179 Ptr<SatHelper> helper = CreateObject<SatHelper>(
180 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E-lora");
181 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
184 Ptr<Node> utNode = Singleton<SatTopology>::Get()->GetUtNode(0);
185 Ptr<LoraPeriodicSender> app = Create<LoraPeriodicSender>();
187 app->SetInterval(Seconds(10));
189 app->SetStartTime(Seconds(1.0));
190 app->SetStopTime(Seconds(10.0));
191 app->SetPacketSize(24);
193 app->SetNode(utNode);
194 utNode->AddApplication(app);
196 Ptr<SatOrbiterNetDevice> orbiterNetDevice = DynamicCast<SatOrbiterNetDevice>(
197 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
198 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
201 Config::Connect(
"/NodeList/*/DeviceList/*/SatMac/Rx",
203 Config::Connect(
"/NodeList/*/DeviceList/*/FeederMac/*/Rx",
206 Simulator::Stop(Seconds(10));
209 Simulator::Destroy();
211 Singleton<SatEnvVariables>::Get()->DoDispose();
213 NS_TEST_ASSERT_MSG_NE(
m_gwReceiveDate, Seconds(0),
"Packet should be received by Gateway.");
214 NS_TEST_ASSERT_MSG_NE(
m_edReceiveDate, Seconds(0),
"Ack should be received by End Device.");
218 Time delay = MilliSeconds(130);
220 NS_TEST_ASSERT_MSG_GT(difference, Seconds(1) + delay,
"Ack arrived too early.");
221 NS_TEST_ASSERT_MSG_LT(difference + delay,
222 MilliSeconds(1900) + delay,
223 "Ack arrived too late. First window should be closed.");
242 virtual void DoRun(
void);
243 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
253 : TestCase(
"Test regenerative satellite lorawan with acks sent in second window."),
254 m_gwReceiveDate(Seconds(0)),
255 m_edReceiveDate(Seconds(0))
265 Ptr<const Packet> packet,
266 const Address& address)
283 Singleton<SatEnvVariables>::Get()->DoInitialize();
284 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-sat-lora-regenerative",
289 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
290 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
291 EnumValue(LorawanMacHeader::CONFIRMED_DATA_UP));
292 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
295 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
296 EnumValue(SatEnums::REGENERATION_NETWORK));
297 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
298 EnumValue(SatEnums::REGENERATION_NETWORK));
300 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
301 TimeValue(MilliSeconds(1500)));
302 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
303 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
304 TimeValue(MilliSeconds(400)));
305 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
306 TimeValue(MilliSeconds(500)));
309 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay",
310 TimeValue(Seconds(1) + MilliSeconds(500)));
311 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
314 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
315 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
316 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
317 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
318 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
319 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
323 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
324 BooleanValue(
false));
325 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
326 BooleanValue(
false));
329 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
330 EnumValue(SatPhyRxCarrierConf::EM_AVI));
331 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
332 EnumValue(SatPhyRxCarrierConf::EM_AVI));
333 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
334 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
335 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
336 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
337 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
338 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
341 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
342 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
343 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
344 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
346 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
349 Ptr<SatHelper> helper = CreateObject<SatHelper>(
350 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E-lora");
351 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
354 Ptr<Node> utNode = Singleton<SatTopology>::Get()->GetUtNode(0);
355 Ptr<LoraPeriodicSender> app = Create<LoraPeriodicSender>();
357 app->SetInterval(Seconds(10));
359 app->SetStartTime(Seconds(1.0));
360 app->SetStopTime(Seconds(10.0));
361 app->SetPacketSize(24);
363 app->SetNode(utNode);
364 utNode->AddApplication(app);
366 Ptr<SatOrbiterNetDevice> orbiterNetDevice = DynamicCast<SatOrbiterNetDevice>(
367 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
368 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
371 Config::Connect(
"/NodeList/*/DeviceList/*/SatMac/Rx",
373 Config::Connect(
"/NodeList/*/DeviceList/*/FeederMac/*/Rx",
376 Simulator::Stop(Seconds(10));
379 Simulator::Destroy();
381 Singleton<SatEnvVariables>::Get()->DoDispose();
382 NS_TEST_ASSERT_MSG_NE(
m_gwReceiveDate, Seconds(0),
"Packet should be received by Gateway.");
383 NS_TEST_ASSERT_MSG_NE(
m_edReceiveDate, Seconds(0),
"Ack should be received by End Device.");
387 Time delay = MilliSeconds(130);
389 NS_TEST_ASSERT_MSG_GT(difference, Seconds(1.5) + delay,
"Ack arrived too early.");
390 NS_TEST_ASSERT_MSG_LT(difference + delay,
391 MilliSeconds(2400) + delay,
392 "Ack arrived too late. Second window should be closed.");
410 virtual void DoRun(
void);
411 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
412 void PhyTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
425 : TestCase(
"Test regenerative satellite lorawan with acks sent out of reception windows."),
426 m_edReceiveDate(Seconds(0)),
427 m_phyGwReceive(false),
428 m_phyEdReceive(false)
438 Ptr<const Packet> packet,
439 const Address& address)
454 Ptr<const Packet> packet,
455 const Address& address)
472 Singleton<SatEnvVariables>::Get()->DoInitialize();
473 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-sat-lora-regenerative",
478 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
479 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
480 EnumValue(LorawanMacHeader::CONFIRMED_DATA_UP));
481 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
484 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
485 EnumValue(SatEnums::REGENERATION_NETWORK));
486 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
487 EnumValue(SatEnums::REGENERATION_NETWORK));
489 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
490 TimeValue(MilliSeconds(1500)));
491 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
492 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
493 TimeValue(MilliSeconds(400)));
494 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
495 TimeValue(MilliSeconds(500)));
497 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay",
498 TimeValue(Seconds(0.1)));
499 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
502 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
503 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
504 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
505 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
506 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
507 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
511 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
512 BooleanValue(
false));
513 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
514 BooleanValue(
false));
517 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
518 EnumValue(SatPhyRxCarrierConf::EM_AVI));
519 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
520 EnumValue(SatPhyRxCarrierConf::EM_AVI));
521 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
522 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
523 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
524 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
525 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
526 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
529 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
530 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
531 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
532 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
534 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
535 Config::SetDefault(
"ns3::SatPhy::EnableStatisticsTags", BooleanValue(
true));
538 Ptr<SatHelper> helper = CreateObject<SatHelper>(
539 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E-lora");
540 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
543 Ptr<Node> utNode = Singleton<SatTopology>::Get()->GetUtNode(0);
544 Ptr<LoraPeriodicSender> app = Create<LoraPeriodicSender>();
546 app->SetInterval(Seconds(10));
548 app->SetStartTime(Seconds(1.0));
549 app->SetStopTime(Seconds(10.0));
550 app->SetPacketSize(24);
552 app->SetNode(utNode);
553 utNode->AddApplication(app);
555 Ptr<SatOrbiterNetDevice> orbiterNetDevice = DynamicCast<SatOrbiterNetDevice>(
556 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
557 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
560 Config::Connect(
"/NodeList/*/DeviceList/*/SatMac/Rx",
562 Config::Connect(
"/NodeList/*/DeviceList/*/FeederMac/*/Rx",
564 Config::Connect(
"/NodeList/*/DeviceList/*/SatPhy/Rx",
566 Config::Connect(
"/NodeList/*/DeviceList/*/FeederPhy/*/Rx",
568 Config::Connect(
"/NodeList/*/DeviceList/*/UserPhy/*/Rx",
571 Simulator::Stop(Seconds(10));
574 Simulator::Destroy();
576 Singleton<SatEnvVariables>::Get()->DoDispose();
580 "GW should receive a packet and the first retransmission.");
581 NS_TEST_ASSERT_MSG_EQ(
m_edReceiveDate, Seconds(0),
"No ack should be received by End Device.");
585 "Phy layer should trace traffic from End Device to Gateway.");
588 "Phy layer should not trace traffic from Gateway to End Device, as phy "
589 "layer is in SLEEP state.");
608 virtual void DoRun(
void);
609 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
610 void PhyTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
621 : TestCase(
"Test regenerative satellite lorawan with acks sent out of reception windows and no "
622 "retransmission needed."),
623 m_edReceiveDate(Seconds(0))
634 Ptr<const Packet> packet,
635 const Address& address)
652 Singleton<SatEnvVariables>::Get()->DoInitialize();
653 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-sat-lora-regenerative",
658 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
659 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
660 EnumValue(LorawanMacHeader::UNCONFIRMED_DATA_UP));
661 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
664 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
665 EnumValue(SatEnums::REGENERATION_NETWORK));
666 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
667 EnumValue(SatEnums::REGENERATION_NETWORK));
669 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
670 TimeValue(MilliSeconds(1500)));
671 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
672 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
673 TimeValue(MilliSeconds(400)));
674 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
675 TimeValue(MilliSeconds(500)));
677 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay",
678 TimeValue(Seconds(0.1)));
679 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
682 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
683 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
684 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
685 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
686 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
687 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
691 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
692 BooleanValue(
false));
693 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
694 BooleanValue(
false));
697 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
698 EnumValue(SatPhyRxCarrierConf::EM_AVI));
699 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
700 EnumValue(SatPhyRxCarrierConf::EM_AVI));
701 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
702 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
703 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
704 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
705 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
706 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
709 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
710 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
711 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
712 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
714 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
715 Config::SetDefault(
"ns3::SatPhy::EnableStatisticsTags", BooleanValue(
true));
718 Ptr<SatHelper> helper = CreateObject<SatHelper>(
719 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E-lora");
720 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
723 Ptr<Node> utNode = Singleton<SatTopology>::Get()->GetUtNode(0);
724 Ptr<LoraPeriodicSender> app = Create<LoraPeriodicSender>();
726 app->SetInterval(Seconds(10));
728 app->SetStartTime(Seconds(1.0));
729 app->SetStopTime(Seconds(10.0));
730 app->SetPacketSize(24);
732 app->SetNode(utNode);
733 utNode->AddApplication(app);
735 Ptr<SatOrbiterNetDevice> orbiterNetDevice = DynamicCast<SatOrbiterNetDevice>(
736 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
737 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
741 "/NodeList/*/DeviceList/*/SatMac/Rx",
745 "/NodeList/*/DeviceList/*/FeederMac/*/Rx",
749 Simulator::Stop(Seconds(10));
752 Simulator::Destroy();
754 Singleton<SatEnvVariables>::Get()->DoDispose();
758 "GW should receive a packet but no retransmission.");
759 NS_TEST_ASSERT_MSG_EQ(
m_edReceiveDate, Seconds(0),
"No ack should be received by End Device.");
777 virtual void DoRun(
void);
778 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
788 : TestCase(
"Test regenerativesatellite lorawan with CBR traffic."),
789 m_edReceiveDate(Seconds(0))
799 Ptr<const Packet> packet,
800 const Address& address)
817 Singleton<SatEnvVariables>::Get()->DoInitialize();
818 Singleton<SatEnvVariables>::Get()->SetOutputVariables(
"test-sat-lora-regenerative",
823 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
824 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
825 EnumValue(LorawanMacHeader::CONFIRMED_DATA_UP));
826 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
829 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
830 EnumValue(SatEnums::REGENERATION_NETWORK));
831 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
832 EnumValue(SatEnums::REGENERATION_NETWORK));
834 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
835 TimeValue(MilliSeconds(1500)));
836 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
837 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
838 TimeValue(MilliSeconds(450)));
839 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
840 TimeValue(MilliSeconds(500)));
841 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay", TimeValue(Seconds(1)));
842 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
845 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
846 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
847 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
848 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
849 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
850 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
854 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
855 BooleanValue(
false));
856 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
857 BooleanValue(
false));
860 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
861 EnumValue(SatPhyRxCarrierConf::EM_AVI));
862 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
863 EnumValue(SatPhyRxCarrierConf::EM_AVI));
864 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
865 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
866 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
867 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
868 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
869 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
872 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
873 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
874 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
875 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
877 Config::SetDefault(
"ns3::CbrApplication::Interval", StringValue(
"10s"));
878 Config::SetDefault(
"ns3::CbrApplication::PacketSize", UintegerValue(24));
880 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
883 Ptr<SatHelper> helper = CreateObject<SatHelper>(
884 Singleton<SatEnvVariables>::Get()->LocateDataDirectory() +
"/scenarios/geo-33E-lora");
885 helper->CreatePredefinedScenario(SatHelper::SIMPLE);
887 NodeContainer utUsers = Singleton<SatTopology>::Get()->GetUtUserNodes();
888 NodeContainer gwUsers = Singleton<SatTopology>::Get()->GetGwUserNodes();
889 InetSocketAddress gwUserAddr = InetSocketAddress(helper->GetUserAddress(gwUsers.Get(0)), 9);
891 PacketSinkHelper sinkHelper(
"ns3::UdpSocketFactory", Address());
892 CbrHelper cbrHelper(
"ns3::UdpSocketFactory", Address());
893 ApplicationContainer sinkContainer;
894 ApplicationContainer cbrContainer;
896 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
897 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(0)));
899 cbrHelper.SetAttribute(
"Remote", AddressValue(Address(gwUserAddr)));
901 auto app = cbrHelper.Install(utUsers.Get(0)).Get(0);
902 app->SetStartTime(Seconds(1));
903 cbrContainer.Add(app);
905 sinkContainer.Start(Seconds(1));
906 sinkContainer.Stop(Seconds(20));
908 Ptr<SatOrbiterNetDevice> orbiterNetDevice = DynamicCast<SatOrbiterNetDevice>(
909 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
910 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
913 Ptr<PacketSink> receiver = DynamicCast<PacketSink>(sinkContainer.Get(0));
915 Config::Connect(
"/NodeList/*/DeviceList/*/SatMac/Rx",
917 Config::Connect(
"/NodeList/*/DeviceList/*/FeederMac/*/Rx",
920 Simulator::Stop(Seconds(20));
923 Simulator::Destroy();
925 Singleton<SatEnvVariables>::Get()->DoDispose();
927 NS_TEST_ASSERT_MSG_NE(
m_gwReceiveDate, Seconds(0),
"Packet should be received by Gateway.");
928 NS_TEST_ASSERT_MSG_NE(
m_edReceiveDate, Seconds(0),
"Ack should be received by End Device.");
932 Time delay = MilliSeconds(130);
934 NS_TEST_ASSERT_MSG_GT(difference, Seconds(1) + delay,
"Ack arrived too early.");
935 NS_TEST_ASSERT_MSG_LT(difference + delay,
936 MilliSeconds(1900) + delay,
937 "Ack arrived too late. First window should be closed.");
939 NS_TEST_ASSERT_MSG_EQ(receiver->GetTotalRx(), 24,
"Sink should receive one packet of 24 bytes");
959 virtual void DoRun(
void);
960 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
970 : TestCase(
"Test constellation satellite lorawan with acks sent in first window."),
971 m_gwReceiveDate(Seconds(0)),
972 m_edReceiveDate(Seconds(0))
982 Ptr<const Packet> packet,
983 const Address& address)
1000 Singleton<SatEnvVariables>::Get()->DoInitialize();
1002 Ptr<SimulationHelper> simulationHelper =
1003 CreateObject<SimulationHelper>(
"test-sat-lora-regenerative/constellation-first-window");
1006 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
1007 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
1008 EnumValue(LorawanMacHeader::CONFIRMED_DATA_UP));
1009 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
1012 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
1013 EnumValue(SatEnums::REGENERATION_NETWORK));
1014 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
1015 EnumValue(SatEnums::REGENERATION_NETWORK));
1017 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
1018 TimeValue(MilliSeconds(1500)));
1019 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
1020 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
1021 TimeValue(MilliSeconds(400)));
1022 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
1023 TimeValue(MilliSeconds(500)));
1024 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay", TimeValue(Seconds(1)));
1025 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
1028 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
1029 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
1030 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
1031 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
1032 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
1033 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
1034 DoubleValue(15000));
1037 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
1038 BooleanValue(
false));
1039 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
1040 BooleanValue(
false));
1043 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
1044 EnumValue(SatPhyRxCarrierConf::EM_AVI));
1045 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
1046 EnumValue(SatPhyRxCarrierConf::EM_AVI));
1047 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
1048 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
1049 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
1050 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
1051 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
1052 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
1055 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
1056 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
1057 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
1058 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
1060 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
1063 simulationHelper->SetSimulationTime(Seconds(15.0));
1065 simulationHelper->SetGwUserCount(1);
1066 simulationHelper->SetUtCountPerBeam(1);
1067 simulationHelper->SetUserCountPerUt(1);
1068 simulationHelper->SetBeams(
"30 43");
1070 simulationHelper->LoadScenario(
"constellation-eutelsat-geo-2-sats-isls-lora");
1072 simulationHelper->CreateSatScenario();
1075 Ptr<Node> utNode = Singleton<SatTopology>::Get()->GetUtNode(0);
1076 Ptr<LoraPeriodicSender> app = Create<LoraPeriodicSender>();
1078 app->SetInterval(Seconds(10));
1080 app->SetStartTime(Seconds(1.0));
1081 app->SetStopTime(Seconds(10.0));
1082 app->SetPacketSize(24);
1084 app->SetNode(utNode);
1085 utNode->AddApplication(app);
1087 Ptr<SatOrbiterNetDevice> orbiterNetDevice0 = DynamicCast<SatOrbiterNetDevice>(
1088 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
1089 Ptr<SatOrbiterNetDevice> orbiterNetDevice1 = DynamicCast<SatOrbiterNetDevice>(
1090 Singleton<SatTopology>::Get()->GetOrbiterNode(1)->GetDevice(0));
1091 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
1094 Config::Connect(
"/NodeList/*/DeviceList/*/SatMac/Rx",
1096 Config::Connect(
"/NodeList/*/DeviceList/*/FeederMac/*/Rx",
1099 simulationHelper->RunSimulation();
1101 Simulator::Destroy();
1103 Singleton<SatEnvVariables>::Get()->DoDispose();
1105 NS_TEST_ASSERT_MSG_NE(
m_gwReceiveDate, Seconds(0),
"Packet should be received by Gateway.");
1106 NS_TEST_ASSERT_MSG_NE(
m_edReceiveDate, Seconds(0),
"Ack should be received by End Device.");
1110 Time delay = MilliSeconds(130);
1112 NS_TEST_ASSERT_MSG_GT(difference, Seconds(1) + delay,
"Ack arrived too early.");
1113 NS_TEST_ASSERT_MSG_LT(difference + delay,
1114 MilliSeconds(1900) + delay,
1115 "Ack arrived too late. First window should be closed.");
1134 virtual void DoRun(
void);
1135 void MacTraceCb(std::string context, Ptr<const Packet> packet,
const Address& address);
1149 : TestCase(
"Test constellation satellite lorawan with handovers."),
1150 m_gwReceiveDate(Seconds(0)),
1151 m_edReceiveDate31(Seconds(0)),
1152 m_edReceiveDate40(Seconds(0)),
1153 m_edReceiveDate41(Seconds(0))
1163 Ptr<const Packet> packet,
1164 const Address& address)
1191 Singleton<SatEnvVariables>::Get()->DoInitialize();
1193 Ptr<SimulationHelper> simulationHelper =
1194 CreateObject<SimulationHelper>(
"test-sat-lora-regenerative/constellation-handover");
1197 Config::SetDefault(
"ns3::LorawanMacEndDevice::DataRate", UintegerValue(5));
1198 Config::SetDefault(
"ns3::LorawanMacEndDevice::MType",
1199 EnumValue(LorawanMacHeader::CONFIRMED_DATA_UP));
1200 Config::SetDefault(
"ns3::SatLoraConf::Standard", EnumValue(SatLoraConf::SATELLITE));
1203 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
1204 EnumValue(SatEnums::REGENERATION_NETWORK));
1205 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
1206 EnumValue(SatEnums::REGENERATION_NETWORK));
1208 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDelay",
1209 TimeValue(MilliSeconds(1000)));
1210 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDelay", TimeValue(Seconds(2)));
1211 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::FirstWindowDuration",
1212 TimeValue(MilliSeconds(900)));
1213 Config::SetDefault(
"ns3::LorawanMacEndDeviceClassA::SecondWindowDuration",
1214 TimeValue(MilliSeconds(500)));
1215 Config::SetDefault(
"ns3::LoraNetworkScheduler::FirstWindowAnswerDelay", TimeValue(Seconds(1)));
1216 Config::SetDefault(
"ns3::LoraNetworkScheduler::SecondWindowAnswerDelay", TimeValue(Seconds(2)));
1219 Config::SetDefault(
"ns3::SatConf::SuperFrameConfForSeq0",
1220 EnumValue(SatSuperframeConf::SUPER_FRAME_CONFIG_4));
1221 Config::SetDefault(
"ns3::SatSuperframeConf4::FrameConfigType",
1222 EnumValue(SatSuperframeConf::CONFIG_TYPE_4));
1223 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_AllocatedBandwidthHz", DoubleValue(15000));
1224 Config::SetDefault(
"ns3::SatSuperframeConf4::Frame0_CarrierAllocatedBandwidthHz",
1225 DoubleValue(15000));
1228 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService0_ConstantAssignmentProvided",
1229 BooleanValue(
false));
1230 Config::SetDefault(
"ns3::SatLowerLayerServiceConf::DaService3_RbdcAllowed",
1231 BooleanValue(
false));
1234 Config::SetDefault(
"ns3::SatOrbiterHelper::FwdLinkErrorModel",
1235 EnumValue(SatPhyRxCarrierConf::EM_AVI));
1236 Config::SetDefault(
"ns3::SatOrbiterHelper::RtnLinkErrorModel",
1237 EnumValue(SatPhyRxCarrierConf::EM_AVI));
1238 Config::SetDefault(
"ns3::SatBeamHelper::RandomAccessModel", EnumValue(SatEnums::RA_MODEL_ESSA));
1239 Config::SetDefault(
"ns3::SatBeamHelper::RaInterferenceEliminationModel",
1240 EnumValue(SatPhyRxCarrierConf::SIC_RESIDUAL));
1241 Config::SetDefault(
"ns3::SatBeamHelper::RaCollisionModel",
1242 EnumValue(SatPhyRxCarrierConf::RA_COLLISION_CHECK_AGAINST_SINR));
1243 Config::SetDefault(
"ns3::SatBeamHelper::ReturnLinkLinkResults", EnumValue(SatEnums::LR_LORA));
1246 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowDuration", StringValue(
"600ms"));
1247 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowStep", StringValue(
"200ms"));
1248 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::WindowSICIterations", UintegerValue(5));
1249 Config::SetDefault(
"ns3::SatPhyRxCarrierPerWindow::EnableSIC", BooleanValue(
false));
1251 Config::SetDefault(
"ns3::SatMac::EnableStatisticsTags", BooleanValue(
true));
1253 Config::SetDefault(
"ns3::SatHelper::HandoversEnabled", BooleanValue(
true));
1254 Config::SetDefault(
"ns3::SatHandoverModule::NumberClosestSats", UintegerValue(2));
1257 Ptr<SimulationHelperConf> simulationConf = CreateObject<SimulationHelperConf>();
1258 simulationHelper->SetSimulationTime(Seconds(100));
1259 simulationHelper->SetGwUserCount(1);
1260 simulationHelper->SetUserCountPerUt(1);
1261 simulationHelper->SetBeamSet({31, 40, 41, 43});
1262 simulationHelper->LoadScenario(
"constellation-leo-2-satellites-lora");
1263 simulationHelper->SetUserCountPerMobileUt(simulationConf->m_utMobileUserCount);
1264 simulationHelper->CreateSatScenario(SatHelper::NONE);
1266 Ptr<Node> utNode = Singleton<SatTopology>::Get()->GetUtNode(0);
1267 simulationHelper->GetTrafficHelper()->AddLoraPeriodicTraffic(Seconds(10),
1269 NodeContainer(utNode),
1274 Ptr<SatOrbiterNetDevice> orbiterNetDevice0 = DynamicCast<SatOrbiterNetDevice>(
1275 Singleton<SatTopology>::Get()->GetOrbiterNode(0)->GetDevice(0));
1276 Ptr<SatOrbiterNetDevice> orbiterNetDevice1 = DynamicCast<SatOrbiterNetDevice>(
1277 Singleton<SatTopology>::Get()->GetOrbiterNode(1)->GetDevice(0));
1279 m_edAddress = Singleton<SatTopology>::Get()->GetUtNode(0)->GetDevice(2)->GetAddress();
1285 Config::Connect(
"/NodeList/*/DeviceList/*/SatMac/Rx",
1287 Config::Connect(
"/NodeList/*/DeviceList/*/FeederMac/*/Rx",
1289 Config::Connect(
"/NodeList/*/DeviceList/*/UserMac/*/Rx",
1292 simulationHelper->RunSimulation();
1294 Simulator::Destroy();
1296 Singleton<SatEnvVariables>::Get()->DoDispose();
1298 NS_TEST_ASSERT_MSG_NE(
m_gwReceiveDate, Seconds(0),
"Packet should be received by Gateway.");
1301 "Ack should be received by End Device from satellite 0 and beam 31.");
1304 "Ack should be received by End Device from satellite 1 and beam 40.");
1307 "Ack should be received by End Device from satellite 1 and beam 41.");
1321 : TestSuite(
"sat-lora-regenerative-test", Type::SYSTEM)
1327 TestCase::Duration::QUICK);
Test case to check if Lora ack arrives in first reception window when using a constellation.
Address m_orbiterUserAddress
SatLoraConstellationFirstWindowTestCase()
virtual ~SatLoraConstellationFirstWindowTestCase()
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
Test case to check if Lora still works after hadovers.
Address m_orbiterUserAddress41
Address m_orbiterUserAddress40
SatLoraConstellationHandoverTestCase()
Address m_orbiterUserAddress31
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
virtual ~SatLoraConstellationHandoverTestCase()
Test case to check if packet is received on App layer.
virtual ~SatLoraRegenerativeCbrTestCase()
SatLoraRegenerativeCbrTestCase()
Address m_orbiterUserAddress
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
Test case to check if Lora ack arrives in first reception window.
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
virtual ~SatLoraRegenerativeFirstWindowTestCase()
Address m_orbiterUserAddress
SatLoraRegenerativeFirstWindowTestCase()
Test case to check that packet is not retransmitted if ack outside of both windows but no retransmiss...
SatLoraRegenerativeOutOfWindowWindowNoRetransmissionTestCase()
void PhyTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
virtual ~SatLoraRegenerativeOutOfWindowWindowNoRetransmissionTestCase()
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
std::vector< Time > m_gwReceiveDates
Address m_orbiterUserAddress
Test case to check if packet retransmitted if ack outside of both windows.
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
SatLoraRegenerativeOutOfWindowWindowTestCase()
Address m_orbiterUserAddress
std::vector< Time > m_gwReceiveDates
virtual ~SatLoraRegenerativeOutOfWindowWindowTestCase()
void PhyTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
Test case to check if Lora ack arrives in second reception window.
virtual ~SatLoraRegenerativeSecondWindowTestCase()
Address m_orbiterUserAddress
SatLoraRegenerativeSecondWindowTestCase()
void MacTraceCb(std::string context, Ptr< const Packet > packet, const Address &address)
Test suite for Satellite mobility unit test cases.
SatLoraRegenerativeTestSuite()
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
static SatLoraRegenerativeTestSuite satLoraRegenerativeTestSuite