CTRE Phoenix C++ 5.35.1
Loading...
Searching...
No Matches
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.
 
 ButtonMonitor (const ButtonMonitor &rhs)
 This is able to copy another ButtonMonitor class.
 
virtual ~ButtonMonitor ()
 
virtual void Process ()
 Call this every loop, it monitors for button presses.
 
virtual void OnStart ()
 Do nothing on start.
 
virtual void OnLoop ()
 Process every loop.
 
virtual bool IsDone ()
 
virtual void OnStop ()
 Do nothing on stop.
 
- Public Member Functions inherited from ctre::phoenix::tasking::IProcessable
virtual ~IProcessable ()
 
- Public Member Functions inherited from ctre::phoenix::tasking::ILoopable
virtual ~ILoopable ()
 

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: