Example ToolBus Script
process PT1 is let T1: tool1adapter in execute(tool1adapter, T1?) . ( rec-event(T1, message) . snd-msg(t1, t2, message) . rec-msg(t2, t1, ack) . snd-ack-event(T1, message) + rec-event(T1, quit) . shutdown("") ) * delta endlet process PT2 is let T2: tool2 in execute(tool2, T2?) . ( rec-msg(t1, t2, message) . snd-eval(T2, eval(message)) . rec-value(T2, value(ack)) . snd-msg(t2, t1, ack) ) * delta endlet
PT1
and
PT2
closely resemble the processes
PTool1
and
PTool2
in the example as ToolBus application specification.
The
execute
actions in the ToolBus script correspond to starting the
adapter for Tool1 and starting Tool2 in parallel with the processes
PT1
and
PT2
respectively.
tool tool1adapter is { command = "wish-adapter -script tool1adapter.tcl" } tool tool2 is { command = "wish-adapter -script tool2.tcl" }
toolbus(PT1, PT2)
PT1
and
PT2
in parallel.