User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 161
9.2.62.3 COM Syntax[Command] – Binary mode
PUT 1, S1
• S1: string of data to write to serial port.
Purpose:
Writes the S1 string to the serial port. The function returns only after all the data have been actually sent.
Warnings:
• The string can contain any byte by using the CHR$ function.
• Serial port cannot be used by an IO server in the same time, or it would result to a “IO Error”.
9.2.62.4 TCP/UDP Syntax[Command] – Binary mode
PUT E1, S1
• E1: is the file number returned by the OPEN function.
• S1: string of data to write to the socket.
Purpose:
Writes the S1 string to the socket
The function returns only after all the data have been actually transferred to the stack.
Warnings:
• The socket must be opened. The OPEN command returns immediately but generates a scheduled action.
The PUT command will generate an IO error until the socket is actually opened (See OPEN on page 154).
• When data are transferred to the TCP/IP stack, it does not mean that the data have been received by the socket end point.
It may take minutes before the data are considered as undeliverable and the socket is put in error mode.
• The string can contain any byte by using the CHR$ function.
See also:
“CLOSE” on page 133, “EOF” on page 137, “GET” on page 138, “OPEN” on page 154.
9.2.63 PUTFTP
Syntax[command]
PUTFTP S1,S2
• S1 is the destination file name
• S2 is the destination file content. This content follows a special syntax allowing including EXPORT_BLOCK_DESCRIPTOR contents.
See Export block descriptor on page 192
Purpose:
This command posts a scheduled action request for a PUTFTP generation.
When the function returns, the GETSYS PRG,"ACTIONID" returns the ID of the scheduled action and allows tracking this action.
It is also possible to program an ONSTATUS action that will be called when the action is finished (with or without success).
Example:
The path /ewon1/ specified is the path on the server side. It has nothing to do with the path on the /usr/ eWON side!
See also:
“GETSYS, SETSYS” on page 141, “ONxxxxxx” on page 151, “ONSTATUS” on page 153.
9.2.64 REBOOT
Syntax [Command]
REBOOT
Purpose:
This Basic keyword provides a very easy way to reboot eWON.
A typical use of this command is by simply entering it into a file you name "remote.bas" then saving locally and uploading this file on the eWON
FTP site to replace the existing remote.bas file. eWON then directly reboots.
REM Post an FTP file to the configured FTP server with event log
PUTFTP "/ewon1/events","[$dtEV]"