Skip to content

Commit

Permalink
networks: Added simple reusable linear networks for PPP and Wifi.
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Dec 20, 2024
1 parent a287691 commit d9cc07d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/inet/networks/ppp/LinearNetwork.ned
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//

package inet.networks.ppp;

import inet.networks.base.WiredNetworkBase;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;

network LinearNetwork extends WiredNetworkBase
{
submodules:
client: StandardHost {
@display("p=350,200");
}
router: Router {
@display("p=550,200");
}
server: StandardHost {
@display("p=750,200");
}
connections:
client.pppg++ <--> { datarate = 100Mbps; delay = 1us; } <--> router.pppg++;
router.pppg++ <--> { datarate = 100Mbps; delay = 1us; } <--> server.pppg++;
}

25 changes: 25 additions & 0 deletions src/inet/networks/wifi/LinearNetwork.ned
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//


package inet.networks.wifi;

import inet.networks.base.WirelessNetworkBase;
import inet.node.contract.INetworkNode;
import inet.node.wireless.AccessPoint;

network LinearNetwork extends WirelessNetworkBase
{
submodules:
client: <default("WirelessHost")> like INetworkNode {
@display("p=350,200");
}
ap: AccessPoint {
@display("p=550,200");
}
server: <default("WirelessHost")> like INetworkNode {
@display("p=750,200");
}
}

0 comments on commit d9cc07d

Please sign in to comment.