peripherals
Class Potentiometer

java.lang.Object
  extended by peripherals.Peripheral
      extended by peripherals.Potentiometer

public class Potentiometer
extends Peripheral

This class represents the potentiometer on CENG336 Board.

Author:
e1347061

Field Summary
 
Fields inherited from class peripherals.Peripheral
id, isEnabled, KEY_PAD, LED_ARRAY, pic, POTENTIOMETER, SEVEN_SEGMENT_DISPLAY_ARRAY
 
Constructor Summary
Potentiometer(PIC pic)
          Constructor that initializes the potentiometer.
Potentiometer(PIC pic, boolean isEnabled)
          Main constructor that initializes the potentiometer.
 
Method Summary
 double getAnalogData()
           
 PotentiometerPanel getPPanel()
          This method returns the visual representation of the potentiometer.
 void setAnalogData(double analogData)
           
 void update()
          This abstract method communicates with the virtual card and makes necessary changes on it.
 
Methods inherited from class peripherals.Peripheral
getId, getPic, isEnabled, setEnabled, setId, setPic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Potentiometer

public Potentiometer(PIC pic)
Constructor that initializes the potentiometer.

Parameters:
id -
pic -

Potentiometer

public Potentiometer(PIC pic,
                     boolean isEnabled)
Main constructor that initializes the potentiometer.

Parameters:
id -
pic -
isEnabled -
Method Detail

update

public void update()
Description copied from class: Peripheral
This abstract method communicates with the virtual card and makes necessary changes on it.

Specified by:
update in class Peripheral

getAnalogData

public double getAnalogData()
Returns:
the analogData

setAnalogData

public void setAnalogData(double analogData)
Parameters:
analogData - the analogData to set

getPPanel

public PotentiometerPanel getPPanel()
This method returns the visual representation of the potentiometer.