-1

I am working in NS2 and want to do the simulation of my new protocol. My protocol is regarding peer to peer overlay network. In the algorithm of my protocol i need to know the Battery Status and Geo Location of a node.

I would like to know whether it is possible to check the battery status and geo-location of a node? If yes..then kindly elaborate it...!!!

Wasi Xam
  • 51
  • 1
  • 4
  • You should show some of what you've got so far. For example, how might you get a node to tell _itself_ what its battery status is? – Donal Fellows Apr 12 '15 at 15:50
  • @DonalFellows i have a little idea about this project in web that there it should use Battery Status API of HTML5 for FInding the charging status of peers...Now i don't know how it will be done in NS2 or is it possible to do it ns2 – Wasi Xam Apr 12 '15 at 19:54
  • Is it possible to use API's in NS2? – Wasi Xam Apr 12 '15 at 19:55

1 Answers1

0

"GeoLocation" is included in a stock ns-2.3x : cd ns-2.3x/ && grep -Rin GeoLocation


"Battery" : See mannasim https://github.com/paultsr/ns-allinone-2.35 → ns-2.35/mannasim/{files.cc files.h}

Examples ( set val(en) EnergyModel/Battery ) : mannasim-examples2015.tar.gz

Link https://drive.google.com/file/d/0B7S255p3kFXNak52bmYwQnQxYzg/view?usp=sharing


"Battery", also see MOCA__TCL-files.tar.gz

(Line 2002, 2x-DMOCA-code_v1.tcl : exec xgraph dsr_routing_4.tr -x "Trust Value" -y "Node battery power" ...)

Links https://drive.google.com/file/d/0B7S255p3kFXNWG43QU9ybzB4eUU/view?usp=sharing

. https://drive.google.com/file/d/0B7S255p3kFXNUncwSU5pbkQ0LTA/view?usp=sharing


Knud Larsen
  • 5,753
  • 2
  • 14
  • 19