"examples/vscode:/vscode.git/clone" did not exist on "e795a4c6f88a51a5d1b16b47d36f8e103f0a82ac"
Unverified Commit bc34320c authored by Jakob Görgen's avatar Jakob Görgen
Browse files

experiments/simbricks/orchestration/system/base : call super constructor in...

experiments/simbricks/orchestration/system/base : call super constructor in base sytem classes for id generation
parent bcfe0682
...@@ -44,6 +44,7 @@ class IdObj(abc.ABC): ...@@ -44,6 +44,7 @@ class IdObj(abc.ABC):
class Component(IdObj): class Component(IdObj):
def __init__(self, s: System) -> None: def __init__(self, s: System) -> None:
super().__init__()
s.system = s s.system = s
s.parameters = {} s.parameters = {}
s.add_component(self) s.add_component(self)
...@@ -59,6 +60,7 @@ class Component(IdObj): ...@@ -59,6 +60,7 @@ class Component(IdObj):
class Interface(IdObj): class Interface(IdObj):
def __init__(self, c: Component) -> None: def __init__(self, c: Component) -> None:
super().__init__()
self.component = c self.component = c
self.channel: Channel | None = None self.channel: Channel | None = None
...@@ -75,6 +77,7 @@ class Interface(IdObj): ...@@ -75,6 +77,7 @@ class Interface(IdObj):
class Channel(IdObj): class Channel(IdObj):
def __init__(self, a: Interface, b: Interface) -> None: def __init__(self, a: Interface, b: Interface) -> None:
super().__init__()
self.latency = 500 self.latency = 500
self.a: Interface = a self.a: Interface = a
self.b: Interface = b self.b: Interface = b
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment