|
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.StartStopPulseCounter
This class supports the access and configuration to the start/stop
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 | |
StartStopPulseCounter()
Creates a new instance of GPIO start/stop pulse counter. |
Method Summary | |
int |
getValue()
Read out current pulse value. |
void |
release()
Releases the GPIO start/stop pulse counter. |
void |
resume()
Resume pulse counter from the pulse value of the last run. |
void |
start()
Reset and start pulse counter from 0. |
int |
stop()
Stops the pulse counter and returns the number of pulses counted until this time. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StartStopPulseCounter() throws IOException
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 start() throws IOException
IOException
- if starting the GPIO pulse counter instance failespublic void resume() throws IOException
IOException
- if resuming the GPIO pulse counter instance failespublic int stop() throws IOException
IOException
- if stopping the GPIO pulse counter instance failespublic int getValue() throws IOException
IOException
- if getting value failed
|
IM Profile | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |