F´ Flight Software - C/C++ Documentation  NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FixedLengthString.hpp
Go to the documentation of this file.
1 #ifndef FW_FIXED_LENGTH_STRING_TYPE_HPP
2 #define FW_FIXED_LENGTH_STRING_TYPE_HPP
3 
6 #include <Fw/Cfg/SerIds.hpp>
7 
8 namespace Fw {
9 
11  public:
12 
13  enum {
17  };
18 
19  FixedLengthString(const char* src);
20  FixedLengthString(const StringBase& src);
22  FixedLengthString(void);
23  ~FixedLengthString(void);
24  const char* toChar(void) const;
25  NATIVE_UINT_TYPE length(void) const;
26 
27  const FixedLengthString& operator=(const FixedLengthString& other);
28 
31 
32  PRIVATE:
33  void copyBuff(const char* buff, NATIVE_UINT_TYPE size);
34  NATIVE_UINT_TYPE getCapacity(void) const ;
35  void terminate(NATIVE_UINT_TYPE size);
36 
37  char m_buf[STRING_SIZE];
38  };
39 }
40 
41 #endif
StringType.hpp
Declares ISF string base class.
Fw::FixedLengthString::operator=
const FixedLengthString & operator=(const FixedLengthString &other)
equal operator
Definition: FixedLengthString.cpp:48
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Fw::StringBase
Definition: StringType.hpp:23
Fw::FixedLengthString::~FixedLengthString
~FixedLengthString(void)
destructor
Definition: FixedLengthString.cpp:27
Fw::FixedLengthString::FixedLengthString
FixedLengthString(void)
default constructor
Definition: FixedLengthString.cpp:23
Fw::FixedLengthString::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Serialized size is size of buffer + size field.
Definition: FixedLengthString.hpp:16
Fw::FW_TYPEID_FIXED_LENGTH_STRING
@ FW_TYPEID_FIXED_LENGTH_STRING
256 char string Buffer type id
Definition: SerIds.hpp:59
Fw::FixedLengthString::STRING_SIZE
@ STRING_SIZE
Storage for string.
Definition: FixedLengthString.hpp:15
Fw::FixedLengthString::deserialize
SerializeStatus deserialize(SerializeBufferBase &buffer)
deserialization function
Definition: FixedLengthString.cpp:59
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
FW_FIXED_LENGTH_STRING_SIZE
#define FW_FIXED_LENGTH_STRING_SIZE
Character array size for the filepath character type.
Definition: FpConfig.hpp:354
Fw::FixedLengthString::toChar
const char * toChar(void) const
gets char buffer
Definition: FixedLengthString.cpp:34
Fw::FixedLengthString::SERIALIZED_TYPE_ID
@ SERIALIZED_TYPE_ID
typeid for string type
Definition: FixedLengthString.hpp:14
Fw::FixedLengthString::length
NATIVE_UINT_TYPE length(void) const
returns length of stored string
Definition: FixedLengthString.cpp:30
BasicTypes.hpp
Declares ISF basic types.
Fw::FixedLengthString::serialize
SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
Definition: FixedLengthString.cpp:53
SerIds.hpp
Definitions for ISF type serial IDs.
FwBuffSizeType
#define FwBuffSizeType
Type representation for storing a buffer or string size.
Definition: FpConfig.hpp:79
Fw::FixedLengthString
Definition: FixedLengthString.hpp:10
Fw
Definition: Buffer.cpp:21