I have a statechart that does stuff depending on another statechart. Let's call them Master and Slave.
In the Slave statechart I import the Master and assign it to a variable.
import: "Master.ysc"
var master: Master
Let's say the Slave statechart is in StateA
and wants to go to StateB
when Master triggers an event B
. Then as a transition trigger I use master.B
My problem is that the Slave statechart doesn't see the Master events. In the generated (Python) code self.master = None
in the init method of the Slave, and it always stays None
. Is there a way to do this properly?
I also tried to raise an event in the Slave directly from Master, as in this question:
import: "Slave.ysc"
var slave: Slave
raise slave.goto_b
But here I also have a problem with the reference being None.
self.slave.raise_goto_b()
AttributeError: 'NoneType' object has no attribute 'raise_goto_b'
Am I missing something simple (an assignment to the master/slave variable or something), or is it a problem with the Python bindings?