Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (2)
Clustering
no vote
In sensor network applications, sensor nodes need to collect dataperiodically and transmit them to the data sink through multi-hops. The sensornodes are uniformly and independently distributed in a sensor field. Eachsensor node is aware of its own geographic location. The data collected by each sensor is communicated through thenetwork to a single processing center that uses the data. Clustering sensorsinto groups such that sensors communicate information only to cluster-heads andthen the cluster-heads communicate the aggregated information to the processingcenter, saving energy and bandwidth. The cost of transmitting a bit is higherthan a computation; therefore, it may be beneficial to organize the sensorsinto clusters. Cluster-based controlstructure provides more efficient use of resources in wireless sensor networks.
chris1008205
2016-08-23
0
1
To create classes and object in ns2
no vote
An OTcl script that defines two object classes, "teacher" and "student", where "Student" is the child class of "teacher", and a member function called "greet" for each class. After the class definitions, each object instance is declared, the "subject" variable of each instance is set to maths for teacher and name for student and the "greet" member function of each object instance is called. The keyword Class is to create an object class and instproc is to define a member function to an object class. Class inheritance is specified using the keyword -superclass. In defining member functions, $self acts same as the "this" pointer in C++, and instvar checks if the following variable name is already declared in its class or in its superclass. Finally, to create an object instance, the keyword new is used.
chris1008205
2016-08-23
1
1
No more~