Connection Information Option
The second stage of the connection process involves a name lookup of the service to use, or registry of the service provided. The *kCMOIrDAConnectInformation option is used to specify this information.The following example shows the use of this option:
The fields in the IrDA connection information option frame are described in Table 9-5.local option := {
label: kCMOIrDAConnectInformation, // "irci" type: 'option, opCode: opSetRequired, data: { arglist: [ 0, // LSAP id 0, // peer LSAP id 4, // strlen("Test") 5, // strlen("IrLPT") "Test", // my name "IrLPT", // peer name ], typelist: [ 'struct, 'uLong, // fMyLSAPId 'uLong, // fPeerLSAPId 'uLong, // fMyNameLength 'uLong, // fPeerNameLength ['array, 'char, 0], // fMyName ['array, 'char, 0], // fPeerName ], }, };
Table 9-5 IrDA connection information option fields
Option field Description fMyLSAPId Set to 0 and the IrDA comm tool chooses a random LSAP id (between 1 and 31), or you may set a specific value from 1 to 31. The default is 0. fPeerLSAPId Set to 0 to do the service lookup by name, or specify any other value from 1 to 111. If the value is non-zero, then the name lookup phase is skipped and connection is made using an LSAP id with that value. The default is 0. fMyNameLength The length, in characters, of the fMyName
string. The default is 1.fPeerNameLength The length, in characters, of the fPeerName
string. The default is 1.fMyName A string identifying the service provided by the Newton unit. The default is "X". fPeerName A string identifying the service provided by the peer device. The default is "X". Note that the only reason to use a specific value for the
fMyLSAPId
field would be to advertise your service by number instead of by name--and that is not recommended per IrDA standards. The option is left available in case your application needs to communicate with an older desktop IrDA application.Likewise for the
fPeerLSAPId
field--per IrDA standards, services should be identified and looked up by name, not number. But if you need to communicate with an older desktop IrDA application that supports access only by LSAP id (no name look up) then you will be able to by specifying the id number directly.
- Note
- Fields used during an endpoint
Connect
operation includefPeerLSAPId
,fPeerNameLength
andfClassNames
. Fields used during an endpointListen
operation includefMyLSAPId
,fMyNameLength
andfClassNames
.![]()
![]()
![]()
![]()
![]()
© Apple Computer, Inc.
26 APR 1997Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help