CAS Documentation Version 1.3 update * CAS Main Page ---------------------------------------------------------------------------- DCA/Intel Communicating Applications Specification Version 1.3 ADDENDUM Note: This document is NOT a complete CAS specification and is intended to be used ONLY in conjunction with the CAS 1.2 documentation that can be downloaded from the BBS. Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994. All rights reserved. Digital Communications Associates, Inc. 1000 Alderman Drive Alpharetta, GA 30201-4199 Intel Corporation 5200 N.E. Elam Young Pkwy. Hillsboro, OR 97124-6497 This specification was jointly developed by Digital Communications Associates, Incorporated and Intel Corporation. Although it has been released into the public domain and is not confidential or proprietary, the specification is still the copyright and property of Digital Communications Associates, Incorporated and Intel Corporation. Disclaimer of Warranty DIGITAL COMMUNICATIONS ASSOCIATES, INCORPORATED (DCA) AND INTEL CORPORATION EXCLUDE ANY AND ALL IMPLIED WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. NEITHER DCA NOR INTEL MAKE ANY WARRANTY OF REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS SPECIFICATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. NEITHER DCA NOR INTEL SHALL HAVE ANY LIABILITY FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RESULTING FROM THE USE OR MODIFICATION OF THIS SPECIFICATION. This specification uses the following trademarks: The Intel logo is a registered trademark of Intel Corporation. DCA and Digital Communications Associates are registered trademarks of Digital Communications Associates, Incorporated. Document summary: The following new functions and features were introduced in CAS version 1.3: NEW FUNCTIONS: a) CAS function 19h : See Get Queue Information b) CAS function 1Ah : See Set Control Record Field NEW FEATURES: a) Custom Cover Pages : See Custom Cover Pages b) TIFF file support extensions : See TIFF file support c) Event specific Sender Id (CSID) : See Setting CSID CHANGES / ENHANCEMENTS TO EXISTING CAS FUNCTIONS: a) CAS function 7h (Open File) : See under TIFF file support b) CAS function 14h (Move File) : See under TIFF file support c) CAS function 8h (Delete a File) : See under Custom Cover Pages CHANGES TO EXISTING STRUCTURES: a) Extended Data Block : See EDB changes b) Group File : See GCF Record changes c) (Task) Control File : See TCF Record changes d) File Transfer Record: : See FTR Record changes e) Error Codes: : See New Error Codes ABBREVIATIONS: The following abbreviations have been used in the text of this document: a) TCF: Task Control File; same as Control File b) GCF: Group Control File; same as Group File c) FTR: File Transfer Record d) EDB: Extended Data Block *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= * * NEW CAS FUNCTIONS * *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Get Queue Information: CAS FUNCTION 19H + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Description: The Get Queue Information function (19H) returns information on up to 10 events in the queue. Input: AH = Multiplex number AL = 19H BH = which events 1 = 1st 10 2 = 2nd 10 ... BL = RESERVED CX = (bit fields, set to 0 or 1 depending) bit description 0 Incoming Events (Receives) (0=no, 1=yes) 1 Outgoing Events (Sends) (0=no, 1=yes) 2 RESERVED 3 Direction (0 = forward, 1 = backward) 4 Events that are "Complete" (0 = no, 1 = yes) 5 Events that are "Waiting" (0 = no, 1 = yes) 6 Events that resulted in an error (0 = no, 1 = yes) 7 Events that were aborted (0 = no, 1 = yes) 8 Read events (0 = no, 1 = yes) 9 Unread events (0 = no, 1 = yes) 10-15 RESERVED DS:DX points to a 512-byte storage area Return: AX = 0 if successful, the number of entries filled in (up to 10). If unsuccessful, a negative error code. Error code 204, "No more events", is returned for a request that could not be even partially filled. This function fills the storage area pointed to by DS:DX with an array of 10 of the following information: Offset Size Description 0 2 Event handle 2 1 Event type 3 1 Transfer type 4 2 Status 6 2 Time (DOS file time format) 8 2 Date (DOS file date format) 10 32 Destination/Sender (depending on event type) 42 4 Number of pages or files 46 1 Duration (seconds portion) 47 1 Duration (minutes portion) 48 1 Duration (hours portion) 49 1 Read/Unread 50 1 RESERVED Offset 49 (Read/Unread) will come from offset 216 in the Task Control File which means "Cover page read flag." This field is settable by using CAS function 17h. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Set Control Record Field: CAS FUNCTION 1Ah + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Background: The Application Tag field at offset 59 in the TCF henceforth called the "Application Tag or Subject field" may be used by applications as the subject of an event. Applications may set this field in submitted TCFs to specify the subject of a file transfer, and this value will be preserved in the TCF in the receivers queue. Applications may set the value of this field in received events to allow a user to designate a subject for incoming faxes, or change the subject of received file transfers. Description: Sets the Application tag, Phone Number, or From field of an event. Strings which are too long are truncated. No new error conditions are introduced. Input: AH => Multiplex Number AL => New function number BX => Event handle. CH => Queue Number CL => 0 - Application Tag 1 - Phone Number 2 - From Name DS:DX => Pointer to new value as an ASCIIZ string of maximum length: if CL = 0 64 chars including \0. if CL = 1 47 chars including \0. if CL = 2 32 chars including \0. Return: AX = 0 if successful, negative CAS error code otherwise *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= * * CUSTOM COVER PAGES * *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Background: The Custom Cover Page feature allows the specification of an individual Cover Page for each receipient in a Group Send FAX event. When a group event is processed, individual events are created and put in the log queue as they are completed. In these individual events, the first FTR will be the cover page file specified as the Custom Cover Page file for that individual. The "number of files" and number of files/pages transmitted fields in the TCF will be increased to reflect that this file was sent as if it were simply the first file in the FTR list. However, the cover page flag is still set to "2" for this event, so applications know that this was indeed a custom cover. As with other events, the custom cover page is owned by the event, will always be deleted with the event. Thus, the cover page files refenced in the group record of a pending group event, or the file referenced in the first FTR of an individual or logged sub-event will be deleted with the event. Note: A Custom Cover Page may contain multiple pages. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + TCF Record Changes: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Offset Length Description 137 1 Cover Page Flag : 0 => No Cover Page 1 => Send CAS Cover Page 2 => Send Custom Cover Page ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + GCF Record Changes: + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ These fields are added to the structure: Offset Length Description 84 1 attempts so far to send this individual event 85 1 Custom Cover File Type (same values as in FTR) 86 1 Pages in Cover page (application need not set) 87 13 Custom Cover file name [no pathname is given for this file; it must reside in the same directory as the Group Control File itself]. This file, like any other, will be paged by the CAS implementation, and so, it may result in more than one physical page being sent. 100 28 Reserved. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Location and Nature of Custom Cover Page Files: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The Custom Cover Page files must reside in the same directory as the Control File itself. The Custom Cover Page file can be of any type that is supported by the CAS implementation and may consist of multiple pages. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + Custom Cover Page and File Transfers: + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + The CAS 1.3 specification does not extend Custom Cover Page support to File Transfers. This means that the CAS server will ignore the Custom Cover Page flag in a Group Send Event if the Transfer Mode at offset 1 in the Control File is set to File Transfer (Code 2). This is equivalent to doing a Group File Transfer with No Cover Page (Byte at offset 137 in the Control File set to 0). ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + Custom Cover Page and Logo Files: + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + The PCX Logo File field at offset 303 in the Control File (which is normally a part of a default cover page) will be ignored if the Cover Page Flag in the Control File is set to Custom Cover Page. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Custom Cover Page and Single Send Events: + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ CAS Applications which submit Single Send Events (that is, either a Send (code 0) or a Polled Send (code 3) at offset 0 in the TCF) can set the Cover Page flag at offset 137 in the Task Control File (TCF) to Custom Cover Page (code 2) to indicate that the first File Transfer Record (FTR) is the Cover Page for that event. In this case, no special processing is involved and the CAS server will treat this like any other Single Send Event. In other words, the CAS server will interpret a Custom Cover Page for Single Send Events as being equivalent to No Cover Page (code 0). +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Custom Cover Page and CAS Function 08h (Delete a file): + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Enhancements to CAS Function 08: CAS Function 08h (Delete a File) is extended to delete all the files associated with a Custom Cover Page if the specified event handle (in BX register) corresponds to a Group Event in the Task Queue (register DL = 0) with Custom Cover Page (Cover Page flag at offset 137 set to 2) irrespective of the value of the delete files flag (offset 140). This means that CAS function 08h will delete all Custom Cover Page files even if the delete files flag in the Control File is set to 0 ("Never Delete Files") *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= * * TIFF FILE SUPPORT * *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= EDB Changes: Offset Length Description 150 4 Supported Transfer Types: A 32-bit mask of the transfer types supported by this CAS server. The low order bit of the first byte represents transfer type 0 (as defined by offset 1 in the task control file) , next bit is type 1, etc. For each bit: 1 = this transfer type is supported 0 = this transfer type is not supported So: bit 0 of Byte 150 = 1 if 200x200 fax mode is supported bit 1 of Byte 150 = 1 if 100x200 fax mode is supported bit 2 of Byte 150 = 1 if file transfer mode is supported 154 4 Supported Event Types: A 32-bit mask of the event types supported by this CAS server. The low order bit of the first byte represents event type 0 (as defined by offset 1 in the task control file) , next bit is type 1, etc. For each bit: 1 = this event type is supported 0 = this event type is not supported So: bit 0 of Byte 153 = 1 if ASCII is supported bit 1 of Byte 153 = 1 if PCX is supported bit 2 of Byte 153 = 1 if DCX is supported bit 3 of Byte 153 = 1 if TIFF 1D is supported bit 4 of Byte 153 = 1 if TIFF 2D is supported bit 0 of Byte 154 = 1 if Send is supported bit 1 of Byte 154 = 1 if Receive is supported bit 2 of Byte 154 = 1 if Polled Send is supported bit 3 of Byte 154 = 1 if Polled Receive is supported bit 4 of Byte 154 = 1 if Group Send is supported bit 5 of Byte 154 = 1 if Group Polled Receive supported 158 4 Supported File Types: A 32-bit mask of the file types that this CAS server can accept to send. The low order bit of the first byte represents file type 0 (as defined by offset 0 in the file transfer record), next bit is type 1, etc. For each bit: 1 = this file type is supported 0 = this file type is not supported 162 94 Reserved Note: Even though these bits were all zero in early versions of CAS, applications should obviously still assume that earlier CAS version could send ASCII, PCX, and DCX. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + FTR Record Changes: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The file type byte at offset 0 in the FTR can be set to any of the following values: File Type: 0 => ASCII 1 => PCX 2 => DCX 3 => TIFF (1D) 4 => TIFF (2D) For sending, applications can set FTR file types to these values to submit files to send in these new formats. For received files, the CAS implementation will set the file type field to reflect the type of a stored received file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + Changes to CAS Functions 07 and 14h: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ CAS functions open (07H) and move (14H) are enhanced as follows: For Functions 07 and 14 : low order 15 bits of CX => Receive file number high order bit of CX : 0=> open or move in DCX format 1=> open or move in native format Native format means whatever format the file is currently stored in. Applications can determine the current format by examining the header of the file, or from the value in the file type field in the FTR. *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= * * CAS TIFF FILE FORMAT * *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= This section describes the Tiff Class F standard for the CAS TIFF format. 0.1. Normal Tiff file layout All Class F Tiff files have the following layout: * Tiff Header * Tiff Page Header (IFD) * Encoded Page Data * Tiff Page Header (IFD) * Encoded Page Data * Tiff Page Header (IFD) * Encoded Page Data The Tiff Header is always the first 8 bytes in a Tiff file. The last four characters specify the offset of the first page header (IFD) in the file. Each IFD, in turn, points to the next IFD with the exception of the last which contains a NULL pointer. This pointer is always the last four bytes in an IFD. The format of the encoded page data is described by the corresponding page header. For example, Casmodem now saves in T.4 so the page headers specify T.4 1D or 2D encoding with byte aligned EOL's (Class F). 0.2. CAS native Tiff file format IFD's 0.2.1. File Layout: BOF Tiff Header------------> 1st IFD-------> 2nd IFD-----> ....--->Last IFD--> NULL Resolution Info Encoded Page Data Encoded Page Data Encoded Data CAS Extra Data EOF This is an exact replica of the standard Tiff file with the exception that there is extra, non-Tiff data between the Tiff Header and the first IFD. Since the Tiff Standard specifies that all locations, except for the first byte in the file, are specified by pointers within header blocks, extra data can be placed between the header and the first IFD or between Page Data and a following IFD. This extra data space is used to store information about the resolution of the document and any information that a document management system like CAS needs to maintain within the image file. The CAS extra data is present only in TIFF files created by CAS; it is not required for submitted TIFF images. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + HEADER TAGS + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The following is a suggested list of Tags, or information descriptors, for the IFDs: Tag Value Meaning NewSubfileType 2 Multipage document ImageWidth 1728 Horiz. pixel count ImageLength varies Vert. pixel count BitsPerSample 1 1 bit = 1 pixel Compression 3 Group 3 Fax Photometric 0 White is zero FillOrder 2 LSBit first StripOffsets varies Points to the first byte of page data. Only 1 strip per page Orientation 1 Standard orientation SamplesPerPixel 1 Bilevel image RowsPerStrip same as Image Length Only 1 strip per page StripByteCounts varies Total amount of page image data Xresolution 204 # of pixels per ResUnit Yresolution 98 or 196 # of pixels per ResUnit T4Options 4 or 1D encoding, always compressed, Byte aligned EOLS 5 2D encoding, always compressed, Byte aligned EOLs T6Options 0 T6 not used (due to compression tag value of 3) ResolutionUnit 2 Inches PageNumber varies Current page number and total number of pages in document *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= * * SETTING CSID FOR INDIVIDUAL EVENTS * *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= If the "phone number" field of a submitted TCF contains a semicolon, all characters after the semicolon are used as the CSID for that transmission. After the event is complete, the default CSID is restored. If the "phone number" field of a submitted TCF contains a colon, the colon and all characters after it are used as the CSID for that transmission. *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= * * NEW ERROR CODES * *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= 020DH: Resident manager busy 028CH: File type not supported by this CAS implementation 028DH: Custom Cover Page File not found 0430H: Irrecoverable data error