• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sfc-aqua / quisp / 9594660830

20 Jun 2024 09:03AM UTC coverage: 42.821% (+0.6%) from 42.22%
9594660830

Pull #558

github

Paolo Fittipaldi
Fixed names to make capitalization consistent
Pull Request #558: [SATELLITE LINKS] PR 4: Pointing System

144 of 316 new or added lines in 8 files covered. (45.57%)

2 existing lines in 1 file now uncovered.

2866 of 6693 relevant lines covered (42.82%)

38229.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.83
/quisp/modules/Satellite/PointingSystem.cc
1
/** \file PointingSystem.cc
2
 *
3
 *  \brief PointingSystem
4
 */
5
#include "PointingSystem.h"
6
#include "channels/FreeSpaceChannel.h"
7
#include "messages/visibility_messages_m.h"
8

9
using namespace channels;
10

11
namespace quisp::modules::Satellite {
12

13
Define_Module(PointingSystem);
14

15
PointingSystem::PointingSystem() : provider(utils::ComponentProvider{this}) {}
4✔
16

NEW
17
PointingSystem::~PointingSystem() {}
×
18

19
void PointingSystem::initialize() {}
4✔
20

21
void PointingSystem::handleMessage(cMessage* msg) {
4✔
22
  if (dynamic_cast<VisibilityMessage*>(msg)) {
4✔
23
    if (auto vcr = dynamic_cast<VisCheckRequest*>(msg)) {
3✔
24
      VisCheckOutcome* vco = new VisCheckOutcome();
3✔
25
      const char* gate_to_check = vcr->getOut_gate();
3✔
26
      int gtc_index = vcr->getIndex();
3✔
27
      cChannel* chl = getParentModule()->gate(gate_to_check, gtc_index)->getChannel();
3✔
28
      if (auto* fs_chl = dynamic_cast<FreeSpaceChannel*>(chl)) {
3✔
29
        SimTime next_check_time = fs_chl->getNextCheckTime();
2✔
30
        vco->setNextCheckTime(next_check_time.dbl());
2✔
31
      } else {
2✔
32
        EV << "WARNING: checking visibility along a fiber channel. Seems weird.";
1✔
33
        vco->setNextCheckTime(0);
1✔
34
      }
1✔
35
      send(vco, "ans");
3✔
36
      delete vcr;
3✔
37
    }
3✔
38
  } else
3✔
39
    throw(cRuntimeError("Unexpected Message at Pointing System!"));
1✔
40
  return;
3✔
41
};
4✔
42

43
}  // namespace quisp::modules::Satellite
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc