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

AnalogTrigger Class Reference

Inheritance diagram for AnalogTrigger:
Collaboration diagram for AnalogTrigger:

List of all members.

Public Member Functions

 AnalogTrigger (UINT8 moduleNumber, UINT32 channel)
 AnalogTrigger (UINT32 channel)
 AnalogTrigger (AnalogChannel *channel)
void SetLimitsVoltage (float lower, float upper)
void SetLimitsRaw (INT32 lower, INT32 upper)
void SetAveraged (bool useAveragedValue)
void SetFiltered (bool useFilteredValue)
UINT32 GetIndex ()
bool GetInWindow ()
bool GetTriggerState ()
AnalogTriggerOutputCreateOutput (AnalogTriggerOutput::Type type)

Friends

class AnalogTriggerOutput

Detailed Description

Definition at line 16 of file AnalogTrigger.h.


Constructor & Destructor Documentation

AnalogTrigger::AnalogTrigger ( UINT8  moduleNumber,
UINT32  channel 
)

Constructor for an analog trigger given both the slot and channel.

Parameters:
moduleNumber The analog module (1 or 2).
channel The analog channel (1..8).

Definition at line 57 of file AnalogTrigger.cpp.

AnalogTrigger::AnalogTrigger ( UINT32  channel  )  [explicit]

Constructor for an analog trigger given a channel number. The default module is used in this case.

Parameters:
channel The analog channel (1..8).

Definition at line 46 of file AnalogTrigger.cpp.

AnalogTrigger::AnalogTrigger ( AnalogChannel channel  )  [explicit]

Construct an analog trigger given an analog channel. This should be used in the case of sharing an analog channel between the trigger and an analog input object.

Definition at line 67 of file AnalogTrigger.cpp.


Member Function Documentation

AnalogTriggerOutput * AnalogTrigger::CreateOutput ( AnalogTriggerOutput::Type  type  ) 

Creates an AnalogTriggerOutput object. Gets an output object that can be used for routing. Caller is responsible for deleting the AnalogTriggerOutput object.

Parameters:
type An enum of the type of output object to create.
Returns:
A pointer to a new AnalogTriggerOutput object.

Definition at line 192 of file AnalogTrigger.cpp.

UINT32 AnalogTrigger::GetIndex (  ) 

Return the index of the analog trigger. This is the FPGA index of this analog trigger instance.

Returns:
The index of the analog trigger.

Definition at line 149 of file AnalogTrigger.cpp.

bool AnalogTrigger::GetInWindow (  ) 

Return the InWindow output of the analog trigger. True if the analog input is between the upper and lower limits.

Returns:
The InWindow output of the analog trigger.

Definition at line 160 of file AnalogTrigger.cpp.

bool AnalogTrigger::GetTriggerState (  ) 

Return the TriggerState output of the analog trigger. True if above upper limit. False if below lower limit. If in Hysteresis, maintain previous state.

Returns:
The TriggerState output of the analog trigger.

Definition at line 176 of file AnalogTrigger.cpp.

void AnalogTrigger::SetAveraged ( bool  useAveragedValue  ) 

Configure the analog trigger to use the averaged vs. raw values. If the value is true, then the averaged value is selected for the analog trigger, otherwise the immediate value is used.

Definition at line 119 of file AnalogTrigger.cpp.

void AnalogTrigger::SetFiltered ( bool  useFilteredValue  ) 

Configure the analog trigger to use a filtered value. The analog trigger will operate with a 3 point average rejection filter. This is designed to help with 360 degree pot applications for the period where the pot crosses through zero.

Definition at line 134 of file AnalogTrigger.cpp.

void AnalogTrigger::SetLimitsRaw ( INT32  lower,
INT32  upper 
)

Set the upper and lower limits of the analog trigger. The limits are given in ADC codes. If oversampling is used, the units must be scaled appropriately.

Definition at line 83 of file AnalogTrigger.cpp.

void AnalogTrigger::SetLimitsVoltage ( float  lower,
float  upper 
)

Set the upper and lower limits of the analog trigger. The limits are given as floating point voltage values.

Definition at line 100 of file AnalogTrigger.cpp.


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

Generated on Thu Jan 12 2012 22:35:27 for WPILibC++ by doxygen 1.7.1