Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
tap::control::governor::CommandGovernorInterface Class Referenceabstract

#include <command_governor_interface.hpp>

Public Member Functions

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.
 

Detailed Description

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.

Member Function Documentation

◆ isFinished()

virtual bool tap::control::governor::CommandGovernorInterface::isFinished ( )
pure virtual

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

◆ isReady()

virtual bool tap::control::governor::CommandGovernorInterface::isReady ( )
pure virtual

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

◆ onGovernedCommandInitialized()

virtual void tap::control::governor::CommandGovernorInterface::onGovernedCommandInitialized ( )
inlinevirtual

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


The documentation for this class was generated from the following file: