br::ufrgs::ece::AIC::Encoder Class Reference
[AIC Hardware Interface]

List of all members.

Detailed Description

Provides access to incremental encoder in an Actuator Interface Card.

Author:
Walter Fetter Lages (w.fetter@ieee.org)
Version:
AIC-1.3.0


Public Member Functions

 Encoder (int base, int pulses)
 Initializes Encoder, clears the counter on the quadrature decoder chip.

native void finalize ()
 Finalizes Encoder.

double read ()
 Reads the counter on the quadrature decoder chip and converts the motion to radians.

double readAndClear ()
 Reads the counter on the quadrature decoder chip, converts the motion to radians and clears the counter.


Static Public Member Functions

native void clear ()
 Clears the counter on the quadrature decoder chip.

native int getCount ()
 Gets the count on the quadrature decoder chip.

native int getCountAndClear ()
 Gets the count and clears the counter on the quadrature decoder chip.


Public Attributes

final int PULSES
 Number of pulses per revolution of the encoder, considering the quadrature decoder.


Constructor & Destructor Documentation

br::ufrgs::ece::AIC::Encoder::Encoder int  base,
int  pulses
[inline]
 

Initializes Encoder, clears the counter on the quadrature decoder chip.

Parameters:
base Base address for on board devices
pulses Number of pulses per revolution of the encoder, considering the quadrature decoder


Member Function Documentation

native int br::ufrgs::ece::AIC::Encoder::getCount  )  [static]
 

Gets the count on the quadrature decoder chip.

Returns:
the number of pulses (in 2-complement) since the last time the counter was cleared

native int br::ufrgs::ece::AIC::Encoder::getCountAndClear  )  [static]
 

Gets the count and clears the counter on the quadrature decoder chip.

Returns:
the number of pulses (in 2-complement) since the last time the counter was cleared

double br::ufrgs::ece::AIC::Encoder::read  )  [inline]
 

Reads the counter on the quadrature decoder chip and converts the motion to radians.

Returns:
the displacement in radians since the last time the encoder was cleared

double br::ufrgs::ece::AIC::Encoder::readAndClear  )  [inline]
 

Reads the counter on the quadrature decoder chip, converts the motion to radians and clears the counter.

Returns:
the displacement in radians since the last time the encoder was cleared


The documentation for this class was generated from the following file:
Generated on Thu Mar 27 15:33:38 2008 for Actuator Interface Card by doxygen 1.3.6