javaclient
Class BlinkenlightInterface

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

public class BlinkenlightInterface
extends PlayerDevice

The blinkenlight interface is used to switch on and off a flashing indicator light, and to set it's flash period.

This interface accepts no configuration requests.

Version:
Author:
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
BlinkenlightInterface(PlayerClient pc, short indexOfDevice)
          Constructor for BlinkenlightInterface.
 
Method Summary
 byte getEnable()
          Returns the current blinking lights state (zero: disabled, non-zero: enabled).
 int getPeriod()
          Returns the flash period (one whole on-off cycle) in milliseconds.
 void readData()
          The blinkenlight data provides the current state of the indicator light.
 void set(byte ena, int period)
          Set the blinkenlight state and period.
 
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

BlinkenlightInterface

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

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

readData

public void readData()
The blinkenlight data provides the current state of the indicator light.

Overrides:
readData in class PlayerDevice

getEnable

public byte getEnable()
Returns the current blinking lights state (zero: disabled, non-zero: enabled).

Returns:
the current blinking lights state as a byte

getPeriod

public int getPeriod()
Returns the flash period (one whole on-off cycle) in milliseconds.

Returns:
the flash period as an integer

set

public void set(byte ena,
                int period)
Set the blinkenlight state and period.

Parameters:
ena - zero: disabled, non-zero: enabled
period - flash period (one whole on-off cycle) in milliseconds