public class AnalogTrigger extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
AnalogTrigger.AnalogTriggerException
Exceptions dealing with improper operation of the Analog trigger.
|
Modifier and Type | Field and Description |
---|---|
protected AnalogInput |
m_analogInput |
protected int |
m_index |
protected boolean |
m_ownsAnalog |
protected int |
m_port
Where the analog trigger is attached.
|
Constructor and Description |
---|
AnalogTrigger(AnalogInput channel)
Construct an analog trigger given an analog channel.
|
AnalogTrigger(int channel)
Constructor for an analog trigger given a channel number.
|
Modifier and Type | Method and Description |
---|---|
AnalogTriggerOutput |
createOutput(AnalogTriggerOutput.AnalogTriggerType type)
Creates an AnalogTriggerOutput object.
|
void |
free()
Release the resources used by this object.
|
int |
getIndex()
Return the index of the analog trigger.
|
boolean |
getInWindow()
Return the InWindow output of the analog trigger.
|
boolean |
getTriggerState()
Return the TriggerState output of the analog trigger.
|
void |
setAveraged(boolean useAveragedValue)
Configure the analog trigger to use the averaged vs.
|
void |
setFiltered(boolean useFilteredValue)
Configure the analog trigger to use a filtered value.
|
void |
setLimitsRaw(int lower,
int upper)
Set the upper and lower limits of the analog trigger.
|
void |
setLimitsVoltage(double lower,
double upper)
Set the upper and lower limits of the analog trigger.
|
protected int m_port
protected int m_index
protected AnalogInput m_analogInput
protected boolean m_ownsAnalog
public AnalogTrigger(int channel)
channel
- the port to use for the analog triggerpublic AnalogTrigger(AnalogInput channel)
channel
- the AnalogInput to use for the analog triggerpublic void free()
public void setLimitsRaw(int lower, int upper)
lower
- the lower raw limitupper
- the upper raw limitpublic void setLimitsVoltage(double lower, double upper)
lower
- the lower voltage limitupper
- the upper voltage limitpublic void setAveraged(boolean useAveragedValue)
useAveragedValue
- true to use an averaged value, false otherwisepublic void setFiltered(boolean useFilteredValue)
useFilteredValue
- true to use a filterd value, false otherwisepublic int getIndex()
public boolean getInWindow()
public boolean getTriggerState()
public AnalogTriggerOutput createOutput(AnalogTriggerOutput.AnalogTriggerType type)
type
- An enum of the type of output object to create.