public class TiGeneralSensor extends Object implements ITiEventListener
| Constructor and Description |
|---|
TiGeneralSensor(TiGPIO gpio,
int signalPinID)
TiGeneralSensor initialization, without adc
|
TiGeneralSensor(TiGPIO gpio,
int signalPinID,
TiADC adc,
int analogChannelID)
TiGeneralSensor 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
|
void |
onEvent(ITiEvent evt)
triggered when the event occurs
|
void |
setEventListener(ITiGeneralSensorEventListener lc)
Set the TiGeneralSensor event listener
|
public TiGeneralSensor(TiGPIO gpio, int signalPinID) throws IOException
gpio - TiGPIO object[IN]signalPinID - signal pin id[IN]analogChannelID - analog channel id[IN]IOExceptionpublic TiGeneralSensor(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 void onEvent(ITiEvent evt)
ITiEventListeneronEvent in interface ITiEventListenerevt - event objectpublic void setEventListener(ITiGeneralSensorEventListener lc) throws IOException
lc - listener object or null[IN]IOException