Class CommandGovernorInterface

Class Documentation

class CommandGovernorInterface

An interface that is used to gate the execution of a Command. Override this interface to gate various commands based on some conditional logic. For example, create a sub-class of this interface and have isReady return true when the ref system indicates you have enough heat to launch a projectile. Then, use a GovernorLimitedCommand to only run a command that launches a projectile when the CommandGovernorInterface sub-object you created is true.

Public Functions

inline virtual void onGovernedCommandInitialized()

Called once when the command associated with this governor is scheduled.

virtual bool isReady() = 0

Returns true if the Command being governed by the governor may execute.

virtual bool isFinished() = 0

Returns true if the Command being governed by the governor should stop executing.