The DF_IOTT structure contains fields describing the fax data for one fax document to be transmitted. Each structure describes one source for fax data: raw, TIFF/F or ASCII. A linked list or array of DF_IOTT structures (table) can be created to specify multiple fax documents for transmission using the fax send function, fx_sendfax( ). A pointer argument in the fax send function points to the DF_IOTT table.
The DF_IOTT table may contain entries specifying fax data of different widths, resolutions and encoding schemes. Before the fax data is transmitted, the validity of each DF_IOTT table entry is verified.
For complete reference information on all fields in the DF_IOTT structure, see Section 7.6. DF_IOTT -- Fax Transmit Data Description on page 109.
The following topics on DF_IOTT are discussed:
4.5.1. Declaring a Table of DF_IOTT EntriesThe following usage notes and cautions apply when you declare a table of DF_IOTT entries:
The io_type field of the last DF_IOTT table entry must contain an IO_EOT to identify it as the last table entry.
The fx_setiott( ) function can be used to initialize DF_IOTT structure values. For more information, see Chapter 9. Fax Library Function Reference.
4.5.2. Connecting DF_IOTT Table EntriesWhen sending more than one fax document in a single fx_send( ) operation, you must build a linked list or array of DF_IOTT structures (table).
This DF_IOTT table may represent a combination of data in MH or MMR encoding schemes, or in ASCII format. The valid encoding scheme or format of the stored files specified for transmission depends on the capability of the fax product.
Specify the link between DF_IOTT table entries using the io_type logical OR field as follows:
If neither IO_EOT nor IO_LINK is specified, the next entry is contiguous (next element in the array).
The fax library automatically builds the backward links for the DF_IOTT chain when fx_sendfax( ) is issued. The io_prevp field of the first DF_IOTT entry is set to NULL.
4.5.3. Sending Data from Device or MemoryUse the io_type field of the DF_IOTT structure to specify whether you are sending data from a device or from memory.
IO_MEM is only valid when io_datatype is set for raw data (DF_RAW) or ASCII (DF_ASCII).
4.5.4. Specifying File Storage FormatUse the io_datatype field of the DF_IOTT structure to specify the file storage format for transmission as follows:
4.5.5. Sending Raw FilesFax data stored as a raw file contains no information on the format of the fax data. When the raw data is sent, the width, resolution and encoding scheme for the stored raw fax data must be specified in the DF_IOTT structure.
If the width and resolution of the data in the raw file do not match the capabilities of the receiving station, automatic image scaling is provided.
Raw files negotiated for transfer in MH or MR line encoding scheme are sent with a fill order of Least Significant Bit (LSB) first; End of Line (EOL) sequences are not byte aligned.
Table 11. DF_IOTT Fields for Raw Files lists DF_IOTT fields used to send raw files:
Table 11. DF_IOTT Fields for Raw Files
Field |
Value or Description |
io_datatype |
DF_RAW |
io_width |
|
io_resln |
|
io_coding |
Encoding scheme for raw files: DF_MH for Modified Huffman and DF_MMR for Modified Modified Read. See Section 4.5.8. Specifying Encoding Scheme on page 52 for more information. |
io_offset |
The starting byte location in the file/memory for the data transfer. Setting io_offset to zero starts the transfer from the beginning of the file/memory. |
io_length |
The number of bytes to transfer. This field is used with the io_type value. |
io_type |
If io_type is set to IO_DEV and io_length is set to -1, data is transferred until the end of the file is reached. If io_type is set to IO_MEM, io_length indicates the exact number of bytes to transfer from the buffer. If io_type is set to IO_MEM, io_bufferp points to the buffer in memory containing the raw image data. |
4.5.6. Sending TIFF/F FilesThe DF_IOTT structure may be set to send all or part of a single or multi-page TIFF/F file.
The fax library defaults to sending a single TIFF/F page beginning at page zero. To transmit TIFF/F files with a base 1 page numbering scheme, use the FC_TFPGBASE channel parameter in fx_setparm( ).
To send a subset of a TIFF/F file, use the io_pgcount and io_firstpg fields; see Table 12. DF_IOTT Fields for TIFF/F Files.
The io_pgcount value specifies the number of pages to send, and the io_firstpg value specifies the first page number to send. If the value of io_firstpg is zero (default), the number of pages specified by io_pgcount is sent. For example, to send document pages 0, 1 and 2 of a TIFF/F file, set io_firstpg to 0, and io_pgcount to 3.
If the width and resolution of the data in the TIFF/F file do not match the capabilities of the receiving station, automatic image scaling is provided.
Table 12. DF_IOTT Fields for TIFF/F Files lists DF_IOTT fields used to send TIFF/F files.
Table 12. DF_IOTT Fields for TIFF/F Files
Field |
Value or Description |
io_datatype |
DF_TIFF |
io_firstpg |
The first page number to send. The first page in the file is referenced as page zero. |
io_pgcount |
The number of pages to send. If io_pgcount is -1 (default), all remaining pages in the file are sent. |
io_coding |
This field is ignored. The fax library reads the TIFF/F tags embedded in the file to determine the encoding scheme of the stored data. |
Handling Multi-Page TIFF/F FilesIn a multi-page TIFF/F file transmission, all pages preceding the final page are set to DFC_EOM (FC_SENDCONT parameter in fx_setparm( )). The last selected page of the specified TIFF/F file uses the Phase D continuation value set in io_phdcont (DF_IOTT structure).
To change the default intermediate page continuation value, set the FC_SENDCONT parameter to a different value or to DFC_AUTO. For more information, see Section 4.5.9. Setting Phase D Continuation Values (page 53) and fx_setparm( ) (page 281).
TroubleshootingTo ensure that TIFF/F files are sent successfully, the TIFF/F file must contain:
For a table of TIFF/F tags and values, see Appendix A. For information on error codes returned, see Appendix D.
4.5.7. Sending ASCII FilesASCII files are converted to a fax image at the time of fax transmission and sent at the width, resolution and other values as specified in DF_IOTT.
The fax image is encoded over the phone line in MH or in the encoding scheme specified by the FC_TXCODING parameter of fx_setparm( ).
Converted ASCII files negotiated for transfer in the MH or MR line encoding scheme are sent with a fill order of Least Significant Bit (LSB) first; End of Line (EOL) sequences are byte aligned.
Table 13. DF_IOTT Fields for ASCII Files lists DF_IOTT fields used to send ASCII files.
Table 13. DF_IOTT Fields for ASCII Files
Field |
Value or Description |
io_datatype |
DF_ASCII |
io_width |
|
io_resln |
|
io_offset |
Byte offset in ASCII file/memory to start reading the ASCII data. Setting io_offset to zero starts reading the ASCII data from the beginning of the file/memory. |
io_length |
Number of bytes of ASCII data to read, convert and send. This field is used with the io_type field. |
io_type |
If io_type is set to IO_DEV and io_length is set to -1, data is transferred until the end of the file is reached. If io_type is set to IO_MEM, io_length indicates the exact number of bytes of ASCII data to read from the buffer. This allows the application to select a portion of an ASCII file for transmission. If io_type is set to IO_MEM, io_bufferp points to the buffer in memory containing the ASCII data. |
io_datap |
A pointer to an optional DF_ASCIIDATA structure that contains parameters and values for the ASCII data. If this pointer is NULL, the DF_ASCIIDATA structure defaults are used. For information on this structure, see Chapter 7. Fax Data Structures. |
io_coding |
This field is ignored for ASCII file transfer. |
4.5.8. Specifying Encoding Scheme for Data TransmissionThe encoding scheme used in transmitting data over the phone line varies by product. For product support, see Section 2.4. Key Product Features on page 8. The negotiated encoding scheme is determined by the receiver's capability.
The io_coding field in the DF_IOTT structure specifies the transmission encoding scheme and is used only in sending raw files. The available values for io_coding are:
For TIFF/F and ASCII files, the io_coding field is ignored.
Some Dialogic fax products provide the option to specify the preferred line encoding scheme for fax transmission. This option uses the FC_TXCODING parameter in fx_setparm( ). For more information on FC_TXCODING, see Section 4.6.2. Specifying a Preferred Encoding Scheme for Transmission on page 60 and the fx_setparm( ) function reference on page 281.
The transmitting channel uses the FC_TXCODING value during Phase B negotiation with the remote receiver. The fax image data provided via the DF_IOTT structures is automatically converted to the negotiated line encoding scheme at the time of transmission. The final negotiated line encoding scheme for transmission depends on the receiver's capability.
To determine the negotiated line encoding scheme, call ATFX_CODING( ) after the negotiation of Phase B is completed.
4.5.9. Setting Phase D Continuation ValuesEach DF_IOTT table entry specifies a continuation value for Phase D (post-message procedure) of the T.30 protocol in the io_phdcont field.
The io_phdcont field defines the way in which a following DF_IOTT entry is connected to the current DF_IOTT entry. Based on the io_phdcont field value, a message is sent from the transmitter to the receiver at the end of the current DF_IOTT entry's fax data. By selecting the appropriate value, you can transmit more data from the next DF_IOTT entry or terminate the fax session.
The io_phdcont field can have one of the values listed in Table 14. Phase D Continuation Values.
Table 14. Phase D Continuation Values
HintsMore detail on each Phase D continuation value is provided next.
Automatic Phase D Messaging - DFC_AUTOTo enable automatic Phase D messaging, set the io_phdcont field in the DF_IOTT entry to DFC_AUTO.
By specifying DFC_AUTO for each DF_IOTT entry, Phase D messaging is simplified. The application does not have to determine the correct Phase D continuation value for each DF_IOTT entry; the Dialogic fax library does this automatically. The fax library uses DFC_EOM, DFC_MPS or DFC_EOP as the continuation value based on the width, resolution, and position of the DF_IOTT entry in the chain as well as the remote receiver's capability.
For example, if you specify DFC_AUTO for the last DF_IOTT entry in the chain, the fax library automatically issues an EOP after transmitting all files specified in the last DF_IOTT entry.
For fax data containing more than one image file per page (also known as sub-page addressing), you must use DFC_MPG. For more information, see Section 4.5.10. Merging Images from Different Sources or Sub-Page Addressing on page 57.
Merge Page - DFC_MPGTo concatenate data for the DF_IOTT entry directly following the current DF_IOTT entry to the same page, specify DFC_MPG as the Phase D continuation value. This concatenation is also known as sub-page addressing.
When you use DFC_MPG, the DFC_MPG entries in a chain are followed by a DF_IOTT entry that specifies DFC_AUTO or a Phase D continuation value (DFC_EOP, DFC_EOM or DFC_MPS) for the last entry of the multi-source fax page.
For more information on sub-page addressing, see Section 4.5.10. Merging Images from Different Sources or Sub-Page Addressing on page 57.
End of Procedure - DFC_EOPTo disconnect the fax call after Phase E is completed, specify DFC_EOP as the Phase D continuation value in the io_phdcont field for a DF_IOTT entry.
After Phase E, the line is still open and the application sets the channel on-hook, if necessary.
End of Message - DFC_EOMTo transmit more data in a different format, specify DFC_EOM as the Phase D continuation value in the io_phdcont field. This value allows you to:
When initiating a turnaround polling fax transmission, set the io_phdcont field to DFC_EOM for the last DF_IOTT entry. This allows the fax session to return to Phase B after the initial fax data transmission is completed. The caller application (transmitter) can then continue with the turnaround polling fax transmission by issuing the fx_rcvfax( ) or fx_rcvfax2( ) function to indicate a poll request; see Section 3.4.3. Turnaround Polling Fax Transmission on page 34.
The current width and resolution values for the fax session remain in effect until a Phase D continuation value of DFC_EOM is reached in a DF_IOTT entry.
If the width and/or resolution of the data described in the next DF_IOTT entry is different from the current entry, specify DFC_EOM in the current entry to renegotiate Phase B.
Multi-Page Signal - DFC_MPSTo transmit more data in the same format as the current page, use DFC_MPS as the Phase D continuation value in the io_phdcont field.
All fields of the next DF_IOTT entry should be set to transmit data of the same format (image width, resolution, and so on) as the current DF_IOTT entry's data.
When transmitting a multi-page TIFF/F file from a single DF_IOTT structure, the value specified in the io_phdcont field of the DF_IOTT structure is the Phase D continuation value after all the pages specified in that DF_IOTT structure are sent. The Phase D continuation value used between each page of the multi-page TIFF/F file is specified by the FC_SENDCONT parameter (see fx_setparm( )).
4.5.10. Merging Images from Different Sources or Sub-Page AddressingA single page of fax data can be formed from images stored in different sources. Each stored image is considered a sub-page.
To concatenate fax data described in the next DF_IOTT entry to the current DF_IOTT entry on the same page, specify DFC_MPG in the io_phdcont field.
For example, to create a page of fax data from three different files (TIFF/F, raw and ASCII), three DF_IOTT entries are required. For each of the first two DF_IOTT entries, set the io_phdcont field to DFC_MPG to concatenate the data to the following DF_IOTT entry's data. For the third DF_IOTT entry, specify DFC_AUTO or a Phase D continuation value (DFC_EOP, DFC_EOM or DFC_MPS) in the io_phdcont field for the last entry of the page.
The following rules and restrictions apply to sub-page addressing and the use of the DFC_MPG value.
DFC_MPG Usage
Resolution
The resolution for the fax data page is determined by the resolution specified for the first sub-page entry or by the resolution specified in the fx_sendfax( ) sndflag argument.
Width
Encoding schemes
ASCII sub-pages
If the DFC_MPG continuation value is not used properly, ATDV_LASTERR( ) returns an EFX_BADIOTT error code.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation