WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
DriverStation.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "wpi/hal/DriverStationTypes.h"
#include "wpi/hal/Types.h"
#include "wpi/util/Synchronization.h"
#include "wpi/util/string.h"

Go to the source code of this file.

Functions

int32_t HAL_SendError (HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, const char *details, const char *location, const char *callStack, HAL_Bool printMsg)
 Sends an error to the driver station.
void HAL_SetPrintErrorImpl (void(*func)(const char *line, size_t size))
 Set the print function used by HAL_SendError.
int32_t HAL_SendConsoleLine (const char *line)
 Sends a line to the driver station console.
int32_t HAL_GetControlWord (HAL_ControlWord *controlWord)
 Gets the current control word of the driver station.
int32_t HAL_GetUncachedControlWord (HAL_ControlWord *controlWord)
 Gets the current control word of the driver station.
int32_t HAL_SetOpModeOptions (const struct HAL_OpModeOption *options, int32_t count)
 Sets operating mode options.
HAL_AllianceStationID HAL_GetAllianceStation (int32_t *status)
 Gets the current alliance station ID.
int32_t HAL_GetJoystickAxes (int32_t joystickNum, HAL_JoystickAxes *axes)
 Gets the axes of a specific joystick.
int32_t HAL_GetJoystickPOVs (int32_t joystickNum, HAL_JoystickPOVs *povs)
 Gets the POVs of a specific joystick.
int32_t HAL_GetJoystickButtons (int32_t joystickNum, HAL_JoystickButtons *buttons)
 Gets the buttons of a specific joystick.
int32_t HAL_GetJoystickTouchpads (int32_t joystickNum, HAL_JoystickTouchpads *touchpads)
 Gets the touchpads of a specific joystick.
void HAL_GetAllJoystickData (int32_t joystickNum, HAL_JoystickAxes *axes, HAL_JoystickPOVs *povs, HAL_JoystickButtons *buttons, HAL_JoystickTouchpads *touchpads)
 Gets all the data of a specific joystick.
int32_t HAL_GetJoystickDescriptor (int32_t joystickNum, HAL_JoystickDescriptor *desc)
 Retrieves the Joystick Descriptor for particular slot.
HAL_Bool HAL_GetJoystickIsGamepad (int32_t joystickNum)
 Gets whether a specific joystick is considered to be an Gamepad.
int32_t HAL_GetJoystickGamepadType (int32_t joystickNum)
 Gets the type of joystick connected.
int32_t HAL_GetGameData (HAL_GameData *gameData)
 Gets the game-specific message for the current match.
int32_t HAL_GetJoystickSupportedOutputs (int32_t joystickNum)
 Gets the supported outputs of a specific joystick.
void HAL_GetJoystickName (struct WPI_String *name, int32_t joystickNum)
 Gets the name of a joystick.
int32_t HAL_SetJoystickRumble (int32_t joystickNum, int32_t leftRumble, int32_t rightRumble, int32_t leftTriggerRumble, int32_t rightTriggerRumble)
 Set joystick rumbles.
int32_t HAL_SetJoystickLeds (int32_t joystickNum, int32_t leds)
 Set joystick LEDs.
double HAL_GetMatchTime (int32_t *status)
 Return the approximate match time.
HAL_Bool HAL_GetOutputsEnabled (void)
 Gets if outputs are enabled by the control system.
int32_t HAL_GetMatchInfo (HAL_MatchInfo *info)
 Gets info about a specific match.
HAL_Bool HAL_RefreshDSData (void)
 Refresh the DS control word.
void HAL_ProvideNewDataEventHandle (WPI_EventHandle handle)
 Adds an event handle to be signalled when new data arrives.
void HAL_RemoveNewDataEventHandle (WPI_EventHandle handle)
 Removes the event handle from being signalled when new data arrives.
void HAL_ObserveUserProgramStarting (void)
 Sets the program starting flag in the DS.
void HAL_ObserveUserProgram (HAL_ControlWord word)
 Sets the control word state returned to the DS.