I got an issue about aggregating an interface to the Net-Device. The interface is the class of helics-receiver which is expected to aggregate to a NetDevice.
Ptr<HelicsReceiver> pHelicsRec = 0;
Ptr<NetDevice> pThisDev = destNode->GetDevice(i);
pHelicsRec = pThisDev->GetObject<HelicsReceiver>();
If aggregation is OK, the value of pHelicsRec should the pointer address. While in my code, it is zero which means the netdevice does not have an Ipv4 object aggregated.
Any suggestion will be very appreciated?
../contrib/helics/model/helics-simulator-impl.cc:344:54: error: 'HelicsReceiver' does not refer to a value
pHelicsRec = pThisDev->AggregateObject(HelicsReceiver);
^
../contrib/helics/model/helics-receiver.h:42:7: note: declared here
class HelicsReceiver : public Object
^
../contrib/helics/model/helics-simulator-impl.cc:347:99: error: 'HelicsReceiver' does not refer to a value
std::cout<<"Address of pThisDev aggregate With Object: "<<pThisDev->AggregateObject(HelicsReceiver)<<std::endl;
^
../contrib/helics/model/helics-receiver.h:42:7: note: declared here
class HelicsReceiver : public Object
^
2 errors generated.
We are at ProcessOneEvent...
This event time is 3100000000, id is 17, context is 0
assert failed. cond="!m_rxCallback.IsNull ()", file=../contrib/helics/model/helics-receiver.cc, line=5730859-2ee218ab-f299-4d72-be8d-41636780b5d2::|| cmd:send_message from 65537