
Description | Example | Errors
Name: |
int gl_routerxtx (int bddev, int chan, int rxslot, int txslot) | |
Inputs: |
int bddev |
|
|
int chan |
|
|
int rxslot |
|
|
int txslot |
|
Returns: |
0 |
|
|
-1 |
|
Includes: |
gfpeb.h |
|
The gl_routerxtx( ) function connects and disconnects fax channels to transmit and receive PEB timeslots.
The gl_routerxtx( ) function establishes a connection between a logical fax channel and a pair of PEB timeslots. The transmit and receive timeslots are selected independently. Either or both timeslots can be disconnected. Either or both timeslots can be left unchanged.
If gl_routerxtx( ) is being used to establish a connection and the fax channel is already connected to a PEB timeslot, the existing connection will be removed before the specified connection is established.
If gl_routerxtx( ) is being used to remove a connection and no connection currently exists between the fax channel and a PEB timeslot gl_routerxtx( ) will return an indication of success.
#include "gfpeb.h" int faxchan, faxchan2, txslot, rxslot, status; /* disconnect faxchan from transmit and
receive timeslots from PEB */
txslot = rxslot = -1; faxchan = 1;
faxchan = 2; status = gl_routerxtx(-1, faxchan, rxslot,
txslot);
if (status)
{ fprintf(stderr, "gl_routerxtx( ) disconnect" " failed: %d\n", status); return (status); } /* connect faxchan transmit to timeslot 0 on PEB */
txslot = 0; /* connect faxchan receive to timeslot 1 on PEB */
rxslot = 1; status = gl_routerxtx(-1, faxchan, rxslot,
txslot);
if (status)
{
fprintf(stderr, "gl_routerxtx( ) connect failed: %d\n", status);
return (status);
}
/* To full-duplex connect faxchan with faxchan2 (e.g. for testing purposes) perform another gl_routerxtx( ) for faxchan2 with the txslot and rxslot parameters reversed. */
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation