Interface DigitalComponent

All Known Subinterfaces:
DebuggablePIC, PIC
All Known Implementing Classes:
DigitalAnalyser, DigitalComponent_std, MatricialKeyboard, RemotedTI, TcpIpComponent

public interface DigitalComponent

An interface to describe which services a digital component must offer.
You can read the source of this class here.


Method Summary
 boolean connectPin(int LocalPin, DigitalComponent c, int RemotePin, boolean InitialState)
          Connects pin LocalPin of the component to pin RemotePin of an other component.
 java.lang.String getState()
          Returns the state of the component.
 boolean isPinConnected(int p)
          Returns true if the pin p is already connected on the component.
 void notifyOneCycle()
          This method is called by a PIC at each instruction execution if the component asked so.
 void setPinState(int p, boolean state)
          Sets pin p of the component to the requested state.
 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.
 

Method Detail

connectPin

public boolean connectPin(int LocalPin,
                          DigitalComponent c,
                          int RemotePin,
                          boolean InitialState)
Connects pin LocalPin of the component to pin RemotePin of an other component.
Returns:
false if the requested pin is already connected on one of the components.

setPinState

public void setPinState(int p,
                        boolean state)
Sets pin p of the component to the requested state. There is no use of a getPinState method because a component which changes the state of one of his pins immediatly tells the other component what it has just done.

setPinStateDontNotify

public 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.

isPinConnected

public boolean isPinConnected(int p)
Returns true if the pin p is already connected on the component.

notifyOneCycle

public void notifyOneCycle()
This method is called by a PIC at each instruction execution if the component asked so.

getState

public java.lang.String getState()
Returns the state of the component.