Department of Electrical and Computer Engineering Facebook page


  • DEPARTMENT
    • Overview
    • Computing
    • Facilities
    • Organizations
    • Educational Objectives
    • Student Outcomes
    • Scholarship Awards
    • Employment
    • Advisory Committee
    • Contact
  • ACADEMICS
    • Undergraduate
      • Computer Eng.
      • Electrical Eng.
      • Ambassadors
    • Graduate
      • Information for Prospective Students
      • ECE Graduate Handbook
      • Graduate Forms
      • Ph.D. Qualifying Exam
      • Distance Education
      • Frequently Asked Questions (FAQ)
    • Courses
    • Student Survival kit
    • Distance Learning
  • PEOPLE
    • Faculty
    • Staff
  • PROSPECTIVE STUDENTS
    • Overview
    • FAQ
    • Considering ECE
    • Scholarships
    • PC Requirements
    • Office of Admissions
  • RESEARCH
    • Overview
    • Signal Processing & Communications
    • Digital Systems & Microelectronics
    • Power & High Voltage
    • Research Centers
      • Emerging Materials Research Laboratory
      • High Voltage Laboratory
      • Robotics
    • HPCC
  • ALUMNI
Sensor Networks Assignment 2 Hints - Ece
Personal tools
  • Log in
Views
  • Page
  • Discussion
  • View source
  • History

Sensor Networks Assignment 2 Hints

From Ece

Jump to: navigation, search

Hints for Assignment 2

Sensor Network Simulation 2B, 2C

  • When passing around the path lists via replicate, you may get all of the nodes pointing to the same copy of data. This is due to the way the replicate function is currently written. If it is just a number (like hops), then it copies over the value correctly, but for more complex objects like lists, it returns a pointer instead, and all of them get set to the SAME pointer. So the best workaround is to create a new list, and loop over the values in self.path, append them to the new list, append the last value (self.host.id) to the new list, and put THAT list into the dictionary that is passed into the replicate function.

Sensor Network Simulation 2C

  • To run two programs on separate nodes, just type the desired program name in twice in the commmand line.
Retrieved from "http://www.ece.msstate.edu/wiki/index.php/Sensor_Networks_Assignment_2_Hints"
Category: Sensor Networks
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
SEARCH
TOOLBOX
LANGUAGES
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Powered by MediaWiki
  • This page was last modified on 23 February 2007, at 21:31.
  • This page has been accessed 1,340 times.
  • Privacy policy
  • About Ece
  • Disclaimers

Mississippi State University Home| PO Box 9571, Mississippi State, MS 39762 | Main Office: 1.662.325.3912

Bagley College of Engineering | Mississippi State University| Legal| Webmaster| Intranet

Page modified: Tue, 23 Sep 2008 15:18:39 CDT