<?xml version="1.0"?>
<!DOCTYPE nta PUBLIC "-//Uppaal Team//DTD Flat System 1.0//EN" "http://www.docs.uu.se/docs/rtmv/uppaal/xml/flat-1_0.dtd">
<nta>
  <declaration>// Example of how to use broadcast channels
//////////////////////////////////////////////////////////
// Broadcast channels provde non-blocking one-to-many
// synchronisation. The sender is never blocked. A
// receiver must synchronise if it can. Guards on clocks
// are not allowed on the receiving edge.

broadcast chan c;


int i;</declaration>
  <template>
    <name x="5" y="5">Sender</name>
    <parameter x="5" y="20"/>
    <declaration>//Insert local declarations of clocks, variables and constants.
</declaration>
  <location id="id0" x="112" y="96"/><init ref="id0"/><transition><source ref="id0"/><target ref="id0"/><label kind="synchronisation" x="104" y="8">c!</label><nail x="88" y="32"/><nail x="136" y="32"/></transition></template>
  <template><name x="5" y="5">Receiver</name><parameter x="5" y="20">const id; const N</parameter><declaration/><location id="id2" x="152" y="152"/><location id="id3" x="288" y="216"/><init ref="id2"/><transition><source ref="id2"/><target ref="id3"/><label kind="guard" x="216" y="152">i == id</label><label kind="synchronisation" x="192" y="136">c?</label></transition><transition><source ref="id3"/><target ref="id2"/><label kind="assignment" x="104" y="248">i := (i + 1) % N</label><label kind="synchronisation" x="144" y="224">c?</label><nail x="264" y="264"/><nail x="128" y="200"/></transition></template><instantiation>//Insert process assignments.
R1 := Receiver(0, 3);
R2 := Receiver(1, 3);
R3 := Receiver(1, 3);</instantiation>
  <system>//Edit system definition.
system Sender, R1, R2, R3;</system>
</nta>
