Package org.wpilib.commands3.proto
Class ProtobufCommands.ProtobufCommand
java.lang.Object
us.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
org.wpilib.commands3.proto.ProtobufCommands.ProtobufCommand
- All Implemented Interfaces:
Cloneable
- Enclosing class:
ProtobufCommands
public static final class ProtobufCommands.ProtobufCommand
extends us.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
implements Cloneable
Protobuf type
ProtobufCommand-
Field Summary
Fields inherited from class us.hebi.quickbuf.ProtoMessage
bitField0_, cachedSize, unknownBytesFieldName -
Method Summary
Modifier and TypeMethodDescriptionThe mechanisms required by the command.The mechanisms required by the command.clear()clearId()A unique ID for the command.How much time the command took to execute in its most recent run.The name of the command.The ID of the parent command.The priority level of the command.The mechanisms required by the command.How long the command has taken to run, in aggregate.clone()protected intbooleanstatic us.hebi.quickbuf.Descriptors.Descriptorstatic us.hebi.quickbuf.MessageFactory<ProtobufCommands.ProtobufCommand> intgetId()A unique ID for the command.doubleHow much time the command took to execute in its most recent run.us.hebi.quickbuf.Utf8StringThe name of the command.us.hebi.quickbuf.RepeatedMessage<ProtobufCommands.ProtobufMechanism> The mechanisms required by the command.getName()The name of the command.us.hebi.quickbuf.Utf8StringThe name of the command.intThe ID of the parent command.intThe priority level of the command.us.hebi.quickbuf.RepeatedMessage<ProtobufCommands.ProtobufMechanism> The mechanisms required by the command.doubleHow long the command has taken to run, in aggregate.booleanhasId()A unique ID for the command.booleanHow much time the command took to execute in its most recent run.booleanhasName()The name of the command.booleanThe ID of the parent command.booleanThe priority level of the command.booleanThe mechanisms required by the command.booleanHow long the command has taken to run, in aggregate.booleanisEmpty()mergeFrom(us.hebi.quickbuf.JsonSource input) mergeFrom(us.hebi.quickbuf.ProtoSource input) parseFrom(byte[] data) parseFrom(us.hebi.quickbuf.JsonSource input) parseFrom(us.hebi.quickbuf.ProtoSource input) setId(int value) A unique ID for the command.setLastTimeMs(double value) How much time the command took to execute in its most recent run.setName(CharSequence value) The name of the command.setName(us.hebi.quickbuf.Utf8String value) The name of the command.setParentId(int value) The ID of the parent command.setPriority(int value) The priority level of the command.setTotalTimeMs(double value) How long the command has taken to run, in aggregate.voidwriteTo(us.hebi.quickbuf.JsonSink output) voidwriteTo(us.hebi.quickbuf.ProtoSink output) Methods inherited from class us.hebi.quickbuf.ProtoMessage
bytesDefaultValue, checkInitialized, getCachedSize, getMissingFields, getMissingFields, getMissingFields, getMissingFields, getSerializedSize, getUnknownBytes, hashCode, isInitialized, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, rethrowFromParent, toByteArray, toByteArray, toByteArray, toString, writeDelimitedTo
-
Method Details
-
newInstance
- Returns:
- a new empty instance of
ProtobufCommand
-
hasLastTimeMs
How much time the command took to execute in its most recent run. Only included in a message for an actively running command.
optional double last_time_ms = 6;- Returns:
- whether the lastTimeMs field is set
-
clearLastTimeMs
How much time the command took to execute in its most recent run. Only included in a message for an actively running command.
optional double last_time_ms = 6;- Returns:
- this
-
getLastTimeMs
How much time the command took to execute in its most recent run. Only included in a message for an actively running command.
optional double last_time_ms = 6;- Returns:
- the lastTimeMs
-
setLastTimeMs
How much time the command took to execute in its most recent run. Only included in a message for an actively running command.
optional double last_time_ms = 6;- Parameters:
value- the lastTimeMs to set- Returns:
- this
-
hasTotalTimeMs
How long the command has taken to run, in aggregate. Only included in a message for an actively running command.
optional double total_time_ms = 7;- Returns:
- whether the totalTimeMs field is set
-
clearTotalTimeMs
How long the command has taken to run, in aggregate. Only included in a message for an actively running command.
optional double total_time_ms = 7;- Returns:
- this
-
getTotalTimeMs
How long the command has taken to run, in aggregate. Only included in a message for an actively running command.
optional double total_time_ms = 7;- Returns:
- the totalTimeMs
-
setTotalTimeMs
How long the command has taken to run, in aggregate. Only included in a message for an actively running command.
optional double total_time_ms = 7;- Parameters:
value- the totalTimeMs to set- Returns:
- this
-
hasPriority
The priority level of the command.
optional int32 priority = 4;- Returns:
- whether the priority field is set
-
clearPriority
The priority level of the command.
optional int32 priority = 4;- Returns:
- this
-
getPriority
The priority level of the command.
optional int32 priority = 4;- Returns:
- the priority
-
setPriority
The priority level of the command.
optional int32 priority = 4;- Parameters:
value- the priority to set- Returns:
- this
-
hasId
A unique ID for the command. Different invocations of the same command object have different IDs.
optional uint32 id = 1;- Returns:
- whether the id field is set
-
clearId
A unique ID for the command. Different invocations of the same command object have different IDs.
optional uint32 id = 1;- Returns:
- this
-
getId
A unique ID for the command. Different invocations of the same command object have different IDs.
optional uint32 id = 1;- Returns:
- the id
-
setId
A unique ID for the command. Different invocations of the same command object have different IDs.
optional uint32 id = 1;- Parameters:
value- the id to set- Returns:
- this
-
hasParentId
The ID of the parent command. Not included in the message for top-level commands.
optional uint32 parent_id = 2;- Returns:
- whether the parentId field is set
-
clearParentId
The ID of the parent command. Not included in the message for top-level commands.
optional uint32 parent_id = 2;- Returns:
- this
-
getParentId
The ID of the parent command. Not included in the message for top-level commands.
optional uint32 parent_id = 2;- Returns:
- the parentId
-
setParentId
The ID of the parent command. Not included in the message for top-level commands.
optional uint32 parent_id = 2;- Parameters:
value- the parentId to set- Returns:
- this
-
hasName
The name of the command.
optional string name = 3;- Returns:
- whether the name field is set
-
clearName
The name of the command.
optional string name = 3;- Returns:
- this
-
getName
The name of the command.
optional string name = 3;- Returns:
- the name
-
getNameBytes
The name of the command.
optional string name = 3;- Returns:
- internal
Utf8Stringrepresentation of name for reading
-
getMutableNameBytes
The name of the command.
optional string name = 3;- Returns:
- internal
Utf8Stringrepresentation of name for modifications
-
setName
The name of the command.
optional string name = 3;- Parameters:
value- the name to set- Returns:
- this
-
setName
The name of the command.
optional string name = 3;- Parameters:
value- the name to set- Returns:
- this
-
hasRequirements
The mechanisms required by the command.
repeated .wpi.proto.ProtobufMechanism requirements = 5;- Returns:
- whether the requirements field is set
-
clearRequirements
The mechanisms required by the command.
repeated .wpi.proto.ProtobufMechanism requirements = 5;- Returns:
- this
-
getRequirements
The mechanisms required by the command.
repeated .wpi.proto.ProtobufMechanism requirements = 5;This method returns the internal storage object without modifying any has state. The returned object should not be modified and be treated as read-only. UsegetMutableRequirements()if you want to modify it.- Returns:
- internal storage object for reading
-
getMutableRequirements
public us.hebi.quickbuf.RepeatedMessage<ProtobufCommands.ProtobufMechanism> getMutableRequirements()The mechanisms required by the command.
repeated .wpi.proto.ProtobufMechanism requirements = 5;This method returns the internal storage object and sets the corresponding has state. The returned object will become part of this message and its contents may be modified as long as the has state is not cleared.- Returns:
- internal storage object for modifications
-
addRequirements
The mechanisms required by the command.
repeated .wpi.proto.ProtobufMechanism requirements = 5;- Parameters:
value- the requirements to add- Returns:
- this
-
addAllRequirements
public ProtobufCommands.ProtobufCommand addAllRequirements(ProtobufCommands.ProtobufMechanism... values) The mechanisms required by the command.
repeated .wpi.proto.ProtobufMechanism requirements = 5;- Parameters:
values- the requirements to add- Returns:
- this
-
copyFrom
- Specified by:
copyFromin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
mergeFrom
- Overrides:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
clear
- Specified by:
clearin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
clearQuick
- Overrides:
clearQuickin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
equals
- Specified by:
equalsin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
writeTo
- Specified by:
writeToin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>- Throws:
IOException
-
computeSerializedSize
- Specified by:
computeSerializedSizein classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
mergeFrom
public ProtobufCommands.ProtobufCommand mergeFrom(us.hebi.quickbuf.ProtoSource input) throws IOException - Specified by:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>- Throws:
IOException
-
writeTo
- Overrides:
writeToin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>- Throws:
IOException
-
mergeFrom
public ProtobufCommands.ProtobufCommand mergeFrom(us.hebi.quickbuf.JsonSource input) throws IOException - Overrides:
mergeFromin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>- Throws:
IOException
-
clone
- Specified by:
clonein classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
isEmpty
- Overrides:
isEmptyin classus.hebi.quickbuf.ProtoMessage<ProtobufCommands.ProtobufCommand>
-
parseFrom
public static ProtobufCommands.ProtobufCommand parseFrom(byte[] data) throws us.hebi.quickbuf.InvalidProtocolBufferException - Throws:
us.hebi.quickbuf.InvalidProtocolBufferException
-
parseFrom
public static ProtobufCommands.ProtobufCommand parseFrom(us.hebi.quickbuf.ProtoSource input) throws IOException - Throws:
IOException
-
parseFrom
public static ProtobufCommands.ProtobufCommand parseFrom(us.hebi.quickbuf.JsonSource input) throws IOException - Throws:
IOException
-
getFactory
- Returns:
- factory for creating ProtobufCommand messages
-
getDescriptor
- Returns:
- this type's descriptor.
-