'How to change datarate of a channel during simulation in INET4?

I'm looking for TCP behavior via INET4. I'd like to know whether there's a way to change the data rate while the TCP simulation is running? As we have this parameters in the ned file of INET->example->tcpwindowscale:

//
// author: Thomas Reschka
//

 package inet.examples.inet.tcpwindowscale;

 import inet.common.misc.ThruputMeteringChannel;
 import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
 import inet.node.inet.StandardHost;


 network tcpwindowscale
 {
parameters:
types:
    channel LFNPath extends ThruputMeteringChannel
    {
        parameters:
            datarate = 10Mbps;
            delay = 900s;
            per = 0;
            ber = 0.00000001;
            thruputDisplayFormat = default("p b u");
    }
submodules:
    client: StandardHost {
        parameters:
            @display("p=250,100");
        gates:
            pppg[1];
    }
    server: StandardHost {
        parameters:
            @display("p=400,100;i=device/server");
        gates:
            pppg[1];
    }
    configurator: Ipv4NetworkConfigurator {
        @display("p=100,100;is=s");
    }
connections:
    client.pppg[0] <--> LFNPath <--> server.pppg[0];
   }

Now Here I want change the data rate during simulation from 1Mbps to 10Mbps for every 10sec. So every 10sec the data rate change and pick random value and run for 100s. Total of 10 values it pick randomly of datarate.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source