Friday, January 8, 2010

Can You give me coding 4 stop and wait protocol using C?

I assume you want the program to go into a ' wait' loop until a condition is met....





IF constructs are one way...





If %26lt;condition does not exist%26gt; loop


else %26lt;continue%26gt;


endif





This is a poor way of doing it....since the program will ' lock' until your condition is met...if the condition is never met, you will be forced to re-boot





A better way is to create an ' interrupt' based module where your condition will generate an ' interrupt' in regular program execution, perform an ';interrupt handling routine';, then continue program execution normally.





Google for '; Interrupt Handling in C';Can You give me coding 4 stop and wait protocol using C?
Forgive my confusion, but what do you mean by that? I've been programming for 10 years at least, and I have never heard of anything like a ';stop and wait protocol';. Are you asking about allowing the user to input something? All you need is a text box and a button. The text box will allow the user to enter something, and the button will activate the next sequence of commands that you had to ';stop and wait'; for. But there is no ';protocol'; for this, just code to carry out the task you want done.

No comments:

Post a Comment