Skip to first unread message

dbaez...@gmail.com

unread,
Apr 27, 2016, 5:55:06 PM4/27/16
to ns-3-users
hello to all you, someone who can help me with the following question. How I can insert coordinates of the position (x,y) and mac address of the node within a package? please and thank you.

Tommaso Pecorella

unread,
Apr 27, 2016, 6:10:01 PM4/27/16
to ns-3-users
Hi,

this (or similar) topic has been discussed many times in the past.
You can create a new header or, equivalently, read and write from the packet payload.

About how to create and use a new header, refer to one of the countless header source files. The easiest one is the SeqTsHeader in src/applications/model.
About how to read/write from the payload, see the UdpEchoClient application.
Note that you can NOT use doubles in headers, and even in payloads it's quite a bad idea.

T.

dbaez...@gmail.com

unread,
Apr 28, 2016, 6:03:13 PM4/28/16
to ns-3-users

Hi.To read and write, which deals with the class methods UdpEchoClient application? and as I can implement in my  attached code, help please and thank you.
wifi-simple-adhoc(1).cc

Tommaso Pecorella

unread,
Apr 28, 2016, 6:19:03 PM4/28/16
to ns-3-users
Hi,

the code you attached doesn't show anything (or any effort in doing what you asked for).
Please study the classes I mentioned in the previous message. We can not do your work for you.
Moreover, I understand that English is not your native language (neither is for me), but please... take a moment to make your messages at least understandable.

Thanks,

t.
Reply all
Reply to author
Forward
0 new messages