Dear Amir and Dear Geek and Dear all,
You mentioned about defining two mode of nodes.
Can I used from your this theory about applying time slot to node that are locating in right direction and left direction (like highway scenario)
first I want to find that this node is located in which direction and after that apply it time slot ? (if you have another idea please tell me)
so that is true defined two group node ( rightNodes and leftNodes ) ?
I am Thanks in advance to all of you for helping and giving your expert idea.
NodeContainer nodes;
NodeContainer rightnodes;
NodeContainer leftnodes;
void
TdmaExample::CreateNodes ()
{
std::cout << "Creating " << (unsigned) m_nWifis << " nodes.\n";
nodes.Create (m_nWifis);
rightNodes.Create (m_nWifis); // for nodes in right direction
leftNodes.Create (m_nWifis); // for nodes in left direction
/* if nodes is rightdirection
nodes = rightNodes
rightNodes.Create (m_nWifis);
else
node is leftdirection
nodes = leftNodes
leftNodes.Create (m_nWifis);
*/
NS_ASSERT_MSG (m_nWifis > m_nSinks, "Sinks must be less or equal to the number of nodes in network");
}
'
'
'
devices = wifi.Install (wifiPhy, wifiMac, rightNodes); // devices = wifi.Install (wifiPhy, wifiMac, anNodes);
ldevices = wifi.Install (wifiPhy, wifiMac, leftNodes); // gdevices = wifi.Install (wifiPhy, wifiMac, gNodes);
TdmaHelper tdma = TdmaHelper (rightNodes.GetN ()+leftNodes.GetN(), rightNodes.GetN ()+leftNodes.GetN()); // in this case selected, numSlots = nodes
TdmaControllerHelper controller;
'
'
'
devices = tdma.Install (rightNodes);
ldevices = tdma.Install (leftNodes);
'
'