Now you can download a copy of these docs so you can use them offline! Download now
Utility.h
1 /*---------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*---------------------------------------------------------------------------*/
6 
7 #ifndef UTILITY_H_
8 #define UTILITY_H_
9 
10 #include <taskLib.h>
11 
12 #define wpi_assert(condition) wpi_assert_impl(condition, #condition, NULL, __FILE__, __LINE__, __FUNCTION__)
13 #define wpi_assertWithMessage(condition, message) wpi_assert_impl(condition, #condition, message, __FILE__, __LINE__, __FUNCTION__)
14 
15 #define wpi_assertEqual(a, b) wpi_assertEqual_impl(a, b, NULL, __FILE__, __LINE__, __FUNCTION__)
16 #define wpi_assertEqualWithMessage(a, b, message) wpi_assertEqual_impl(a, b, message, __FILE__, __LINE__, __FUNCTION__)
17 
18 #define wpi_assertNotEqual(a, b) wpi_assertNotEqual_impl(a, b, NULL, __FILE__, __LINE__, __FUNCTION__)
19 #define wpi_assertNotEqualWithMessage(a, b, message) wpi_assertNotEqual_impl(a, b, message, __FILE__, __LINE__, __FUNCTION__)
20 
21 bool wpi_assert_impl(bool conditionValue, const char *conditionText, const char *message, const char *fileName, uint32_t lineNumber, const char *funcName);
22 bool wpi_assertEqual_impl(int valueA, int valueB, const char *message, const char *fileName,uint32_t lineNumber, const char *funcName);
23 bool wpi_assertNotEqual_impl(int valueA, int valueB, const char *message, const char *fileName,uint32_t lineNumber, const char *funcName);
24 
25 char *wpi_getLabel(UINT addr, int32_t *found = NULL);
26 void wpi_selfTrace();
27 void wpi_suspendOnAssertEnabled(bool enabled);
28 void wpi_stackTraceOnAssertEnable(bool enabled);
29 
30 uint16_t GetFPGAVersion();
31 uint32_t GetFPGARevision();
32 uint32_t GetFPGATime();
33 int32_t GetRIOUserSwitch();
34 void SetRIOUserLED(uint32_t state);
35 int32_t GetRIOUserLED();
36 int32_t ToggleRIOUserLED();
37 void SetRIO_FPGA_LED(uint32_t state);
38 int32_t GetRIO_FPGA_LED();
39 int32_t ToggleRIO_FPGA_LED();
40 
41 #endif // UTILITY_H_

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6