openoptics.Toolbox.BaseNetwork.connect#
- BaseNetwork.connect(time_slice, node1, node2, port1=0, port2=0, unidirectional=False) bool[source]#
Connect two node ports at the given time slice by configuring OCS, if no optical connections haven’t been built for both ports.
- Parameters:
time_slice (int) – The time slice to connect
node1 (int) – The first of two nodes to connect
node2 (int) – The second of two nodes to connect
port1 (int, optional) – The port the first node uses to connect. Defaults to 0.
port2 (int, optional) – The port the second node uses to connect. Defaults to 0.
unidirectional (bool, optional) – Whether connection is unidirectional. Defaults to False.
- Returns:
Whether the connect() was successful.
- Return type:
bool