Example #1
0
    def get_ports_list(self, port_type="optical", prefix=None) -> List[Port]:
        """returns a list of ports. Useful for routing bundles of ports

        Args:
            port_type: str or (int, int) layer
            prefix: for example "E" for east, "W" for west ...
        """
        return list(
            select_ports(self.ports, port_type=port_type,
                         prefix=prefix).values())
Example #2
0
 def get_ports_list(self, port_type="optical", prefix=None) -> List[Port]:
     """ returns a lit of  ports """
     return list(
         select_ports(self.ports, port_type=port_type,
                      prefix=prefix).values())
Example #3
0
 def get_ports_dict(self, port_type="optical", prefix=None):
     """ returns a list of ports """
     return select_ports(self.ports, port_type=port_type, prefix=prefix)