2023-12-03 18:53:24 -05:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
|
|
|
|
|
|
// THIS FILE WAS AUTO-GENERATED BY ./hal/generate_usage_reporting.py. DO NOT MODIFY
|
|
|
|
|
|
2019-06-28 23:55:14 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-11-08 22:53:20 -08:00
|
|
|
#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
|
|
|
|
|
|
2019-06-28 23:55:14 -04:00
|
|
|
/*
|
|
|
|
|
* Autogenerated file! Do not manually edit this file.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-11-12 16:38:24 +11:00
|
|
|
#ifdef __cplusplus
|
2019-06-28 23:55:14 -04:00
|
|
|
namespace HALUsageReporting {
|
2019-11-12 16:38:49 +11:00
|
|
|
enum tResourceType : int32_t {
|
2019-06-28 23:55:14 -04:00
|
|
|
${usage_reporting_types_cpp}
|
2019-11-12 16:38:49 +11:00
|
|
|
};
|
|
|
|
|
enum tInstances : int32_t {
|
2019-06-28 23:55:14 -04:00
|
|
|
${usage_reporting_instances_cpp}
|
2019-11-12 16:38:49 +11:00
|
|
|
};
|
2019-06-28 23:55:14 -04:00
|
|
|
}
|
2019-11-12 16:38:24 +11:00
|
|
|
#endif
|