17 #define wpi_assert(condition) \
18 wpi_assert_impl(condition, #condition, "", __FILE__, __LINE__, __FUNCTION__)
19 #define wpi_assertWithMessage(condition, message) \
20 wpi_assert_impl(condition, #condition, message, __FILE__, __LINE__, \
23 #define wpi_assertEqual(a, b) \
24 wpi_assertEqual_impl(a, b, #a, #b, "", __FILE__, __LINE__, __FUNCTION__)
25 #define wpi_assertEqualWithMessage(a, b, message) \
26 wpi_assertEqual_impl(a, b, #a, #b, message, __FILE__, __LINE__, __FUNCTION__)
28 #define wpi_assertNotEqual(a, b) \
29 wpi_assertNotEqual_impl(a, b, #a, #b, "", __FILE__, __LINE__, __FUNCTION__)
30 #define wpi_assertNotEqualWithMessage(a, b, message) \
31 wpi_assertNotEqual_impl(a, b, #a, #b, message, __FILE__, __LINE__, \
35 const char *message,
const char *fileName,
36 uint32_t lineNumber,
const char *funcName);
38 const char *valueBString,
const char *message,
39 const char *fileName, uint32_t lineNumber,
40 const char *funcName);
42 const char *valueBString,
const char *message,
43 const char *fileName, uint32_t lineNumber,
44 const char *funcName);
46 void wpi_suspendOnAssertEnabled(
bool enabled);
uint64_t GetFPGATime()
Read the microsecond-resolution timer on the FPGA.
Definition: Utility.cpp:161
uint16_t GetFPGAVersion()
Return the FPGA Version number.
Definition: Utility.cpp:133
bool wpi_assertEqual_impl(int valueA, int valueB, const char *valueAString, const char *valueBString, const char *message, const char *fileName, uint32_t lineNumber, const char *funcName)
Assert equal implementation.
Definition: Utility.cpp:99
std::string GetStackTrace(uint32_t offset)
Get a stack trace, ignoring the first "offset" symbols.
Definition: Utility.cpp:208
uint32_t GetFPGARevision()
Return the FPGA Revision number.
Definition: Utility.cpp:148
bool wpi_assertNotEqual_impl(int valueA, int valueB, const char *valueAString, const char *valueBString, const char *message, const char *fileName, uint32_t lineNumber, const char *funcName)
Assert not equal implementation.
Definition: Utility.cpp:117
bool GetUserButton()
Get the state of the "USER" button on the RoboRIO.
Definition: Utility.cpp:172
bool wpi_assert_impl(bool conditionValue, const char *conditionText, const char *message, const char *fileName, uint32_t lineNumber, const char *funcName)
Assert implementation.
Definition: Utility.cpp:28