Class NetworkPublishOperation<D>
- java.lang.Object
-
- edu.wpi.grip.core.operations.network.NetworkPublishOperation<D>
-
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
PublishAnnotatedOperation
,ROSPublishOperation
public abstract class NetworkPublishOperation<D> extends java.lang.Object implements Operation
Abstract superclass for operations that publish data.
-
-
Field Summary
Fields Modifier and Type Field Description protected InputSocket<D>
dataSocket
protected java.lang.Class<D>
dataType
protected InputSocket<java.lang.String>
nameSocket
-
Constructor Summary
Constructors Modifier Constructor Description protected
NetworkPublishOperation(InputSocket.Factory isf, java.lang.Class<D> dataType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.List<InputSocket<java.lang.Boolean>>
createFlagSockets()
Creates a list of input sockets that control which items to publish.protected abstract void
doPublish()
Publishes the data.java.util.List<InputSocket>
getInputSockets()
java.util.List<OutputSocket>
getOutputSockets()
void
perform()
Performs thisOperation
.
-
-
-
Field Detail
-
dataType
protected final java.lang.Class<D> dataType
-
dataSocket
protected final InputSocket<D> dataSocket
-
nameSocket
protected final InputSocket<java.lang.String> nameSocket
-
-
Constructor Detail
-
NetworkPublishOperation
protected NetworkPublishOperation(InputSocket.Factory isf, java.lang.Class<D> dataType)
-
-
Method Detail
-
getInputSockets
public java.util.List<InputSocket> getInputSockets()
- Specified by:
getInputSockets
in interfaceOperation
- Returns:
- A list of sockets for the inputs that the operation expects.
-
createFlagSockets
protected abstract java.util.List<InputSocket<java.lang.Boolean>> createFlagSockets()
Creates a list of input sockets that control which items to publish.
-
getOutputSockets
public java.util.List<OutputSocket> getOutputSockets()
- Specified by:
getOutputSockets
in interfaceOperation
- Returns:
- A list of sockets for the outputs that the operation produces.
-
doPublish
protected abstract void doPublish()
Publishes the data.
-
-