Class NTManager
- java.lang.Object
-
- edu.wpi.grip.core.operations.network.networktables.NTManager
-
- All Implemented Interfaces:
Manager
,MapNetworkPublisherFactory
,MapNetworkReceiverFactory
public class NTManager extends java.lang.Object implements Manager, MapNetworkPublisherFactory, MapNetworkReceiverFactory
This class encapsulates the way we map various settings to the global NetworkTables state.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Map<java.lang.Integer,java.util.logging.Level>
ntLogLevels
Information from: https://github.com/PeterJohnson/ntcore/blob/master/src/Log.h and https://github.com/PeterJohnson/ntcore/blob/e6054f543a6ab10aa27af6cace855da66d67ee44 /include/ntcore_c.h#L39
-
Constructor Summary
Constructors Constructor Description NTManager(edu.wpi.first.networktables.NetworkTableInstance ntInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkReceiver
create(java.lang.String path)
<P> MapNetworkPublisher<P>
create(java.util.Set<java.lang.String> keys)
void
flushOnPipelineComplete(RunStoppedEvent event)
Flush all changes to networktables when the pipeline completes.void
updateSettings(ProjectSettingsChangedEvent event)
Change the server address according to the project setting.
-
-
-
Field Detail
-
ntLogLevels
protected static final java.util.Map<java.lang.Integer,java.util.logging.Level> ntLogLevels
Information from: https://github.com/PeterJohnson/ntcore/blob/master/src/Log.h and https://github.com/PeterJohnson/ntcore/blob/e6054f543a6ab10aa27af6cace855da66d67ee44 /include/ntcore_c.h#L39
-
-
Method Detail
-
updateSettings
public void updateSettings(ProjectSettingsChangedEvent event)
Change the server address according to the project setting.
-
flushOnPipelineComplete
public void flushOnPipelineComplete(@Nullable RunStoppedEvent event)
Flush all changes to networktables when the pipeline completes.
-
create
public <P> MapNetworkPublisher<P> create(java.util.Set<java.lang.String> keys)
- Specified by:
create
in interfaceMapNetworkPublisherFactory
-
create
public NetworkReceiver create(java.lang.String path)
- Specified by:
create
in interfaceMapNetworkReceiverFactory
-
-