Download User Manual

Transcript
Creating Models in QML
143
system {
Inbound MyInput : MyRecord;
Outbound MyOutput : MyRecord;
}
record MyRecord {
public int x;
}
record TemplateRecord<T> {
public T x;
}
Now assume that we are expecting a message of type MyRecord from input port MyInput
with the member variable x assigned to 3.
MyPort:MyRecord [msg.x == 3]
/
/* Echo 'msg' back to the environment. */
MyOutput.send(msg, -1);
A proper template instantiation in the transition string for TemplateRecord would for
example be
MyPort:TemplateRecord<String> [msg.x == "a message"]
4.8.3 Internal Transitions of a State
A UML level basic state may contain a set of internal transitions.
An internal transition is a transition that remains within a single state rather than a transition
that involves two states. It represents the occurrence of an event that does not cause a change
of state.
Note that an internal transition is not equivalent to a self-transition from a state back to the
same state. If there is a sub state machine in a basic state, the self-transition causes the initial