<component>.get-available-connector "type" ["direction"]
Return the name of a free connector of type type found within the component and its children. The direction of the connector to search for can be selected using direction ("up" or "down"). If no direction is specified, the command will first search for down connectors and then up connectors, returning the first match. Connectors supporting any direction will always match.
If no free connector is found, NIL is returned.
The following example connects a text console component to each serial connector in a system represented by the board top-level component:
while (board.get-available-connector serial) {
connect (board.get-available-connector serial) (
(new-text-console-comp).get-available-connector serial)
}
Simics Core
connect,
<component>.connect-to