Skip to content

Commit

Permalink
Update ActiveTextLogger naming to match build system naming expecta…
Browse files Browse the repository at this point in the history
…tions (#2509)

* fix: old ActiveTextLogger naming breaks with new FPrime build system

* fix: broke ActiveTextLogger UTs
  • Loading branch information
kbotteon committed Feb 1, 2024
1 parent 94c8fec commit d1f166e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.

#include <Svc/ActiveTextLogger/ActiveTextLoggerImpl.hpp>
#include <Svc/ActiveTextLogger/ActiveTextLogger.hpp>
#include <Fw/Types/Assert.hpp>
#include <Fw/Logger/Logger.hpp>
#include <ctime>
Expand All @@ -14,19 +14,19 @@ namespace Svc {
// Initialization/Exiting
// ----------------------------------------------------------------------

ActiveTextLoggerComponentImpl::ActiveTextLoggerComponentImpl(const char* name) :
ActiveTextLogger::ActiveTextLogger(const char* name) :
ActiveTextLoggerComponentBase(name),
m_log_file()
{

}

ActiveTextLoggerComponentImpl::~ActiveTextLoggerComponentImpl()
ActiveTextLogger::~ActiveTextLogger()
{

}

void ActiveTextLoggerComponentImpl::init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
void ActiveTextLogger::init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
{
ActiveTextLoggerComponentBase::init(queueDepth,instance);
}
Expand All @@ -35,7 +35,7 @@ namespace Svc {
// Handlers to implement for typed input ports
// ----------------------------------------------------------------------

void ActiveTextLoggerComponentImpl::TextLogger_handler(NATIVE_INT_TYPE portNum,
void ActiveTextLogger::TextLogger_handler(NATIVE_INT_TYPE portNum,
FwEventIdType id,
Fw::Time &timeTag,
const Fw::LogSeverity& severity,
Expand Down Expand Up @@ -117,7 +117,7 @@ namespace Svc {
// Internal interface handlers
// ----------------------------------------------------------------------

void ActiveTextLoggerComponentImpl::TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString& text)
void ActiveTextLogger::TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString& text)
{

// Print to console:
Expand All @@ -132,7 +132,7 @@ namespace Svc {
// Helper Methods
// ----------------------------------------------------------------------

bool ActiveTextLoggerComponentImpl::set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups)
bool ActiveTextLogger::set_log_file(const char* fileName, const U32 maxSize, const U32 maxBackups)
{
FW_ASSERT(fileName != nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

namespace Svc {

//! \class ActiveTextLoggerComponentImpl
//! \class ActiveTextLoggerComponent
//! \brief Active text logger component class
//!
//! Similarly to the PassiveTextLogger, this component takes log texts
//! and prints them to the console, but does so from a thread to keep
//! consistent ordering. It also provides the option to write the text
//! to a file as well.

class ActiveTextLoggerComponentImpl: public ActiveTextLoggerComponentBase {
class ActiveTextLogger: public ActiveTextLoggerComponentBase {

public:

Expand All @@ -33,11 +33,11 @@ namespace Svc {
//! type conversion.
//!
//! \param compName the component instance name
explicit ActiveTextLoggerComponentImpl(const char* compName);
explicit ActiveTextLogger(const char* compName);

//! \brief Component destructor
//!
virtual ~ActiveTextLoggerComponentImpl(); //!< destructor
virtual ~ActiveTextLogger(); //!< destructor

//! \brief Component initialization routine
//!
Expand Down Expand Up @@ -70,12 +70,12 @@ namespace Svc {
/*! \brief Copy constructor
*
*/
ActiveTextLoggerComponentImpl(const ActiveTextLoggerComponentImpl&);
ActiveTextLogger(const ActiveTextLogger&);

/*! \brief Copy assignment operator
*
*/
ActiveTextLoggerComponentImpl& operator=(const ActiveTextLoggerComponentImpl&);
ActiveTextLogger& operator=(const ActiveTextLogger&);

// ----------------------------------------------------------------------
// Constants/Types
Expand Down
2 changes: 1 addition & 1 deletion Svc/ActiveTextLogger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
####
set(SOURCE_FILES
"${CMAKE_CURRENT_LIST_DIR}/ActiveTextLogger.fpp"
"${CMAKE_CURRENT_LIST_DIR}/ActiveTextLoggerImpl.cpp"
"${CMAKE_CURRENT_LIST_DIR}/ActiveTextLogger.cpp"
"${CMAKE_CURRENT_LIST_DIR}/LogFile.cpp"
)

Expand Down
4 changes: 2 additions & 2 deletions Svc/ActiveTextLogger/test/ut/ActiveTextLoggerTester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define TESTER_HPP

#include "ActiveTextLoggerGTestBase.hpp"
#include "Svc/ActiveTextLogger/ActiveTextLoggerImpl.hpp"
#include "Svc/ActiveTextLogger/ActiveTextLogger.hpp"

namespace Svc {

Expand Down Expand Up @@ -60,7 +60,7 @@ namespace Svc {

//! The component under test
//!
ActiveTextLoggerComponentImpl component;
ActiveTextLogger component;

};

Expand Down

0 comments on commit d1f166e

Please sign in to comment.