133 m_container = Create<SatControlMsgContainer>(Seconds(0.10),
true);
134 Ptr<SatControlMessage> crMsg = CreateObject<SatCrMessage>();
135 Ptr<SatControlMessage> tbtpMsg = CreateObject<SatTbtpMessage>();
138 Simulator::Schedule(Seconds(0.09),
142 Simulator::Schedule(Seconds(0.20),
146 Simulator::Schedule(Seconds(0.31),
150 Simulator::Schedule(Seconds(0.40),
156 Simulator::Schedule(Seconds(0.10),
160 Simulator::Schedule(Seconds(0.21),
164 Simulator::Schedule(Seconds(0.35),
168 Simulator::Schedule(Seconds(0.43),
178 NS_TEST_ASSERT_MSG_EQ((crMsg ==
nullptr),
false,
"CR message creation failed");
179 NS_TEST_ASSERT_MSG_EQ((tbtpMsg ==
nullptr),
false,
"TBTP message failed");
182 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[0] == crMsg),
true,
"first message incorrect");
183 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[1] == tbtpMsg),
true,
"second message incorrect");
184 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[2] == tbtpMsg),
true,
"third message incorrect");
185 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[3] == crMsg),
true,
"fourth message incorrect");
187 Simulator::Destroy();
236 m_container = Create<SatControlMsgContainer>(Seconds(0.10),
false);
237 Ptr<SatControlMessage> crMsg = CreateObject<SatCrMessage>();
238 Ptr<SatControlMessage> tbtpMsg = CreateObject<SatTbtpMessage>();
241 Simulator::Schedule(Seconds(0.09),
245 Simulator::Schedule(Seconds(0.20),
249 Simulator::Schedule(Seconds(0.31),
253 Simulator::Schedule(Seconds(0.40),
259 Simulator::Schedule(Seconds(0.10),
263 Simulator::Schedule(Seconds(0.21),
267 Simulator::Schedule(Seconds(0.40),
271 Simulator::Schedule(Seconds(0.49),
281 NS_TEST_ASSERT_MSG_EQ((crMsg ==
nullptr),
false,
"CR message creation failed");
282 NS_TEST_ASSERT_MSG_EQ((tbtpMsg ==
nullptr),
false,
"TBTP message failed");
285 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[0] == crMsg),
true,
"first message incorrect");
286 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[1] == tbtpMsg),
true,
"second message incorrect");
287 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[2] == tbtpMsg),
true,
"third message incorrect");
288 NS_TEST_ASSERT_MSG_EQ((
m_msgsRead[3] == crMsg),
true,
"fourth message incorrect");
290 Simulator::Destroy();