background image
C H A P T E R 2 4
Built-in Communications Tools
24-12
AppleTalk Functions
The following example shows how to instruct a communications tool to allow its
resources to be claimed by another tool. For instance, you might send this option
with an
arglist
value of
true
if you are listening for an incoming connection.
The default for all tools is to be in an active state.
{
label: kCMOPassiveState,
type: 'option,
opCode: opSetRequired,
data: {
arglist: [
true, // passively claim modem
},
typelist: [
kStruct,
kBoolean,
]
}
AppleTalk Functions
24
The Newton system software provides a number of global functions for obtaining
the addresses of other devices on the network.
If you are using an endpoint with the AppleTalk tool, the AppleTalk drivers are
opened automatically when you call the endpoint
Bind
method. The drivers are
closed when you call the endpoint
UnBind
method.
To manually open the AppleTalk drivers, you need to call the
OpenAppleTalk
function. When you are done with AppleTalk, call the
CloseAppleTalk
function
to close the drivers.
Note that you call the AppleTalk zone access functions without first calling
OpenAppleTalk
. Each of the AppleTalk zone access functions opens the drivers
(if necessary), performs its operations, and closes the drivers (if necessary). If you
are making multiple AppleTalk calls, it is more efficient for you to manually open
the drivers, make your calls, and then close the drivers.
Table 24-8 summarizes the AppleTalk functions. These functions are described in
detail in "AppleTalk Functions" (page 21-76) in Newton Programmer's Reference.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна