jmce - 1_02

jmce.sim.serial
Class SerialFile

java.lang.Object
  extended by jmce.sim.AbstractHardware
      extended by jmce.sim.AbstractPeripheral
          extended by jmce.sim.Device<java.lang.Integer>
              extended by jmce.sim.Serial
                  extended by jmce.sim.serial.SerialFile
All Implemented Interfaces:
Console, DeviceConsumer<java.lang.Integer>, Hardware, Peripheral

public class SerialFile
extends Serial
implements DeviceConsumer<java.lang.Integer>

Serial interface to file.

This class implements a serial interface without input and with the output to a file.

Version:
1.00
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.AbstractPeripheral
cpu
 
Constructor Summary
SerialFile()
           
SerialFile(java.lang.String name)
           
 
Method Summary
 void consume(java.lang.Integer c)
           
 java.lang.String getFileName()
          Return the name of the file used as output
 void init(Hardware parent)
          Initialize the hardware.
 void setFileName(java.lang.String s)
          Set the name of the file used as output
 java.lang.String toString()
           
 
Methods inherited from class jmce.sim.Serial
print, println, println, putchar
 
Methods inherited from class jmce.sim.Device
addInputConsumer, addInputProducer, addOutputConsumer, addOutputProducer, getConnected, read, readOutput, readyRead, readyReadOutput, readyWrite, removeInputConsumer, removeOutputConsumer, setConnected, write, writeInput
 
Methods inherited from class jmce.sim.AbstractPeripheral
idle, registerCPU, setIdle, setLive
 
Methods inherited from class jmce.sim.AbstractHardware
addHardware, createFrame, destroy, getHardware, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareForName, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jmce.sim.Hardware
addHardware, destroy, getHardware, getHardware, getHardware, getHardware, getHardwareCount, getHardwareInstances, getHardwareTree, getName, getParent, initSwing, removeHardware, removeHardware, reset, setHardware, setHardware, setName
 

Constructor Detail

SerialFile

public SerialFile()

SerialFile

public SerialFile(java.lang.String name)
Method Detail

init

public void init(Hardware parent)
          throws SIMException
Description copied from interface: Hardware
Initialize the hardware. This method must be called before any use of the interface. Only set ... / get ... method are allowed to be called before the intialization.

Specified by:
init in interface Hardware
Overrides:
init in class AbstractHardware
Parameters:
parent - Parent of this hardware.
Throws:
SIMException

consume

public void consume(java.lang.Integer c)
             throws SIMException
Specified by:
consume in interface DeviceConsumer<java.lang.Integer>
Throws:
SIMException

setFileName

public void setFileName(java.lang.String s)
Set the name of the file used as output


getFileName

public java.lang.String getFileName()
Return the name of the file used as output


toString

public java.lang.String toString()
Overrides:
toString in class AbstractHardware

jmce - 1_02