RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
NetworkTableEvent.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
5package org.wpilib.networktables;
6
13public final class NetworkTableEvent {
15 public enum Kind {
20 IMMEDIATE(0x0001),
21
23 CONNECTED(0x0002),
24
26 DISCONNECTED(0x0004),
27
29 CONNECTION(0x0004 | 0x0002),
30
32 PUBLISH(0x0008),
33
35 UNPUBLISH(0x0010),
36
38 PROPERTIES(0x0020),
39
41 TOPIC(0x0020 | 0x0010 | 0x0008),
42
44 VALUE_REMOTE(0x0040),
45
47 VALUE_LOCAL(0x0080),
48
50 VALUE_ALL(0x0080 | 0x0040),
51
53 LOG_MESSAGE(0x0100),
54
56 TIME_SYNC(0x0200);
57
58 private final int value;
59
60 Kind(int value) {
61 this.value = value;
62 }
63
69 public int getValue() {
70 return value;
71 }
72 }
73
78 public final int listener;
79
94 public boolean is(Kind kind) {
95 return (m_flags & kind.getValue()) != 0;
96 }
97
98 private final int m_flags;
99
102
104 public final TopicInfo topicInfo;
105
108
110 public final LogMessage logMessage;
111
114
129 int listener,
130 int flags,
136 this.m_inst = inst;
137 this.listener = listener;
138 this.m_flags = flags;
139 this.connInfo = connInfo;
140 this.topicInfo = topicInfo;
141 this.valueData = valueData;
142 this.logMessage = logMessage;
143 this.timeSyncData = timeSyncData;
144 }
145
146 /* Network table instance. */
147 private final NetworkTableInstance m_inst;
148
155 return m_inst;
156 }
157}
NetworkTableEvent(NetworkTableInstance inst, int listener, int flags, ConnectionInfo connInfo, TopicInfo topicInfo, ValueEventData valueData, LogMessage logMessage, TimeSyncEventData timeSyncData)