F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
scan.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title scan.hpp
3 // \author mstarch
4 // \brief hpp file for c-string scan function (sscanf equivalent)
5 //
6 // \copyright
7 // Copyright (C) 2026 California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 // ======================================================================
11 #ifndef FW_TYPES_SCAN_HPP_
12 #define FW_TYPES_SCAN_HPP_
13 #include <Fw/FPrimeBasicTypes.hpp>
14 #include <cstdarg>
15 namespace Fw {
16 
18 enum class ScanStatus {
19  SUCCESS,
24 };
25 
43 ScanStatus stringScan(FwSizeType& count, const char* source, FwSizeType maximumSize, const char* formatString, ...);
44 
65  const char* source,
66  FwSizeType maximumSize,
67  const char* formatString,
68  va_list args);
69 } // namespace Fw
70 #endif // FW_TYPES_SCAN_HPP_
An error was returned from an underlying call.
PlatformSizeType FwSizeType
FwSizeType overflowed the range of size_t.
ScanStatus stringScan(FwSizeType &count, const char *source, FwSizeType maximumSize, const char *formatString,...)
scan a c-string
Definition: sscanf_scan.cpp:11
ScanStatus
status of string scan calls
Definition: scan.hpp:18
Format provided invalid format string.
The source string was not null-terminated within the maximum size.
Implementation of malloc based allocator.