fprime/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.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

31 lines
741 B
C++

#ifndef SVC_TEXT_LOGGER_IMPL_HPP
#define SVC_TEXT_LOGGER_IMPL_HPP
#include <Svc/PassiveConsoleTextLogger/PassiveTextLoggerComponentAc.hpp>
namespace Svc {
class ConsoleTextLoggerImpl : public PassiveTextLoggerComponentBase {
public:
// Only called by derived class
ConsoleTextLoggerImpl(const char* compName);
void init(void);
~ConsoleTextLoggerImpl(void);
private:
// downcalls for input ports
void TextLogger_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::TextLogSeverity severity, Fw::TextLogString &text);
// Track which line of the display we're on
NATIVE_INT_TYPE m_displayLine;
NATIVE_INT_TYPE m_pointerLine;
};
}
#endif