LarkInfoBody:
TYPE =
MONITORED
RECORD
[
interface: LarkOpsRpcControl.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
failed: BOOL ← FALSE, -- set when this (instance of) Lark is no longer viable.
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
blinkProcess: PROCESS ← NIL, -- created if LED must flash.
stateChange: CONDITION, -- larkProcess should notice change
audioSource: AudioSource ← NIL, -- e.g., $telset
switchState: SwitchState ← $onhook, -- state of switchhook/speakerphone switch...
textToSpeech: BOOL←FALSE, -- Prose 2000 or DecTalk synthesizer is available on this Lark.
transmitOnly: BOOL←FALSE, -- w/line(A/B), inhibit spkr, rcvr, line(A/B) out for svcs.
Some values that have to be preserved from one larkState to another
forwardedCall: BOOL←FALSE,
multicasting: BOOL←FALSE,
spec: ThParty.PartyInfo←NIL,
cSpec: Lark.ConnectionSpec←NIL,
keyTable: Lark.KeyTable ←
NIL,
keySynch: CONDITION, -- used to lock pieces of LarkOutImpl together while keys are distributed
keyTableDistrsRequested: INT𡤀,
keyTablesDistributed: INT ← 0,
toneSpec: LarkPlay.ToneSpec←NIL,
nextToneList: LIST OF LarkPlay.ToneList←NIL,
larkToneSpec: Lark.ToneSpec←NIL,
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
lastSwitchState: SwitchState ← $onhook,
lState: LState ← [lSw: ALL[Lark.enabled]],
scratchEv: Lark.CommandEvents ← NIL,
For use by LarkCall Registrants
props: Atom.PropList ← NIL,
Limited registration for handling Lark-to-Server events for peripheral services, informing them of conversation termination, . . .
See LarkInImpl, LarkOutImpl for usage discussions.
keyboardEventHandler: PROC[info: LarkInfo, sEvent: Lark.StatusEvent],
keyboardResetHandler: PROC[info: LarkInfo]
];