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

Go to the source code of this file.

Classes

struct  HALSIM_AlertInfo
 Information about an alert. More...

Functions

int32_t HALSIM_GetNumAlerts (void)
 Gets the number of alerts.
int32_t HALSIM_GetAlerts (struct HALSIM_AlertInfo *arr, int32_t length)
 Gets detailed information about each alert.
void HALSIM_FreeAlerts (struct HALSIM_AlertInfo *arr, int32_t length)
 Frees an array of alert information returned by HALSIM_GetAlerts.
void HALSIM_ResetAlertData (void)
 Resets all alert simulation data.

Function Documentation

◆ HALSIM_FreeAlerts()

void HALSIM_FreeAlerts ( struct HALSIM_AlertInfo * arr,
int32_t length )

Frees an array of alert information returned by HALSIM_GetAlerts.

Parameters
arrarray to free
lengthnumber of alerts in arr (as returned by HALSIM_GetAlerts)

◆ HALSIM_GetAlerts()

int32_t HALSIM_GetAlerts ( struct HALSIM_AlertInfo * arr,
int32_t length )

Gets detailed information about each alert.

Parameters
arrarray of information to be filled
lengthlength of arr
Returns
Number of alerts; note: may be larger or smaller than passed-in length

◆ HALSIM_GetNumAlerts()

int32_t HALSIM_GetNumAlerts ( void )

Gets the number of alerts.

Note: this is not guaranteed to be consistent with the number of alerts returned by HALSIM_GetAlerts, so the latter's return value should be used to determine how many alerts were actually filled in.

Returns
the number of alerts

◆ HALSIM_ResetAlertData()

void HALSIM_ResetAlertData ( void )

Resets all alert simulation data.