examples/simple-error-model.cc
changeset 2502 50d0da37f02f
parent 2494 1c69ea12779c
child 2575 1aae382e65e2
equal deleted inserted replaced
2501:3eaeac1dd5ed 2502:50d0da37f02f
    43 #include "ns3/command-line.h"
    43 #include "ns3/command-line.h"
    44 #include "ns3/default-value.h"
    44 #include "ns3/default-value.h"
    45 #include "ns3/ptr.h"
    45 #include "ns3/ptr.h"
    46 #include "ns3/config.h"
    46 #include "ns3/config.h"
    47 #include "ns3/uinteger.h"
    47 #include "ns3/uinteger.h"
       
    48 #include "ns3/string.h"
    48 
    49 
    49 #include "ns3/simulator.h"
    50 #include "ns3/simulator.h"
    50 #include "ns3/nstime.h"
    51 #include "ns3/nstime.h"
    51 #include "ns3/data-rate.h"
    52 #include "ns3/data-rate.h"
    52 
    53 
    81   LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_INFO);
    82   LogComponentEnable ("SimplePointToPointExample", LOG_LEVEL_INFO);
    82 #endif
    83 #endif
    83 
    84 
    84   // Set a few parameters
    85   // Set a few parameters
    85   Config::SetDefault ("RateErrorModel::ErrorRate", Double (0.01));
    86   Config::SetDefault ("RateErrorModel::ErrorRate", Double (0.01));
    86   Config::SetDefault ("RateErrorModel::ErrorUnit", "EU_PKT");
    87   Config::SetDefault ("RateErrorModel::ErrorUnit", String ("EU_PKT"));
    87   
    88   
    88   Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
    89   Config::SetDefault ("OnOffApplication::PacketSize", Uinteger (210));
    89   Config::SetDefault ("OnOffApplication::DataRate", MakeDataRate ("448kb/s"));
    90   Config::SetDefault ("OnOffApplication::DataRate", DataRate ("448kb/s"));
    90 
    91 
    91 
    92 
    92   // Allow the user to override any of the defaults and the above
    93   // Allow the user to override any of the defaults and the above
    93   // Bind()s at run-time, via command-line arguments
    94   // Bind()s at run-time, via command-line arguments
    94   CommandLine::Parse (argc, argv);
    95   CommandLine::Parse (argc, argv);