mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
This changes the C++ HALUsageReporting enums to have an explicit type which matches the HAL_Report parameter types. In practice this shouldn't change much except for tooling that might be parsing this header.
55 lines
1.3 KiB
C
55 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// ifdef's definition is to allow for default parameters in C++.
|
|
#ifdef __cplusplus
|
|
/**
|
|
* Reports a hardware usage to the HAL.
|
|
*
|
|
* @param resource the used resource
|
|
* @param instanceNumber the instance of the resource
|
|
* @param context a user specified context index
|
|
* @param feature a user specified feature string
|
|
* @return the index of the added value in NetComm
|
|
*/
|
|
int64_t HAL_Report(int32_t resource, int32_t instanceNumber,
|
|
int32_t context = 0, const char* feature = nullptr);
|
|
#else
|
|
|
|
/**
|
|
* Reports a hardware usage to the HAL.
|
|
*
|
|
* @param resource the used resource
|
|
* @param instanceNumber the instance of the resource
|
|
* @param context a user specified context index
|
|
* @param feature a user specified feature string
|
|
* @return the index of the added value in NetComm
|
|
*/
|
|
int64_t HAL_Report(int32_t resource, int32_t instanceNumber, int32_t context,
|
|
const char* feature);
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
/*
|
|
* Autogenerated file! Do not manually edit this file.
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
namespace HALUsageReporting {
|
|
enum tResourceType : int32_t {
|
|
${usage_reporting_types_cpp}
|
|
};
|
|
enum tInstances : int32_t {
|
|
${usage_reporting_instances_cpp}
|
|
};
|
|
}
|
|
#endif
|