Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IM Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.siemens.icm.io
Class StartStopPulseCounter

    java.lang.Object
      com.siemens.icm.io.StartStopPulseCounter

public class StartStopPulseCounter
extends Object

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

### StartStopPulseCounter

    public StartStopPulseCounter()
                          throws IOException

  Creates a new instance of GPIO start/stop pulse counter.

Throws:
  `IOException` - if creating the GPIO pulse counter instance failes

Method Detail

### release

    public void release()
                 throws IOException

  Releases the GPIO start/stop pulse counter.

  Throws:
    `IOException` - if releasing the GPIO pulse counter instance failes

### start

    public void start()
               throws IOException

  Reset and start pulse counter from 0.

  Throws:
    `IOException` - if starting the GPIO pulse counter instance failes

### resume

    public void resume()
                throws IOException

  Resume pulse counter from the pulse value of the last run.

  Throws:
    `IOException` - if resuming the GPIO pulse counter instance failes

### stop

    public int stop()
             throws IOException

  Stops the pulse counter and returns the number of pulses counted until this time.

  Throws:
    `IOException` - if stopping the GPIO pulse counter instance failes

### getValue

    public int getValue()
                 throws IOException

  Read out current pulse value.

  Throws:
    `IOException` - if getting value failed

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IM Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a comment or suggestion Version 2.0 of IM Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.