Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 9 - IrDA Communication Tool / IrDA Tool Option Reference


Link Disconnect Option

The link disconnect option, *kCMOIrDALinkDisconnectTimeout, sets the time (in seconds) before communication is terminated, if no activity is received from the peer device.

The following example shows the use of this option:

local option := {

label: kCMOIrDALinkDisconnectTimeout, // link disconnect threshold type: 'option, opCode: opSetRequired, data: { arglist: [ 8, // disconnect after 8 seconds ], typelist: [ 'struct, uLong, // time before disconnect, default is 40 seconds ], }, };

Proper communication protocol between IrDA devices is to send data or a "ready-to-receive" packet every 500ms (minimum). If no such activity is detected for the number of seconds specified by this option, then the IrDA tool is disconnected. The default value is 40 seconds. Valid values are 3, 8, 12, 16, 20, 25, 30, and 40.

This option applies to both Connect and Listen operations.

Note that after 3 seconds of non-activity, a disconnect warning event is sent from the IrDA tool via the endpoint EventHandler method. The values used for the eventCode and data slots of the event frame passed to EventHandler are shown in Table 9-6.

Table 9-6 Disconnect warning event values
ConstantValue
Event codes
kEventToolSpecific1
kEventDisconnect2
kEventRelease3
IrDA tool event data
kDisconnectWarningEvent1

Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help