Skip to content

Commit

Permalink
updates to hardware layout hierarchy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamillar committed Nov 26, 2024
1 parent b09d856 commit 991785b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gwproto/data_classes/hardware_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ def boss_node(self, node: ShNode) -> Optional[ShNode]:
raise DcError(f"{node} is missing boss {boss_handle}")
return boss

def direct_reports(self, node: ShNode) -> List[ShNode]:
return [n for n in self.nodes.values() if self.boss_node(n) == node]

def node_from_handle(self, handle: str) -> Optional[ShNode]:
return next((n for n in self.nodes.values() if n.handle == handle), None)

Expand Down

0 comments on commit 991785b

Please sign in to comment.