<> <> <> <> <<(Lark=>Smarts)>> 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; SmartsHandle: TYPE = LONG CARDINAL; SHHH: TYPE = RPC.Conversation; nullHandle: SmartsHandle = LOOPHOLE[NIL[REF], LONG CARDINAL]; <> <> <> <<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.>> <> <> <> <> <> Register: PROC[ shh: SHHH_, -- encrypts connection; (authentic) Rname is extractable oldSmartsID: SmartsHandle _ 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 <<(see also Login, below)>> clientInstance: ROPE_ -- obtained from Identify ] RETURNS [ smartsID: SmartsHandle, epoch: Epoch ]; <> <> RecordEvent: PROC[shh: SHHH_, smartsID: SmartsHandle_, whatHappened: StatusEvents_] RETURNS[success: BOOL]; <> EventRope: PROC[ shh: SHHH_, smartsID: SmartsHandle_, time: CARDINAL, device: Lark.Device, events: ROPE] RETURNS[success: BOOL]; <> <> Login: PROC[shh: SHHH_, smartsID: SmartsHandle_, authenticated: BOOL_TRUE]; }.