TeleBoss 850 2.06.280_STD User Manual
Page 169
a_lib.WaitForString
Description
Waits for the specified string to be received on the specified handle.
Syntax
a_lib.WaitForString(handle, string)
a_lib.WaitForString(handle, string, timeout)
handle: The handle obtained when the device or socket was
opened
string: The text string to be sent
timeout: How many milliseconds to wait for the string to
arrive;
waits forever if timeout not specified
Returns
Returns 1 if successful, 'nil' if not.
Example
-- wait 5 seconds for prompt
if a_lib.WaitForString(handle, "READY", 5000) then
-- send a command
a_lib.SendString(handle, "ver\n")
end
a_lib.CTSHigh
Description
Returns the state of the CTS pin on the specified IO port.
Syntax
a_lib.CTSHigh(port)
port: The name of the port (i.e. "com1", etc)
Returns
Returns 1 if the CTS pin is high, 0 if low, and 'nil' if port is not physically present.
Example
-- check CTS on io2
print(a_lib.CTSHigh("com2"))
1
Содержание Teleboss 850
Страница 6: ......