F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
format.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title format.hpp
3 // \author mstarch
4 // \brief hpp file for c-string format function
5 //
6 // \copyright
7 // Copyright (C) 2025 California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 // ======================================================================
11 #ifndef FW_TYPES_FORMAT_HPP_
12 #define FW_TYPES_FORMAT_HPP_
13 #include <FpConfig.h>
14 #include <cstdarg>
15 namespace Fw {
16 
18 enum class FormatStatus {
19  SUCCESS,
20  OVERFLOWED,
24 };
25 
42  FormatStatus stringFormat(char* destination, const FwSizeType maximumSize, const char* formatString, ...);
43 
62 FormatStatus stringFormat(char* destination, const FwSizeType maximumSize, const char* formatString, va_list args);
63 }
64 #endif // FW_TYPES_FORMAT_HPP_
65 
66 
PlatformSizeType FwSizeType
Definition: FpConfig.h:35
Format overflowed.
FwSizeType overflowed the range of size_t.
C-compatible configuration header for fprime configuration.
Format provided invalid format string.
An error was returned from an underlying call.
FormatStatus stringFormat(char *destination, const FwSizeType maximumSize, const char *formatString,...)
format a c-string
FormatStatus
status of string format calls
Definition: format.hpp:18