|
IM Profile | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.siemens.icm.io.LimitPulseCounter
This class supports the access and configuration to the limit
pulse counter of the general purpose IO driver (GPIO).
The pulse counter is designed to measure signals from 0 to 1000 pulses per second.
The pulse counter will be configured in GPIO10 pin. If the GPIO10 line is already configured in
a GPIO port of input or output pins, any attempt to activate the pulse counter will be rejected.
Vice versa, if the pulse counter is opened the GPIO10 line cannot be configured in a GPIO port.
The usage of all GPIO ports is restricted to the same
interface where the GPIO driver was opened. The paralel access of the GPIO
driver by Java and another interface (i.e. AT commnad interface) is not supported.
When the module starts up, all GPIO pins are set to high-impedance state after
initializing. Therefore, it is recommended to connect pull-up or pull-down resistors
to all GPIO pins you want to use as output. This is necessary to keep these pins
from floating or driving any external devices before all settings are done by the
input port constructor and after release the input port again.
Constructor Summary | |
LimitPulseCounter(int limit)
Creates a new instance of a GPIO limit pulse counter. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LimitPulseCounter(int limit) throws IOException
limit
- number of pulses to be counted.
IOException
- if creating the GPIO pulse counter instance failesMethod Detail |
public 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.siemens.icm.io.LimitPulseCounterListener)
,
clearListener()
public void removeListener(LimitPulseCounterListener listener)
listener
- The InPortListener object to be removed from the list.InPortListener
,
addListener(com.siemens.icm.io.LimitPulseCounterListener)
,
clearListener()
public void clearListener()
InPortListener
,
addListener(com.siemens.icm.io.LimitPulseCounterListener)
,
removeListener(com.siemens.icm.io.LimitPulseCounterListener)
|
IM Profile | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |