1
Uml Process / Re: SysML SendMessage, AcceptEvent, State Machine effect, Signal data and simulation
« on: Today at 04:12:54 pm »
Hello Serge,
Please try the following steps.
1. Create a Trigger ('Trigger1') and a Signal ('Signal1')
2. specify the type of Trigger1 to 'Signal' and assign Signal1 as its signal
3. add an attribute 'att' to Signal1
4. create a Statemachine diagram and assign Trigger1 to a Transition
5. create an Action and enter the following code as its effect
UIBroadcastSignal("Signal1",{'att' : 1});
// 1 is an example value
6. for a State after the Transition, you can refer the passed value (1 in this case) like:
sim.x = sim.Signal1.att;
// sim.x will be 1 (you need to define sim.x before this code)
This means that we (maybe) cannot use SendSignal Action with specified parameters but use the UIBroadcastSignal macro with parameters.
HTH,
Please try the following steps.
1. Create a Trigger ('Trigger1') and a Signal ('Signal1')
2. specify the type of Trigger1 to 'Signal' and assign Signal1 as its signal
3. add an attribute 'att' to Signal1
4. create a Statemachine diagram and assign Trigger1 to a Transition
5. create an Action and enter the following code as its effect
UIBroadcastSignal("Signal1",{'att' : 1});
// 1 is an example value
6. for a State after the Transition, you can refer the passed value (1 in this case) like:
sim.x = sim.Signal1.att;
// sim.x will be 1 (you need to define sim.x before this code)
This means that we (maybe) cannot use SendSignal Action with specified parameters but use the UIBroadcastSignal macro with parameters.
HTH,