--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
--
Hi,
I tried altering udp-echo using this HOWTO: http://www.nsnam.org/wiki/index.php/HOWTO_make_and_use_a_new_application
but I keep getting the same error when I try to run the request-response.cc example
ygao@Terilogy:~/ns-3-allinone/ns-3.8-pyviz$ ./waf --run scratch/request-response
Waf: Entering directory `/home/ygao/ns-3-allinone/ns-3.8-pyviz/build'
'/home/ygao/ns-3-allinone/ns-3.8-pyviz/bindings/python/ns3/__init__.py' -> '/home/ygao/ns-3-allinone/ns-3.8-pyviz/build/debug/bindings/python/ns3/__init__.py'
[454/958] cxx: scratch/request-response.cc -> build/debug/scratch/request-response_3.o
../scratch/request-response.cc: In function ‘int main(int, char**)’:
../scratch/request-response.cc:88: error: ‘RequestResponseServerHelper’ was not declared in this scope
../scratch/request-response.cc:88: error: expected ‘;’ before ‘server’
../scratch/request-response.cc:89: error: ‘server’ was not declared in this scope
../scratch/request-response.cc:100: error: ‘RequestResponseClientHelper’ was not declared in this scope
../scratch/request-response.cc:100: error: expected ‘;’ before ‘client’
../scratch/request-response.cc:101: error: ‘client’ was not declared in this scope
cc1plus: warnings being treated as errors
../scratch/request-response.cc:87: error: unused variable ‘port’
Waf: Leaving directory `/home/ygao/ns-3-allinone/ns-3.8-pyviz/build'
Build failed: -> task failed (err #1):
{task: cxx request-response.cc -> request-response_3.o}
It seems like something about declaring the helper and applications.
6. Make a new helper for your new application
a. change directory into ns-3-dev/src/helper
cd src/helper
b. create a new helper from the existing UDP echo helper
cp udp-echo-helper.cc request-response-helper.cc
cp udp-echo-helper.h request-response-helper.h
c. Edit the new helper files and make the same substitutions as in step 3
above.
d. Edit the helper wscript file and add a module dependency for your new helper file.
Add the string "'request-response'," in the call to create_ns3_module, like,
'udp-echo', 'request-response'])
e. Add the new dependency files to the wscript
Add a line 'request-response-helper.cc', in the helper.source assignments. Like
'udp-echo-helper.cc',
'request-response-helper.cc',
Add a line, 'request-response-helper.h', in the headers.source assignments. Like
'udp-echo-helper.h',
'request-response-helper.h',
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.