F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
TlmString.hpp
Go to the documentation of this file.
1#ifndef FW_TLM_STRING_TYPE_HPP
2#define FW_TLM_STRING_TYPE_HPP
3
4#include <FpConfig.hpp>
6#include <Fw/Cfg/SerIds.hpp>
7
8namespace Fw {
9
10 class TlmString : public Fw::StringBase {
11 public:
12
13 enum {
15 SERIALIZED_SIZE = FW_TLM_STRING_MAX_SIZE + sizeof(FwBuffSizeType) // size of buffer + storage of size word
16 };
17
18 TlmString();
19 TlmString(const TlmString& src);
20 TlmString(const StringBase& src);
21 TlmString(const char* src);
22 TlmString& operator=(const TlmString& other);
23 TlmString& operator=(const StringBase& other);
24 TlmString& operator=(const char* other);
25 ~TlmString();
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 char m_buf[FW_TLM_STRING_MAX_SIZE];
36 };
37}
38
39#endif
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
#define FW_TLM_STRING_MAX_SIZE
Max size of channelized telemetry string type.
Definition FpConfig.h:261
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 TlmString.cpp:48
NATIVE_UINT_TYPE getCapacity() const override
return size of buffer
Definition TlmString.cpp:52
SerializeStatus serialize(SerializeBufferBase &buffer) const override
serialization function
Definition TlmString.cpp:56
TlmString & operator=(const TlmString &other)
assignment operator
Definition TlmString.cpp:22
SerializeStatus deserialize(SerializeBufferBase &buffer) override
deserialization function
Definition TlmString.cpp:75
Definition Buffer.cpp:21
SerializeStatus
forward declaration for string
@ FW_TYPEID_TLM_STR
Telemetry string type id.
Definition SerIds.hpp:48