RobotCore
Robot Core Documentation
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
robotCore.IterativeRobotBase Class Referenceabstract
Inheritance diagram for robotCore.IterativeRobotBase:
robotCore.TimedRobot

Public Member Functions

void robotInit ()
 
void simulationInit ()
 
void disabledInit ()
 
void autonomousInit ()
 
void teleopInit ()
 
void testInit ()
 
void robotPeriodic ()
 
void simulationPeriodic ()
 
void disabledPeriodic ()
 
void autonomousPeriodic ()
 
void teleopPeriodic ()
 
void testPeriodic ()
 

Protected Member Functions

 IterativeRobotBase (double period)
 
void loopFunc ()
 

Protected Attributes

int m_period
 

Detailed Description

IterativeRobotBase implements a specific type of robot program framework, extending the RobotBase class.

The IterativeRobotBase class does not implement startCompetition(), so it should not be used by teams directly.

This class provides the following functions which are called by the main loop, startCompetition(), at the appropriate times:

robotInit() – provide for initialization at robot power-on

init() functions – each of the following functions is called once when the appropriate mode is entered:

periodic() functions – each of these functions is called on an interval:

Constructor & Destructor Documentation

◆ IterativeRobotBase()

robotCore.IterativeRobotBase.IterativeRobotBase ( double  period)
protected

Constructor for IterativeRobotBase.

Parameters
periodPeriod in seconds.

Member Function Documentation

◆ autonomousInit()

void robotCore.IterativeRobotBase.autonomousInit ( )

Initialization code for autonomous mode should go here.

Users should override this method for initialization code which will be called each time the robot enters autonomous mode.

◆ autonomousPeriodic()

void robotCore.IterativeRobotBase.autonomousPeriodic ( )

Periodic code for autonomous mode should go here.

◆ disabledInit()

void robotCore.IterativeRobotBase.disabledInit ( )

Initialization code for disabled mode should go here.

Users should override this method for initialization code which will be called each time the robot enters disabled mode.

◆ disabledPeriodic()

void robotCore.IterativeRobotBase.disabledPeriodic ( )

Periodic code for disabled mode should go here.

◆ robotInit()

void robotCore.IterativeRobotBase.robotInit ( )

Provide an alternate "main loop" via startCompetition(). Robot-wide initialization code should go here.

Users should override this method for default Robot-wide initialization which will be called when the robot is first powered on. It will be called exactly one time.

Warning: the Driver Station "Robot Code" light and FMS "Robot Ready" indicators will be off until RobotInit() exits. Code in RobotInit() that waits for enable will cause the robot to never indicate that the code is ready, causing the robot to be bypassed in a match.

◆ robotPeriodic()

void robotCore.IterativeRobotBase.robotPeriodic ( )

Periodic code for all robot modes should go here.

◆ simulationInit()

void robotCore.IterativeRobotBase.simulationInit ( )

Robot-wide simulation initialization code should go here.

Users should override this method for default Robot-wide simulation related initialization which will be called when the robot is first started. It will be called exactly one time after RobotInit is called only when the robot is in simulation.

◆ simulationPeriodic()

void robotCore.IterativeRobotBase.simulationPeriodic ( )

Periodic simulation code should go here.

This function is called in a simulated robot after user code executes.

◆ teleopInit()

void robotCore.IterativeRobotBase.teleopInit ( )

Initialization code for teleop mode should go here.

Users should override this method for initialization code which will be called each time the robot enters teleop mode.

◆ teleopPeriodic()

void robotCore.IterativeRobotBase.teleopPeriodic ( )

Periodic code for teleop mode should go here.

◆ testInit()

void robotCore.IterativeRobotBase.testInit ( )

Initialization code for test mode should go here.

Users should override this method for initialization code which will be called each time the robot enters test mode.

◆ testPeriodic()

void robotCore.IterativeRobotBase.testPeriodic ( )

Periodic code for test mode should go here.


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