Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating different range of wifi for RSU and Vehicle #15

Open
sangitatukai opened this issue Jul 13, 2021 · 1 comment
Open

Creating different range of wifi for RSU and Vehicle #15

sangitatukai opened this issue Jul 13, 2021 · 1 comment

Comments

@sangitatukai
Copy link

sangitatukai commented Jul 13, 2021

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

@fgfxf
Copy link

fgfxf commented Mar 8, 2024

可以尝试修改这个wifi-setup-helper.cc文件,按照install+参数选择的方式安装给节点。从而达到设置参数的目的。它原本dbm值是固定的。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants