F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
LogString.hpp
Go to the documentation of this file.
1 #ifndef FW_LOG_STRING_TYPE_HPP
2 #define FW_LOG_STRING_TYPE_HPP
3 
4 #include <FpConfig.hpp>
6 #include <Fw/Cfg/SerIds.hpp>
7 
8 namespace Fw {
9 
10  class LogStringArg : public Fw::StringBase {
11  public:
12 
13  enum {
15  SERIALIZED_SIZE = FW_LOG_STRING_MAX_SIZE + sizeof(FwBuffSizeType) // size of buffer + storage of two size words
16  };
17 
18  LogStringArg();
19  LogStringArg(const LogStringArg& src);
20  LogStringArg(const StringBase& src);
21  LogStringArg(const char* src);
22  LogStringArg& operator=(const LogStringArg& other);
23  LogStringArg& operator=(const StringBase& other);
24  LogStringArg& operator=(const char* other);
25  ~LogStringArg();
26 
27  const char* toChar() const override;
28  NATIVE_UINT_TYPE getCapacity() const override;
29 
30  SerializeStatus serialize(SerializeBufferBase& buffer) const override;
31  SerializeStatus serialize(SerializeBufferBase& buffer, NATIVE_UINT_TYPE maxLen) const override;
33 
34  private:
35 
36  char m_buf[FW_LOG_STRING_MAX_SIZE];
37  };
38 
39 }
40 
41 #endif
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:52
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
Definition: FpConfig.h:259
U16 FwBuffSizeType
Definition: FpConfig.h:30
C++-compatible configuration header for fprime configuration.
Definitions for ISF type serial IDs.
Declares ISF string base class.
const char * toChar() const override
Definition: LogString.cpp:49
SerializeStatus deserialize(SerializeBufferBase &buffer) override
deserialization function
Definition: LogString.cpp:76
LogStringArg & operator=(const LogStringArg &other)
assignment operator
Definition: LogString.cpp:23
NATIVE_UINT_TYPE getCapacity() const override
return size of buffer
Definition: LogString.cpp:53
SerializeStatus serialize(SerializeBufferBase &buffer) const override
serialization function
Definition: LogString.cpp:57
@ FW_TYPEID_LOG_STR
Log string type id.
Definition: SerIds.hpp:50
SerializeStatus
forward declaration for string