...
Version | Author | Date | State | Description of Changes | ||
---|---|---|---|---|---|---|
0.1 | Toshan Lash | 02/10/2015 | Working Draft | Initial version. | ||
0.2 | Toshan Lash | 02/12/2015 | Working Draft | Updated features for further study information. | ||
0.3 | Toshan Lash |
|
| 02/23/2015 | Approved | Changes based on feedback and sample application changes. |
Acronyms
Acronym | Description |
---|---|
API | Application Programming Interface |
BFV | Boston Fax and Voice API |
SDK | Software Development Kit |
...
void t4TimerProcessEvent(BTLINE *lp, struct args_packet *args)
{
struct args_fax args_fax;
unsigned short t4TimerValue;
intunsigned t4Duration;
intunsigned t4Attempt;
// Check to see if the event received is from the fax facility and is the
// T4 adaptation information event.
if ((args->facility == MILL_FACILITY_FAX) &&
(args->cmd_verb == MILL_VERB_EVENT) &&
(args->cmd_specifier == FAX_T4_ADAPT_INFO_EVENT))
{
// Obtain the current T4 timer value, the T4 duration to receive
// a response or T4 time out and the T4 attempt.
BT_ZERO(args_fax);
BfvFaxT4TimerParams(lp, &args_fax);
t4TimerValue = args_fax.t4TimerValue;
t4Duration = args_fax.t4Duration;
t4Attempt = args_fax.t4Attempt;
printf("t4TimerProcessEvent T4TimerValue %d%u duration %d%u attempt %d%u\n",
args_fax.t4TimerValue,
args_fax.t4Duration,
args_fax.t4Attempt );
// Set the T4 timer value to a new value. For example, the following
// checks to see if the attempt just completed is 1 and if so it will set the
// T4 timer value to the existing T4 timer value plus 500 ms.
// End user can change the following to set the T4 timer value to a new
// value according to some algorithm determined by the end user
if (t4Attempt == 1)
{
BT_ZERO(args_fax);
args_fax.t4TimerValue = t4TimerValue + 500;
printf("t4TimerProcessEvent Set T4TimerValue %d%u\n",
args_fax.t4TimerValue );
BfvFaxT4TimerParams(lp, &args_fax);
}
}
}
...