2. Tutorial
2 Tutorial
2.1 Visualizing Message Sequence Charts
The easiest way of using ET
, is to just use it as a graphical tool for displaying message sequence charts. In order to do that you need to first start a Viewer
(which by default starts a Collector
):
{ok, ViewerPid} = et_viewer:start([{title,"Coffee Order"}]), CollectorPid = et_viewer:get_collector_pid(ViewerPid).
Then you send events to the Collector
with the function et_collector:report_event/6
like this:
et_collector:report_event(CollectorPid,85,from,to,message,extra_stuff).
The Viewer
will automatically pull events from the Collector
and display them on the screen.
The number (in this case 85) is a