
Description | Example | Errors
Name: |
long ATFX_RESLN(dev) | |
Inputs: |
int dev |
fax channel device handle |
Returns: |
Vertical resolution of the transferred page if successful | |
|
AT_FAILURE if error | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
extended attribute | |
Mode: |
synchronous | |
|
||
The ATFX_RESLN( ) function returns the vertical resolution of the page that is sent or received. Valid values are:
DF_RESHI |
High vertical resolution (fine) - 196 lines or pels per inch |
DF_RESLO |
Low vertical resolution (coarse) - 98 lines or pels per inch |
|
|
Parameter |
Description |
|
dev |
Specifies the channel device handle for the fax channel obtained when the channel was opened. |
The data provided by this function is updated each time the fax transfer completes Phase D of the T.30 protocol.
To monitor the vertical resolution, you must enable Phase D events and issue ATFX_RESLN( ) when the TFX_PHASED event occurs. Note that since Phase D also occurs at the end of a send or receive when a Phase D event is not generated, you can also issue this function after a TFX_FAXSEND or TFX_FAXRECV event.
The final, vertical resolution value returned by ATFX_RESLN( ) at the end of a fax session remains available to the application until a new send or receive is initiated on that channel.
#include <stdio.h>
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
DF_IOTT iott[10];
int dev;
/* Handler for Phase D events. */
int phd_hdlr( );
main( )
{
/*
* Open the channel using fx_open( ) and obtain the Dialogic
* FAX device handle in dev.
*/
.
.
/*
* Install handler (phd_hdlr( )) using sr_enbhdlr( ) to service
* TFX_PHASED events.
*/
if (sr_enbhdlr(dev, TFX_PHASED, phd_hdlr) == -1) {
printf("Failed to install Phase D handler \n");
return;
}
/*
* Call fx_sendfax( ) in synchronous mode after setting
* up the DF_IOTT array. Set DF_PHASED bit in mode field
* to enable generation of Phase D events.
*/
if (fx_sendfax(dev, iott, EV_SYNC|DF_PHASED) == -1) {
printf("Error - %s (error code %d)\n",
ATDV_ERRMSGP(dev),ATDV_LASTERR(dev));
if (ATDV_LASTERR(dev)==EDX_SYSTEM) {
/* Perform system error processing */
}
}
/*
* Vertical resolution of the page just transferred is
* available at this point.
*/
printf("Page was transferred at vertical resolution: %ld\n",
ATFX_RESLN(dev));
.
.
}
/*
* Handler registered with SRL to handle TFX_PHASED events.
*/
int phd_hdlr( )
{
long phdrpy;
int dev = sr_getevtdev( );
/*
* Vertical resolution of the page just transferred is
* available at this point.
*/
printf("Page was transferred at vertical resolution: %ld\n",
ATFX_RESLN(dev));
.
.
return(0);
}
If one of the following conditions is present, this function fails and returns AT_FAILURE:
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation