javaclient
Class AIOInterface

java.lang.Object
  extended by javaclient.PlayerDevice
      extended by javaclient.AIOInterface

public class AIOInterface
extends PlayerDevice

The aio interface provides access to an analog I/O device.

Version:
Author:
Maxim A. Batalin & Radu Bogdan Rusu

Field Summary
static short PLAYER_AIO_MAX_SAMPLES
          maximum number of analog I/O samples
 
Fields inherited from class javaclient.PlayerDevice
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec
 
Constructor Summary
AIOInterface(PlayerClient pc, short indexOfDevice)
          Constructor for AIOInterface.
 
Method Summary
 int[] getAnin()
          Returns the samples values up to PLAYER_AIO_MAX_SAMPLES.
 byte getCount()
          Returns the number of valid samples
 void readData()
          Read the samples values.
 
Methods inherited from class javaclient.PlayerDevice
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, handleResponse, readHeader, sendHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAYER_AIO_MAX_SAMPLES

public static final short PLAYER_AIO_MAX_SAMPLES
maximum number of analog I/O samples

See Also:
Constant Field Values
Constructor Detail

AIOInterface

public AIOInterface(PlayerClient pc,
                    short indexOfDevice)
Constructor for AIOInterface.

Parameters:
pc - a reference to the PlayerClient object
indexOfDevice - the index of the device
Method Detail

readData

public void readData()
Read the samples values.

Overrides:
readData in class PlayerDevice

getCount

public byte getCount()
Returns the number of valid samples

Returns:
the number of valid samples as a byte

getAnin

public int[] getAnin()
Returns the samples values up to PLAYER_AIO_MAX_SAMPLES.

Returns:
an array filled with the samples values