WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
UsageReporting.h
Go to the documentation of this file.
1
2#ifndef __UsageReporting_h__
3#define __UsageReporting_h__
4
5#ifdef _WIN32
6#include <stdint.h>
7#define EXPORT_FUNC __declspec(dllexport) __cdecl
8#elif defined(__vxworks)
9#include <vxWorks.h>
10#define EXPORT_FUNC
11#else
12#include <stdint.h>
13#include <stdlib.h>
14#define EXPORT_FUNC
15#endif
16
17#define kUsageReporting_version 1
18
20{
21typedef enum
22{
150
151// kResourceType_MaximumID = 255,
153
154typedef enum
155{
236} tInstances;
237
238/**
239 * Report the usage of a resource of interest.
240 *
241 * @param resource one of the values in the tResourceType above (max value 51).
242 * @param instanceNumber an index that identifies the resource instance.
243 * @param context an optional additional context number for some cases (such as module number). Set to 0 to omit.
244 * @param feature a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string.
245 */
246uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context = 0, const char* feature = NULL);
247} // namespace nUsageReporting
248
249#ifdef __cplusplus
250extern "C"
251{
252#endif
253
254 uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char* feature);
255
256#ifdef __cplusplus
257}
258#endif
259
260#endif // __UsageReporting_h__
uint32_t EXPORT_FUNC FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, uint8_t instanceNumber, uint8_t context, const char *feature)
#define EXPORT_FUNC
Definition UsageReporting.h:14
Definition base.h:2607
Definition UsageReporting.h:20
uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, uint8_t context=0, const char *feature=NULL)
Report the usage of a resource of interest.
tInstances
Definition UsageReporting.h:155
@ kCANPlugin_2CAN
Definition UsageReporting.h:164
@ kDriverStationEIO_FixedDigitalOut
Definition UsageReporting.h:201
@ kCANPlugin_BlackJagBridge
Definition UsageReporting.h:163
@ kRobotDriveSwerve_AdvantageKit
Definition UsageReporting.h:190
@ kRobotDrive2_DifferentialCurvature
Definition UsageReporting.h:181
@ kRobotDrive2_KilloughPolar
Definition UsageReporting.h:185
@ kLoggingFramework_Monologue
Definition UsageReporting.h:230
@ kDataLogLocation_Onboard
Definition UsageReporting.h:226
@ kDashboard_QFRCDashboard
Definition UsageReporting.h:224
@ kADXL345_SPI
Definition UsageReporting.h:205
@ kRobotDriveSwerve_CTRE
Definition UsageReporting.h:188
@ kFramework_RobotBuilder
Definition UsageReporting.h:170
@ kDriverStationCIO_Analog
Definition UsageReporting.h:191
@ kDriverStationEIO_AnalogIn
Definition UsageReporting.h:195
@ kOdometry_MecanumDrive
Definition UsageReporting.h:215
@ kSmartDashboard_LiveWindow
Definition UsageReporting.h:210
@ kKinematics_MecanumDrive
Definition UsageReporting.h:212
@ kCommand2_Scheduler
Definition UsageReporting.h:208
@ kFramework_ROS
Definition UsageReporting.h:169
@ kDriverStationEIO_Acceleration
Definition UsageReporting.h:194
@ kFramework_AdvantageKit
Definition UsageReporting.h:171
@ kRobotDrive2_MecanumPolar
Definition UsageReporting.h:183
@ kPDP_Unknown
Definition UsageReporting.h:235
@ kDashboard_Unknown
Definition UsageReporting.h:217
@ kDriverStationEIO_DigitalOut
Definition UsageReporting.h:200
@ kDashboard_AdvantageScope
Definition UsageReporting.h:223
@ kDashboard_FRCWebComponents
Definition UsageReporting.h:225
@ kRobotDrive_MecanumPolar
Definition UsageReporting.h:177
@ kDriverStationCIO_DigitalOut
Definition UsageReporting.h:193
@ kDriverStationEIO_TouchSlider
Definition UsageReporting.h:204
@ kDriverStationEIO_Encoder
Definition UsageReporting.h:203
@ kRobotDrive2_DifferentialTank
Definition UsageReporting.h:180
@ kLanguage_DotNet
Definition UsageReporting.h:160
@ kPDP_CTRE
Definition UsageReporting.h:233
@ kDashboard_Glass
Definition UsageReporting.h:218
@ kDriverStationEIO_DigitalIn
Definition UsageReporting.h:199
@ kLanguage_Kotlin
Definition UsageReporting.h:161
@ kLoggingFramework_AdvantageKit
Definition UsageReporting.h:231
@ kLanguage_Rust
Definition UsageReporting.h:162
@ kDashboard_Elastic
Definition UsageReporting.h:221
@ kLoggingFramework_Other
Definition UsageReporting.h:228
@ kLoggingFramework_DogLog
Definition UsageReporting.h:232
@ kOdometry_SwerveDrive
Definition UsageReporting.h:216
@ kRobotDrive_Tank
Definition UsageReporting.h:176
@ kRobotDrive_MecanumCartesian
Definition UsageReporting.h:178
@ kRobotDrive_ArcadeRatioCurve
Definition UsageReporting.h:175
@ kDriverStationEIO_AnalogOut
Definition UsageReporting.h:196
@ kLanguage_CPlusPlus
Definition UsageReporting.h:157
@ kDashboard_SmartDashboard
Definition UsageReporting.h:219
@ kRobotDrive2_KilloughCartesian
Definition UsageReporting.h:184
@ kDashboard_Shuffleboard
Definition UsageReporting.h:220
@ kDriverStationEIO_Button
Definition UsageReporting.h:197
@ kRobotDriveSwerve_Other
Definition UsageReporting.h:186
@ kRobotDrive2_DifferentialArcade
Definition UsageReporting.h:179
@ kDriverStationEIO_PWM
Definition UsageReporting.h:202
@ kFramework_Timed
Definition UsageReporting.h:168
@ kDriverStationEIO_LED
Definition UsageReporting.h:198
@ kRobotDrive_ArcadeButtonSpin
Definition UsageReporting.h:174
@ kKinematics_SwerveDrive
Definition UsageReporting.h:213
@ kADXL345_I2C
Definition UsageReporting.h:206
@ kFramework_Iterative
Definition UsageReporting.h:165
@ kFramework_CommandControl
Definition UsageReporting.h:167
@ kDriverStationCIO_DigitalIn
Definition UsageReporting.h:192
@ kLanguage_LabVIEW
Definition UsageReporting.h:156
@ kLanguage_Python
Definition UsageReporting.h:159
@ kPDP_REV
Definition UsageReporting.h:234
@ kRobotDriveSwerve_MaxSwerve
Definition UsageReporting.h:189
@ kOdometry_DifferentialDrive
Definition UsageReporting.h:214
@ kRobotDrive_ArcadeStandard
Definition UsageReporting.h:173
@ kDashboard_LabVIEW
Definition UsageReporting.h:222
@ kDataLogLocation_USB
Definition UsageReporting.h:227
@ kFramework_MagicBot
Definition UsageReporting.h:172
@ kCommand_Scheduler
Definition UsageReporting.h:207
@ kRobotDriveSwerve_YAGSL
Definition UsageReporting.h:187
@ kLanguage_Java
Definition UsageReporting.h:158
@ kFramework_Simple
Definition UsageReporting.h:166
@ kRobotDrive2_MecanumCartesian
Definition UsageReporting.h:182
@ kKinematics_DifferentialDrive
Definition UsageReporting.h:211
@ kLoggingFramework_Epilogue
Definition UsageReporting.h:229
@ kSmartDashboard_Instance
Definition UsageReporting.h:209
tResourceType
Definition UsageReporting.h:22
@ kResourceType_CTRE_future5
Definition UsageReporting.h:92
@ kResourceType_TrapezoidProfile
Definition UsageReporting.h:113
@ kResourceType_PathWeaverTrajectory
Definition UsageReporting.h:144
@ kResourceType_ExponentialProfile
Definition UsageReporting.h:125
@ kResourceType_PIDController2
Definition UsageReporting.h:108
@ kResourceType_RevSparkFlexCAN
Definition UsageReporting.h:137
@ kResourceType_LoggingFramework
Definition UsageReporting.h:141
@ kResourceType_ThriftyNova
Definition UsageReporting.h:146
@ kResourceType_HiTechnicCompass
Definition UsageReporting.h:70
@ kResourceType_PWMVictorSPX
Definition UsageReporting.h:104
@ kResourceType_RevServoHub
Definition UsageReporting.h:147
@ kResourceType_AddressableLEDs
Definition UsageReporting.h:115
@ kResourceType_I2C
Definition UsageReporting.h:44
@ kResourceType_Odometry
Definition UsageReporting.h:111
@ kResourceType_SPI
Definition UsageReporting.h:58
@ kResourceType_Counter
Definition UsageReporting.h:34
@ kResourceType_CTRE_future6
Definition UsageReporting.h:93
@ kResourceType_NavX
Definition UsageReporting.h:97
@ kResourceType_PhotonPoseEstimator
Definition UsageReporting.h:128
@ kResourceType_CTRE_future7
Definition UsageReporting.h:117
@ kResourceType_ADIS16470
Definition UsageReporting.h:107
@ kResourceType_ProfiledPIDController
Definition UsageReporting.h:109
@ kResourceType_Shuffleboard
Definition UsageReporting.h:101
@ kResourceType_Redux_future1
Definition UsageReporting.h:132
@ kResourceType_DriverStationLCD
Definition UsageReporting.h:40
@ kResourceType_ADXRS450
Definition UsageReporting.h:77
@ kResourceType_DigitalOutput
Definition UsageReporting.h:37
@ kResourceType_XboxController
Definition UsageReporting.h:95
@ kResourceType_PWFSEN36005
Definition UsageReporting.h:148
@ kResourceType_Dashboard
Definition UsageReporting.h:35
@ kResourceType_RevSparkMaxPWM
Definition UsageReporting.h:105
@ kResourceType_Victor
Definition UsageReporting.h:61
@ kResourceType_ScanseSweep
Definition UsageReporting.h:100
@ kResourceType_AnalogTriggerOutput
Definition UsageReporting.h:31
@ kResourceType_PCM
Definition UsageReporting.h:83
@ kResourceType_CTRE_future10
Definition UsageReporting.h:120
@ kResourceType_Command
Definition UsageReporting.h:63
@ kResourceType_PS4Controller
Definition UsageReporting.h:126
@ kResourceType_PWMTalonSRX
Definition UsageReporting.h:74
@ kResourceType_CANJaguar
Definition UsageReporting.h:32
@ kResourceType_PCVideoServer
Definition UsageReporting.h:65
@ kResourceType_DriverStationEIO
Definition UsageReporting.h:39
@ kResourceType_Gyro
Definition UsageReporting.h:43
@ kResourceType_Koors40
Definition UsageReporting.h:145
@ kResourceType_Module
Definition UsageReporting.h:24
@ kResourceType_DigitalInput
Definition UsageReporting.h:36
@ kResourceType_CTRE_future2
Definition UsageReporting.h:89
@ kResourceType_ADIS16448
Definition UsageReporting.h:81
@ kResourceType_DigitalGlitchFilter
Definition UsageReporting.h:80
@ kResourceType_Task
Definition UsageReporting.h:59
@ kResourceType_CTRE_future11
Definition UsageReporting.h:121
@ kResourceType_SRF08
Definition UsageReporting.h:71
@ kResourceType_LinearFilter
Definition UsageReporting.h:94
@ kResourceType_Talon
Definition UsageReporting.h:67
@ kResourceType_CAN
Definition UsageReporting.h:102
@ kResourceType_AnalogTrigger
Definition UsageReporting.h:30
@ kResourceType_CTRE_future12
Definition UsageReporting.h:122
@ kResourceType_CANifier
Definition UsageReporting.h:86
@ kResourceType_PathPlannerPath
Definition UsageReporting.h:129
@ kResourceType_Compressor
Definition UsageReporting.h:33
@ kResourceType_SmartDashboard
Definition UsageReporting.h:66
@ kResourceType_DutyCycle
Definition UsageReporting.h:114
@ kResourceType_DataLogManager
Definition UsageReporting.h:140
@ kResourceType_LaserShark
Definition UsageReporting.h:149
@ kResourceType_ChoreoTrajectory
Definition UsageReporting.h:142
@ kResourceType_CTRE_future14
Definition UsageReporting.h:124
@ kResourceType_AnalogChannel
Definition UsageReporting.h:29
@ kResourceType_Pixy
Definition UsageReporting.h:98
@ kResourceType_Pixy2
Definition UsageReporting.h:99
@ kResourceType_ChoreoTrigger
Definition UsageReporting.h:143
@ kResourceType_DriverStationCIO
Definition UsageReporting.h:38
@ kResourceType_PathFindingCommand
Definition UsageReporting.h:131
@ kResourceType_MindsensorsSD540
Definition UsageReporting.h:79
@ kResourceType_HiTechnicAccel
Definition UsageReporting.h:69
@ kResourceType_RevSparkFlexPWM
Definition UsageReporting.h:138
@ kResourceType_Solenoid
Definition UsageReporting.h:57
@ kResourceType_NidecBrushless
Definition UsageReporting.h:85
@ kResourceType_PhotonCamera
Definition UsageReporting.h:127
@ kResourceType_KinectStick
Definition UsageReporting.h:49
@ kResourceType_Accelerometer
Definition UsageReporting.h:27
@ kResourceType_CTRE_future9
Definition UsageReporting.h:119
@ kResourceType_PDP
Definition UsageReporting.h:82
@ kResourceType_AnalogOutput
Definition UsageReporting.h:72
@ kResourceType_Redux_future3
Definition UsageReporting.h:134
@ kResourceType_PIDController
Definition UsageReporting.h:50
@ kResourceType_Redux_future5
Definition UsageReporting.h:136
@ kResourceType_ADXL362
Definition UsageReporting.h:76
@ kResourceType_VictorSP
Definition UsageReporting.h:73
@ kResourceType_Controller
Definition UsageReporting.h:23
@ kResourceType_RobotDrive
Definition UsageReporting.h:54
@ kResourceType_CTRE_future4
Definition UsageReporting.h:91
@ kResourceType_ADXL345
Definition UsageReporting.h:28
@ kResourceType_BangBangController
Definition UsageReporting.h:139
@ kResourceType_Joystick
Definition UsageReporting.h:47
@ kResourceType_Jaguar
Definition UsageReporting.h:46
@ kResourceType_Encoder
Definition UsageReporting.h:41
@ kResourceType_UsbCamera
Definition UsageReporting.h:96
@ kResourceType_CTRE_future8
Definition UsageReporting.h:118
@ kResourceType_Kinect
Definition UsageReporting.h:48
@ kResourceType_FusionVenom
Definition UsageReporting.h:116
@ kResourceType_SerialPort
Definition UsageReporting.h:55
@ kResourceType_Kinematics
Definition UsageReporting.h:110
@ kResourceType_Relay
Definition UsageReporting.h:53
@ kResourceType_Button
Definition UsageReporting.h:62
@ kResourceType_Servo
Definition UsageReporting.h:56
@ kResourceType_HiTechnicColorSensor
Definition UsageReporting.h:68
@ kResourceType_GearTooth
Definition UsageReporting.h:42
@ kResourceType_Preferences
Definition UsageReporting.h:51
@ kResourceType_DigilentDMC60
Definition UsageReporting.h:103
@ kResourceType_Ultrasonic
Definition UsageReporting.h:60
@ kResourceType_TalonFX
Definition UsageReporting.h:87
@ kResourceType_CTRE_future1
Definition UsageReporting.h:88
@ kResourceType_CANPlugin
Definition UsageReporting.h:26
@ kResourceType_CTRE_future13
Definition UsageReporting.h:123
@ kResourceType_Framework
Definition UsageReporting.h:45
@ kResourceType_CANTalonSRX
Definition UsageReporting.h:75
@ kResourceType_CTRE_future3
Definition UsageReporting.h:90
@ kResourceType_PathPlannerAuto
Definition UsageReporting.h:130
@ kResourceType_PWM
Definition UsageReporting.h:52
@ kResourceType_Redux_future2
Definition UsageReporting.h:133
@ kResourceType_Language
Definition UsageReporting.h:25
@ kResourceType_RevSPARK
Definition UsageReporting.h:78
@ kResourceType_RevSparkMaxCAN
Definition UsageReporting.h:106
@ kResourceType_AxisCamera
Definition UsageReporting.h:64
@ kResourceType_Redux_future4
Definition UsageReporting.h:135
@ kResourceType_Units
Definition UsageReporting.h:112
@ kResourceType_PigeonIMU
Definition UsageReporting.h:84