doc/tutorial/tweaking.texi
changeset 3382 d5f8e5fae1c6
parent 3356 be3532c51a37
child 3771 21f40ccb03b3
equal deleted inserted replaced
3381:3cdd9d60f7c7 3382:d5f8e5fae1c6
   460 at the @command{ns-3} attribute system while walking through the 
   460 at the @command{ns-3} attribute system while walking through the 
   461 @code{first.cc} script.  We looked at the following lines of code,
   461 @code{first.cc} script.  We looked at the following lines of code,
   462 
   462 
   463 @verbatim
   463 @verbatim
   464     PointToPointHelper pointToPoint;
   464     PointToPointHelper pointToPoint;
   465     pointToPoint.SetDeviceParameter ("DataRate", StringValue ("5Mbps"));
   465     pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
   466     pointToPoint.SetChannelParameter ("Delay", StringValue ("2ms"));
   466     pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
   467 @end verbatim
   467 @end verbatim
   468 
   468 
   469 and mentioned that @code{DataRate} was actually an @code{Attribute} of the 
   469 and mentioned that @code{DataRate} was actually an @code{Attribute} of the 
   470 @code{PointToPointNetDevice}.  Let's use the command line argument parser
   470 @code{PointToPointNetDevice}.  Let's use the command line argument parser
   471 to take a look at the attributes of the PointToPointNetDevice.  The help
   471 to take a look at the attributes of the PointToPointNetDevice.  The help
   484   --ns3::PointToPointNetDevice::DataRate=[32768bps]:
   484   --ns3::PointToPointNetDevice::DataRate=[32768bps]:
   485     The default data rate for point to point links
   485     The default data rate for point to point links
   486 @end verbatim
   486 @end verbatim
   487 
   487 
   488 This is the default value that will be used when a @code{PointToPointNetDevice}
   488 This is the default value that will be used when a @code{PointToPointNetDevice}
   489 is created in the system.  We overrode this default with the ``parameter''
   489 is created in the system.  We overrode this default with the attribute
   490 setting in the @code{PointToPointHelper} above.  Let's use the default values 
   490 setting in the @code{PointToPointHelper} above.  Let's use the default values 
   491 for the point-to-point devices and channels by deleting the 
   491 for the point-to-point devices and channels by deleting the 
   492 @code{SetDeviceParameter} call and the @code{SetChannelParameter} call from 
   492 @code{SetDeviceAttribute} call and the @code{SetChannelAttribute} call from 
   493 the @code{first.cc} we have in the scratch directory.
   493 the @code{first.cc} we have in the scratch directory.
   494 
   494 
   495 Your script should now just declare the @code{PointToPointHelper} and not do 
   495 Your script should now just declare the @code{PointToPointHelper} and not do 
   496 any @code{set} operations as in the following example,
   496 any @code{set} operations as in the following example,
   497 
   497