mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 04:35:25 -06:00
* NATIVE_INT_TYPE use in toString * NATIVE_INT_TYPE use in SimpleObjRegistry * NATIVE_INT_TYPE use in Asserts * NATIVE_INT_TYPE use in Fw/Comp * NATIVE_INT_TYPE use in getCapacity * NATIVE_INT_TYPE use in getEntries * NATIVE_INT_TYPE use in size/length * NATIVE_INT_TYPE use in FILE_NAME_ARG * NATIVE_INT_TYPE use in Fw (misc) * NATIVE_INT_TYPE use in identifier * NATIVE_INT_TYPE use in Fw (misc II) * POINTER_CAST in Buffer * POINTER_CAST in Serializable * sp * Removing no longer used DefaultTypes.hpp * Fixes to accomidate Fw refactor * Unit-test and CI fixes * Fixing review comments - pt 1
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
/*
|
|
* LogBuffer.hpp
|
|
*
|
|
* Created on: Sep 10, 2012
|
|
* Author: ppandian
|
|
*/
|
|
|
|
/*
|
|
* Description:
|
|
* This object contains the LogBuffer type, used for storing log entries
|
|
*/
|
|
#ifndef FW_LOG_BUFFER_HPP
|
|
#define FW_LOG_BUFFER_HPP
|
|
|
|
#include <FpConfig.hpp>
|
|
#include <Fw/Types/Serializable.hpp>
|
|
#include <Fw/Cfg/SerIds.hpp>
|
|
|
|
namespace Fw {
|
|
|
|
class LogBuffer final : public SerializeBufferBase {
|
|
public:
|
|
|
|
enum {
|
|
SERIALIZED_TYPE_ID = FW_TYPEID_LOG_BUFF,
|
|
SERIALIZED_SIZE = FW_LOG_BUFFER_MAX_SIZE + sizeof(FwBuffSizeType)
|
|
};
|
|
|
|
LogBuffer(const U8 *args, FwSizeType size);
|
|
LogBuffer();
|
|
LogBuffer(const LogBuffer& other);
|
|
virtual ~LogBuffer();
|
|
LogBuffer& operator=(const LogBuffer& other);
|
|
|
|
FwSizeType getBuffCapacity() const; // !< returns capacity, not current size, of buffer
|
|
U8* getBuffAddr();
|
|
const U8* getBuffAddr() const;
|
|
|
|
private:
|
|
U8 m_bufferData[FW_LOG_BUFFER_MAX_SIZE]; // command argument buffer
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|