-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSMA.ned
More file actions
43 lines (39 loc) · 1.15 KB
/
CSMA.ned
File metadata and controls
43 lines (39 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// This file is part of an OMNeT++/OMNEST simulation example.
//
// Copyright (C) 1992-2015 Andras Varga
//
// This file is distributed WITHOUT ANY WARRANTY. See the file
// `license' for details on this and other legal matters.
//
//
// The Aloha network consists of hosts which talk to the central "server" via
// the Aloha or Slotted Aloha protocol
//
network CSMA
{
parameters:
int numHosts; // number of hosts
double txRate @unit(bps); // transmission rate
double slotTime @unit(ms); // zero means no slots (pure Aloha)
double DIFS @unit(ms);
double SIFS @unit(ms);
double RTS @unit(ms);
double CTS @unit(ms);
int maxBackoffs;
@display("bgi=background/terrain,s;bgb=1000,1000");
submodules:
server: Server{
CTS = parent.CTS;
SIFS = parent.SIFS;
numHosts = parent.numHosts;
};
host[numHosts]: Host {
txRate = parent.txRate;
slotTime = parent.slotTime;
maxBackoffs = parent.maxBackoffs;
DIFS = parent.DIFS;
SIFS = parent.SIFS;
RTS = parent.RTS;
}
}