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 endpointOption
method to get this information.
You may also want to know the status of the connection regarding error and retry rates. You can use thelocal 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? ], }, }, ];
kCMOSlowIRStats
option to return this information. Note that thekCMOSlowIRStats
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.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help