From: <sa...@sf...> - 2007-08-29 00:09:55
|
I am developing a simulation using Stage and have run into a problem. With the old C++ client, it was very easy to get the simulation time. However, I can't seem to find a way to get the time since start of simulation using the JavaClient. If there is a way, does anyone know what it is? If not, can anyone point me in the right direction on how to add this feature to the JavaClient? Thanks for any help. Sarah |
From: Radu B. R. <ru...@cs...> - 2007-08-30 14:13:09
|
I haven't looked at that one yet... If possible, take a look at the C++ client and see where that information is coming from, and then we could try to replicate it into Javaclient. Due to time constraints, I am not able to do too much for the project right now, but I can definitely offer pointers and supervise. I'll probably take a look again at the whole thing after we release Player 2.1, so having a list of "to do" would be neat, so I know what to upgrade or fix or... :) As always, contributions are more than welcome! Cheers, Radu. sa...@sf... wrote: > > I am developing a simulation using Stage and have run into a problem. With > the old C++ client, it was very easy to get the simulation time. However, I > can't seem to find a way to get the time since start of simulation using the > JavaClient. > > If there is a way, does anyone know what it is? If not, can anyone point me > in the right direction on how to add this feature to the JavaClient? > > Thanks for any help. > > Sarah -- | Radu Bogdan Rusu | http://rbrusu.com/ | http://www9.cs.tum.edu/people/rusu/ | Intelligent Autonomous Systems | Technische Universitaet Muenchen |
From: John O. <joh...@gm...> - 2007-08-30 15:58:19
|
I did something similar not long ago: Each header does come with a time stamp since the start of the simulation, my solution was to simply record the most recent time stamp. The best position to do this seems to be in "read (int interf, int index)" in PlayerClient.java, after the line: header = readHeader (); you could add something like: if(header.getTimestamp()>currentTime) { currentTime = header.getTimestamp(); } then a getter method on currentTime in PlayerClient would allow you to get the latest time. I have attached my version of http://www.nabble.com/file/p12410309/PlayerClient.java PlayerClient.java . Its not exactly the most eligent way of doing this since PlayerClient shouldnt realy be storing this type of information but it works. Let me know if you have any problems Thanks John sarahb-2 wrote: > > > > I am developing a simulation using Stage and have run into a problem. > With > the old C++ client, it was very easy to get the simulation time. However, > I > can't seem to find a way to get the time since start of simulation using > the > JavaClient. > > If there is a way, does anyone know what it is? If not, can anyone point > me > in the right direction on how to add this feature to the JavaClient? > > Thanks for any help. > > Sarah > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users > > -- View this message in context: http://www.nabble.com/simulation-clock-tf4345003.html#a12410309 Sent from the java-player-users mailing list archive at Nabble.com. |
From: Radu B. R. <ru...@cs...> - 2007-08-30 16:26:33
|
Thanks John. Could you generate a patch against SVN ? I could commit it to the official repository afterwards. Cheers, Radu. John Oliver wrote: > I did something similar not long ago: > > Each header does come with a time stamp since the start of the simulation, > my solution was to simply record the most recent time stamp. The best > position to do this seems to be in "read (int interf, int index)" in > PlayerClient.java, after the line: > > header = readHeader (); > > you could add something like: > > if(header.getTimestamp()>currentTime) > { > currentTime = header.getTimestamp(); > } > > then a getter method on currentTime in PlayerClient would allow you to get > the latest time. > > I have attached my version of > http://www.nabble.com/file/p12410309/PlayerClient.java PlayerClient.java . > Its not exactly the most eligent way of doing this since PlayerClient > shouldnt realy be storing this type of information but it works. > > Let me know if you have any problems > > Thanks > > John > > > > > sarahb-2 wrote: >> >> >> I am developing a simulation using Stage and have run into a problem. >> With >> the old C++ client, it was very easy to get the simulation time. However, >> I >> can't seem to find a way to get the time since start of simulation using >> the >> JavaClient. >> >> If there is a way, does anyone know what it is? If not, can anyone point >> me >> in the right direction on how to add this feature to the JavaClient? >> >> Thanks for any help. >> >> Sarah >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> _______________________________________________ >> Java-player-users mailing list >> Jav...@li... >> https://lists.sourceforge.net/lists/listinfo/java-player-users >> >> > -- | Radu Bogdan Rusu | http://rbrusu.com/ | http://www9.cs.tum.edu/people/rusu/ | Intelligent Autonomous Systems | Technische Universitaet Muenchen |
From: John O. <joh...@gm...> - 2007-09-12 13:09:18
|
sorry it took awhile but been busy. Here it is( http://www.nabble.com/file/p12634944/timestampPatch timestampPatch ), you should be able to apply it by: patch -p0 < timestampPatch from the directory above the javaclient2 directory. thanks John Radu Bogdan Rusu-2 wrote: > > Thanks John. Could you generate a patch against SVN ? I could commit it to > the official > repository afterwards. > > Cheers, > Radu. > > John Oliver wrote: >> I did something similar not long ago: >> >> Each header does come with a time stamp since the start of the >> simulation, >> my solution was to simply record the most recent time stamp. The best >> position to do this seems to be in "read (int interf, int index)" in >> PlayerClient.java, after the line: >> >> header = readHeader (); >> >> you could add something like: >> >> if(header.getTimestamp()>currentTime) >> { >> currentTime = header.getTimestamp(); >> } >> >> then a getter method on currentTime in PlayerClient would allow you to >> get >> the latest time. >> >> I have attached my version of >> http://www.nabble.com/file/p12410309/PlayerClient.java PlayerClient.java >> . >> Its not exactly the most eligent way of doing this since PlayerClient >> shouldnt realy be storing this type of information but it works. >> >> Let me know if you have any problems >> >> Thanks >> >> John >> >> >> >> >> sarahb-2 wrote: >>> >>> >>> I am developing a simulation using Stage and have run into a problem. >>> With >>> the old C++ client, it was very easy to get the simulation time. >>> However, >>> I >>> can't seem to find a way to get the time since start of simulation using >>> the >>> JavaClient. >>> >>> If there is a way, does anyone know what it is? If not, can anyone >>> point >>> me >>> in the right direction on how to add this feature to the JavaClient? >>> >>> Thanks for any help. >>> >>> Sarah >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Java-player-users mailing list >>> Jav...@li... >>> https://lists.sourceforge.net/lists/listinfo/java-player-users >>> >>> >> > > -- > | Radu Bogdan Rusu | http://rbrusu.com/ > | http://www9.cs.tum.edu/people/rusu/ > | Intelligent Autonomous Systems > | Technische Universitaet Muenchen > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users > > -- View this message in context: http://www.nabble.com/simulation-clock-tf4345003.html#a12634944 Sent from the java-player-users mailing list archive at Nabble.com. |