WPILibC++ 2023.4.3-108-ge5452e3
|
Functions | |
void | HAL_SetMain (void *param, void(*mainFunc)(void *), void(*exitFunc)(void *)) |
Sets up the system to run the provided main loop in the main thread (e.g. More... | |
HAL_Bool | HAL_HasMain (void) |
Returns true if HAL_SetMain() has been called. More... | |
void | HAL_RunMain (void) |
Runs the main function provided to HAL_SetMain(). More... | |
void | HAL_ExitMain (void) |
Causes HAL_RunMain() to exit. More... | |
void HAL_ExitMain | ( | void | ) |
Causes HAL_RunMain() to exit.
If HAL_SetMain() has been called, this calls the exit function provided to that function.
HAL_Bool HAL_HasMain | ( | void | ) |
Returns true if HAL_SetMain() has been called.
void HAL_RunMain | ( | void | ) |
Runs the main function provided to HAL_SetMain().
If HAL_SetMain() has not been called, simply sleeps until HAL_ExitMain() is called.
void HAL_SetMain | ( | void * | param, |
void(*)(void *) | mainFunc, | ||
void(*)(void *) | exitFunc | ||
) |
Sets up the system to run the provided main loop in the main thread (e.g.
the thread in which main() starts execution) and run the robot code in a separate thread.
Normally the robot code runs in the main thread, but some GUI systems require the GUI be run in the main thread.
To be effective, this function must be called before the robot code starts the main loop (e.g. by frc::StartRobot()).
param | parameter data to pass to mainFunc and exitFunc |
mainFunc | the function to be run when HAL_RunMain() is called. |
exitFunc | the function to be run when HAL_ExitMain() is called. |