public class StartStopPulseCounter extends Object
Constructor and Description |
---|
StartStopPulseCounter()
Creates a new instance of GPIO start/stop pulse counter.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public StartStopPulseCounter() throws IOException
IOException
- if creating the GPIO pulse counter instance failespublic 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 failedCopyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.