ist.palcom.simulated.incubator
Class Incubator

java.lang.Object
  extended by ist.palcom.device.AbstractDevice
      extended by ist.palcom.device.AbstractUDPDevice
          extended by ist.palcom.simulated.incubator.Incubator
All Implemented Interfaces:
DeviceAndServiceListener, CommandEventListener, java.lang.Runnable

public class Incubator
extends AbstractUDPDevice
implements CommandEventListener, DeviceAndServiceListener


Field Summary
protected  IncubatorGUI gui
           
 
Fields inherited from class ist.palcom.device.AbstractDevice
context, scheduler
 
Constructor Summary
Incubator(DeviceID id, IncubatorGUI gui)
           
 
Method Summary
 void addElement(java.lang.Object info)
           
 void closeConnection(PRDConnection info)
           
 void commandReceived(CommandEvent e)
          A command has been invoked in a user interface.
protected  DeviceContext createDeviceContext(DeviceID deviceID, PalcomScheduler scheduler)
          Creates the DeviceContext of the device.
 void establishConnection(PRDConnection info)
           
 AssemblyManager getAssemblyManager()
           
 LocalSID getControlCustomerLocalSID()
           
 PRDDevice getDeviceInfo()
           
 PalcomDeviceTree getPalTree()
           
 ResourceAddressingManager getRAM()
           
protected  void initDevice()
          Initialize the device.
 void removeElement(java.lang.Object info)
           
protected  void stopDevice()
          Stop the device.
 
Methods inherited from class ist.palcom.device.AbstractDevice
getDeviceContext, getName, getRootPath, run, safePutEvent, setHeartBeatPeriod, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gui

protected final IncubatorGUI gui
Constructor Detail

Incubator

public Incubator(DeviceID id,
                 IncubatorGUI gui)
Method Detail

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.

Overrides:
createDeviceContext in class AbstractUDPDevice
Parameters:
deviceID - The device ID.
scheduler - The scheduler.
Returns:
The DeviceContext

getDeviceInfo

public PRDDevice getDeviceInfo()
Overrides:
getDeviceInfo in class AbstractDevice

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

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

establishConnection

public void establishConnection(PRDConnection info)
                         throws java.io.IOException
Throws:
java.io.IOException

closeConnection

public void closeConnection(PRDConnection info)
                     throws java.io.IOException
Throws:
java.io.IOException

getControlCustomerLocalSID

public LocalSID getControlCustomerLocalSID()

commandReceived

public void commandReceived(CommandEvent e)
A command has been invoked in a user interface.

Specified by:
commandReceived in interface CommandEventListener

getAssemblyManager

public AssemblyManager getAssemblyManager()

getRAM

public ResourceAddressingManager getRAM()

getPalTree

public PalcomDeviceTree getPalTree()

addElement

public void addElement(java.lang.Object info)
Specified by:
addElement in interface DeviceAndServiceListener

removeElement

public void removeElement(java.lang.Object info)
Specified by:
removeElement in interface DeviceAndServiceListener