DIRECTORY Pup USING [ Address, Net, Host ], Rope USING [ ROPE ], RPC USING [ Conversation, ShortROPE ], Thrush USING [ KeyTable ] ; Lark: CEDAR DEFINITIONS = { -- *************************** Types ****************************** -- SHHH: TYPE = RPC.Conversation; ROPE: TYPE = RPC.ShortROPE; VoiceSocket: TYPE = Pup.Address; Machine: TYPE = RECORD [ net: Pup.Net, host: Pup.Host]; noMachine: Machine = [[0], [0]]; Device: TYPE = MACHINE DEPENDENT { microphonePTT (0), -- mike switch -- hookSwitch (1), -- switch on local handset speakerSwitch (2), -- switch on speaker box -- touchPad (3), -- DTMF generator/detector (downstroke) -- keyboard (4), -- standard keyboard -- auxiliaryKeyboard (5), -- extra device locator (6), -- as yet undefined -- ringDetect (7), -- on back door -- revertRelay (8), -- on Teleset, controls Tip, Ring, and receiver -- offHookRelay (9), -- on Telewall, controls Tip and Ring only -- sideTone (10), -- on Teleset -- ringEnable (11), -- volume bypass on speaker -- led (12), -- lamp on speaker box -- crossBar (13), -- analog crossbar switch -- timeslot (14), -- to set timeslots -- voiceMode (15), -- program modes -- inGain1 (16), -- table indicies -- inGain2 (17), outGain1 (18), outGain2 (19), echoSuppression (20), nothing (21), clearCrosspoint (22), -- Event is row/column pair -- setCrosspoint (23), -- Event is row/column pair -- revertHookswitch (24), -- reverts A/A1, etc. -- aRelay (25), -- controls A/A1 -- tones (26), -- See description of notification in ToneSpec -- delay (27), -- Event is number of deciseconds to delay -- spMode (28), -- speakerphone mode -- touchPadUp (29), -- DTMF generator/detector (upstroke) -- keyboardUp (30), -- upstroke auxiliaryKeyboardUp (31), -- upstroke lastPlusOne (32), -- not used, but update when increasing number of devices. (255) -- byte wide -- }; Event: TYPE = CHARACTER; firstChar: Event = '\000; lastChar: Event = '\177; b0: Event = '\200; b1: Event = '\201; b2: Event = '\202; b3: Event = '\203; b4: Event = '\204; b5: Event = '\205; b6: Event = '\206; b7: Event = '\207; b8: Event = '\210; b9: Event = '\211; bA: Event = '\212; bB: Event = '\213; bC: Event = '\214; bD: Event = '\215; bStar: Event = '\216; bThorp: Event = '\217; enabled: Event = '\220; disabled: Event = '\221; reset: Event = '\222; ts0: Event = '\223; ts12: Event = '\224; tab0: Event = '\225; tab1: Event = '\226; tab2: Event = '\227; tab3: Event = '\230; tab4: Event = '\231; tab5: Event = '\232; tab6: Event = '\233; tab7: Event = '\234; tab8: Event = '\235; tab9: Event = '\236; o3i1: Event = '\237; o2i2: Event = '\240; o1i1: Event = '\241; inbound: Event = '\242; outbound: Event = '\243; endNum: Event = '\244; notify: Event = '\245; CommandEvent: TYPE = MACHINE DEPENDENT RECORD [ device: Device, event: Event ]; StatusEvent: TYPE = MACHINE DEPENDENT RECORD [ time: CARDINAL, device: Device, event: Event ]; DTMFEvent: TYPE = Event[b0..bThorp]; CharacterEvent: TYPE = Event[firstChar..lastChar]; Passel: TYPE = [0..32); StatusEvents: TYPE = REF StatusEventSequence; StatusEventSequence: TYPE= RECORD[ e: PACKED SEQUENCE length: Passel OF StatusEvent ]; CommandEvents: TYPE = REF CommandEventSequence; CommandEventSequence: TYPE= RECORD[ e: PACKED SEQUENCE length: Passel OF CommandEvent ]; Hertz: TYPE = [0..3500); -- Voice bandpass -- Milliseconds: TYPE = [0..10000); Protocol: TYPE = MACHINE DEPENDENT {interactive (0), nWay (1), recordOnly (2), (7)}; Encoding: TYPE = MACHINE DEPENDENT {muLaw (0), (7)}_muLaw; VoiceBuffer: TYPE = MACHINE DEPENDENT {in1 (0), in2 (1), out1 (2), out2 (3), out3 (4), (7)}; ConnectionSpec: TYPE = REF ConnectionSpecRec; ConnectionSpecRec: TYPE = MACHINE DEPENDENT RECORD [ protocol: Protocol, encoding: Encoding, blankA: [0..1777B] _ 0, sampleRate: INTEGER, packetSize: INTEGER, blankB: [0..17777B] _ 0, buffer: VoiceBuffer, blankC: [0..7777B] _ 0, keyIndex: [0..17B], localSocket: VoiceSocket, remoteSocket: VoiceSocket ]; Genre: TYPE = MACHINE DEPENDENT { Alto (0), Lark1(1), (255) }; LarkModel: TYPE = MACHINE DEPENDENT RECORD [ genre: Genre, hardwareVersion: [0..256), softwareVersion: CARDINAL ]; KeyTable: TYPE = Thrush.KeyTable; EchoParameters: TYPE = REF EchoParameterRecord; EchoParameterRecord: TYPE = MACHINE DEPENDENT RECORD [ blankA: [0..17777B] _ 0, buffer: VoiceBuffer, blankB: [0..37777B] _ 0, buffer2Controlled: BOOL, buffer1Controlled: BOOL, decayTime: CARDINAL, gain: ARRAY [0..5) OF CARDINAL ]; ToneSpec: TYPE = REF ToneSpecRec; ToneSpecRec: TYPE = RECORD [ notification: CommandEvent _ [nothing, 0C], -- what to use when notifying. volume: CARDINAL, -- "WaveTable": entire sequence played at one volume, for now totalTime: CARDINAL, -- duration of one total performance in millisec tones: LIST OF Tone ]; Tone: TYPE = RECORD [ f1: CARDINAL, -- Hertz. f2: CARDINAL, -- Hertz. on, off: CARDINAL, -- Tone will be played at f2 Hz. for on ms.; then off ms. of silence. repetitions: CARDINAL_1 -- specifies number of repetitions of this toned ]; }. Stewart, May 25, 1986 9:57:29 pm PDT, added SetHostNumber, Stewart fLark.mesa Copyright c 1984, 1986 by Xerox Corporation. All rights reserved. Last modified by Swinehart and Owicki, December 7, 1982 1:47 pm Last modified by Swinehart, May 25, 1986 9:57:29 pm PDT Last modified by Stewart, July 18, 1983 12:58 pm Data types for communications between Larks and their controlling servers. See LarkOps.mesa for Server -> Lark procedures, LarkSmarts.mesa for Lark -> Server procedures. Kinds of keystrokes and other "digital" actions that a Lark user might initiate, including keyboard and touchpad buttons, switch-hook actions, etc. An event must be associated with a Device in order to be unambiguously interpreted. Ascii range DTMF pushbuttons Switches (i.e., offhood, onhook) Time slots Table indices Voice software modes Echo suppression modes <> tag field in Generate tones Typically, devices and events will be combined Subset of events corresponding to "touch-tones" Sequences have these kinds of domain types, so that instances of them will fit in a single RPC packet. This is basically an Event "string", maxLength=length Good for sending character sequence, as in the Display command, below. There may be more than one way to transmit voice, depending. We will probably also experiment with a number of encodings. If a Smarts says this to a Lark, it informs the Lark what connections to establish (see Connect, below.) If a Lark says this to a Smarts, it is a report of what connections presently exist. Some more stuff that the Lark tells the Smarts when Registering. f1, f2: frequencies of two sinusoidal tones; f2 may be zero to request a single tone on, off: noisy and silent intervals during each repetition. repetitions: should be fairly small; longer sequences should be produced by queuing multiple specifications, not too far ahead; prevents pollution after server crash. waveTable, an index into Lark's available waveform tables for tone generation. Also, more complex tone sequences can be specified using a queue of Tones requests. queueIt: add specification to a list of sequential tone specs ~queueIt: supercede all pending tones with this one (e.g., scope=silence) notify: issue a "tones" event when this entry terminates. If notification.device is 'nothing', ToneSpec is to be played only once. Notification: If notification.device is 'tones', notification will be reported as an event after completion of the first tone in the list. totalTime field is not used by Lark. (ToneSpecs are used by other parts of the Etherphone system.) Pause: not used by Lark. Swinehart, May 25, 1986 9:57:14 pm PDT Moved operations to LarkOps. changes to: Machine Κ˜Jšœ ™ Jšœ Οmœ7™BJšœ?™?Jšœ7™7Jšœ0™0J˜J™ͺJ˜šΟk ˜ Jšœžœ˜!Jšœžœžœ˜Jšžœžœ˜&Jšœžœ ˜J˜J˜—Jšœžœ˜J˜JšΟcF˜FJ˜Jšžœžœžœ˜Jšžœžœžœ ˜J˜Jšœ žœ˜ šœ žœžœ˜Jšœ˜—J˜ J˜šœžœžœž œ˜"JšœŸ˜$JšœŸ˜*JšœŸ˜.JšœŸ*˜8JšœŸ˜%JšœŸ˜&Jšœ Ÿ˜#JšœŸ˜"JšœŸ2˜CJšœŸ-˜?JšœŸ˜JšœŸ˜/Jšœ Ÿ˜#JšœŸ˜+JšœŸ˜%JšœŸ˜#JšœŸ˜"J˜ J˜J˜J˜J˜ JšœŸ˜4JšœŸ˜2JšœŸ˜/Jšœ Ÿ˜ Jšœ Ÿ1˜=Jšœ Ÿ-˜9Jšœ Ÿ˜$JšœŸ%˜9JšœŸ ˜JšœŸ ˜&JšœŸ:˜LJšœŸ˜J˜J˜—JšœP™PJšœQ™QJšœE™EJ˜Jšœžœž œ˜J˜Jšœ ™ J˜J˜J˜Jšœ™J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜Jšœ ™ J˜J˜J˜J˜Jšœ ™ J˜J˜J˜Jšœ ™ J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜Jšœ™J˜J˜J˜J˜Jšœ™J˜J˜J˜Jšœ1™1J˜J˜Jšœ™J˜J˜Jšœ.™.J˜š œžœžœž œžœ˜/J˜J˜ J˜J˜—š œ žœžœž œžœ˜.Jšœžœ˜J˜J˜ J˜J˜—Jšœ/™/J˜Jšœ žœ˜$Jšœžœ˜2J˜JšœJ™JJšœ™J˜Jšœžœ ˜J˜Jšœ5™5JšœF™FJ˜Jšœžœžœ˜-J˜šœžœžœ˜"Jšœžœžœžœ ˜0J˜J˜—Jšœžœžœ˜/J˜šœžœžœ˜#Jšœžœžœžœ ˜1J˜J˜—JšœžœŸ˜-Jšœžœ˜ J˜Jšœ<™J˜š œ žœžœž œžœ˜,J˜ J˜Jšœž˜J˜J˜—Jšœ žœ˜!J˜Jšœžœžœ˜/š œžœžœž œžœ˜6Jšœ˜J˜Jšœ˜Jšœžœ˜Jšœžœ˜Jšœ žœ˜Jšœžœžœž˜J˜—J˜JšœT™TJšœ;™;JšœS™SJšœR™RJšœN™NJšœS™SJšœ=™=JšœI™IJšœ9™9J™Jšœ žœžœ ˜"šœ žœžœ˜šœ,Ÿ˜JJ™H—JšœžœŸ=˜OJšœ žœŸ0˜EJšœžœžœ˜J˜J™ŠJ™b—J˜šœžœžœ˜JšœžœŸ ˜JšœžœŸ ˜Jšœ žœŸE˜XJšœ žœŸ2˜IJ˜J™—J˜J˜J˜Jšœ9Οr ˜BJ˜code™&K™Kšœ  ™—K™—…—φ%t