vndn-example-tms.txt
@guibaraujo
Here I am trying to creates different range of wifi for RSU and Vehicle modifying ndn4ivc/Helper/wifi-setup-helper.cc. I pass a boolean value through NetDeviceContainer WifiSetupHelper::ConfigureDevices (NodeContainer &nodes, bool enablePcap, int s)
and modified the lines
if(s==1){
wifiPhy.Set ("TxPowerStart", DoubleValue (60)); //Minimum available transmission level (dbm)
wifiPhy.Set ("TxPowerEnd", DoubleValue (60)); //Maximum available transmission level (dbm)
}
if(s==2){
wifiPhy.Set ("TxPowerStart", DoubleValue (24)); //Minimum available transmission level (dbm)
wifiPhy.Set ("TxPowerEnd", DoubleValue (24)); //Maximum available transmission level (dbm)
}
Now I call this function from vndn-example-tms.cIn the original code where all the nodes are installed with the same networking devices has the following lines:
/std::cout << "Installing networking devices for every node..." << std::endl;
ndn::WifiSetupHelper wifi;
NetDeviceContainer devices = wifi.ConfigureDevices (nodePool, enablePcap, 1); // making wi fi range different with this boolean value /
I cahnged this as following for installing networking devices separately for RSU nodes and Vehicles nodes:
NodeContainer allOtherNodes, rsuNodes; //store the RSU nodes and vehilces node in different container
for (NodeList::Iterator i = NodeList::Begin(); i != NodeList::End(); ++i) {
if ((i==nodePool.Get(0))||(i==nodePool.Get(1))||(i==nodePool.Get(2))||(i==nodePool.Get(3))||(i==nodePool.Get(4))||(i==nodePool.Get(5))){
rsuNodes.Add(i);
}
else
allOtherNodes.Add(i);
}
std::cout << "Installing networking devices for every RSU..." << std::endl;
ndn::WifiSetupHelper wifi;
NetDeviceContainer devices = wifi.ConfigureDevices (rsuNodes, enablePcap, 1); // making wi fi range different with this boolean value
Though it is not showing any error, when I pass the nodePool to .ConfigureDevices(), I found there is 4538 Forwarder:onContentStoreHit() But when I pass the rsuNodes and allOtherNodes seperately to ConfigureDevices, I found 0 onContentStoreHit().
Im not understanding why there is no content hit while I install the network device seperately to RSU and Vehicles.
Are the RSU nodes are fail to work as content provider ? I am not getting where I made the mistake.
Here Im attaching the modified files of vndn-example-tms.cc in text version
vndn-example-tms.txt @guibaraujo Here I am trying to creates different range of wifi for RSU and Vehicle modifying ndn4ivc/Helper/wifi-setup-helper.cc. I pass a boolean value through NetDeviceContainer WifiSetupHelper::ConfigureDevices (NodeContainer &nodes, bool enablePcap, int s)
and modified the lines if(s==1){ wifiPhy.Set ("TxPowerStart", DoubleValue (60)); //Minimum available transmission level (dbm) wifiPhy.Set ("TxPowerEnd", DoubleValue (60)); //Maximum available transmission level (dbm) } if(s==2){
wifiPhy.Set ("TxPowerStart", DoubleValue (24)); //Minimum available transmission level (dbm) wifiPhy.Set ("TxPowerEnd", DoubleValue (24)); //Maximum available transmission level (dbm) }
Now I call this function from vndn-example-tms.c In the original code where all the nodes are installed with the same networking devices has the following lines:
/std::cout << "Installing networking devices for every node..." << std::endl; ndn::WifiSetupHelper wifi; NetDeviceContainer devices = wifi.ConfigureDevices (nodePool, enablePcap, 1); // making wi fi range different with this boolean value /
I cahnged this as following for installing networking devices separately for RSU nodes and Vehicles nodes:
NodeContainer allOtherNodes, rsuNodes; //store the RSU nodes and vehilces node in different container
for (NodeList::Iterator i = NodeList::Begin(); i != NodeList::End(); ++i) { if ((i==nodePool.Get(0))||(i==nodePool.Get(1))||(i==nodePool.Get(2))||(i==nodePool.Get(3))||(i==nodePool.Get(4))||(i==nodePool.Get(5))){ rsuNodes.Add(i); } else allOtherNodes.Add(i);
std::cout << "Installing networking devices for every RSU..." << std::endl; ndn::WifiSetupHelper wifi; NetDeviceContainer devices = wifi.ConfigureDevices (rsuNodes, enablePcap, 1); // making wi fi range different with this boolean value
std::cout << "Installing networking devices for every Vehicles..." << std::endl; ndn::WifiSetupHelper wifi1; NetDeviceContainer devices1 = wifi1.ConfigureDevices (allOtherNodes, enablePcap, 2); //change: /ndn4vc/helper/wifi-setup-helper.cc configureDvice()
Though it is not showing any error, when I pass the nodePool to .ConfigureDevices(), I found there is 4538 Forwarder:onContentStoreHit() But when I pass the rsuNodes and allOtherNodes seperately to ConfigureDevices, I found 0 onContentStoreHit().
Im not understanding why there is no content hit while I install the network device seperately to RSU and Vehicles. Are the RSU nodes are fail to work as content provider ? I am not getting where I made the mistake.
Here Im attaching the modified files of vndn-example-tms.cc in text version