public class LimitPulseCounter extends Object
Constructor and Description |
---|
LimitPulseCounter(int limit)
Creates a new instance of a GPIO limit pulse counter.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(LimitPulseCounterListener listener)
Registers listeners to receive value changes at an input port.
|
void |
clearListener()
Removes all listener objects which have been previously added to
this input port.
|
int |
getLimit()
Gets the given limit of the GPIO limit pulse counter.
|
void |
release()
Releases the GPIO limit pulse counter.
|
void |
removeListener(LimitPulseCounterListener listener)
Removes a listener object which has been previously added from the internal
list table of listener objects.
|
void |
stop()
Stops the GPIO limit pulse counter.
|
public LimitPulseCounter(int limit) throws IOException
limit
- number of pulses to be counted.IOException
- if creating the GPIO pulse counter instance failespublic void release() throws IOException
IOException
- if releasing the GPIO pulse counter instance failespublic void stop() throws IOException
IOException
- if stopping the GPIO pulse counter instance failespublic int getLimit() throws IOException
IOException
- if getting value failedpublic void addListener(LimitPulseCounterListener listener)
listener
- The InPortListener object to be registered.InPortListener
,
removeListener(com.cinterion.io.LimitPulseCounterListener)
,
clearListener()
public void removeListener(LimitPulseCounterListener listener)
listener
- The InPortListener object to be removed from the list.InPortListener
,
addListener(com.cinterion.io.LimitPulseCounterListener)
,
clearListener()
public void clearListener()
Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.