The InPortListener interface defines the capabilities for receiving
value changes at the input ports of the general purpose IO driver (GPIO).
To receive the new values of the port an implementation class for the
InPortListener interface must be created first.
The portValueChanged method must contain the processing code for the port value
changes. This code shall leave the listener context inmediately
(i.e. running a new thread). While the callback method does not return
it cannot be called again if changes occur.
After creating an instance of InPortListener, this
instance has to be passed as a parameter to the Inport.addListener
method. After that, the callback methods will be called by the runtime
system each time the corresponding events occur.
Callback method for changes at the input ports of the general purpose IO driver (GPIO).
Method Detail
portValueChanged
void portValueChanged(int portValue)
Callback method for changes at the input ports of the general purpose IO driver (GPIO).
The callback method will be called by the runtime system each time
time the value of the port changes, if an implementation
class object is registered as listener for the GPIO input ports.
While implementing a class for the InPortListener interface,
the user can place the processing code for the port value changes into this method.
This code shall leave the listener context inmediately (i.e. running
a new thread). While the callback method does not return it cannot be
called again if changes occur.