public class TiMQ extends Object implements ITiEventListener
| Constructor and Description |
|---|
TiMQ(TiGPIO gpio,
int signalPinID)
TiMQn initialization, without adc
|
TiMQ(TiGPIO gpio,
int signalPinID,
TiADC adc,
int analogChannelID)
TiMQn initialization, with adc
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAnalogOutput()
Gets the analog output value of AOUT
|
int |
getDigitalOutput()
Gets the value of DOUT
|
long |
getEventTime()
Gets the event time
|
int |
getSignalPinID()
Gets the signal pin id
|
TiEventType |
getType()
the event type of the listener
|
boolean |
isGreaterThanThreshold()
Check if greater than the threshold value
|
void |
onEvent(ITiEvent evt)
triggered when the event occurs
|
void |
setEventListener(ITiMQEventListener lc)
Set the TiMQn event listener
|
public TiMQ(TiGPIO gpio, int signalPinID) throws IOException
gpio - TiGPIO object[IN]signalPinID - signal pin id[IN]IOExceptionpublic TiMQ(TiGPIO gpio, int signalPinID, TiADC adc, int analogChannelID) throws IOException
gpio - TiGPIO object[IN]signalPinID - signal pin id[IN]adc - TiADC object[IN]analogChannelID - analog channel id[IN]IOExceptionpublic int getAnalogOutput()
throws IOException
IOExceptionpublic int getDigitalOutput()
throws IOException
IOExceptionpublic long getEventTime()
public int getSignalPinID()
public TiEventType getType()
ITiEventListenergetType in interface ITiEventListenerpublic boolean isGreaterThanThreshold()
throws IOException
IOExceptionpublic void onEvent(ITiEvent evt)
ITiEventListeneronEvent in interface ITiEventListenerevt - event objectpublic void setEventListener(ITiMQEventListener lc) throws IOException
lc - listener object or null[IN]IOException