WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
frc::TimedRobot Class Reference

TimedRobot implements the IterativeRobotBase robot program framework. More...

#include <TimedRobot.h>

Inheritance diagram for frc::TimedRobot:
frc::IterativeRobotBase frc::RobotBase

Public Member Functions

void StartCompetition () override
 Provide an alternate "main loop" via StartCompetition().
 
void SetPeriod (double seconds)
 Set time period between calls to Periodic() functions. More...
 
- Public Member Functions inherited from frc::IterativeRobotBase
virtual void RobotInit ()
 Robot-wide initialization code should go here. More...
 
virtual void DisabledInit ()
 Initialization code for disabled mode should go here. More...
 
virtual void AutonomousInit ()
 Initialization code for autonomous mode should go here. More...
 
virtual void TeleopInit ()
 Initialization code for teleop mode should go here. More...
 
virtual void TestInit ()
 Initialization code for test mode should go here. More...
 
virtual void RobotPeriodic ()
 Periodic code for all modes should go here. More...
 
virtual void DisabledPeriodic ()
 Periodic code for disabled mode should go here. More...
 
virtual void AutonomousPeriodic ()
 Periodic code for autonomous mode should go here. More...
 
virtual void TeleopPeriodic ()
 Periodic code for teleop mode should go here. More...
 
virtual void TestPeriodic ()
 Periodic code for test mode should go here. More...
 
- Public Member Functions inherited from frc::RobotBase
bool IsEnabled () const
 Determine if the Robot is currently enabled. More...
 
bool IsDisabled () const
 Determine if the Robot is currently disabled. More...
 
bool IsAutonomous () const
 Determine if the robot is currently in Autonomous mode. More...
 
bool IsOperatorControl () const
 Determine if the robot is currently in Operator Control mode. More...
 
bool IsTest () const
 Determine if the robot is currently in Test mode. More...
 
bool IsNewDataAvailable () const
 Indicates if new data is available from the driver station. More...
 

Static Public Attributes

static constexpr double kDefaultPeriod = 0.02
 

Additional Inherited Members

- Static Public Member Functions inherited from frc::RobotBase
static std::thread::id GetThreadId ()
 Gets the ID of the main robot thread.
 
- Protected Member Functions inherited from frc::IterativeRobotBase
void LoopFunc ()
 
- Protected Member Functions inherited from frc::RobotBase
 RobotBase ()
 Constructor for a generic robot program. More...
 
 RobotBase (const RobotBase &)=delete
 
RobotBaseoperator= (const RobotBase &)=delete
 
- Protected Attributes inherited from frc::RobotBase
DriverStationm_ds
 
- Static Protected Attributes inherited from frc::RobotBase
static std::thread::id m_threadId
 

Detailed Description

TimedRobot implements the IterativeRobotBase robot program framework.

The TimedRobot class is intended to be subclassed by a user creating a robot program.

Periodic() functions from the base class are called on an interval by a Notifier instance.

Member Function Documentation

void TimedRobot::SetPeriod ( double  period)

Set time period between calls to Periodic() functions.

A timer event is queued for periodic event notification. Each time the interrupt occurs, the event will be immediately requeued for the same time interval.

Parameters
periodPeriod in seconds.

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