LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Component Class Referenceabstract

Base class for components. More...

#include <Component.h>

Inheritance diagram for Component:

Public Member Functions

 Component (const char *name, int driverStationDigitalIn)
 Constructs a component with a name.
 
virtual ~Component ()
 Frees the resources allocated by the component.
 
void Update ()
 Updates the component each cycle.
 
bool EnableRequired ()
 Returns whether or not the robot requires to be in an enabled state to run the enabled function.
 
int GetDigitalIn ()
 Gets the driver station digital input channel for the component.
 
const char * GetName ()
 Gets the component's name.
 

Static Public Member Functions

static void CreateComponents ()
 Creates all components.
 
static void DestroyComponents ()
 Destroys all components.
 
static void UpdateAll ()
 Calls Update() on all created components.
 

Protected Member Functions

virtual void UpdateEnabled ()=0
 Allows the component to update itself when enabled.
 
virtual void UpdateDisabled ()=0
 Allows the component to execute code when disabled.
 
virtual void OnEnabled ()=0
 Called the first cycle that the component is enabled.
 
virtual void OnDisabled ()=0
 Called the first cycle that the component is disabled.
 

Detailed Description

Base class for components.

Member Function Documentation

bool Component::EnableRequired ( )

Returns whether or not the robot requires to be in an enabled state to run the enabled function.

Returns
whether the component requires an enabled state
int Component::GetDigitalIn ( )

Gets the driver station digital input channel for the component.

Returns
the digital input channel

Here is the caller graph for this function:

const char * Component::GetName ( )

Gets the component's name.

Returns
the name of the component

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