-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
networks: Added simple reusable linear networks for PPP and Wifi.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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++; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} | ||
|