Hello all,
i am working on a new routing protocol (named "bp"), i try to call a function, from my simulation script, executing some output stuff and printing the results in a csv file
(forwarded packets, number of packet on MAC queue ...): void MeshScenario::ScenarioReport()
{
std::ofstream out (m_CSVReportFileName.c_str ());
out << "NodeIndex, IPAddress, ForwardedPackets, VirtualPackets" << std::endl;
for ( int i=0 ; i < m_xSize * m_ySize ; i++)
{
out << i << ",";
Ptr<ns3::bp::RoutingProtocol> RoutingLayer = meshRouters.Get(i) -> GetObject<Ipv4> ()
-> GetRoutingProtocol();
NS_ASSERT(RoutingLayer);
RoutingLayer-> nodeReport (out);
out << std::endl;
}
out.close();
}
So i try to execute a method (
nodeReport) in each node, the problem is that i am not able to access to it :
./ns3/ptr.h:447:27: erreur: invalid conversion from ‘ns3::Ipv4RoutingProtocol*’ to ‘ns3::bp::RoutingProtocol*’ [-fpermissive]
Any suggestion please?