Chapter 18. TCP/IP
415
18.2.3 Programming Notes for Resume Function
If the BHT is turned off and on during data transmission in wireless communications, the wire-
less communications device will remain off so that subsequent data will no longer be sent or
received.
In such a case, BHT-BASIC interpreter will return a run-time error (Error code: &h105) inform-
ing that the power is off. Develop such user programs that perform the following procedure and
then open the wireless communications device again.
■
Procedure for opening the wireless communications device again after detec-
tion of a power-off error
(1) Use the ON ERROR GOTO statement for error interrupt (at this step, none of (3) through
(5) should be carried out)
(2) Use the RESUME statement for transferring control to the main program
(3) Close the socket.
(4) Disconnect the TCP/IP communications pathway.
(5) Close the wireless communications device.
On the next page is a sample program.
Komentarze do niniejszej Instrukcji