ThSmarts.mesa
Last modified by Swinehart, October 15, 1983 3:34 pm
DIRECTORY
Lark,
RPC USING [ InterfaceName ],
Thrush USING [
ConversationHandle, ConvEvent, ConvEventBody, Disposition, IntervalSpecBody, PartyHandle, Machine, SHHH, SmartsHandle, unencrypted ]
;
ThSmarts: CEDAR DEFINITIONS = {
Types, Copies
ConvEvent: TYPE = Thrush.ConvEvent;
ConvEventBody: TYPE = Thrush.ConvEventBody;
IntervalSpecBody: TYPE = Thrush.IntervalSpecBody;
SmartsHandle: TYPE = Thrush.SmartsHandle;
SHHH: TYPE = Thrush.SHHH;
none: SHHH = Thrush.unencrypted;
Since Party=>Smarts interfaces are one=>many, the Party must be able to import instances of Smarts interfaces. These types are really Lupine-generated interface records. They are defined opaquely here to avoid circular Defs dependencies. See ThParty.Register*[].
SmartsInterface: TYPE=REF SmartsInterfaceRecord;
SmartsInterfaceRecord: TYPE = RPC.InterfaceName;
Circularities prevent this definition from being here ~~ see ThParty
LocalSmartsInterface: TYPE = ThSmartsRpcControl.InterfaceRecord;
PartyHandle: TYPE = Thrush.PartyHandle;
ConversationHandle: TYPE = Thrush.ConversationHandle;
Disposition: TYPE = Thrush.Disposition;
SmartsProperties: TYPE=RECORD[
x: SELECT role: SmartsRole FROM
backstop, supervisor=> NULL,
voiceTerminal, manager => [ machine: Thrush.Machine← ],
ENDCASE ];
SmartsRole: TYPE={backstop, voiceTerminal, manager, supervisor};
voiceTerminal represents a role corresponding to Lark Smarts, front or back door; the basic workhorse. An important aspect of such a Smarts is that its client can provide a voice path.
manager represents the intelligent workstation level. Such a Smarts will tend to accept some operations and pass others.
supervisor smarts can be used either to monitor Party operations, log system operations, or to provide some sort of administrative filtering.
backstop represents a level which is required to respond to all requests; It need not necessarily do anything else. <<Subject to elimination.>>
SmartsHandles are created by/in ThParty.Register*[].
Smarts Operations
These functions operate by performing the distribution function on the set of Smarts connected to the Party. This is further described in the ThParty implementations.
Progress: PROC[
Called by Party to report changes in connection status either in response to an Alert from self or due to various other call progress events, including the initiation or termination of a connection.
shh: SHHH←none,
smartsID: Thrush.SmartsHandle,
event: ConvEvent,
yourParty: BOOL, -- TRUE if this event deals with your party.
latestEvent: BOOL, -- TRUE if at time of call, this is latest known event for this conv.
informationOnly: BOOLFALSE -- TRUE if higher priority smarts has already acted.
Don't do anything to the network, and don't do anything noisy. ??
] RETURNS [ d: Disposition ];
}.