equal
deleted
inserted
replaced
65 PacketSocketHelper packetSocket; |
65 PacketSocketHelper packetSocket; |
66 packetSocket.Install (c); |
66 packetSocket.Install (c); |
67 |
67 |
68 // create the shared medium used by all csma devices. |
68 // create the shared medium used by all csma devices. |
69 NS_LOG_INFO ("Create channels."); |
69 NS_LOG_INFO ("Create channels."); |
70 Ptr<CsmaChannel> channel = CreateObject<CsmaChannel> ("BitRate", DataRateValue (DataRate(5000000)), |
70 Ptr<CsmaChannel> channel = CreateObject<CsmaChannel> ( |
71 "Delay", TimeValue (MilliSeconds(2))); |
71 "DataRate", DataRateValue (DataRate(5000000)), |
|
72 "Delay", TimeValue (MilliSeconds(2))); |
72 |
73 |
73 // use a helper function to connect our nodes to the shared channel. |
74 // use a helper function to connect our nodes to the shared channel. |
74 NS_LOG_INFO ("Build Topology."); |
75 NS_LOG_INFO ("Build Topology."); |
75 CsmaHelper csma; |
76 CsmaHelper csma; |
76 csma.SetDeviceParameter ("EncapsulationMode", StringValue ("Llc")); |
77 csma.SetDeviceParameter ("EncapsulationMode", StringValue ("Llc")); |