misim
Interface PortListener
- All Known Implementing Classes:
- BetterLed, SegmentPlugin, CapacitorDelay, TVCanvas, Lcd2Plugin, BreadBoard, LCDPlugin, MotorPlugin, LedArrayPlugin, LedPlugin
- public interface PortListener
Anything that wants to respond to changes on the Pics port
should implement the PortListener interface.
To add a UserInterface to a PortListener, the class should
also implement the Plugin interface.
- See Also:
Plugin
Method Summary |
int |
getBitmask(int portId)
This method is used to identify which bits this listener
is interested in for a given port. |
void |
portEvent(int portBits,
long clockCount,
int portId)
This method is called when the state of a port changes. |
portEvent
public void portEvent(int portBits,
long clockCount,
int portId)
- This method is called when the state of a port changes.
- Parameters:
portBits
- - The current state of the portclockCount
- - the current cpu time (in clock cycles)portId
- - the identifier for the port that generated the event
getBitmask
public int getBitmask(int portId)
- This method is used to identify which bits this listener
is interested in for a given port.
- Parameters:
portId
- - the port identifier- Returns:
- an integer with the appropriate bits set.