ist.palcom.services.tilessimulator
Class Tile

java.lang.Object
  extended by ist.palcom.device.AbstractDevice
      extended by ist.palcom.services.tilessimulator.Tile
All Implemented Interfaces:
java.lang.Runnable

public class Tile
extends AbstractDevice

A tile is a simulated PalCom device used in the tiles simulation framework


Field Summary
 
Fields inherited from class ist.palcom.device.AbstractDevice
context, scheduler
 
Constructor Summary
Tile(java.lang.String name, DeviceID deviceID, TilePeer tilePeer)
           
 
Method Summary
 void attachGateway()
           
protected  DeviceContext createDeviceContext(DeviceID deviceID, PalcomScheduler scheduler)
          Creates the DeviceContext of the device.
 void detachGateway()
           
 DeviceID getDeviceID()
           
 java.lang.String getIRInterfaceID()
           
 boolean getLed(int i)
           
 int getLEDCount()
           
protected  void initDevice()
          Initialize the device.
 void repaint()
           
 void setLed(int i, boolean b)
           
protected  void stopDevice()
          Stop the device.
 
Methods inherited from class ist.palcom.device.AbstractDevice
getDeviceContext, getDeviceInfo, getName, getRootPath, run, safePutEvent, setHeartBeatPeriod, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tile

public Tile(java.lang.String name,
            DeviceID deviceID,
            TilePeer tilePeer)
Method Detail

initDevice

protected void initDevice()
                   throws java.io.IOException
Description copied from class: AbstractDevice
Initialize the device. Called from a PalcomThread. Here the actual setup is done. Subclasses override this method, and call super.initDevice from there.

Overrides:
initDevice in class AbstractDevice
Throws:
java.io.IOException

createDeviceContext

protected DeviceContext createDeviceContext(DeviceID deviceID,
                                            PalcomScheduler scheduler)
Description copied from class: AbstractDevice
Creates the DeviceContext of the device. This method has to be implemented in a concrete subclass.

Specified by:
createDeviceContext in class AbstractDevice
Parameters:
deviceID - The device ID.
scheduler - The scheduler.
Returns:
The DeviceContext

stopDevice

protected void stopDevice()
                   throws java.io.IOException
Description copied from class: AbstractDevice
Stop the device. Called from a PalcomThread. Here the actual cleanup is done. Subclasses override this method, and call super.stopDevice from there.

Overrides:
stopDevice in class AbstractDevice
Throws:
java.io.IOException

repaint

public void repaint()

getDeviceID

public DeviceID getDeviceID()

getIRInterfaceID

public java.lang.String getIRInterfaceID()

getLed

public boolean getLed(int i)

setLed

public void setLed(int i,
                   boolean b)

getLEDCount

public int getLEDCount()

attachGateway

public void attachGateway()

detachGateway

public void detachGateway()