Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ir(4) — NEWS-os 3.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

IR(4)  —  UNIX Programmer’s Manual

 

NAME

ir − Image Reader device interface

SYNOPSYS

ir0 at iop addr 7fee10 intr 110
/dev/ir
#include <newsiop/imagereader.h>

DESCRIPTION

ir provides the interface to control NEWS Image Reader (NWP-534).  The Image Reader has many inteligent functions and ir makes most of the functions effectively. 

Operations will be done through the system call of ‘ioctl’ to /dev/ir, and can be used with C language easily. 

DATA FORMAT

The data format of the structures are ;

struct ir_window {
intiw_x;   /∗ X coordinate ∗/
intiw_y;   /∗ Y coordinate ∗/
intiw_dx;  /∗ width ∗/
intiw_dy;  /∗ height ∗/
};
 struct ir_xy {
intiw_x;   /∗ magnification of X axis / amount of data ∗/
intiw_y;   /∗ magnification of Y axis / amount of data ∗/
};
 struct ir_seg {
intis_in;  /∗ mode in segment ∗/
intis_out; /∗ mode out of segment ∗/
};

ir_window is the data format for storing the area data. 

ir_xy is the data format for storing the data of amount for the magnific and the image data. 

ir_seg is the data format for storing the mode of in/out of the segment. 

IOCTL

IRIOCINIT : initialization indication

initialize the image reader.  ioctl(fildes,IRIOCINIT);

IRIOCHOME : home position indication

return the optics to home position.  ioctl(fildes,IRIOCHOME);

IRIOCLAMP : lamp indication

define the lamp ON or OFF. 
 

#define      LAMP_OFF     0       /∗ light is off ∗/
#define      LAMP_ON      1       /∗ light is on ∗/
 int lamp;
ioctl(fildes,IRIOCLAMP,&lamp);

IRIOCRESOLUTION
: resolution indication

define the resolution. 

#define      DPI_300     300      /∗ 300 dpi ∗ /
#define      DPI_200     200      /∗ 200 dpi ∗ /
#define      DPI_150     150      /∗ 150 dpi ∗ /
#define      DPI_75       75      /∗  75 dpi ∗ /
 int resolution;
ioctl(fildes,IRIOCRESOLUTION,&resolution);

IRIOCMIRROR : mirror image indication

set or quit the mirror image mode. 

#define      NORMAL       0       /∗ normal image ∗/
#define      MIRROR       1       /∗ mirror image ∗/
 int mirror;
ioctl(fildes,IRIOCMIRROR,&mirror)

IRIOCOUTMODE : output indication

define the output mode (image read mode)

#define      BINARY       0       /∗ black and white ∗ /
#define      DIZER1       1       /∗ dizer pattern No.1 ∗ /
#define      DIZER2       2       /∗ dizer pattern No.2 ∗ /
#define      DIZER3       3       /∗ dizer pattern No.3 ∗ /
#define      DIZER4       4       /∗ dizer pattern No.4 ∗ /
#define      DIZER5       5       /∗ dizer pattern No.5 ∗ /
#define      DIZER6       6       /∗ dizer pattern No.6 ∗ /
#define      DIZER7       7       /∗ dizer pattern No.7 ∗ /
#define      MULTI        9       /∗ multi ∗ /
 int outmode;
ioctl(fildes,IRIOCOUTMODE,&outmode);

IRIOCAREAMODE
: area mode indication

define the output mode in/out of the segument in area mode

#define      BINARY       0       /∗ black and white ∗ /
#define      DIZER1       1       /∗ dizer pattern No.1 ∗ /
#define      DIZER2       2       /∗ dizer pattern No.2 ∗ /
#define      DIZER3       3       /∗ dizer pattern No.3 ∗ /
#define      DIZER4       4       /∗ dizer pattern No.4 ∗ /
#define      DIZER5       5       /∗ dizer pattern No.5 ∗ /
#define      DIZER6       6       /∗ dizer pattern No.6 ∗ /
#define      DIZER7       7       /∗ dizer pattern No.7 ∗ /
#define      WHITE        11      /∗ white ∗ /
 struct ir_seg seg_outmode;
ioctl(fildes,IRIOCAREAMODE,&seg_outmode)

IRIOCLIGHT : concentration definetion

define the concentration of image signal. 
 

int light;
ioctl(fildes,IRIOCLIGHT,&light);

