Appendix II: Task Controller and Task Processes (1)
CCITT(FAX)
NAME
ccitt - conversion between vector and CCITT T4 format
SYNOPSIS
ccitt() - a MOS task
command string (task name is defined as ccitt):
ccitt"<function>
DESCRIPTION
This routine operates as a MOS pipe task to convert the vec-tors to CCITT T4 format or inversely.
The parameter function specifies what the task is to do.
value function
1c one-dimensional compression
1d one-dimensional decompression
2c[<k>] two-dimensional compression
2d two-dimensional decompression
Note k is the maximun number of lines to be coded two- dimensionally before a one-dimensionally coded line is in-serted. If k is omitted, the default value 2 is adopted.
SEE ALSO
vector(fax), t4(fax), fitter(fax)
CHECK(FAX)
NAME
check - check the validity of a vector file.
SYNOPSIS
check() - a MOS task
command string (the task name is defined as check):
check"<function>,<width>,<height>,[<from>,<to>]
DESCRIPTION
This routine operates as a MOS pipe task checking the vali-dity of the input vector file.
The number of lines to be checked is specified by the param-eter height. If the height of the image is less than the parameter, the actual height is printed. Thus, one can set the parameter height to a big number in order to count the number of lines of the input image.
The run lengths in each of these lines are accumulated and the sum is compared with the parameter width.
These are the basic functions which are performed whenever the task is invoked. However, there are several options one can choose by setting the one-character parameter function.
value function
'n' basic function only
'c' print the count of each line
'l' print all lines
's' print the lines in the interval
specified by parameter from and to
DIAGNOSTICS
A bad line will be reported and it will cause the job abort-ed.
SEE ALSO
vector(fax), getl(fax), fitter(fax)
CHOP(FAX)
NAME
chop - extract a designated rectangular area from an image
SYNOPSIS
chop() - a MOS task
command string (task name is defined as chop):
chop"<x0>,<y0>,<x1>,<y1>
DESCRIPTION
This routine operates as a MOS pipe task extracting a desig-nated rectangular area from an input image. Input and out-put are image data files in the form of vectors.
The following diagram shows the coordinate system being used. Note that the lengths are measured in number of pels.
(0, 0) width X
+-------------------------+---->
| |
| |
| (x0, y0) |
| +---------+ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| +---------+ |
| (x1, y1) |
| |
| |
| |
| |
height +-------------------------+
|
|
Y V
As can be seen in the diagram, the rectangular area to be extracted is specified by the parameters x0, x1, y0, y1, which are decimal strings.
BUGS
One has to make sure that
0 < x0 < width
0 < y0 < height
0 < x1 < width
0 < y1 < height
SEE ALSO
vector(fax), getl(fax), putl(fax), fitter(fax)
CLEAN(FAX)
NAME
clean - clean an image.
SYNOPSIS
clean() - a MOS task
command string (task name is defined as clean):
clean"<width>,<height>
DESCRIPTION
This routine operates as a MOS pipe task cleaning an image by means of mask scanning. Input and output are image data files in the form of vectors.
The width and height should be given as the parameters.
SEE ALSO
vector(fax), getl(fax), putl(fax), fitter(fax)
DECOMP(FAX)
NAME
decomp - decompress DACOM blocks
SYNOPSIS
decomp() - a MOS task
command string (task name is defined as decomp):
decomp
DESCRIPTION
This task takes DACOM blocks from the Clean and Simple in-terface, and decompresses them into vector format. Then it writes the vectors to the Clean and Simple interface.
SEE ALSO
dacom(dev), vector(fax), fitter(fax)
FAX(FAX)
NAME
fax - interface process for DACOM facsimile machine
SYNOPSIS
fax() - a MOS task
command string (task name is defined as fax):
fax"<function>
DESCRIPTION
This task uses the Clean and Simple interface to read or write facsimile image data.
The one character parameter function specifies whether the data is to be read or written. Character w is for writing. In this case, 74 byte DACOM blocks contaning correct CRC fields are expected. On the other hand, character r is for reading. In this case, a document is read on the facsimile machine, the DACOM blocks being created.
SEE ALSO
dacom(dev), fitter(fax)
FITTER(FAX)
NAME
fitter - fit processes together to form a data pipe
SYNOPSIS
fitter() - the MOS task controller
DESCRIPTION
According to the command string typed on the console, fitter links the specified processes together to form a task chain. The name of the processes is the name given in the PCB. The processes must communicate using the C+S interface. Only one C+S interface is opened per process - data is pushed in with a cswrite and pulled out with a csread. The fitter does not inspect the data in any way but merely passes it from one process to another.
The format of command string is:
A | B | C.
The fitter takes data from the process called A, write it to the process called B, reads data from the process B and write that data to the process C. Note that all middle processes are both read and written, while the first one in the list is only read from and the last in the list is only written to.
A double quote is used as the separator between the task name and the open parameter string, e.g.
A"500 | B"n,xyz | C,
where the strings '500' and 'n,xyz' are the open parameter stings for tasks A and B, respectively. The parameter stirng is passed to the corresponding task routine when the csopen call returns.
DIAGNOSTICS
The command string containing undefined task will be reject-ed.
SEE ALSO
csinit(fax), csopen(fax), csread(fax), cswrite(fax)