| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // ====================================================================== | ||
| 2 | // \title PingReceiverImpl.cpp | ||
| 3 | // \author tim | ||
| 4 | // \brief cpp file for PingReceiver component implementation class | ||
| 5 | // | ||
| 6 | // \copyright | ||
| 7 | // Copyright 2009-2015, by the California Institute of Technology. | ||
| 8 | // ALL RIGHTS RESERVED. United States Government Sponsorship | ||
| 9 | // acknowledged. | ||
| 10 | // | ||
| 11 | // ====================================================================== | ||
| 12 | |||
| 13 | #include <Fw/FPrimeBasicTypes.hpp> | ||
| 14 | #include <Ref/PingReceiver/PingReceiverComponentImpl.hpp> | ||
| 15 | |||
| 16 | namespace Ref { | ||
| 17 | |||
| 18 | // ---------------------------------------------------------------------- | ||
| 19 | // Construction, initialization, and destruction | ||
| 20 | // ---------------------------------------------------------------------- | ||
| 21 | |||
| 22 | 1 | PingReceiverComponentImpl ::PingReceiverComponentImpl(const char* const compName) | |
| 23 | 1 | : PingReceiverComponentBase(compName), m_inhibitPings(false), m_pingsRecvd(0) {} | |
| 24 | |||
| 25 | 2 | PingReceiverComponentImpl ::~PingReceiverComponentImpl() {} | |
| 26 | |||
| 27 | // ---------------------------------------------------------------------- | ||
| 28 | // Handler implementations for user-defined typed input ports | ||
| 29 | // ---------------------------------------------------------------------- | ||
| 30 | |||
| 31 | 59 | void PingReceiverComponentImpl ::PingIn_handler(const FwIndexType portNum, U32 key) { | |
| 32 | // this->log_DIAGNOSTIC_PR_PingReceived(key); | ||
| 33 |
2/2✓ Branch 1 taken 59 times.
✓ Branch 4 taken 59 times.
|
59 | this->tlmWrite_PR_NumPings(this->m_pingsRecvd++); |
| 34 |
1/2✓ Branch 0 taken 59 times.
✗ Branch 1 not taken.
|
59 | if (not this->m_inhibitPings) { |
| 35 | 59 | PingOut_out(0, key); | |
| 36 | } | ||
| 37 | 59 | } | |
| 38 | |||
| 39 | ✗ | void PingReceiverComponentImpl::PR_StopPings_cmdHandler(FwOpcodeType opCode, /*!< The opcode*/ | |
| 40 | U32 cmdSeq /*!< The command sequence number*/ | ||
| 41 | ) { | ||
| 42 | ✗ | this->m_inhibitPings = true; | |
| 43 | ✗ | this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); | |
| 44 | ✗ | } | |
| 45 | |||
| 46 | } // end namespace Ref | ||
| 47 |