9 #if FW_ASSERT_LEVEL == FW_FILEID_ASSERT 10 #define fileIdFs "Assert: 0x%08" PRIx32 ":%" PRI_FwSizeType "" 12 #define fileIdFs "Assert: \"%s:%" PRI_FwSizeType "\"" 19 (void)fputs(msg, stderr);
20 (void)fputs(
"\n", stderr);
48 file, lineNo, arg1, arg2, arg3);
54 file, lineNo, arg1, arg2, arg3, arg4);
60 file, lineNo, arg1, arg2, arg3, arg4, arg5);
66 file, lineNo, arg1, arg2, arg3, arg4, arg5, arg6);
87 defaultReportAssert(file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6, destBuffer,
88 static_cast<FwSizeType>(
sizeof(destBuffer)));
97 AssertHook* AssertHook::s_assertHook =
nullptr;
100 this->previousHook = s_assertHook;
105 s_assertHook = this->previousHook;
123 if (
nullptr == registeredHook) {
125 defaultReportAssert(file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6, assertMsg,
126 static_cast<FwSizeType>(
sizeof(assertMsg)));
130 registeredHook->
reportAssert(file, lineNo, numArgs, arg1, arg2, arg3, arg4, arg5, arg6);
133 #if FW_ASSERTIONS_ALWAYS_ABORT 193 if (
nullptr == registeredHook) {
195 Fw::defaultReportAssert(file, lineNo, 0, 0, 0, 0, 0, 0, 0, assertMsg,
196 static_cast<FwSizeType>(
sizeof(assertMsg)));
198 registeredHook->
reportAssert(file, lineNo, 0, 0, 0, 0, 0, 0, 0);
206 if (
nullptr == registeredHook) {
208 Fw::defaultReportAssert(file, lineNo, 1, arg1, 0, 0, 0, 0, 0, assertMsg,
209 static_cast<FwSizeType>(
sizeof(assertMsg)));
211 registeredHook->
reportAssert(file, lineNo, 1, arg1, 0, 0, 0, 0, 0);
I8 CAssert1(FILE_NAME_ARG file, FwAssertArgType arg1, FwSizeType lineNo)
PlatformSizeType FwSizeType
FW_ASSERT_NORETURN void defaultSwAssert(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
int8_t I8
8-bit signed integer
void defaultReportAssert(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6, CHAR *destBuffer, FwSizeType buffSize)
#define PRI_FwAssertArgType
static AssertHook * getRegisteredHook()
void SwAssert(FILE_NAME_ARG file, FwSizeType lineNo)
Assert with no arguments.
void defaultPrintAssert(const CHAR *msg)
#define FW_ASSERT_TEXT_SIZE
Size of string used to store assert description // NO_CODESONAR LANG.PREPROC.MACROSTART/END.
virtual void reportAssert(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
destructor
virtual void printAssert(const CHAR *msg)
FormatStatus stringFormat(char *destination, const FwSizeType maximumSize, const char *formatString,...)
format a c-string
I8 CAssert0(FILE_NAME_ARG file, FwSizeType lineNo)
Implementation of malloc based allocator.
#define FW_ASSERT_NORETURN
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.