17 #ifndef FPRIME_BASIC_TYPES_HPP 18 #define FPRIME_BASIC_TYPES_HPP 29 #ifndef FW_ASSERT_TEXT_SIZE 30 #define FW_ASSERT_TEXT_SIZE \ 40 "A generic string should be able to hold a command string");
42 "A generic string should be able to hold an event string");
44 "A generic string should be able to hold a telemetry string");
46 "A generic string should be able to hold a parameter string");
52 "FW_CMD_STRING_MAX_SIZE cannot be larger than FW_CMD_ARG_BUFFER_MAX_SIZE");
55 "FW_LOG_STRING_MAX_SIZE cannot be larger than FW_LOG_BUFFER_MAX_SIZE");
58 "FW_TLM_STRING_MAX_SIZE cannot be larger than FW_TLM_BUFFER_MAX_SIZE");
61 "FW_PARAM_STRING_MAX_SIZE cannot be larger than FW_PARAM_BUFFER_MAX_SIZE");
66 "FW_SERIALIZABLE_TO_STRING must be enabled to enable FW_ENABLE_TEXT_LOGGING");
73 static_assert(std::numeric_limits<FwBuffSizeType>::max() == std::numeric_limits<FwSizeStoreType>::max() &&
75 "FwBuffSizeType must be equivalent to FwExternalSizeType");
77 static_assert(std::numeric_limits<FwSizeType>::max() >= std::numeric_limits<FwSizeStoreType>::max() &&
79 "FwSizeType cannot entirely store values of type FwExternalSizeType");
82 static_assert(
sizeof(PlatformPointerCastType) ==
sizeof(
void*),
83 "PlatformPointerCastType must be the same size as pointers");
84 static_assert(std::numeric_limits<PlatformSizeType>::max() >= std::numeric_limits<unsigned int>::max(),
85 "PlatformSizeType must be at least as large as unsigned int");
86 static_assert(std::numeric_limits<PlatformSignedSizeType>::max() >= std::numeric_limits<int>::max(),
87 "PlatformSignedSizeType must be at least as large as int");
89 "PlatformSignedSizeType must be at least as small as int");
90 static_assert(std::numeric_limits<PlatformIndexType>::is_signed,
"PlatformIndexType must be signed");
91 static_assert(not std::numeric_limits<PlatformSizeType>::is_signed,
"PlatformSizeType must be unsigned");
92 static_assert(std::numeric_limits<PlatformSignedSizeType>::is_signed,
"PlatformSignedSizeType must be signed");
93 static_assert(std::numeric_limits<PlatformSizeType>::max() >= std::numeric_limits<U32>::max(),
94 "PlatformSizeType must be at least as large as U32");
95 static_assert(
sizeof(PlatformSizeType) ==
sizeof(PlatformSignedSizeType),
96 "PlatformSizeType must be the same size as PlatformSignedSizeType");
99 static_assert(std::numeric_limits<FwSizeType>::max() >= std::numeric_limits<unsigned int>::max(),
100 "FwSizeType must be at least as large as unsigned int");
101 static_assert(std::numeric_limits<FwSignedSizeType>::max() >= std::numeric_limits<int>::max(),
102 "FwSignedSizeType must be at least as large as int");
104 "FwSignedSizeType must be at least as large as int");
105 static_assert(std::numeric_limits<FwIndexType>::is_signed,
"FwIndexType must be signed");
106 static_assert(not std::numeric_limits<FwSizeType>::is_signed,
"FwSizeType must be unsigned");
107 static_assert(std::numeric_limits<FwSignedSizeType>::is_signed,
"FwSignedSizeType must be signed");
108 static_assert(std::numeric_limits<FwSizeType>::max() >= std::numeric_limits<U32>::max(),
109 "FwSizeType must be at least as large as U32");
112 #endif // FW_TYPES_HPP #define FW_ENABLE_TEXT_LOGGING
Indicates whether text logging is turned on.
PlatformSizeType FwSizeType
#define FW_SERIALIZABLE_TO_STRING
Indicates if autocoded serializables have toString() methods.
PlatformSignedSizeType FwSignedSizeType
U16 FwSizeStoreType
The type used to serialize a size value.
static U32 min(const U32 a, const U32 b)
C++ header for working with basic fprime types.