CTRE Phoenix C++ 5.33.1
ctre::phoenix::tasking::ButtonMonitor Class Reference

Class to handle button events. More...

#include <ctre/phoenix/tasking/ButtonMonitor.h>

Inheritance diagram for ctre::phoenix::tasking::ButtonMonitor:
ctre::phoenix::tasking::IProcessable ctre::phoenix::tasking::ILoopable

Classes

class  IButtonPressEventHandler
 Interface for classes that handle button events. More...
 

Public Member Functions

 ButtonMonitor (frc::GenericHID *controller, int buttonIndex, IButtonPressEventHandler *ButtonPressEventHandler)
 Constructor for ButtonMonitor. More...
 
 ButtonMonitor (const ButtonMonitor &rhs)
 This is able to copy another ButtonMonitor class. More...
 
virtual ~ButtonMonitor ()
 
virtual void Process ()
 Call this every loop, it monitors for button presses. More...
 
virtual void OnStart ()
 Do nothing on start. More...
 
virtual void OnLoop ()
 Process every loop. More...
 
virtual bool IsDone ()
 
virtual void OnStop ()
 Do nothing on stop. More...
 
- Public Member Functions inherited from ctre::phoenix::tasking::IProcessable
virtual ~IProcessable ()
 
virtual void Process ()=0
 This function is called when a process occurs. More...
 
- Public Member Functions inherited from ctre::phoenix::tasking::ILoopable
virtual ~ILoopable ()
 
virtual void OnStart ()=0
 Function called when object starts. More...
 
virtual void OnLoop ()=0
 Function called every loop. More...
 
virtual bool IsDone ()=0
 
virtual void OnStop ()=0
 Function called when object stops. More...
 

Detailed Description

Class to handle button events.

Constructor & Destructor Documentation

◆ ButtonMonitor() [1/2]

ctre::phoenix::tasking::ButtonMonitor::ButtonMonitor ( frc::GenericHID *  controller,
int  buttonIndex,
IButtonPressEventHandler ButtonPressEventHandler 
)

Constructor for ButtonMonitor.

Parameters
controllerController to monitor
buttonIndexButton to monitor
ButtonPressEventHandlerClass that will handle buttonPresses

◆ ButtonMonitor() [2/2]

ctre::phoenix::tasking::ButtonMonitor::ButtonMonitor ( const ButtonMonitor rhs)

This is able to copy another ButtonMonitor class.

◆ ~ButtonMonitor()

virtual ctre::phoenix::tasking::ButtonMonitor::~ButtonMonitor ( )
inlinevirtual

Member Function Documentation

◆ IsDone()

virtual bool ctre::phoenix::tasking::ButtonMonitor::IsDone ( )
virtual
Returns
false, this is never done

Implements ctre::phoenix::tasking::ILoopable.

◆ OnLoop()

virtual void ctre::phoenix::tasking::ButtonMonitor::OnLoop ( )
virtual

Process every loop.

Implements ctre::phoenix::tasking::ILoopable.

◆ OnStart()

virtual void ctre::phoenix::tasking::ButtonMonitor::OnStart ( )
virtual

Do nothing on start.

Implements ctre::phoenix::tasking::ILoopable.

◆ OnStop()

virtual void ctre::phoenix::tasking::ButtonMonitor::OnStop ( )
virtual

Do nothing on stop.

Implements ctre::phoenix::tasking::ILoopable.

◆ Process()

virtual void ctre::phoenix::tasking::ButtonMonitor::Process ( )
virtual

Call this every loop, it monitors for button presses.

Implements ctre::phoenix::tasking::IProcessable.


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