fprime/Ref/PingReceiver/PingReceiverComponentImpl.hpp
Joshua Anderson 3cccd731d9
Refactor FW_OBJECT_NAMES switches and fix building without object names
Instead of adding the name argument to a constructor when FW_OBJECT_NAMES
is enabled, always supply a name argument.

Add a marco that conditionally sets the name to "" if FW_OBJECT_NAMES is not set.
This cleans up a lot of the conditional compilation switches that weren't being tested
and would silently break, while still stripping the strings from the binary.
2020-10-07 17:19:05 -07:00

74 lines
2.0 KiB
C++

// ======================================================================
// \title PingReceiverImpl.hpp
// \author tim
// \brief hpp file for PingReceiver component implementation class
//
// \copyright
// Copyright 2009-2015, by the California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#ifndef PingReceiver_HPP
#define PingReceiver_HPP
#include "Ref/PingReceiver/PingReceiverComponentAc.hpp"
namespace Ref {
class PingReceiverComponentImpl :
public PingReceiverComponentBase
{
public:
// ----------------------------------------------------------------------
// Construction, initialization, and destruction
// ----------------------------------------------------------------------
//! Construct object PingReceiver
//!
PingReceiverComponentImpl(
const char *const compName /*!< The component name*/
);
//! Initialize object PingReceiver
//!
void init(
const NATIVE_INT_TYPE queueDepth, /*!< The queue depth*/
const NATIVE_INT_TYPE instance = 0 /*!< The instance number*/
);
//! Destroy object PingReceiver
//!
~PingReceiverComponentImpl(void);
PRIVATE:
// ----------------------------------------------------------------------
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------
//! Handler implementation for PingIn
//!
void PingIn_handler(
const NATIVE_INT_TYPE portNum, /*!< The port number*/
U32 key /*!< Value to return to pinger*/
);
void PR_StopPings_cmdHandler(
FwOpcodeType opCode, /*!< The opcode*/
U32 cmdSeq /*!< The command sequence number*/
);
bool m_inhibitPings;
U32 m_pingsRecvd;
};
} // end namespace Ref
#endif