Dunn.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bloomenthal, January 30, 1987 11:44:54 pm PST
DIRECTORY Imager, IO, Rope;
Dunn: CEDAR DEFINITIONS ~ BEGIN
ROPE:    TYPE ~ Rope.ROPE;
STREAM:   TYPE ~ IO.STREAM;
Context:   TYPE ~ Imager.Context;
Handle:   TYPE = REF HandleRec;
HandleRec:  TYPE = RECORD [
stream:     STREAM ← NIL,
simulate:     BOOL ← FALSE
];
SnapperError: ERROR [msg: ROPE];
cmdCode: TYPE = MACHINE DEPENDENT {
from RS232 Interface Specs for Dunn Models 631 and 632 Color Camera Systems
videoInvertHigh   (2EH),
videoInvertLow   (2FH),
readyTest     (3AH),
statusRequest    (3BH),
expose8x5TimeReq  (3CH),
exposeAuxTimeReq  (3DH),
exposeAdjFactorReq  (3EH),
advAuxFrameCnt  (3FH),
reset8x10ExposeStat  (40H), 
restoreFilterWheel  (41H),
recovDefaultVals  (42H), 
select8x10Mode   (43H),
selectAuxMode   (44H), 
selectBW     (45H),
selectColor    (46H), 
selectNrmSeqMode  (47H),
selectSepSeqMode  (48H), 
exposeSeq     (49H),
selectVidAndExpose  (4AH),
set8x10ExposeTimes  (4BH),
setAuxExposeTimes  (4CH),
setExposeAdjFactors  (4DH),
openAuxShutter   (4EH),
closeAuxShutter   (4FH),
unblankMonitor   (50H), 
blankMonitor   (51H),
selectVideoChannel  (52H), 
positionFilterWheel  (53H),
immExposeNoVidSw  (54H), 
yAxisRasterCompOn  (55H),
yAxisRasterCompOff (56H), 
clearYAxisOffset   (57H),
stepYAxisOffset   (58H), 
clearXAxisOffset   (59H),
stepXAxisOffset   (5AH),
select35mmAuxCam  (5BH),
select16mmAuxCam  (5CH),
select4x5AuxCam  (5DH),
selectSX70AuxCam  (5EH),
setNumPadChars   (5FH),
resetAuxNoFilmStats (60H), 
fastOn     (61H),
fastOff     (62H)
};
DunnError: ERROR [explanation: ROPE];
Simulate: PROC RETURNS [handle: Handle];
Returns a Dunn handle: Handle without opening the Dunn.
Subsequent Dunn calls will be simulated.
Open: PROC [host, display: ROPENIL] RETURNS [handle: Handle];
Open the Dunn. If host NIL, it defaults to "York;" if display NIL, it defaults to "Reprisal".
May raise DunnError.
Close: PROC [handle: Handle];
Reset and close the Dunn.
Cmd: PROC [handle: Handle, cmd: cmdCode] RETURNS [BOOL];
Cmd transmits a Dunn.cmdCode to the Dunn;
TRUE is returned iff the Dunn successfully performs the operation.
Expose: PROC [handle: Handle] RETURNS [BOOL];
Expose film either as an RGB composite or not, depending on the exposure mode.
Expose film either as color or black-and-white, depending on the film type.
The exposure mode may be set by Composite or Separate (the reset default).
The film type may be set by BW or Color (the reset default).
Returns TRUE iff command successful.
Composite: PROC [handle: Handle] RETURNS [BOOL];
Set exposure mode to be RGB composite. If film type is color,
each command to expose results in sequential red, green, and
blue exposures before the film is advanced.
Returns TRUE iff command successful.
Separate: PROC [handle: Handle] RETURNS [BOOL];
Set exposure mode to be separate. If film type is color,
each command to expose results in sequential red, green, and
blue exposures to a single film frame.
Returns TRUE iff command successful.
Color: PROC [handle: Handle] RETURNS [BOOL];
Set film type to color. Each command to expose results in
sequential red, green, and blue filtered exposures with corresponding video.
Returns TRUE iff command successful.
BW: PROC [handle: Handle] RETURNS [BOOL];
Set film type to black and white. Each command to expose results in
a single exposure with a transparent filter and the green video channel.
Returns TRUE iff command successful.
Reset: PROC [handle: Handle] RETURNS [BOOL];
Resets Dunn functions; the filter wheel is reset.
The film type is set to color and the exposure mode is set to composite.
Returns TRUE iff command successful.
Snapper: PROC [action: PROC[Context], pixelUnits: BOOL ← FALSE,
color: BOOL ← TRUE, smooth: BOOL ← TRUE];
Will perform the given action and then expose the resulting image.
Snapper can raise the following error:
END.
..
Reserve: PROC RETURNS [Handle: Handle];
This is the simplest way to obtain a Dunn handle: Handle. May raise DunnError.
DunnSimulated: PROC [handle: Handle] RETURNS [BOOL];
Return TRUE iff dunn is in simulate mode.
Status: PROC [handle: Handle] RETURNS [DunnStatus];
If any of the status fields is false, the Dunn is non-functional.
Ready: PROC [handle: Handle] RETURNS [BOOL];
Return TRUE iff Dunn is ready for operation.
SimulateOn: PROC [handle: Handle];
Enable Dunn operations.
SimulateOff: PROC [handle: Handle];
Disable Dunn operations.
DunnStatus:  TYPE ~ RECORD [open, sync, film, io: BOOLTRUE];