Skip to content
Snippets Groups Projects
Commit adb261d9 authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Add documentation for some SFG methods

parent 4a2cad1f
No related branches found
No related tags found
1 merge request!297Add documentation for some SFG methods
Pipeline #94702 passed
......@@ -747,9 +747,18 @@ class SFG(AbstractOperation):
return self._precedence_list
def show_precedence_graph(self) -> None:
"""
Display the output of :func:`precedence_graph` in the system viewer.
"""
self.precedence_graph().view()
def precedence_graph(self) -> Digraph:
"""
Return the SFG in prededence form in Graphviz format.
This can be rendered in enriched shells.
"""
p_list = self.get_precedence_list()
pg = Digraph()
pg.attr(rankdir="LR")
......@@ -1378,6 +1387,14 @@ class SFG(AbstractOperation):
return Schedule(self, scheduling_algorithm="ASAP").schedule_time
def iteration_period_bound(self) -> int:
"""
Return the iteration period bound of the SFG.
If -1, the SFG does not have any loops and therefore no iteration period bound.
"""
raise NotImplementedError()
def edit(self) -> None:
"""Edit SFG in GUI."""
from b_asic.GUI.main_window import start_editor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment