Developing a Fax Application

BT_ZERO(args_t30);

args_t30.bit_rate = BITRATE_14400; args_t30.scan_time = SCANTIME_0; BfvFaxT30Params(lp,&args_t30);

Configures the channel's maximum transmission rate. This function is optional.

BT_ZERO(args_page);

args_page.top_margin = 0; args_page.bottom_margin = 0; args_page.length = 1143; args_page.ascii_pad = 1; args_page.image_pad = 0; args_page.image_break = 0; args_page.image_margin = 0; BfvFaxPageParams(lp,&args_page);

Sets the page parameters: no top or bottom margins, a page length of 1143 (normal) G3 lines, no padding of short ASCII pages, no padding of short images, no breaking of images, and no margins for images.

BT_ZERO(args_fax);

args_fax.resolution = RES_200H_200V; args_fax.width = WIDTH_A4; BfvFaxBeginSendRaw(lp, &args_fax);

Begins the handshaking procedure and indicates that the first page is in fine resolution and has A4 width.

BfvFaxGetRemoteInfo(lp, &args_fax);

Waits for the called machine to send its ID and capabilities.

BfvFaxWaitForTraining(lp, &args_fax);

Waits for the completion of the Phase B handshaking procedure.

BT_ZERO(args_strip); args_strip.fmt = DATA_G3; args_strip.resolution = RES_200H_100V; args_strip.width = WIDTH_A4; BfvFaxStripParams(lp,&args_strip);

Sets the G3 strip parameters for the G3 strip ltrhd.g3.

BT_ZERO(args_fax);

args_fax.fname = "ltrhd.g3"; args_fax.fmt = DATA_G3; BfvFaxSendFile(lp, &args_fax);

Sends the G3 letterhead data file ltrhd.g3 to the driver.

November 2009

71

Page 71
Image 71
Dialogic 6.2 manual Sets the G3 strip parameters for the G3 strip ltrhd.g3