error:no member function declared in class

hi all, im using ns3 for my thesis.
so i added i metod In a class called LteHelper.h in this way
Ptr <LteNetDevice> InstallSingleUe(Ptr <Node> p);
after that i implement it in the class LteHelper.cc in this way
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Ptr <LteNetDevice>
 LteHelper::InstallSingleUe(Ptr <Node> p)
 {
	Ptr<LteNetDevice> device;
	Ptr<LtePhy> phy;
	Ptr<UeLtePhy> livPhy = CreateUePhy ();
	Ptr<UeNetDevice> dev = CreateObject<UeNetDevice> (p, livPhy);
	livPhy->GetDownlinkSpectrumPhy()->SetPhyMacRxEndOkCallback(MakeCallback(&LteNetDevice::Receive, dev));
		device=dev;// device è un ptr ad un LteNetDevice
		phy=livPhy;//phy è un ptr ad un LtePhy
		device->SetAddress(Mac48Address::Allocate());
		phy->SetDevice(device);
		phy->GetDownlinkSpectrumPhy()->SetDevice(device);
		phy->GetUplinkSpectrumPhy()->SetDevice(device);
		device->Start();
		p->AddDevice(device);

	return device;
}


when i run i got this error

build/debug/src/helper/lte-helper_1.o
../src/helper/lte-helper.cc:261: error: no ‘ns3::Ptr<ns3::LteNetDevice> ns3::LteHelper::InstallSingleUe(ns3::Ptr<ns3::Node>)’ member function declared in class ‘ns3::LteHelper’
Waf: Leaving directory `/home/giuseppe/workspace/SpectrumSharing/build'
Build failed:  -> task failed (err #1): 
	{task: cxx lte-helper.cc -> lte-helper_1.o}


in the static metod where i call the previous i've done:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
static
void createUserAtEachTime(double timeGenerationCall){
	cout<< i<<endl;
	ueNodesContainer[0].Create(1);
	Ptr <Node> p=ueNodesContainer[0].Get(i);
	Ptr <LteNetDevice> pippo=lte_helper[0].InstallSingleUe(p);

.
.

}

int main(){
createUserAtEachTime(time);
}


nothing special at all, but it doesn't work!!
i can't understand what's wrong !!
may you help me...? why this metodo seems to be not present for compiler....?
There is a difference between "add metod In a class called LteHelper.h in this way" and "add a method to the class LteHelper "

So you should check whether indeed this method was placed in the class LteHelper
Last edited on
Topic archived. No new replies allowed.