mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
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.
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
// ======================================================================
|
|
// \title LinuxTimerImpl.hpp
|
|
// \author tim
|
|
// \brief hpp file for LinuxTimer component implementation class
|
|
//
|
|
// \copyright
|
|
// Copyright 2009-2015, by the California Institute of Technology.
|
|
// ALL RIGHTS RESERVED. United States Government Sponsorship
|
|
// acknowledged.
|
|
//
|
|
// ======================================================================
|
|
|
|
#ifndef LinuxTimer_HPP
|
|
#define LinuxTimer_HPP
|
|
|
|
#include "Svc/LinuxTimer/LinuxTimerComponentAc.hpp"
|
|
|
|
namespace Svc {
|
|
|
|
class LinuxTimerComponentImpl :
|
|
public LinuxTimerComponentBase
|
|
{
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Construction, initialization, and destruction
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Construct object LinuxTimer
|
|
//!
|
|
LinuxTimerComponentImpl(
|
|
const char *const compName /*!< The component name*/
|
|
);
|
|
|
|
//! Initialize object LinuxTimer
|
|
//!
|
|
void init(
|
|
const NATIVE_INT_TYPE instance = 0 /*!< The instance number*/
|
|
);
|
|
|
|
//! Destroy object LinuxTimer
|
|
//!
|
|
~LinuxTimerComponentImpl(void);
|
|
|
|
//! Start timer
|
|
void startTimer(NATIVE_INT_TYPE interval); //!< interval in milliseconds
|
|
|
|
//! Quit timer
|
|
void quit(void);
|
|
|
|
bool m_quit; //!< flag to quit
|
|
|
|
Svc::TimerVal m_timer;
|
|
|
|
|
|
};
|
|
|
|
} // end namespace Svc
|
|
|
|
#endif
|