RobotCore
1.0
WPILib port to raspberry Pi
Toggle main menu visibility
Loading...
Searching...
No Matches
UsageReporting.java
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
package
org.wpilib.util;
6
7
import
java.util.function.BiConsumer;
8
10
public
final
class
UsageReporting {
11
private
static
final
BiConsumer<String, String> DEFAULT_REPORT_USAGE = (resource, data) -> {};
12
private
static
volatile
BiConsumer<String, String> reportUsageImpl = DEFAULT_REPORT_USAGE;
13
14
private
UsageReporting() {}
15
23
public
static
void
reportUsage
(String resource, String data) {
24
reportUsageImpl.accept(resource, data);
25
}
26
35
public
static
void
reportUsage
(String resource,
int
instanceNumber, String data) {
36
reportUsage
(resource +
"["
+ instanceNumber +
"]"
, data);
37
}
38
45
public
static
synchronized
void
setReportUsageImpl
(BiConsumer<String, String> func) {
46
reportUsageImpl = func ==
null
? DEFAULT_REPORT_USAGE : func;
47
}
48
}
org.wpilib.util.UsageReporting.setReportUsageImpl
static synchronized void setReportUsageImpl(BiConsumer< String, String > func)
Definition
UsageReporting.java:45
org.wpilib.util.UsageReporting.reportUsage
static void reportUsage(String resource, String data)
Definition
UsageReporting.java:23
org.wpilib.util.UsageReporting.reportUsage
static void reportUsage(String resource, int instanceNumber, String data)
Definition
UsageReporting.java:35
org
wpilib
util
UsageReporting.java
Generated by
1.18.0