The LimitPulseCounterListener interface defines the capabilities for receiving
the indication of a LimitPulseCounter when it has completed counting its
number of pulses.
To receive the indication and the time taken to count the specified number of pulses
a InPortListener interface must be created first.
The limitReached method must contain the processing code for the end of counting.
After creating an instance of LimitPulseCounterListener, this
instance has to be passed as a parameter to the LimitPulseCounter.addListener
method. After that, the callback methods will be called by the runtime system
when the LimitPulseCounter has completed
counting its number of pulses.
Callback method called by the runtime system when the LimitPulseCounter has completed
counting its number of pulses.
Method Detail
limitReached
void limitReached(int time)
Callback method called by the runtime system when the LimitPulseCounter has completed
counting its number of pulses.
The callback method will be called by the runtime, if an implementation
class object is registered as listener for the LimitPulseCounter object.
While implementing a class for the LimitPulseCounterListener interface,
the user can place the code for reaching the counter limit into this method.
Parameters:
time - The time taken to count the number of pulses specified in ms