fprime/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.hpp
Ian Brault d911fb903f
Add event ID filters to text logger components (#4028)
* Add event ID filter to PassiveConsoleTextLogger

* Add event ID filter to ActiveTextLogger

* Add const qualifier to filtered event list pointers

* Fix assert argument types

* Fix clang format errors

* Fix copy-paste error on include file

Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>

* Add missing initialization to ActiveTextLogger constructor

---------

Co-authored-by: Ian Brault <ian.r.brault@jpl.nasa.gov>
Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-08-27 12:22:53 -07:00

34 lines
986 B
C++

#ifndef SVC_TEXT_LOGGER_IMPL_HPP
#define SVC_TEXT_LOGGER_IMPL_HPP
#include <Svc/PassiveConsoleTextLogger/PassiveTextLoggerComponentAc.hpp>
#include <config/PassiveTextLoggerCfg.hpp>
namespace Svc {
class ConsoleTextLoggerImpl final : public PassiveTextLoggerComponentBase {
public:
// Only called by derived class
ConsoleTextLoggerImpl(const char* compName);
~ConsoleTextLoggerImpl();
//! Configure component with event ID filters
void configure(const FwEventIdType* filteredIds, FwSizeType count);
private:
// downcalls for input ports
void TextLogger_handler(FwIndexType portNum,
FwEventIdType id,
Fw::Time& timeTag,
const Fw::LogSeverity& severity,
Fw::TextLogString& text);
// Event ID filters
FwSizeType m_numFilteredIDs;
FwEventIdType m_filteredIDs[PASSIVE_TEXT_LOGGER_ID_FILTER_SIZE];
};
} // namespace Svc
#endif