By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,738 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,738 IT Pros & Developers. It's quick & easy.

Mobile Agent serial number

P: 3
Hi every one I just I wonder if any one can help

me and my colleague . We are developing a localization algorithm for mobile agent .

and I need the java code that will help me to generate serial numbers
to assign them for mobile agents

I hope that someone will help me

Thanks
Nov 22 '06 #1
Share this Question
Share on Google+
4 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
Hi every one I just I wonder if any one can help

me and my colleague . We are developing a localization algorithm for mobile agent .

and I need the java code that will help me to generate serial numbers
to assign them for mobile agents

I hope that someone will help me

Thanks
What are you looking for in that serial? For it to be a certain number of digits long? In a random order, or a sequential? For it to then input into a certain type of db? and if so, what type?
Nov 22 '06 #2

P: 3
Hi ...... thanks for your reply

what am looking for is a random serial number of maybe 2 to 3 digit along

so that whenever an agent is created a unique number is assigned to it

and that number will be the ID of that agent.

please feel free to propose any suggestion.


thanks
Nov 23 '06 #3

P: 3
hi guys

i just want to know if any one has a solution for my problem??

i need it as soon as possible .

thanks
Nov 25 '06 #4

sicarie
Expert Mod 2.5K+
P: 4,677
hi guys

i just want to know if any one has a solution for my problem??

i need it as soon as possible .

thanks
I'm sure there is a solution, but are you just writing a program to simulate this, or are you trying to interface it with some sort of real-time database, have an actual production solution?

If you're just writing the program, it's as easy as creating a random number generator within 3 digits, making sure it hasn't been created yet, and storing it in some sort of hash table or list.

If this is for a production environment, it's more complicated in the db/device connections, but theoretically the same idea - the only problem will be having the devices themselves accept this number, figuring out how to send the devices the serial (the format)...
Nov 25 '06 #5

Post your reply

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