XNSTimeBuf.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Demers, December 19, 1986 8:46:56 pm PST
DIRECTORY
Basics USING [FWORD, HWORD],
CommBuffer USING [Overhead],
XNSBuf USING[Hdr],
XNSExchangeBuf USING [Hdr, hdrBytes];
~
BEGIN
HWORD: TYPE ~ Basics.HWORD;
FWORD: TYPE ~ Basics.FWORD;
requestBytes: CARDINAL ~ hdrBytes + requestBodyBytes;
responseBytes: CARDINAL ~ hdrBytes + responseBodyBytes;
Header
Hdr: TYPE ~ XNSExchangeBuf.Hdr;
hdrBytes: CARDINAL ~ XNSExchangeBuf.hdrBytes;
Body
Version:
TYPE ~ Basics.
HWORD;
timeProtocolVersion: Version ~ [0, 2];
Type:
TYPE ~ Basics.
HWORD;
requestPacketType: Type ~ [0, 1];
responsePacketType: Type ~ [0,2];
RequestBody:
TYPE ~
MACHINE
DEPENDENT
RECORD [
protocolVersion: Version,
packetType: Type
];
requestBodyBytes: CARDINAL ~ BITS[RequestBody]/BITS[BYTE];
Direction:
TYPE ~ Basics.
HWORD;
west: Direction ~ [0,0];
east: Direction ~ [0, 1];
ToleranceFlag:
TYPE ~ Basics.
HWORD;
toleranceNotSpecified: ToleranceFlag ~ [0, 0];
toleranceIsSpecified: ToleranceFlag ~ [0, 1];
ResponseBody:
TYPE ~
MACHINE
DEPENDENT
RECORD [
protocolVersion: Version,
packetType: Type,
time: FWORD,
direction: Direction,
zone: HWORD,
zoneMinutes: HWORD,
beginDST: HWORD,
endDST: HWORD,
toleranceSpecified: ToleranceFlag,
tolerance: FWORD
];
responseBodyBytes: CARDINAL ~ BITS[ResponseBody]/BITS[BYTE];
Packet
RequestPacket: TYPE ~ REF RequestPacketObject;
RequestPacketObject:
TYPE ~
MACHINE
DEPENDENT
RECORD [
hdr: Hdr,
body: RequestBody];
ResponsePacket: TYPE ~ REF ResponsePacketObject;
ResponsePacketObject:
TYPE ~
MACHINE
DEPENDENT
RECORD [
hdr: Hdr,
body: ResponseBody];
Buffer
All buffers are actually Driver.Buffer's that have been SmashType'd to XNSBuf.Buffer's. Clients may LOOPHOLE between XNSBuf.Buffer and XNSExchangeBuf.Buffer, but should never NEW one of these and should NARROW one only to XNSBuf.Buffer.
RequestBuffer: TYPE ~ REF RequestBufferObject;
RequestBufferObject:
TYPE ~
MACHINE
DEPENDENT
RECORD [
ovh: CommBuffer.Overhead,
hdr1: XNSBuf.Hdr,
hdr2: Hdr,
body: RequestBody];
ResponseBuffer: TYPE ~ REF ResponseBufferObject;
ResponseBufferObject:
TYPE ~
MACHINE
DEPENDENT
RECORD [
ovh: CommBuffer.Overhead,
hdr1: XNSBuf.Hdr,
hdr2: Hdr,
body: ResponseBody];