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 / Using the IrDA Tool


Getting IrDA Tool Information

After a connection has been made, you may want to know various results of the connection such as connection speed, buffer size, and so on. The following example option can be used with the endpoint Option method to get this information.

local connectedOptions :=

[ { label:kCMOIrDADiscoveryInformation, // IrDA discovery info type: 'option, opCode:opGetCurrent, data: { arglist: [ 0, 0, 0, // service hints of discovered dev 0, // dev addr of discovered device 0, ], typelist: [ 'struct, 'uLong, // num probe slots, def:8 'uLong, // my svc hint, default: kIrDASvcHintPDAPalmtop 'uLong, // service hint mask 'uLong, // returned devAddr of peer device 'uLong, // use standard media busy check? ], }, }, { label:kCMOSerialBitRate, // serial bit rate type: 'option, opCode:opGetCurrent, data: { arglist: [ 0, // negotiated speed ], typelist: [ 'struct, 'uLong, // max negotiate speed, def: 115.2k ], }, }, { label:kCMOIrDAReceiveBuffers, // IrDA recv buffers info type: 'option, opCode:opGetCurrent, data: { arglist: [ 0, // negotiated buffer size 0, // negotiated max buffers in use ], typelist: [ 'struct, 'uLong, // size of ea recv buf, def: 512 'uLong, // num recv bufs used, def: 1 ], }, }, { label:kCMOIrDALinkDisconnectTimeout, // link disconn. threshld type: 'option, opCode:opGetCurrent, data: { arglist: [ 0, // negotiated disconnect timeout ], typelist: [ 'struct, 'uLong, // Time before disc, def: 40 secs ], }, }, { label:kCMOSlowIRConnect, // "SlowIR" connect info type: 'option, opCode:opGetCurrent, data: { arglist: [ 0, // connectOptions results ], typelist: [ 'struct, 'uLong, // How did we connect? ], }, }, ];

You may also want to know the status of the connection regarding error and retry rates. You can use the kCMOSlowIRStats option to return this information. Note that the kCMOSlowIRStats option is not documented in this chapter because it's already covered in the "Built-in Communications Tools" chapter of Newton Programmer's Reference, under the infrared communications tool.


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