DIRECTORY Containers USING [Container], IO USING [STREAM], Lark USING [CommandEvent, ConnectionSpec, disabled, Event, Hertz, LarkModel, Milliseconds, SHHH, VoiceBuffer], LarkOpsRpcControl USING [InterfaceRecord], LarkSmarts USING [SmartsID], PupSocket USING [Socket], Pup USING [Address, Host, nullHost, nullSocket], Rope USING [ROPE], RPC USING [ShortROPE], TypeScript USING [TS], ViewerClasses USING [Viewer], ViewRec USING [RecordViewer], VTables USING [VTable]; LarkTest: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; BDat: TYPE = RECORD [ h: LarkHandle, on, off: Lark.CommandEvent _ [device: nothing, event: Lark.disabled], value: BOOL _ FALSE, other: REF ANY _ NIL ]; InputGain: TYPE = {dB0, dB5, dB10, dB15, dB20} _ dB0; OutputGain: TYPE = {dB0, dB3, dB6} _ dB0; WaveTable: TYPE = {dB0, dB3, dB6, dB9, dB12} _ dB9; ToneProc: TYPE = PROC [ self: LarkHandle, f1: Lark.Hertz _ 440, f2: Lark.Hertz _ 480, modulation: Lark.Hertz _ 0, on: Lark.Milliseconds _ 500, off: Lark.Milliseconds _ 500, repetitions: CARDINAL _ 1, waveTable: WaveTable _ dB9, queueIt: BOOLEAN_TRUE, notify: BOOLEAN _ TRUE ]; DialProc: TYPE = PROC [ self: LarkHandle, number: ROPE, on: Lark.Milliseconds _ 60, off: Lark.Milliseconds _ 60, waveTable: WaveTable _ dB9, queueIt: BOOLEAN _ TRUE, notify: BOOLEAN _ TRUE ]; TuneProc: TYPE = PROC [self: LarkHandle, music1: ROPE, music2: ROPE, tune2Delay: NAT_0, tune2Divisor: NAT_1, volumeIncrement: NAT_0, file: BOOLEAN_FALSE] RETURNS [ok: BOOLEAN]; PlayFileProc: TYPE = PROC [self: LarkHandle, fileName: ROPE]; PlayStringProc: TYPE = PROC [self: LarkHandle, string: ROPE]; SpeechProc: TYPE = PROC [self: LarkHandle, text: ROPE, queueIt: BOOL _ TRUE]; MulticastOnProc: TYPE = PROC [self: LarkHandle, listeningTo: Pup.Host]; MulticastOffProc: TYPE = PROC [self: LarkHandle]; PlaybackProc: TYPE = PROC [self: LarkHandle, message: INT, queue: BOOL _ TRUE]; RecordProc: TYPE = PROC [self: LarkHandle, seconds: INT] RETURNS [message: INT]; EchoProc: TYPE = PROC [self: LarkHandle, buffer: Lark.VoiceBuffer, controlIn1: BOOL, controlIn2: BOOL, decayTime: CARDINAL, g0: CARDINAL, g1: CARDINAL, g2: CARDINAL, g3: CARDINAL, g4: CARDINAL]; SetHostProc: TYPE = PROC [self: LarkHandle, host: Pup.Host]; SocketProcIn1: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ in1, socket: Pup.Address_[[173B],Pup.nullHost, Pup.nullSocket] ]; SocketProcIn2: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ in2, socket: Pup.Address_[[173B],Pup.nullHost, Pup.nullSocket] ]; SocketProcOut1: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ out1, socket: Pup.Address_[[173B],Pup.nullHost, Pup.nullSocket] ]; SocketProcOut2: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ out2, socket: Pup.Address_[[173B],Pup.nullHost, Pup.nullSocket] ]; SocketProcOut3: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ out3, socket: Pup.Address_[[173B],Pup.nullHost, Pup.nullSocket] ]; BProc: TYPE = PROC [self: LarkHandle]; ControlRecord: TYPE = RECORD [ InGain1: InputGain, InGain2: InputGain, OutGain: OutputGain, PlayFile: PlayFileProc, Dial: DialProc, Tones: ToneProc, Tunes: TuneProc, Reset: BProc, Status: BProc, ConnStatus: BProc, Register: BProc, ToneStatus: BProc, Quit: BProc, SendAllXBar: BProc, Echo: EchoProc, SetHost: SetHostProc, SetSocketIn1: SocketProcIn1, SetSocketIn2: SocketProcIn2, SetSocketOut1: SocketProcOut1, SetSocketOut2: SocketProcOut2, SetSocketOut3: SocketProcOut3, PlayString: PlayStringProc, Speech: SpeechProc, MulticastOn: MulticastOnProc, MulticastOff: MulticastOffProc ]; LarkDataObject: TYPE = RECORD [ in: IO.STREAM _ NIL, out: IO.STREAM _ NIL, container: Containers.Container, ts: TypeScript.TS, recordViewer: ViewerClasses.Viewer, vr: ViewRec.RecordViewer _ NIL, xbv: VTables.VTable _ NIL, cr: REF ControlRecord _ NIL, tsA, tsB: TypeScript.TS, procA, procB: PROCESS, inA, outA, inB, outB: IO.STREAM, msg: IO.STREAM _ NIL, shhh: Lark.SHHH, rName: RPC.ShortROPE _ NIL, instance: RPC.ShortROPE _ NIL, address: Pup.Address, serverRname: RPC.ShortROPE _ NIL, clientRname: RPC.ShortROPE _ NIL, clientInstance: RPC.ShortROPE _ NIL, handle: LarkSmarts.SmartsID _ 0, model: Lark.LarkModel, registered: BOOL _ FALSE, pleaseStop: BOOL _ FALSE, process: PROCESS, tx1, tx2, tx3, rx1, rx2, rx3: Lark.ConnectionSpec, lark: LarkOpsRpcControl.InterfaceRecord, socket: PupSocket.Socket _ NIL, buttons: LIST OF REF BDat, cmds: LIST OF REF ANY, multicastState: MulticastState _ $off ]; LarkHandle: TYPE = REF LarkDataObject; MulticastState: TYPE = { on, off}; PlayFile: PROC [fileName: ROPE, him: Pup.Address]; OpenVFS: BProc; CloseVFS: BProc; Playback: PlaybackProc; Record: RecordProc; MyToneProc: ToneProc; MyTuneProc: TuneProc; MySpeechProc: SpeechProc; MyPlayStringProc: PlayStringProc; HandleProseOutput: PROC [c: CHAR]; Ping: PROC [e: Lark.Event]; CleanupForNewRegistration: BProc; CleanupProc: BProc; END. Stewart, July 18, 1983 1:00 pm, added SetHost Stewart, April 24, 1985 6:10:27 pm PST, Cedar 5, Stewart ÜLarkTest.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. L. Stewart December 27, 1983 4:56 pm Last Edited by: Pier, April 19, 1984 4:05:27 pm PST Last Edited by: Swinehart, April 4, 1987 4:10:42 pm PST Last Edited by: PolleZ, May 7, 1985 2:22:36 pm PDT VoiceStream USING [Handle], VFS stuff OpenVFS: BProc, CloseVFS: BProc, Playback: PlaybackProc, Record: RecordProc, VFS info stream: VoiceStream.Handle _ NIL, housekeeping actual procedures, because it is not all in one module Edited on April 24, 1985 6:08:49 pm PST, by PolleZ Adding Prose definitions added: SpeechSpec, ProseControlChar, reset, resetLen, commenceSpeech, commandLeader, indexMarkerEnd, speechDone, speechDoneLen, maxTextPktLen, maxPkts ʘJšœ ™ Jšœ Ïmœ1™