Raúl
Moderador
 Moderador
| Mensajes: 444 |  | Karma: 6
|
Re:how do i "pass" data to other services? - 2008/10/08 17:53
Hi carlcs, hey I know that building.. I used to work close to there (in the Foundation building) like six years ago!
For the signaling part, I would use the standard MSRS service subscription model. Also, I would write two separate services: one serving sonar reading and other serving pose paramenters (although both of them take the date from the same log file). The reason is that probably you want your control code, let's call it control service, to be written just once independently of whether you read data from a real sonar or from the logged-sonar reader service.
So you could write a, say LoggedSonar service, which will implement the generic contract for Sonar. Thus, your control code doesn't need to know about special cases, like using a real sonar, or a simulated one, or in your case a logged sonar reader. You can have a look to my simulated sonar service to check how the generic sonar contract can be implemented, and also you can check how state updates are notified to subscribers. You could implement a timer (like in MSRS service tutorials incrementTick) and send a new sonar reading everytime the timer tick handler is executed. Does this makes sense for you? Is this what you want to do?
Cheers, Raúl.
Raúl Arrabales Moreno. conscious-robots.com/raul |