
The Bfv API Functions
Hereafter each of the line states is referred to by the descriptive part of its name only (for example, LINE_STATE_IDLE is referred to as IDLE).
The current state of the line is stored in the BTLINE structure. A pointer to this structure is passed as an argument to nearly all Bfv API entry points and is provided to the application by the BfvLineAttach function.
A number of functions and interrupts serve as inputs to the BTLINE structure and affect the transition to different line states. Other functions check the current line state.
Some functions conditionally branch to other points in the code, and some prevent inappropriate action from occurring, for example, frequent checking for CONNECTED before attempting to transmit data.
The following is a partial list of the functions and interrupts and the line state they set:
FUNCTION | LINE STATE |
BfvLineAnswer | Sets the state to CONNECTED. |
BfvLineAttach | Initializes the state to IDLE. |
BfvLineOriginateCall | Sets the state to CONNECTED or OFF_HOOK |
| depending on the results from call |
| progress monitoring. |
BfvLineReset | Resets the state to IDLE. |
BfvLineTerminateCall | Sets the state to IDLE. |
INTERRUPTS | LINE STATE |
Answer tone detect | Sets the state to CONNECTED. |
Direction change | Sets the state to TURNAROUND. |
Disconnect | Sets the state to IDLE. |
Received FSK data | Sets the state to AWAIT_TRAINING. |
Ring detect | Sets the state to RINGING. |
Training | Sets the state to FAX_MODE. |
November 2009 | 29 |