public class MonitoringEvent extends PeripheralEvent
MonitoringEvent class encapsulates ADC channel under- and over-threshold value conditions. ADCChannel,
MonitoringListener| Modifier and Type | Field and Description |
|---|---|
static int |
BACK_TO_RANGE
Indicates that the ADC channel value got back within the defined range.
|
static int |
OUT_OF_RANGE
Indicates that the ADC channel value exceeded the defined range.
|
count, lastTimeStamp, lastTimeStampMicros, peripheral, timeStamp, timeStampMicros| Constructor and Description |
|---|
MonitoringEvent(ADCChannel channel,
int type,
int value)
Creates a new
MonitoringEvent with the specified raw sampled value and time-stamped with the current
time.. |
MonitoringEvent(ADCChannel channel,
int type,
int value,
long timeStamp,
int timeStampMicros)
Creates a new
MonitoringEvent with the specified raw sampled value and timestamp. |
| Modifier and Type | Method and Description |
|---|---|
int |
getType()
Returns the type of range condition being notified.
|
int |
getValue()
Returns the new ADC channel's value.
|
getCount, getLastTimeStamp, getLastTimeStampMicros, getPeripheral, getTimeStamp, getTimeStampMicrospublic static final int BACK_TO_RANGE
public static final int OUT_OF_RANGE
public MonitoringEvent(ADCChannel channel, int type, int value)
MonitoringEvent with the specified raw sampled value and time-stamped with the current
time..channel - the source ADC channel.type - the type of range condition being notified: OUT_OF_RANGE or BACK_TO_RANGE.value - the raw sampled value.java.lang.IllegalArgumentException - if type is not one of the defined types.public MonitoringEvent(ADCChannel channel, int type, int value, long timeStamp, int timeStampMicros)
MonitoringEvent with the specified raw sampled value and timestamp.channel - the source ADC channel.type - the type of range condition being notified: OUT_OF_RANGE or BACK_TO_RANGE.value - the raw sampled value.timeStamp - the timestamp (in milliseconds).timeStampMicros - the additional microseconds to the timestamp.java.lang.IllegalArgumentException - if type is not one of the defined types or if timeStamp or timeStampMicros is
negative.public int getType()
OUT_OF_RANGE or BACK_TO_RANGE.public int getValue()
Copyright (c) 1990, 2013, Oracle and/or its affiliates. All rights reserved.