javaclient
Class DIOInterface

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

public class DIOInterface
extends PlayerDevice

The dio interface provides access to a digital I/O device.

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

Field Summary
 
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
DIOInterface(PlayerClient pc, short indexOfDevice)
          Constructor for DIOInterface.
 
Method Summary
 int getBitField()
          Returns the bitfield of samples.
 byte getCount()
          Returns the number of valid samples
 void readData()
          Read the samples values.
 void setOutputBitfield(byte count, int digout)
          The dio interface accepts 4-byte commands which consist of the ouput bitfield.
 
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
 

Constructor Detail

DIOInterface

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

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

getBitField

public int getBitField()
Returns the bitfield of samples.

Returns:
the bitfield of samples as an integer

setOutputBitfield

public void setOutputBitfield(byte count,
                              int digout)
The dio interface accepts 4-byte commands which consist of the ouput bitfield.

Parameters:
count - the command
digout - the output bitfield