<> <> <> <> <> <> DIRECTORY Containers USING [Container], IO USING [STREAM], Lark USING [CommandEvent, ConnectionSpec, disabled, Event, Hertz, LarkModel, Machine, Milliseconds, SHHH, VoiceBuffer], LarkRpcControl USING [InterfaceRecord], LarkSmarts USING [NetAddress, SmartsHandle], PupDefs USING [PupSocket], PupTypes USING [PupAddress, PupHostID], Rope USING [ROPE], RPC USING [ShortROPE], TypeScript USING [TS], ViewerClasses USING [Viewer], ViewRec USING [RecordViewer], VoiceStream USING [Handle], 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: PupTypes.PupHostID]; 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: PupTypes.PupHostID]; SocketProcIn1: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ in1, socket: PupTypes.PupAddress_[[173B],[0],[0,0]] ]; SocketProcIn2: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ in2, socket: PupTypes.PupAddress_[[173B],[0],[0,0]] ]; SocketProcOut1: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ out1, socket: PupTypes.PupAddress_[[173B],[0],[0,0]] ]; SocketProcOut2: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ out2, socket: PupTypes.PupAddress_[[173B],[0],[0,0]] ]; SocketProcOut3: TYPE = PROC [ self: LarkHandle, buffer: Lark.VoiceBuffer _ out3, socket: PupTypes.PupAddress_[[173B],[0],[0,0]] ]; 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, OpenVFS: BProc, CloseVFS: BProc, Playback: PlaybackProc, Record: RecordProc, 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: LarkSmarts.NetAddress, serverRname: RPC.ShortROPE _ NIL, clientRname: RPC.ShortROPE _ NIL, clientInstance: RPC.ShortROPE _ NIL, handle: LarkSmarts.SmartsHandle _ 0, model: Lark.LarkModel, registered: BOOL _ FALSE, pleaseStop: BOOL _ FALSE, process: PROCESS, tx1, tx2, tx3, rx1, rx2, rx3: Lark.ConnectionSpec, lark: LarkRpcControl.InterfaceRecord, <> socket: PupDefs.PupSocket _ NIL, stream: VoiceStream.Handle _ 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: PupTypes.PupAddress]; 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 <> <> <> <<>>