I am doing sensor network simulation project. In which I have some functions which deals with Timestamp (like getTimeStamp, becomeIdle, setEpoch). well I almost simulated whole network part i.e. Random Deployment of sensor nodes, Find the node within the sensing range (neighbours). Establish a routing path, sending packets etc. Well, Now I require to provide a timestamp for each event of sensor node like send packet, receive packet, sleep, wakeup and I don't have any clue, how can i implement it.
After all the Google searching,finally I decided to tell my problem to javaranch. because this my last resource.
Please give me some hint or logic to deploy timestamps.
Don't know much about it myself, but TIMESTAMP is usually an SQL concept. There is a java.sql.Timestamp class, which might supply what you require. There is a 2nd Timestamp class which might also be of use, but it appears to require signatures. If you Google for MySQL and timestamp, you get this sort of thing.
I hope that is of some use for starters: anybody else able to help?
But I dont want real timestamp. I want to simulate the real world network so require dummy timestamp. I also require epoch (Some Time Interval) to show the event duration of particular operation like,time taken to send packets, Idle time of a particular sensor node. etc.
Originally posted by rushikesh kale: ...Well, Now I require to provide a timestamp for each event of sensor node like send packet, receive packet, sleep, wakeup and I don't have any clue, how can i implement it.
Can you please elaborate it? And how do you relate it with java.
Originally posted by rushikesh kale: ...After all the Google searching,finally I decided to tell my problem to javaranch. because this my last resource.Please give me some hint or logic to deploy timestamps.
Can you please give some of the string combinations that you tried? And what did you mean by deployment of timestamps?
Here is my Design detail of the Program: I created the class SensorNode which is use to create sensor object. It contains properties like name, id, x coordinate, y coordinate, transmission range etc. I am populating them using getter and setter methods. In my main class, I am taking following inputs: 1. Number of sensor to be deployed 2. Area of the Network (eg. 1000X1000) 3. Range of the sensor 4. Then, I am generating x and y coordinates randomly in a for loop and storing them in new objects of class SensorNode 5. I am also populating other properties of sensors(name, id, range) inside this for loop. 6. After generating these sensor object, i am storing them in a List. 7. By this, I am deploying the sensors randomly in a particular area. 8. Then, I am trying to find neighbours of each sensor i.e sensors which are placed within the range. and storing them, in Neighbouring array. 9. Now, I am trying to form a network, by implementing routing protocol to connect different neighbours. 10. Then, I wrote a function which simulate the message passing mechanism of a network 11. Now, The thing which is remaining is to provide a dummy timestamp for which i need assistance?
A feeble attempt to tell you about our stuff that makes us money
how do I do my own kindle-like thing - without amazon