F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TextLogString.hpp
Go to the documentation of this file.
1 #ifndef FW_TEXT_LOG_STRING_TYPE_HPP
2 #define FW_TEXT_LOG_STRING_TYPE_HPP
3 
4 #include <Fw/Types/BasicTypes.hpp>
5 #include <Fw/Types/StringType.hpp>
6 #include <FpConfig.hpp>
7 #include <Fw/Cfg/SerIds.hpp>
8 
9 namespace Fw {
10 
11  class TextLogString : public Fw::StringBase {
12  public:
13 
14  enum {
16  SERIALIZED_SIZE = FW_LOG_TEXT_BUFFER_SIZE + sizeof(FwBuffSizeType) // size of buffer + storage of two size words
17  };
18 
19  TextLogString(const char* src);
20  TextLogString(const StringBase& src);
21  TextLogString(const TextLogString& src);
22  TextLogString();
23  TextLogString& operator=(const TextLogString& other);
24  TextLogString& operator=(const StringBase& other);
25  TextLogString& operator=(const char* other);
27 
28  const char* toChar() const;
30 
31  private:
32 
33  char m_buf[FW_LOG_TEXT_BUFFER_SIZE];
34  };
35 
36 }
37 
38 #endif
Fw::TextLogString::~TextLogString
~TextLogString()
Definition: TextLogString.cpp:44
Fw::TextLogString
Definition: TextLogString.hpp:11
Fw::TextLogString::getCapacity
NATIVE_UINT_TYPE getCapacity() const
return size of buffer
Definition: TextLogString.cpp:51
Fw::StringBase
Definition: StringType.hpp:23
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:28
Fw::FW_TYPEID_LOG_STR
@ FW_TYPEID_LOG_STR
Log string type id.
Definition: SerIds.hpp:50
FwBuffSizeType
#define FwBuffSizeType
Type representation for storing a buffer or string size.
Definition: FpConfig.hpp:79
Fw::TextLogString::TextLogString
TextLogString()
Definition: TextLogString.cpp:17
Fw::TextLogString::toChar
const char * toChar() const
Definition: TextLogString.cpp:47
Fw::TextLogString::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition: TextLogString.hpp:16
Fw::TextLogString::SERIALIZED_TYPE_ID
@ SERIALIZED_TYPE_ID
Definition: TextLogString.hpp:15
Fw::TextLogString::operator=
TextLogString & operator=(const TextLogString &other)
Definition: TextLogString.cpp:21
FW_LOG_TEXT_BUFFER_SIZE
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
Definition: FpConfig.hpp:283
Fw
Definition: SerIds.hpp:20