|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DigitalComponent_std | +--PIC_std
This interface is the standard implementation of intreface PIC, but a lot of other classes implementing
it could be written (to have better emulation algorithms for instance).
You can read the source of this class here.
Constructor Summary | |
PIC_std()
Creates a new PIC_std without any program. |
|
PIC_std(CompiledProgram prog)
Creates a new PIC_std with a program. |
|
PIC_std(DigitalComponentUI dui)
Creates a new PIC_std without any program with an UI. |
Method Summary | |
void |
addComponentToNotify(DigitalComponent c)
Tells the PIC to notify c at each instruction cycle. |
boolean |
connectPin(int LocalPin,
DigitalComponent c,
int RemotePin,
boolean InitialState)
Connects pin LocalPin of the component to pin RemotePin of an other component. |
void |
ExecInstruction()
Executes one instruction. |
java.lang.String |
getState()
Returns the state of the component. |
void |
notifyOneCycle()
This method is called by a PIC at each instruction execution if the component asked so. |
void |
ReprogramFlash(CompiledProgram prog)
Reprograms the PIC. |
void |
Reset()
Resets the PIC. |
void |
Run()
Runs the PIC. |
void |
setPinStateDontNotify(int p,
boolean state)
Sets pin p of the component to the requested state without notifying the caller, this is used by the notifying routine of the Pin, so you should add here the code handling the response of the DigitalComponent to a change on its pins. |
Methods inherited from class DigitalComponent_std |
isPinConnected,
refreshDisplay,
setPinState |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PIC_std(CompiledProgram prog)
prog
- The program.public PIC_std()
public PIC_std(DigitalComponentUI dui)
Method Detail |
public boolean connectPin(int LocalPin, DigitalComponent c, int RemotePin, boolean InitialState)
public void setPinStateDontNotify(int p, boolean state)
public void notifyOneCycle()
public java.lang.String getState()
public void ReprogramFlash(CompiledProgram prog)
prog
- The new program.public void Run()
public void Reset()
public void ExecInstruction()
public void addComponentToNotify(DigitalComponent c)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |