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

Go to the source code of this file.

Functions

void HAL_ReportUsage (std::string_view resource, std::string_view data)
 Reports usage of a resource of interest.
void HAL_ReportUsage (std::string_view resource, int instanceNumber, std::string_view data)
 Reports usage of a resource of interest.

Function Documentation

◆ HAL_ReportUsage() [1/2]

void 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

◆ HAL_ReportUsage() [2/2]

void 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