LarkInfoBody:
TYPE =
MONITORED
RECORD
[
interface: LarkRpcControl.InterfaceRecord, -- here's how you make calls to Lark --
shh: SHHH, -- here's what you use to encrypt them --
larkSmartsInfo: SmartsInfo, -- back pointers
larkTrunkSmartsInfo: SmartsInfo, -- back pointers
netAddress: Thrush.NetAddress, -- <<needed when creating socket numbers?>> --
model: Lark.LarkModel, -- what does this Lark look like? --
debugIn: IO.STREAM, debugPrint: IO.STREAM←NIL,
larkState: LarkState ← $none, -- tone/crossbar/connect state of actual Lark hardware
newActions: LIST OF REF←NIL, -- queue of low-level requests to supervisor process
lastAction: LIST OF REF←NIL, -- used in request-queue maintenance,
larkProcess: PROCESS←NIL, -- maintains same
stateChange: CONDITION, -- larkProcess should notice change
hookState: HookState ← $onhook, -- state of switchhook/speakerphone switch...
terminalType: TerminalType ← $std, -- telset, speakerphone, or monitor switching.
textToSpeech: BOOL←FALSE, -- Prose 2000 synthesizer is available on this Lark.
Some values that have to be preserved from one larkState to another
forwardedCall: BOOL←FALSE,
spec: ThParty.PartyInfo←NIL,
cSpec: Lark.ConnectionSpec←NIL,
keyTable: Lark.KeyTable ← NIL,
toneSpec: LarkPlay.ToneSpec←NIL,
nextToneList: LIST OF LarkPlay.ToneList←NIL,
larkToneSpec: Lark.ToneSpec←NIL,
Prose control values
proseResponse: Rope.ROPE←NIL, -- holds incomplete Prose responses
flushJustFinished: BOOL←FALSE, -- can expect to have to flush proseQueue next time thru LarkInImpl.HandleProseOutput
proseQueue: LarkProseQueue←NIL, -- holds queue of client markers and proseSpecs
pTail: LarkProseQueue←NIL,
textToSpeak: Rope.ROPE←NIL,
clientMarker: INT←maxClientMarker,
controlMarker: INT←maxControlMarker,
ctrlMarkerQueue: LIST OF REF ANY←NIL, -- holds queue of control markers
pktsOutstanding: INT𡤀,
flushInProgress: BOOL←FALSE, -- consider combining w flushJustFinished?
Click and ring detect timings
swOnTime: CARDINAL𡤀,
Lark reports the time when a ringing voltage is detected on the telewall, and the time when the voltage goes away. There can be an on-off glitch when the phone is hung up, and ringing is an alternating thing, so we need to interpret these signals before passing on to higher levels. See LarkInImpl.
ringChangeTime: CARDINAL𡤀,
ringDetState: RingDetState ← $idle,
ringDetCondition: CONDITION,
ringDetInstance: INT𡤀, -- timeout routine is relevant only if this matches
Ringing control information
When a Note in a tune specifies "notify", expectedNotification is incremented (mod the lower-case letters) and sent along to the Lark. When the Lark finishes that note, it notifies the smarts, and eventually LarkOut, using that value. It's possible (though not desired) for this notification to precede the "WAIT" that pends notification. In this case, we mustn't wait. See LarkOutImpl.DoTones and ditto.WaitQ. receivedNotification is set to a value outside the range just after each WAIT opportunity terminates.
expectedNotification: Lark.Event ← 'z,
receivedNotification: Lark.Event ← 'Y,
LarkSupervisor Variables
lastTerminalType: TerminalType ← $std,
lState: LState ← [lSw: ALL[Lark.enabled]],
scratchEv: Lark.CommandEvents ← NIL
];