RobotCore
1.0
WPILib port to raspberry Pi
Toggle main menu visibility
Loading...
Searching...
No Matches
FileLogger.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.datalog;
6
7
import
java.util.concurrent.atomic.AtomicLong;
8
13
public
class
FileLogger
implements
AutoCloseable {
14
private
final
AtomicLong m_impl;
15
24
public
FileLogger
(String file,
DataLog
log, String key) {
25
m_impl =
new
AtomicLong(
DataLogJNI
.createFileLogger(file, log.
getImpl
(), key));
26
}
27
28
@Override
29
public
void
close() {
30
long
impl = m_impl.getAndSet(0);
31
if
(impl != 0) {
32
DataLogJNI
.freeFileLogger(impl);
33
}
34
}
35
}
org.wpilib.datalog.DataLog
Definition
DataLog.java:30
org.wpilib.datalog.DataLog.getImpl
long getImpl()
Definition
DataLog.java:442
org.wpilib.datalog.DataLogJNI
Definition
DataLogJNI.java:21
org.wpilib.datalog.FileLogger.FileLogger
FileLogger(String file, DataLog log, String key)
Definition
FileLogger.java:24
org
wpilib
datalog
FileLogger.java
Generated by
1.18.0