Files
allwpilib/hal/src/generate/FRCUsageReporting.h.in
David Vo 2da64d15f6 Make usage reporting enums type match (#2069)
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.
2019-11-11 21:38:49 -08:00

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