-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pull in framework changes from data-products branch * Pull in changes to DpManager from data-products branch * Pull in DpWriter from data-products branch * Fix spelling * Revise FileNameString * Fix warnings in CI * Fix static analysis warnings * Fix static analysis warnings * Revise formatting and comments * Revise banner comments * Revise FileNameString per PR comment * Revise path names in config headers If a header H.hpp exists in the F Prime source base, then is dangerous. Because [project root] and [fprime root] are both in the list of include paths, it's not clear whether this means "include [project root]/config/H.hpp" or "include [fprime root]/config/H.hpp." On the other hand, or has no such ambiguity, because only one of [project root]/config and [fprime root]/config is in the list of include paths. * Revise path names in config headers If a header H.hpp exists in the F Prime source base, then `#include "config/H.hpp"` is dangerous. Because [project root] and [fprime root] are both in the list of include paths, it's not clear whether this means "include [project root]/config/H.hpp" or "include [fprime root]/config/H.hpp." On the other hand, include <config/H.hpp> or `#include "config/H.hpp"` has no such ambiguity, because only one of [project root]/config and [fprime root]/config is in the list of include paths.
- Loading branch information
Showing
67 changed files
with
3,201 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include "Fw/Types/FileNameString.hpp" | ||
#include "Fw/Types/StringUtils.hpp" | ||
|
||
namespace Fw { | ||
|
||
FileNameString::FileNameString(const char* src) : StringBase() { | ||
(void)Fw::StringUtils::string_copy(this->m_buf, src, sizeof(this->m_buf)); | ||
} | ||
|
||
FileNameString::FileNameString(const StringBase& src) : StringBase() { | ||
(void)Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf)); | ||
} | ||
|
||
FileNameString::FileNameString(const FileNameString& src) : StringBase() { | ||
(void)Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf)); | ||
} | ||
|
||
FileNameString::FileNameString() : StringBase() { | ||
this->m_buf[0] = 0; | ||
} | ||
|
||
FileNameString& FileNameString::operator=(const FileNameString& other) { | ||
if (this == &other) { | ||
return *this; | ||
} | ||
|
||
(void)Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf)); | ||
return *this; | ||
} | ||
|
||
FileNameString& FileNameString::operator=(const StringBase& other) { | ||
if (this == &other) { | ||
return *this; | ||
} | ||
|
||
(void)Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf)); | ||
return *this; | ||
} | ||
|
||
FileNameString& FileNameString::operator=(const char* other) { | ||
Fw::StringUtils::string_copy(this->m_buf, other, sizeof(this->m_buf)); | ||
return *this; | ||
} | ||
|
||
FileNameString::~FileNameString() {} | ||
|
||
const char* FileNameString::toChar() const { | ||
return this->m_buf; | ||
} | ||
|
||
NATIVE_UINT_TYPE FileNameString::getCapacity() const { | ||
return STRING_SIZE; | ||
} | ||
} // namespace Fw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef FW_FILENAMESTRING_HPP | ||
#define FW_FILENAMESTRING_HPP | ||
|
||
#include <FpConfig.hpp> | ||
|
||
#include "Fw/Cfg/SerIds.hpp" | ||
#include "Fw/Types/StringType.hpp" | ||
#include "config/FppConstantsAc.hpp" | ||
|
||
namespace Fw { | ||
|
||
class FileNameString : public Fw::StringBase { | ||
public: | ||
enum { | ||
SERIALIZED_TYPE_ID = FW_TYPEID_FILE_NAME_STRING, //!< typeid for string type | ||
STRING_SIZE = FileNameStringSize, //!< Storage for string | ||
SERIALIZED_SIZE = STRING_SIZE + sizeof(FwBuffSizeType) //!< Serialized size is size of buffer + size field | ||
}; | ||
|
||
explicit FileNameString(const char* src); //!< char* source constructor | ||
explicit FileNameString(const StringBase& src); //!< other string constructor | ||
explicit FileNameString(const FileNameString& src); //!< String string constructor | ||
FileNameString(); //!< default constructor | ||
FileNameString& operator=(const FileNameString& other); //!< assignment operator | ||
FileNameString& operator=(const StringBase& other); //!< other string assignment operator | ||
FileNameString& operator=(const char* other); //!< char* assignment operator | ||
~FileNameString(); //!< destructor | ||
|
||
const char* toChar() const; //!< gets char buffer | ||
NATIVE_UINT_TYPE getCapacity() const; //!< return buffer size | ||
|
||
private: | ||
char m_buf[FileNameString::STRING_SIZE]; //!< storage for string data | ||
}; | ||
} // namespace Fw | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.