Class UsageReporting

java.lang.Object
org.wpilib.util.UsageReporting

public final class UsageReporting extends Object
Utility functions for reporting resource usage.
  • Method Details

    • reportUsage

      public static void reportUsage(String resource, String data)
      Reports usage of a resource of interest. Repeated calls for the same resource name replace the previous report.
      Parameters:
      resource - the used resource name
      data - arbitrary associated data string
    • reportUsage

      public static void reportUsage(String resource, int instanceNumber, String data)
      Reports usage of a resource of interest. Repeated calls for the same resource name replace the previous report.
      Parameters:
      resource - the used resource name
      instanceNumber - an index that identifies the resource instance
      data - arbitrary associated data string
    • setReportUsageImpl

      public static void setReportUsageImpl(BiConsumer<String,String> func)
      Sets the implementation used by reportUsage(String, String).
      Parameters:
      func - function called by reportUsage(); pass null to restore the default no-op implementation