Now you can download a copy of these docs so you can use them offline! Download now

#include <Trigger.h>

Inheritance diagram for Trigger:
Collaboration diagram for Trigger:

Public Member Functions

bool Grab ()
 
virtual bool Get ()=0
 
void WhenActive (Command *command)
 
void WhileActive (Command *command)
 
void WhenInactive (Command *command)
 
void CancelWhenActive (Command *command)
 
void ToggleWhenActive (Command *command)
 
virtual void InitTable (ITable *table)
 
virtual ITableGetTable ()
 
virtual std::string GetSmartDashboardType ()
 

Protected Attributes

ITablem_table
 

Detailed Description

This class provides an easy way to link commands to inputs.

It is very easy to link a polled input to a command. For instance, you could link the trigger button of a joystick to a "score" command or an encoder reaching a particular value.

It is encouraged that teams write a subclass of Trigger if they want to have something unusual (for instance, if they want to react to the user holding a button while the robot is reading a certain sensor input). For this, they only have to write the Trigger#Get() method to get the full functionality of the Trigger class.

Author
Brad Miller, Joe Grinstead

Definition at line 29 of file Trigger.h.

Member Function Documentation

std::string Trigger::GetSmartDashboardType ( )
virtual
Returns
the string representation of the named data type that will be used by the smart dashboard for this sendable

Implements Sendable.

Definition at line 62 of file Trigger.cpp.

ITable * Trigger::GetTable ( )
virtual
Returns
the table that is currently associated with the sendable

Implements Sendable.

Definition at line 73 of file Trigger.cpp.

void Trigger::InitTable ( ITable subtable)
virtual

Initializes a table for this sendable object.

Parameters
subtableThe table to put the values in.

Implements Sendable.

Definition at line 66 of file Trigger.cpp.


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

Generated on Sat Apr 26 2014 12:26:47 for WPILibC++ by doxygen 1.8.6