background image
C H A P T E R 2 4
Built-in Communications Tools
Serial Tool
Serial Tool with MNP Compression
The asynchronous serial communications tool with MNP compression works
just like a standard asynchronous serial endpoint, except that it uses MNP data
The following is an example that shows how to create an endpoint that uses the
serial tool with MNP compression:
myMnpEP := {_proto:protoBasicEndpoint};
myOptions := [
{ label: kCMSMNPID,
type: 'service,
opCode: opSetRequired } ];
returnedOptions:= myMnpEP:Instantiate(myMnpEP,
The serial tool with MNP endpoint uses all of the standard serial options, as well as
two MNP options, which are summarized in Table 24-2. These options are
described in detail in "Options for the Serial Tool with MNP Compression"
(page 21-27) in Newton Programmer's Reference.
Framed Asynchronous Serial Tool
The framed asynchronous serial communications tool is a superset of the standard
asynchronous serial communications tool. This tool supports the sending and
receiving of framed data. If you use this tool and do not specify framing for a send
or receive operation, the framed asynchronous serial tool works exactly like the
standard asynchronous serial tool.
When you use framing for input, the framed asynchronous serial tool discards
characters until a start of frame sequence is detected and terminates input with an
end-of-file (EOF) indication when the end-of-frame sequence is detected. The tool
reports an error is if a CRC error is detected.
When you use framing for output, the data is prefixed with the start-of-frame
sequence. The end-of frame-sequence and the calculated CRC are sent at the end of
the data. The escape character is used for data transparency during framed operations.
Table 24-2
Summary of serial tool with MNP options
Use when
Before connecting
Sets the data compression type.
Any time
Configures internal MNP timers.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна