public class TriggerProc
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
ControlDeviceOperator |
audioBeeper |
int |
itsTriggerMode |
static int |
MODE_ABOVEVALUE |
static int |
MODE_ALL |
static int |
MODE_BELOWVALUE |
static int |
MODE_BETWEENVALUES |
static int |
MODE_DROPBELOWVALUE |
static int |
MODE_NONE |
static int |
MODE_RISEABOVEVALUE |
Constructor and Description |
---|
TriggerProc(int triggerMode,
float triggerValue)
Standard constructor for the Tracker class.
|
Modifier and Type | Method and Description |
---|---|
void |
disableAudioFeedback() |
void |
enableAudioFeedback(int channelSelector)
enables audio feedback via a beep when the condition triggers
|
int |
execute(float currVal)
executes the basic testing for the TriggerProc
|
float |
getCompareHighValue()
gets the high value for a comparison
|
float |
getCompareLowValue()
gets the low value for a comparison
|
ControlDeviceOperator |
getDeviceController()
gets the device controller
|
SensorDeviceOperator |
getDeviceSensor()
gets the device sensor
|
void |
list()
lists the info
|
void |
setCompareHighValue(int compHighValue)
sets the high value for a comparison
|
void |
setCompareLowValue(int compLowValue)
sets the low value for a comparison
|
void |
setDeviceController(ControlDeviceOperator deviceController)
sets the device controller
|
void |
setDeviceSensor(SensorDeviceOperator deviceSensor)
sets the device sensor
|
void |
testTriggerOff()
switches off the DeviceController
|
void |
testTriggerOn(long mSecs)
keeps the TriggerProc on
|
java.lang.String |
toString()
report the class as a string
|
boolean |
triggerAboveValue(float hFloat,
float val)
performs a test for the TriggerProc
|
boolean |
triggerAlways()
performs a test for the TriggerProc
|
boolean |
triggerBelowValue(float lFloat,
float val)
performs a test for the TriggerProc
|
boolean |
triggerBetweenValues(float lFloat,
float hFloat,
float val)
performs a test for the TriggerProc
|
boolean |
triggerDropBelowValue(float lFloat,
float val)
performs a test for the TriggerProc
|
boolean |
triggerRiseAboveValue(float hFloat,
float val)
performs a test for the TriggerProc
|
public static final int MODE_NONE
public static final int MODE_ALL
public static final int MODE_ABOVEVALUE
public static final int MODE_BELOWVALUE
public static final int MODE_BETWEENVALUES
public static final int MODE_RISEABOVEVALUE
public static final int MODE_DROPBELOWVALUE
public int itsTriggerMode
public ControlDeviceOperator audioBeeper
public TriggerProc(int triggerMode, float triggerValue) throws java.lang.Exception
triggerMode
- how does the proc trigger?triggerValue
- the value for triggerjava.lang.Exception
- ...public boolean triggerAlways() throws java.lang.Exception
java.lang.Exception
- ...public boolean triggerAboveValue(float hFloat, float val) throws java.lang.Exception
hFloat
- the test valueval
- the valuejava.lang.Exception
- ...public boolean triggerBelowValue(float lFloat, float val) throws java.lang.Exception
lFloat
- the test valueval
- the valuejava.lang.Exception
- ...public boolean triggerBetweenValues(float lFloat, float hFloat, float val) throws java.lang.Exception
lFloat
- the test valuehFloat
- the test valueval
- the valuejava.lang.Exception
- ...public boolean triggerRiseAboveValue(float hFloat, float val) throws java.lang.Exception
hFloat
- the test valueval
- the valuejava.lang.Exception
- ...public boolean triggerDropBelowValue(float lFloat, float val) throws java.lang.Exception
lFloat
- the test valueval
- the valuejava.lang.Exception
- ...public int execute(float currVal)
currVal
- the current valuepublic void testTriggerOn(long mSecs) throws java.lang.Exception
mSecs
- milliseconds to keep the trigger onjava.lang.Exception
- ...public void testTriggerOff() throws java.lang.Exception
java.lang.Exception
- ...public float getCompareHighValue()
public void setCompareHighValue(int compHighValue)
compHighValue
- the valuepublic float getCompareLowValue()
public void setCompareLowValue(int compLowValue)
compLowValue
- the valuepublic SensorDeviceOperator getDeviceSensor()
public void setDeviceSensor(SensorDeviceOperator deviceSensor)
deviceSensor
- the device sensorpublic ControlDeviceOperator getDeviceController()
public void setDeviceController(ControlDeviceOperator deviceController)
deviceController
- the device controllerpublic void enableAudioFeedback(int channelSelector) throws java.lang.Exception
channelSelector
- use right channeljava.lang.Exception
- ...public void disableAudioFeedback()
public java.lang.String toString()
toString
in class java.lang.Object
public void list()
RH, 2017