RobotCore
1.0
WPILib port to raspberry Pi
Toggle main menu visibility
Loading...
Searching...
No Matches
Event.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.concurrent;
6
7
import
org.wpilib.util.WPIUtilJNI;
8
17
public
final
class
Event
implements
AutoCloseable {
24
public
Event
(
boolean
manualReset,
boolean
initialState) {
25
m_handle =
WPIUtilJNI
.makeEvent(manualReset, initialState);
26
}
27
33
public
Event
(
boolean
manualReset) {
34
this
(manualReset,
false
);
35
}
36
38
public
Event
() {
39
this
(
false
,
false
);
40
}
41
42
@Override
43
public
void
close() {
44
if
(m_handle != 0) {
45
WPIUtilJNI
.destroyEvent(m_handle);
46
m_handle = 0;
47
}
48
}
49
55
public
int
getHandle
() {
56
return
m_handle;
57
}
58
60
public
void
set
() {
61
WPIUtilJNI
.setEvent(m_handle);
62
}
63
65
public
void
reset
() {
66
WPIUtilJNI
.resetEvent(m_handle);
67
}
68
69
private
int
m_handle;
70
}
org.wpilib.util.WPIUtilJNI
Definition
WPIUtilJNI.java:17
org.wpilib.util.concurrent.Event.Event
Event()
Definition
Event.java:38
org.wpilib.util.concurrent.Event.Event
Event(boolean manualReset, boolean initialState)
Definition
Event.java:24
org.wpilib.util.concurrent.Event.getHandle
int getHandle()
Definition
Event.java:55
org.wpilib.util.concurrent.Event.Event
Event(boolean manualReset)
Definition
Event.java:33
org.wpilib.util.concurrent.Event.reset
void reset()
Definition
Event.java:65
org
wpilib
util
concurrent
Event.java
Generated by
1.18.0