IRIOCNOAE : AE (auto adjust of concentration) indication

define or quit the AE (auto adjust of concentration) mode. 
 

#define      AE           0       /∗ AE ON ∗/
#define      NO_AE        1       /∗ AE QUIT ∗/
 int no_ae;
ioctl(fildes,IRIOCNOAE,&no_ae);

IRIOCREVERSE : nega / posi indication

define the negative or positive mode. 
 

#define      POSI        0        /∗ positive mode ∗/
#define      NEGA        1        /∗ negative mode ∗/
 int reverse;
ioctl(fildes,IRIOCREVERSE,&reverse);

IRIOCAREAREVERSE
: negative/positive indication for area

define the negative or positive mode in area mode
 

#define      POSI        0        /∗ positive ∗/
#define      NEGA        1        /∗ negative ∗/
 struct ir_seg seg_reverse;
ioctl(fildes,IRIOCAREAREVERSE,&seg_reverse);

IRIOCSCALE : magnification indication

define the magnification to read. 
 

int scale;
ioctl(fildes,IRIOCSCALE,&scale);

IRIOCXYSCALE : self-supporting variable scale indication

define the magnifications for main scanning and sub scanning independently. 
 

struct ir_xy xy scale;
ioctl(fildes,IRIOCXYSCALE,&xy_scale);

IRIOCAREA : area indication

define the area to read. 
 

#define      WINDOW               0
#define      A4                   1
#define      A5                   2
#define      B5                   3
#define      B6                   4
#define      ENVELOPE             5
#define      POSTCARD             6
#define      A6                   7
#define      MINI                 10
#define      LETTER               11
#define      NOT_SPECIFIED        99
 int area;
ioctl(fildes,IRIOCAREA,&area);

IRIOCWINDOW : window area indication

define the area to be read by the window. 
 

struct ir_window window;
ioctl(fildes,IRIOCWINDOW,&window);

IRIOCSEGMENT : segment area indication

define the segment area. 
 

struct ir_window segment;
ioctl(fildes,IRIOCSEGMENT,&segment);

IRIOCREAD : scanning indication command

define the execution to read. 
 

int area;
ioctl(fildes,IRIOCREAD,&area);

IRIOCAREAREAD
: area scanning indication command

define to execution the scanning area
 

int area;
ioctl(fildes,IRIOCAREAREAD,&area);

IRIOCMODE : mode report

request the Report No.0 (mode report). 
 

struct ir_mode {
intim_resolution;
intim_mirror;
intim_motor;
intim_light;
struct ir_seg im_reverse;
};

struct ir_mode mode;
ioctl(fildes,IRIOCRMODE,&mode);

IRIOCSTATUS : status report

request the Report No.1 (status report). 
 

struct ir_status {
intis_error;
intis_timeout;
intis_operator_call;
intis_service_call;
};

struct ir_status status;
ioctl(fildes,IRIOCRSTATUS,&status);

IRIOCPOSITION : position report from the origin. 

request the report No.2 (position report from the origin). 
 

int position;
ioctl(fildes,IRIOCRPOSITION,&position);

IRIOCRWINDOW : window report

request the report No.3 (window report). 
 

struct ir_window window;
ioctl(fildes,IRIOCRWINDOW,&window);

IRIOCLIGHT : concentration report

request the report No.4 (Concentration report). 
 

struct ir_light {
intil_ae;
intil_light;
};
 struct ir_light light;
ioctl(fildes,IRIOCRLIGHT,&light);

IRIOCOUTMODE : output mode report

request the report No.5 (output report). 
 

struct ir_seg outmode;
ioctl(fildes,IRIOCROUTMODE,&outmode);

IRIOCSCALE : magnification report

request the report No.6 (magnification report). 
 

struct ir_xy scale;
ioctl(fildes,IRIOCRSCALE,&scale);

IRIOCDATA : number of forwarding data report

request the report No.8 (number of forwarding data report). 
‘amount.x’ is the number of bytes for X axis, and ‘amount.y’ is the number of bytes for Y.
 

struct ir_xy amount;
ioctl(fildes,IRIOCRDATA,&amount);

IRIOCRSELECT : report selection

decide the contents for mode report and output mode report. 
 

int select;
ioctl(fildes,IRIOCRSELECT,&select);

 

FILES

/dev/irimage reader device file

SEE ALSO

Image Reader(NWP-534) Operation Manual

NEWS-OSRelease 3.3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026