src/netanim/examples/grid-animation.cc
changeset 8966 060dba23e9bb
parent 8806 089f19e3b412
equal deleted inserted replaced
8965:cfed4f87e003 8966:060dba23e9bb
    63   grid.AssignIpv4Addresses (Ipv4AddressHelper ("10.1.1.0", "255.255.255.0"),
    63   grid.AssignIpv4Addresses (Ipv4AddressHelper ("10.1.1.0", "255.255.255.0"),
    64                             Ipv4AddressHelper ("10.2.1.0", "255.255.255.0"));
    64                             Ipv4AddressHelper ("10.2.1.0", "255.255.255.0"));
    65 
    65 
    66 
    66 
    67   OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
    67   OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
    68   clientHelper.SetAttribute 
    68   clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
    69     ("OnTime", RandomVariableValue (ConstantVariable (1)));
    69   clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
    70   clientHelper.SetAttribute 
       
    71     ("OffTime", RandomVariableValue (ConstantVariable (0)));
       
    72   ApplicationContainer clientApps;
    70   ApplicationContainer clientApps;
    73 
    71 
    74   // Create an on/off app sending packets
    72   // Create an on/off app sending packets
    75   AddressValue remoteAddress (InetSocketAddress (grid.GetIpv4Address (xSize-1,ySize-1), 1000));
    73   AddressValue remoteAddress (InetSocketAddress (grid.GetIpv4Address (xSize-1,ySize-1), 1000));
    76   clientHelper.SetAttribute ("Remote", remoteAddress);
    74   clientHelper.SetAttribute ("Remote", remoteAddress);