Mail to EE

EETransfer Off-line documentation

Back to summary
Updated 97/06/24 ConnectSerial

Launch a serial connection, then pause as soon as the Newton is connected. When its execution is resumed, it disconnects.

* bps
type: integer
default value: k9600bps (9600)

You can use the following constants to specify the connection speed:
Constant Value
kExternalClock 1
k300bps 300
k600bps 600
k1200bps 1200
k2400bps 2400
k4800bps 4800
k7200bps 7200
k9600bps 9600
k12000bps 12000
k14400bps 14400
k19200bps 19200
k38400bps 38400
k57600bps 57600
k115200bps 115200
k230400bps 230400

* dataBits
type: integer
default value: k8DataBits (8)

You can use the following constants:
Constant Value (number of data bits)
k5DataBits 5
k6DataBits 6
k7DataBits 7
k8DataBits 8

* endpoint type: Newton endpoint
This slot is returned by the instruction. Its initial value is ignored

* flowControl
type: symbol or nil
default value: nil
You can use the following values:

Value Description nil no flow control 'hard Hardware Handshake (DTR & CTS) 'soft Software Handshake (XON/XOFF)

* listen
type: boolean default value: nil

* listenTimeout
type: integer
default value: kNoTimeout (0)
An integer specifying the time, in milliseconds, that the system should allow for the Newton to listen. If you use this slot, specify an integer greater than 30.

* parity type: integer default value: kNoParity (0)
You can use the following constants:

Constant Value Description
kNoParity 0 no parity
kOddParity 1 odd parity
kEvenParity 2 even parity

* receiveBufferSize
type: integer
default value: 1040 (a little more than 1 KB)
This slot lets you increase the size of the input buffer used by the serial tool. Buffers larger than 4KB are not supported; an error results if you specify too large a buffer. Also note you can get an out-of-memory error at connect time if the serial tool cannot allocate the buffer.

This option is often useful because appropriate buffer size can increase performance and decrease overrun errors. For communications that use packet-oriented protocols, a good buffer size is one that is a few bytes larger than the typical packet size.

The input buffer can be increased, especially for data rates above 9600 bps. If no flow control is operating, input buffer size may be the only way to control overruns.
The total size of the input buffer is limited to 4 KB, which includes about 8 bytes per marker. Typical input buffer size is 256 to 1024 bytes.

Note that the usable size of a buffer is usually between one and four bytes less than the buffer size, because of DMA boundary constraints and other considerations.

* serialPort
type: string
default value: kHWLocExternalSerial ("extr")
The possible values for the slot are listed below. Note that these locations are hardware platform dependent.

Constant Value Description
kHWLocExternalSerial "extr" Use the external serial port.
kHWLocBuiltInIR "infr" Use the built-in infrared port.
kHWLocBuiltInModem "mdem" Use the built-in modem.
kHWLocPCMCIASlot1 "slt1" Use the application card in slot 1.
kHWLocPCMCIASlot2 "slt2" Use the application card in slot 2.
kHWLocPCMCIAAnySlot "slot" Use the application card in any slot.

* stopBits
type: integer
default value: k1StopBits (0)
You can use the following constants:

Constant Value Number of stop bits
k1StopBits 0 1 stop bit k1pt5StopBits 1 1.5 stop bits k2StopBits 2 2 stop bits

* transport
type: frame default value: nil
The transport must always be EETransfer.
Note: Before the script executes itself, the global variable "transport" is automatically set to EETransfer. So if you don't use a slot "globalSymbols" you don't have to (and you should not) provide a slot "transport". Otherwise, the "globalSymbols" slot must contain a slot:
transport: 'transport,
©1997 Easter-eggs
All trademarks mentioned are the property of their respective owners