/**
 * This class is the standard implementation of interface Pin.
 * <BR>You can read the source of this class <A HREF="./Pin_std.java.html"> here</A>.
 */
public class Pin_std implements Pin {

	/**
	 * Creates a new pin connected to pin RemotePin of c with the state InitialState.
	 */
	public Pin_std(DigitalComponent c, int RemotePin, boolean InitialState) {
		_c = c;
		_RemotePin = RemotePin;
		_state = InitialState;
	}

	public void setStateDontNotify(boolean state) {
		_state = state;
	}

	public void setState(boolean state) {
		_state = state;
		_c.setPinStateDontNotify(_RemotePin, state);
	}

	public boolean getState() {
		return _state;
	}

	protected DigitalComponent _c;
	protected int _RemotePin;
	protected boolean _state;
}