RoboJDETM v2.0

com.ridgesoft.robotics
Interface PulseInput

All Superinterfaces:
DigitalInput
All Known Implementing Classes:
IntelliBrainDigitalIO, IntelliBrainExpDigitalIO

public interface PulseInput
extends DigitalInput

Generic interface to a digital input port which supports pulse input timing.


Method Summary
 void enablePulseMeasurement(boolean enable)
          Enables or disables pulse measurement.
 int readEdgeCount()
          Reads the count of rising and falling edges detected on this input since pulse measurement was enabled by the enablePulseMeasurement method.
 int readPulseDuration()
          Reads the duration of the last high pulse.
 int readPulseDuration(boolean highPulse)
          Reads the duration of the last pulse.
 
Methods inherited from interface com.ridgesoft.robotics.DigitalInput
isSet
 

Method Detail

enablePulseMeasurement

void enablePulseMeasurement(boolean enable)
Enables or disables pulse measurement.

Parameters:
enable - true enables pulse measurement, false disables pulse measurement

readEdgeCount

int readEdgeCount()
Reads the count of rising and falling edges detected on this input since pulse measurement was enabled by the enablePulseMeasurement method.

Returns:
count of rising and falling edges detected on this input since pulse measurement was enabled

readPulseDuration

int readPulseDuration()
Reads the duration of the last high pulse.

The method enablePulseMeasurement must be called prior to calling this method.

Returns:
duration of last pulse in microseconds, or -1 if a full pulse has not occurred since the last read

readPulseDuration

int readPulseDuration(boolean highPulse)
Reads the duration of the last pulse.

The method enablePulseMeasurement must be called prior to calling this method.

Parameters:
highPulse - true for duration of high pulse, false for duration of low pulse
Returns:
duration of last pulse in microseconds, or -1 if a full pulse has not occurred since the last read

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com