WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
UsageReporting.h File Reference
#include <stdint.h>
#include <string_view>
#include <wpi/string.h>

Go to the source code of this file.

Functions

int32_t HAL_ReportUsage (const struct WPI_String *resource, const struct WPI_String *data)
 Reports usage of a resource of interest.
 
int32_t HAL_ReportUsage (std::string_view resource, std::string_view data)
 Reports usage of a resource of interest.
 
int32_t HAL_ReportUsage (std::string_view resource, int instanceNumber, std::string_view data)
 Reports usage of a resource of interest.
 

Function Documentation

◆ HAL_ReportUsage() [1/3]

int32_t HAL_ReportUsage ( const struct WPI_String * resource,
const struct WPI_String * data )

Reports usage of a resource of interest.

Repeated calls for the same resource name replace the previous report.

Parameters
resourcethe used resource name; convention is to suffix with "[instanceNum]" for multiple instances of the same resource
dataarbitrary associated data string
Returns
a handle

◆ HAL_ReportUsage() [2/3]

int32_t HAL_ReportUsage ( std::string_view resource,
int instanceNumber,
std::string_view data )

Reports usage of a resource of interest.

Repeated calls for the same resource name replace the previous report.

Parameters
resourcethe used resource name
instanceNumberan index that identifies the resource instance
dataarbitrary associated data string
Returns
a handle

◆ HAL_ReportUsage() [3/3]

int32_t HAL_ReportUsage ( std::string_view resource,
std::string_view data )
inline

Reports usage of a resource of interest.

Repeated calls for the same resource name replace the previous report.

Parameters
resourcethe used resource name; convention is to suffix with "[instanceNum]" for multiple instances of the same resource
dataarbitrary associated data string
Returns
a handle