|
@@ -122,7 +122,6 @@ Element function get_enabled_transitions(model : Element, state : String, data :
|
|
|
while (read_nr_out(to_filter) > 0):
|
|
|
transition = set_pop(to_filter)
|
|
|
attr = read_attribute(model, transition, "event")
|
|
|
- log("Check attr in event list: " + set_to_string(data["events"]))
|
|
|
if (bool_or(element_eq(attr, read_root()), set_in(data["events"], attr))):
|
|
|
// Event is OK
|
|
|
cond = read_attribute(model, transition, "cond")
|
|
@@ -144,12 +143,14 @@ Element function execute_transition(model : Element, data : Element, class : Str
|
|
|
script = read_attribute(model, transition, "script")
|
|
|
if (element_neq(script, read_root())):
|
|
|
script = get_func_AL_model(import_node(script))
|
|
|
- log("Calling script with attributes: " + dict_to_string(data["classes"][class]["attributes"]))
|
|
|
script(data["classes"][class]["attributes"])
|
|
|
- log("Called script with attributes: " + dict_to_string(data["classes"][class]["attributes"]))
|
|
|
|
|
|
- // Raise events
|
|
|
- // TODO
|
|
|
+ // Raise events (if any)
|
|
|
+ Element events
|
|
|
+ events = allAssociationDestinations(model, transition, "SCCD/transition_raises")
|
|
|
+ while (read_nr_out(events) > 0):
|
|
|
+ event = set_pop(events)
|
|
|
+ set_add(data["events"], read_attribute(model, event, "event"))
|
|
|
|
|
|
// Return new set of states
|
|
|
return expand_state(model, readAssociationDestination(model, transition))!
|
|
@@ -166,7 +167,6 @@ Float function step_class(model : Element, data : Element, class : String):
|
|
|
Float t_min
|
|
|
Float t_current
|
|
|
|
|
|
- log("Step class " + class)
|
|
|
states = set_copy(data["classes"][class]["states"])
|
|
|
new_states = create_node()
|
|
|
|
|
@@ -202,7 +202,6 @@ Float function step(model : Element, data : Element):
|
|
|
|
|
|
t_min = 1.0
|
|
|
classes = dict_keys(data["classes"])
|
|
|
- log("Got classes: " + set_to_string(classes))
|
|
|
|
|
|
while (read_nr_out(classes) > 0):
|
|
|
class = set_pop(classes)
|