DIRECTORY EikonixProtocol USING [BitsPerPoint, Color, Height, Width], IO USING [STREAM], Rope USING [ROPE] ; Eikonix: CEDAR DEFINITIONS = BEGIN BYTE12: TYPE = [0..4096); -- NB an Eikonix byte is 12 bits Width: CARDINAL = EikonixProtocol.Width; Height: CARDINAL = EikonixProtocol.Height; LineCount: TYPE = [0..Width]; PixelCount: TYPE = [0..Height]; PixelIndex: TYPE = [0..Width); LineIndex: TYPE = [0..Height); IntegrationTime: TYPE = CARDINAL; NBuffer: TYPE ~ REF NBufferRecord; NBufferRecord: TYPE ~ ARRAY PixelIndex OF BYTE12; Handle: TYPE ~ REF HandleRecord; HandleRecord: TYPE ~ RECORD [ serverName: Rope.ROPE, stream: IO.STREAM, open: BOOL _ FALSE]; EikonixError: PUBLIC ERROR [ec: Rope.ROPE]; Open: PUBLIC PROC[serverName: Rope.ROPE] RETURNS [Handle]; Close: PUBLIC PROC[Handle]; SelectWheel: PUBLIC PROC[h: Handle, color: EikonixProtocol.Color]; LoadNormalizer: PUBLIC PROC [h: Handle, darkCurrent: NBuffer, gain: NBuffer]; LineConsumerProc: TYPE ~ PROC [scanNumber: LineIndex, b: Buffer, clientData: REF ANY _ NIL] RETURNS [Buffer]; Buffer: TYPE ~ REF BufferRecord; BufferRecord: TYPE ~ RECORD [pixels: SEQUENCE cnt: CARDINAL OF BYTE12]; SampleScan: PUBLIC PROC [h: Handle, b: Buffer, p: LineConsumerProc, bits: EikonixProtocol.BitsPerPoint _ bp8, clientData: REF ANY _ NIL]; Scan: PUBLIC PROC [h: Handle, lineStart: LineIndex, pixelStart: PixelIndex, lineCount: LineCount, pixelCount: PixelCount, b: Buffer, p: LineConsumerProc, bits: EikonixProtocol.BitsPerPoint _ bp8, clientData: REF ANY _ NIL]; SetIntegrationTime: PUBLIC PROC[h: Handle, t: IntegrationTime, bits: EikonixProtocol.BitsPerPoint _ bp8]; GetIntegrationTime: PUBLIC PROC[h: Handle] RETURNS[t: IntegrationTime]; TurnOnLights: PUBLIC PROC [h: Handle]; TurnOffLights: PUBLIC PROC [h: Handle]; Calibrate: PUBLIC PROC [server: Rope.ROPE _ NIL, t: IntegrationTime, color: EikonixProtocol.Color _ Clear] RETURNS [dc, gain: Eikonix.NBuffer]; CalibrateDarkCurrent: PUBLIC PROC [server: Rope.ROPE _ NIL, t: IntegrationTime] RETURNS [dc: Eikonix.NBuffer]; CalibrateLightsOn: PUBLIC PROC [server: Rope.ROPE _ NIL, t: IntegrationTime, color: EikonixProtocol.Color _ Clear, dc: Eikonix.NBuffer] RETURNS [gain: Eikonix.NBuffer]; GetCal: PUBLIC PROC [h: Handle, oldBuf: NBuffer _ NIL] RETURNS [buf: NBuffer]; ScanForMinMax: PUBLIC PROC [h: Handle, lineStart: LineIndex, pixelStart: PixelIndex, lineCount: LineCount, pixelCount: PixelCount] RETURNS [min: BYTE12, minScan: LineIndex, minPixel: PixelIndex, max: BYTE12, maxScan: LineIndex, maxPixel: PixelIndex]; ComputeCorrectedCalibrate: PUBLIC PROC [dc, gain: Eikonix.NBuffer, min, max: BYTE12] RETURNS [newDc, newGain: Eikonix.NBuffer]; END. äEikonix.mesa Copyright (C) 1985, 1986, Xerox Corporation. All rights reserved. Tim Diebert: January 30, 1986 10:13:45 am PST This program relies on EikonixProtocol.mesa of January 27, 1986 9:21:56 am PST! Connect to and initialise the scanner Disconnect from the scanner Rotates the color wheel Performs 128 calls to p with 128 pixels accross the field. This samples every 16th pixel on every 16th scan line. The Buffer must be 128 long or a new on will be allocated. Scans the image starting with line lineStart pixel pixelStart for pixelCount pixels. Calls p with each line of pixels. b must be at least pixelCount long or a new b will be allocated. repCount specifies the number of times to scan and sum before sending. Ê–˜codešœ ™ K™BK™-—K˜šÏk ˜ KšœO™OKšœœ&˜;Kšœœœ˜Kšœœœ˜K˜K˜—šÏnœœ œ˜"K˜KšœœÏc ˜;Kšœœ˜(Kšœœ˜*Kšœ œ˜Kšœ œ˜Kšœ œ˜Kšœ œ˜Kšœœœ˜!Kšœ œœ˜"Kš œœœ œœ˜1K˜Kšœœœ˜ šœœœ˜Kšœœ˜Kšœœœ˜Kšœœœ˜—K˜Kšœœœ œ˜+K˜š žœœœœœ ˜:K™%—K™šžœ œ ˜K™K˜—šž œœœ*˜BK™—K˜Kšžœœœ1˜MK˜Kšžœœœ0œœœœ ˜mKšœœœ˜ Kš œœœ œœœœ˜GK˜š ž œœœeœœœ˜‹K™®K˜—š žœœœ¿œœœ˜ßKšœ™K˜—Kšžœ œI˜iK˜Kšžœœœ œ˜GK˜Kšž œœœ ˜&K˜Kšž œœœ ˜'K˜Kš ž œœœœœ<œ˜K˜Kš žœœœœœœ˜nK˜Kš žœœœœœQœ˜¨K˜Kš žœœœœœ˜NK˜Kš ž œœœiœœ1œ+˜úK˜Kš žœœœ'œœ#˜K˜Kšœ˜—K™—…— xò