#18 — Detect reset
| State | Rejected |
|---|---|
| Release: | |
| Area | Core Software |
| Issue type | Bug |
| Severity | Important |
| Submitted by | Sébastien Lelong |
| Submitted on | 2007-03-23 |
| Responsible | Sébastien Lelong |
| Target release: |
Last modified on
2007-05-03
by
Sébastien Lelong
I'm using my bot in my console. Everything's nice. Now I power off/on the device: it's been reset, and sent a char to inform that (like "*"). Now, in my console, I try to ping the bot: the "*" is considered as the echo of the ping ("?"), the echo of the ping if considered as the pong ("!"). Forever... Need to bot.com_manager.communicator.flush()...
So...
Need to detect reset chars. Those must be part of the protocol definition.
So...
Need to detect reset chars. Those must be part of the protocol definition.
Added by
Sébastien Lelong
on
2007-03-24 12:57
Issue state:
unconfirmed → open
Added by
Sébastien Lelong
on
2007-04-02 14:08
This can (will ?) be done reading chars from the bot and testing received_chars == reset_chars. Problem is: what happens if the recevied chars are intepreted as reset chars, but shouldn't ? Maybe more than *one* reset char is required, so probability to get those in a "normal" communication is small...
Added by
Sébastien Lelong
on
2007-04-02 16:50
Issue state:
open → resolved
Detects reset char (and also emergency char, ready for other special chars) at different steps:
* while echoing: the bot resets before receiving all chars
* in response: when a return value is expected, check what the bot gives
* in a flush, using com_manager.flush(), not com_manager.communicator.flush(): analyse what's actually been flushed by the bot
Note raw_send/raw_receive in manager doesn't perform checking (keep the "raw" mode). Also note that there was a reset detection which was primarly done in the communicator (was also hardcoded...) so remove this logic and put it in the manager. As a consequence, every action done directly with the communicator won't be checked. That's normal.
* while echoing: the bot resets before receiving all chars
* in response: when a return value is expected, check what the bot gives
* in a flush, using com_manager.flush(), not com_manager.communicator.flush(): analyse what's actually been flushed by the bot
Note raw_send/raw_receive in manager doesn't perform checking (keep the "raw" mode). Also note that there was a reset detection which was primarly done in the communicator (was also hardcoded...) so remove this logic and put it in the manager. As a consequence, every action done directly with the communicator won't be checked. That's normal.
Added by
Sébastien Lelong
on
2007-04-02 17:02
Should this feature be implemented as special events ? Thus, using the event manager ? Actually, "reset" or "emergency" are just events. Special events as they're not linked to a specific action. Also, what if don't want to use an event manager ?
Added by
Sébastien Lelong
on
2007-04-03 07:35
"reset" and "emergency" are not just events, as they can occur within all the communication process (echo,sof,eof,response,ack...) and not just the response (which is what can be considered as the basis of an event generation).
Added by
Sébastien Lelong
on
2007-05-03 15:30
Issue state:
resolved → open
Crappy implementation... Need to really avoid the master/slave model. See ticket #23
Added by
Sébastien Lelong
on
2007-05-03 15:31
Issue state:
open → rejected
See ticket #23