TrcRobot Class Reference

#include <TrcRobot.h>

List of all members.

Public Member Functions

virtual void RobotInit (void)
virtual void DisabledInit (void)
virtual void AutonomousInit (void)
virtual void TeleopInit (void)
virtual void DisabledPeriodic (void)
virtual void AutonomousPeriodic (void)
virtual void TeleopPeriodic (void)
virtual void DisabledContinuous (void)
virtual void AutonomousContinuous (void)
virtual void TeleopContinuous (void)
void SetPeriod (__in double period)
double GetPeriod (void)
double GetLoopsPerSec (void)
void StartCompetition (void)

Static Public Attributes

static const double kDefaultPeriod = 0.0

Protected Member Functions

 TrcRobot (void)
 ~TrcRobot (void)

Detailed Description

This class defines and implements the TrcRobot object. This object is basically identical to the IterativeRobot object in the WPI library. It is replicated here mainly for debugging purpose because tracing has been added to the functions as well as performance benchmark.


Constructor & Destructor Documentation

TrcRobot::TrcRobot ( void   )  [inline, protected]

Constructor for the TrcRobot class.

TrcRobot::~TrcRobot ( void   )  [inline, protected]

Destructor for the TrcRobot class.


Member Function Documentation

virtual void TrcRobot::AutonomousContinuous ( void   )  [inline, virtual]

This function is called continuously in autonomous mode.

virtual void TrcRobot::AutonomousInit ( void   )  [inline, virtual]

This function is called before starting the autonomous mode.

virtual void TrcRobot::AutonomousPeriodic ( void   )  [inline, virtual]

This function is called periodically at fixed intervals in autonomous mode.

virtual void TrcRobot::DisabledContinuous ( void   )  [inline, virtual]

This function is called continuously in disabled mode.

virtual void TrcRobot::DisabledInit ( void   )  [inline, virtual]

This function is called before starting the disabled mode.

virtual void TrcRobot::DisabledPeriodic ( void   )  [inline, virtual]

This function is called periodically at fixed intervals in disabled mode.

double TrcRobot::GetLoopsPerSec ( void   )  [inline]

This function gets the number of loops per second for the main loop.

Returns:
Returns frequency of the periodic function calls.
double TrcRobot::GetPeriod ( void   )  [inline]

This function gets the period for the periodic functions.

Returns:
Returns period of the periodic function calls.
virtual void TrcRobot::RobotInit ( void   )  [inline, virtual]

This function is called one time to do robot-wide initialization.

void TrcRobot::SetPeriod ( __in double  period  )  [inline]

This function sets the period for the periodic functions.

Parameters:
period The period of the periodic function calls. 0.0 means sync to driver station control data.
void TrcRobot::StartCompetition ( void   )  [inline]

Start a competition. This specific StartCompetition() implements "main loop" behavior like that of the FRC control system in 2008 and earlier, with a primary (slow) loop that is called periodically, and a "fast loop" (a.k.a. "spin loop") that is called as fast as possible with no delay between calls. This code needs to track the order of the field starting to ensure that everything happens in the right order. Repeatedly run the correct method, either Autonomous or OperatorControl when the robot is enabled. After running the correct method, wait for some state to change, either the other mode starts or the robot is disabled. Then go back and wait for the robot to be enabled again.

virtual void TrcRobot::TeleopContinuous ( void   )  [inline, virtual]

This function is called continuously in teleop mode.

virtual void TrcRobot::TeleopInit ( void   )  [inline, virtual]

This function is called before starting the teleop mode.

virtual void TrcRobot::TeleopPeriodic ( void   )  [inline, virtual]

This function is called periodically at fixed intervals in teleop mode.


Member Data Documentation

const double TrcRobot::kDefaultPeriod = 0.0 [static]

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

Generated by  doxygen 1.6.2