Apple Newton Utilities Guida Utente Pagina 837

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 942
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 836
CHAPTER 23
Endpoint Interface
Using the Endpoint Interface 23-9
All option data you set gets packed together into one block of data. Each option
within this block must be long-word aligned for the communication tools. So,
when using the
'template data form, you need to use the 'struct type (at the
beginning of the
typelist array) to guarantee that the option is long-word
aligned and padded. To set the serial input/output parameters, for instance, the
option frame might look like this:
serialIOParms := {
type: 'option,
label: kCMOSerialIOParms,
opCode: opSetNegotiate,
data: {
arglist: [
kNoParity, // parity
k1StopBits, // stopBits
k8DataBits, // dataBits
k9600bps, // bps
],
typelist: [
'struct,
'uLong,
'long,
'long,
'long
]
}
};
To get the connection information, the option frame you construct might look like this:
connectInfoParms := {
type: 'option,
label: kCMOSerialIOParms,
opCode: opGetCurrent,
data: {
arglist: [
0, // parity placeholder
0, // stopBits placeholder
0, // dataBits placeholder
0, // bps placeholder
],
typelist: [
'struct,
'ulong,
'long,
Vedere la pagina 836
1 2 ... 832 833 834 835 836 837 838 839 840 841 842 ... 941 942

Commenti su questo manuale

Nessun commento