DIRECTORY BasicTime USING [ GMT, nullGMT ], Lark USING [ Device, StatusEvents, LarkModel, Machine ], RPC USING [ Conversation, ShortROPE ] ; LarkSmarts: CEDAR DEFINITIONS = { OPEN Lark; Epoch: TYPE = BasicTime.GMT; ROPE: TYPE = RPC.ShortROPE; Machine: TYPE = Lark.Machine; SmartsID: TYPE = LONG CARDINAL; SHHH: TYPE = RPC.Conversation; nullHandle: SmartsID = LOOPHOLE[NIL[REF], LONG CARDINAL]; Register: PROC[ shh: SHHH_, -- encrypts connection; (authentic) Rname is extractable oldSmartsID: SmartsID _ nullHandle, -- If Lark is reregistering without having restarted. oldEpoch: Epoch _ BasicTime.nullGMT, machine: Machine, -- Lark's machine; useful in a number of ways model: LarkModel_, -- Describes the Lark hardware, switch settings, and the like authenticated: BOOL_FALSE, -- TRUE if user logged in explicitly before registering clientInstance: ROPE_ -- obtained from Identify ] RETURNS [ smartsID: SmartsID, epoch: Epoch ]; RecordEvent: PROC[shh: SHHH_, smartsID: SmartsID_, whatHappened: StatusEvents_] RETURNS[success: BOOL]; EventRope: PROC[ shh: SHHH_, smartsID: SmartsID_, time: CARDINAL, device: Lark.Device, events: ROPE] RETURNS[success: BOOL]; Login: PROC[shh: SHHH_, smartsID: SmartsID_, authenticated: BOOL_TRUE]; }. ºLarkSmarts.mesa Last modified by Swinehart and Owicki, June 10, 1986 9:03:37 am PDT Last modified by Stewart, October 12, 1982 1:16 pm External interface to Thrush-based smarts for Lark (Etherphone) (Lark=>Smarts) Initialization/Registration Lark uses an Agent, which it obtains using special broadcast techniques, to obtain the information needed to do a default authentication (using a built-in password), get a LarkSmarts interface from an appropriate server, and call Register. See The Agent interface. On various occasions, Lark calls the Register function. The occasions are: 1. Just after importing the Thrush interface during startup. 2. When communications with Thrush have been lost, to reestablish connections, perhaps with a different Thrush (usually, Lark will have just repeated the Import operation, as well.) 3. In immediate response to Lark.PleaseRegister[]. See that function for more details. Thrush can reaffirm the old SmartsID (if there is one), or supply a new one. model describes the Lark to its Smarts. Philosophy. It's the Lark's responsibility to identify itself to some Thrush server, to keep trying when none are available (resume from Import timeout), and to renew the association whenever contact is lost. (see also Login, below) Event Reporting The Lark user has pushed a button or switched a switch. If device is keyboard (event IN CharacterEvent), event should be PUNned to CHAR. If event is enabled/disabled (i.e., onHook, offHook, and the like), device should be one of the transducer devices. A sequence of events can be recorded in a single call. Will be unsuccessful if the smartsID is unfamiliar. Will be unsuccessful if the smartsID is unfamiliar. The SHHH value should be a new one, based on a recent local login activity. The server can obtain the new RName from the SHHH value. This function can also be used to forget the authenticated individual and reestablish the default, built in password (authenticated_FALSE) Êr˜Jšœ™JšœC™CJšœ2™2J˜Jšœ?™?Jšœ™J˜šÏk ˜ Jšœ œœ ˜!Jšœœ.˜8Jšœœ˜%J˜J˜—Jšœ œ˜!Jšœ˜ J˜Jšœœ˜Jšœœœ ˜Jšœ œ˜Jšœ œœœ˜Jšœœœ˜Jš œœœœœœ˜9J˜JšÏc™J˜Jšœ‰™‰J˜JšœK™KJšœ<™