473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

how does the source node know that the other node is within its radio range or not ?

in my project,We consider an ad hoc network composed of battery powered mobile nodes. Each of them has got a radio-range (generally uniform for all nodes in the network),which is an abstract electronic circle around a node within which message packets can be transmitted and received. So, if a pair of nodes want to communicate when they are not within the radio-range of one another, it becomes the responsibility of neighbor of the source and it’s neighbors and so on, hierarchically, to provide the required ubiquitous connectivity between source and destination as there is no fixed infrastructure in the network.

so for establishing such network,i've some questions to ask;-
1 )how does the source node know that the other node is within its radio range or not?how do i write this part of the code in java using thread if we consider each node as a thread and they can communicate by passing messages between them.
Oct 16 '08 #1
6 1874
Nepomuk
3,112 Expert 2GB
I would say first of all, every node needs some kind of ID. That could be an integer or a String or an object from a new class you write or anything else, that would be able to identify it.

Then you'll have to somehow define, which nodes are in range. Maybe you have a 2D field and each node has a position (an x and a y coordinate maybe).

Also, I'd have some kind of class, that knows all of the positions and can therefore tell a node, which other nodes are in range. (So it simulates the radio signals.) However, no node has to know where any other node is except for in or out of range.

Alternatively, you can send a message with the current position of the node trying to make the connection to every node. If it's in range it will reply with its node ID.

If the one you're looking for is in range, great. If it isn't, you'll have to connect via other nodes.

Greetings,
Nepomuk
Oct 17 '08 #2
thanks for the reply......the information is really helpful....nodes are moving in a random fashion.....so if i design a class " that knows all of the positions of the nodes" ,then how do i take care of the nodes when they are randomly moving......
Oct 18 '08 #3
i am clueless about the fact:how to implement the nodes as threads.......in java or in c++ which will be the proper choice for writting the code?please reply......i'm waiting for your suggestion
Oct 19 '08 #4
JosAH
11,448 Expert 8TB
Suppose a node #i wants to know whether or not a node #j is in range. Node #i
transmits a broadcast packet (message) to which every node that receives this
message should respond with its on node number. Node #i either receives a
response from node #j in a certain time interval (nodes are in range) or it doesn't
(the nodes are probably not in range).

If you want to allow hops it gets a bit more complicated but a breadth first search
would basically do the trick.

kind regards,

Jos
Oct 19 '08 #5
thanks for the reply............how this message passsing between nodes can be done?i just can't write the code in java......plz give me some hints about writing the code.....example code or something like that.......so that i can start........
Oct 19 '08 #6
JosAH
11,448 Expert 8TB
thanks for the reply............how this message passsing between nodes can be done?i just can't write the code in java......plz give me some hints about writing the code.....example code or something like that.......so that i can start........
You have to define a boolean inRange(Node i, Node j) function. If two nodes are
in range a node #i can deliver a message to node #j. A Message can be an
interface which is used as a shared resource between a producer (Node #i) and
a consumer (Node #j). This is where synchronization and wait/notify comes in.
Have a look at the Queue interface API documentation.

kind regards,

Jos
Oct 20 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

23
by: ian justice | last post by:
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've...
1
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
5
by: sam | last post by:
Hi all, I am dynamically creating a table rows and inerting radio buttons which are also dynamically created. Everything works fine in Firefox as expected. But I am not able to select radio...
6
by: sandy | last post by:
I am creating a class (or so I hope) which is to be a JobCollection, linked list of 'Job'. Job is another class already created. JobCollection is just the linked list manager. I have to have...
2
by: Jim Carr | last post by:
Upon entering the site www.FutureByDesign-Music.com with IE6, my clipboard is erased and then disabled in all other Windows XP applications. Navigating to another site returns clipboard...
4
by: dreaken667 | last post by:
I'm using this javascript: var curr_type="adherence"; function update(){ var r=document.getElementById("range").options; var range=r.value; if(range!="L7D"){...
32
by: Stephen Horne | last post by:
I've been using Visual C++ 2003 for some time, and recently started working on making my code compile in GCC and MinGW. I hit on lots of unexpected problems which boil down to the same template...
1
by: annemariearmour | last post by:
I am using Crystal reports version 11.2 to create reports. The data source is SQL Server, and I am using views rather than reporting directly from tables. I apply selection criteria to the incoming...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.