Switch to unified view

a b/examples/SmallNetwork/SmallNetwork.ned
1
//
2
// This program is free software: you can redistribute it and/or modify
3
// it under the terms of the GNU Lesser General Public License as published by
4
// the Free Software Foundation, either version 3 of the License, or
5
// (at your option) any later version.
6
// 
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU Lesser General Public License for more details.
11
// 
12
// You should have received a copy of the GNU Lesser General Public License
13
// along with this program.  If not, see http://www.gnu.org/licenses/.
14
// 
15
16
package rina.examples.SmallNetwork;
17
import rina.CS.*;
18
19
20
network SmallNetwork
21
{
22
    @display("bgb=586,372");
23
    submodules:
24
        host1: Host1AP {
25
            @display("p=92,83");
26
        }
27
        host2: Host1AP {
28
            @display("p=92,252");
29
        }
30
        host3: Host1AP {
31
            @display("p=275,83");
32
        }
33
        host4: Host1AP {
34
            @display("p=473,83");
35
        }
36
        host5: Host1AP {
37
            @display("p=473,252");
38
        }
39
        router1: InteriorRouter3Int {
40
            @display("p=166,165");
41
        }
42
        router2: InteriorRouter3Int {
43
            @display("p=275,165");
44
        }
45
        router3: InteriorRouter3Int {
46
            @display("p=388,165");
47
        }
48
49
    connections:
50
        router1.medium[0] <--> host1.medium;
51
        router1.medium[1] <--> host2.medium;
52
        router1.medium[2] <--> router2.medium[0];
53
        router2.medium[1] <--> router3.medium[0];
54
        router2.medium[2] <--> host3.medium;
55
        router3.medium[1] <--> host4.medium;
56
        router3.medium[2] <--> host5.medium;
57
58
}