LarkOps.mesa
Copyright © 1984, 1986 by Xerox Corporation. All rights reserved.
Last modified by Swinehart, May 26, 1986 2:11:30 pm PDT
External operations interface to Lark (Etherphone) Capabilities (Smarts=>Lark)
This interface is a Lark private affair and makes no distinction between the
front and back doors. Such a distinction must be handled by the Smarts.
This interface will be exported/imported as Lark.Lark, even though it's called LarkOps.
DIRECTORY
Rope USING [ ROPE ],
Lark,
Thrush USING [ KeyTable ]
;
LarkOps: CEDAR DEFINITIONS = {
OPEN Lark; -- Recommend opening Lark along with LarkOps.
-- ************************ Smarts=>Lark procedures ********************** --
Cancel any tone sequence in progress. Clear the display (or set it to a distinctive
"out of service" state). Forget about any conversation in progress. Hang up any
automatically switched audio devices (Speakerphone, etc.) Remember the identity
of your "smarts". rName is for use in LarkSmarts.Register (cf.)
Reset: PROC [shh: SHHH, rName: ROPE];
Always accept, whether or not a conversation is in progress; return immediately,
SpecifyTones: PROC[ shh: SHHH,
queueIt: BOOLEANTRUE,
tones: ToneSpec ← NIL
]
RETURNS [ok: BOOLEAN -- FALSE means no room in queue --];
Standard DTMF is special; this function avoids long Tones[] sequences.
on, off: "make"/"break" intervals for each code.
waveTable, queueIt: as above.
events: a "string" of DTMF events to be "feeped". This is for back-door dialing, end-to-end
signalling for remote control of systems, etc. Each DTMF event reported via
LarkSmarts.RecordEvent may also have to be echoed by the Lark program, depending
on the nature of the keyboard.
notify: issue a "tones" event when all digits have been sent.
Feep: PROC[ shh: SHHH,
on, off: Milliseconds,
waveTable: CARDINAL,
queueIt: BOOLEANTRUE,
notify: CommandEvent ← [nothing, 0C],
events: CommandEvents
]
RETURNS [ok: BOOLEAN -- FALSE means no room in queue --];
Commands.
Commands: PROC [shh: SHHH, events: CommandEvents];
Use the sockets and the protocol type from |spec| to establish a conversation between
yourself and the indicated other party (ies). If a conversation is already underway,
replace it with this one, without disrupting existing conversations (a good trick, but
needed, since host number, socket number are likely to change.)
Connect: PROC [shh: SHHH, specs: ConnectionSpec];
Drop all connections corresponding to id, return to idle state. A Connect call with a zero-length
socket sequence should behave the same way. The buffer parameter should match the
connection specification that is being abandoned.
Disconnect: PROC [shh: SHHH, buffer: VoiceBuffer];
This is a Smarts request for the Lark to Register, thus providing a status update.
<< If it works out, the Lark should call LarkSmarts.Register BEFORE returning from
PleaseRegister. That may tie all the monitors in knots, or make error management yucky
on one end or other, whence a return from PleaseRegister will be taken as a promise
to register soon. Alternatively, the procedure could return registration info. >>
PleaseRegister: PROC [shh: SHHH];
This is a Smarts request for the Lark to send in its entire state.
A which = 0 indicates that the Lark should start over. Thereafter, LarkSmarts should
make the next call with which = next.
WhatIsStatus: PROC [shh: SHHH, which: CARDINAL]
RETURNS [next: CARDINAL, events: StatusEvents];
This is a Smarts request for the Lark to send in its outstanding connections.
A which = 0 indicates that the Lark should start over. Thereafter, LarkSmarts should
make the next call with which = next
WhatAreConnections: PROC [shh: SHHH, which: CARDINAL]
RETURNS [next: CARDINAL, specs: ConnectionSpec];
This is a Smarts request for the Lark to send in its outstanding tones.
For now just returns that there are some.
WhatAreTones: PROC [shh: SHHH] RETURNS [BOOLEAN];
SetKeyTable: PROC [shh: SHHH, table: KeyTable];
CommandString: PROC [shh: SHHH, device: Device, commands: Rope.ROPE];
After responding in the affirmative, Lark should collect user name and password information
(somehow), locally, use the Agent to obtain new authentication based on the password, issue LarkSmarts.LogIn to identify the new Rname, then begin using a new conversation based on the new authentication.
PleaseLogin: PROC[shh: SHHH] RETURNS [will: BOOL];
EchoSupression: PROC [shh: SHHH, echo: EchoParameters];
SetHostNumber: PROC [shh: SHHH, host: Machine];
LarkParameters: TYPE = REF LarkParametersRec;
ParamCode: TYPE = MACHINE DEPENDENT {
prSSilThresh (1),
prMaxSquelchTail (2),
prSignalTimeout (3),
prIdlers (4),
prDefaultMaxTransmissions (5),
prBroadcastRetransmissions (6),
Others can be added temporarily without extending this type.
filler (LAST[WORD])
};
LarkParameter: TYPE = RECORD [
paramCode: ParamCode,
paramValue: CARDINAL
];
LarkParametersRec: TYPE = RECORD [
numParams: NAT,
params: SEQUENCE len: NAT OF LarkParameter
];
SetParameters: PROC [shh: SHHH, parameters: LarkParameters]
Change the value of one or more internal parameters to the Lark program.
}.
Stewart, May 25, 1986 9:55:29 pm PDT, added SetHostNumber, Stewart
Swinehart, May 25, 1986 9:55:20 pm PDT
Created from Lark.mesa
changes to: DIRECTORY, LarkOps
Swinehart, May 26, 1986 2:11:30 pm PDT
SetParameters:
changes to: SetHostNumber, SetParameters, LarkParameters, ParamCode, LarkParameter, LarkParametersRec