23 BufferLogger(
const char *
const compName) :
24 BufferLoggerComponentBase(compName),
37 BufferLoggerComponentBase::init(queueDepth, instance);
47 const char *
const logFilePrefix,
48 const char *
const logFileSuffix,
49 const U32 maxFileSize,
53 m_file.init(logFilePrefix, logFileSuffix, maxFileSize, sizeOfSize);
66 if (m_state == LogState::LOGGING_ON) {
67 const U8 *
const addr = fwBuffer.
getData();
68 const U32 size = fwBuffer.
getSize();
69 m_file.logBuffer(addr, size);
71 this->bufferSendOut_out(0, fwBuffer);
81 if (m_state == LogState::LOGGING_ON) {
84 m_file.logBuffer(addr, size);
91 this->pingOut_out(0, key);
109 BL_OpenFile_cmdHandler(
115 m_file.setBaseName(file);
116 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
120 BL_CloseFile_cmdHandler(
125 m_file.closeAndEmitEvent();
126 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
130 BL_SetLogging_cmdHandler(
137 if (state == LogState::LOGGING_OFF) {
138 m_file.closeAndEmitEvent();
140 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
144 BL_FlushFile_cmdHandler(
149 const bool status = m_file.flush();
152 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
156 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
PlatformUIntType NATIVE_UINT_TYPE
U8 * getBuffAddr()
gets buffer address for data filling
NATIVE_UINT_TYPE getBuffLength() const
returns current buffer size
BufferLogger_LogState LogState