public virtual void Connect(string outPortName, InPort inPort) { int outPortNO = OutPortList.FindIndex(outPort => outPort.Name == outPortName); if (outPortNO < 0) { throw logger.Error(new ModelException(this, $"Out port {outPortName} not found.")); } Connect(outPortNO, inPort); }
public override void Connect(int outPortNO, InPort inPort) { if (outPortNO == 0) { Bind(inPort); } else { throw logger.Error(new ModelException(FatherModel, "Out port has only single signal")); } }
public virtual void Connect(int outPortNO, InPort inPort) { if (outPortNO >= OutPortCount()) { throw logger.Error(new ModelException(this, $"Out port number {outPortNO} exceed boundary")); } else { OutPortList[outPortNO].Bind(inPort); } }
public void Bind(InPort inPort) { if (inPort.Source != null) { throw logger.Error(new ModelException(FatherModel, "Duplicated binding of InPort.")); } else { destinationList.Add(inPort); inPort.Source = this; } }
public override void Connect(int outPortNO, InPort inPort) { throw logger.Error(new ModelException(FatherModel, "Cannot link in port to in port")); }
public virtual void Connect(int outPortNO, InPort inPort) { throw new System.NotImplementedException(); }