Hello,
your info is very useful up to this point! currently I am trying to do the same thing.
I want to call a custom method within the diagram.
Either with return-type of void in order to do stuff in the certain state.
Or the better solution would be a method which returns an integer. Then the events in the diagram listen on the integer
and transition appropriately.
Can you explain the way to use a non-generated method within the generated code(in the model without simulation) again or in
a different way. I did everything to the point where I have:
ss.getSCITrain().setSCITrainOperationCallback(new Train());
Just with my classes instead of Train. What exacly is happening there and how does this help me?
Just to let you know, currently I have the same error-message as you did have: Exception in thread "main" java.lang.NullPointerException
Another little question. Is the code of one state executed until one transition can be fired?
In every cycle the code of a state is executed and all events are checked right?
And when an event is true the state transisions.
Then I would like to have an "int light = getLight()" in the state and events like "light > 100", "light < 100".
Thank you very much for your help with this.