Package edu.wpi.first.wpilibj.command
Class PrintCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj.SendableBase
-
- edu.wpi.first.wpilibj.command.Command
-
- edu.wpi.first.wpilibj.command.InstantCommand
-
- edu.wpi.first.wpilibj.command.PrintCommand
-
- All Implemented Interfaces:
Sendable,AutoCloseable
public class PrintCommand extends InstantCommand
APrintCommandis a command which prints out a string when it is initialized, and then immediately finishes. It is useful if you want aCommandGroupto print out a string when it reaches a certain point.
-
-
Constructor Summary
Constructors Constructor Description PrintCommand(String message)Instantiates aPrintCommandwhich will print the given message when it is run.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinitialize()The initialize method is called the first time this Command is run after being started.-
Methods inherited from class edu.wpi.first.wpilibj.command.InstantCommand
_initialize, isFinished
-
Methods inherited from class edu.wpi.first.wpilibj.command.Command
cancel, clearRequirements, doesRequire, end, execute, getGroup, initSendable, interrupted, isCanceled, isCompleted, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setRunWhenDisabled, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled
-
Methods inherited from class edu.wpi.first.wpilibj.SendableBase
addChild, close, free, getName, getSubsystem, setName, setName, setName, setSubsystem
-
-
-
-
Constructor Detail
-
PrintCommand
public PrintCommand(String message)
Instantiates aPrintCommandwhich will print the given message when it is run.- Parameters:
message- the message to print
-
-
Method Detail
-
initialize
protected void initialize()
Description copied from class:CommandThe initialize method is called the first time this Command is run after being started.- Overrides:
initializein classCommand
-
-