??? 11/21/11 06:26 Read: times |
#184841 - True Responding to: ???'s previous message |
This is the exact reason that we fear the functions that does the job for us. In our case, the states are totally under our control. Consider a case where remote machine responds to our commands (say, a GSM modem or a terminal based interface), and then the states change from the way commands are processed. At the same time, remote machine may also send data that is not pertaining to the current state, since t could be an 'interrupt type' of information,or even a malfunction of its own state diagram flow. In this case, if we do a byte level processing and manage the states and the stages, we will know if some thing goes wrong. We do use printf kind of stuff when all we have to do is to pump out some strings at certain points of time. But in the first case, we do not know whether the function will mix up (especially when it is waiting for a string or sending a string and the job is not completed yet) will complete the job or hang because of some other issue without timing out - here again, timing out is not in our control).
Of late, we have been feeling that many are using these functions, and by not using these functions, our productivity is becoming lower, and at times, code gets bigger and complicated. |
Topic | Author | Date |
UART - byte by byte or library functions? | 01/01/70 00:00 | |
Nothing magic | 01/01/70 00:00 | |
One Reason for SiLabs Parts | 01/01/70 00:00 | |
What's the difference? | 01/01/70 00:00 | |
Never underestimate the value of state machines | 01/01/70 00:00 | |
True | 01/01/70 00:00 |