8.2 Interactive Test Program
(Page 3 of 12 in this chapter)
Name:
aditest
Purpose:
Demonstrates AG Access functions executing in asynchronous mode. The
aditest
is used to:
Verify proper installation and operation of AG Access
Allow the user to experiment with AG Access and observe its dynamics
Expose working examples of AG Access functions
Usage:
aditest [options]
where options are:
Option
Description
-?
Help
-b n
Specifies the AG board number <n>. Default=0.
-s n:m
Specifies the MVIP stream and timeslot for the first channel. Default=0:0
-p protocol
Specifies the protocol to run. Default=nocc.
-l
Shows low-level events.
Highlights:
All AG Access functions except voice play and record are featured using the asynchronous buffer transfer methods (
adiPlayAsync
,
adiRecordAsync
). These functions are featured in
playrec
. Furthermore, the board configuration functions (
adiGetBoardInfo
,
adiGetBoardSlots
) are featured in the
brdinfo
demo.
The stop event fetch (
SE
), get one event (
GE
), and continue event fetch (
CE
) commands allow you to "single step" with respect to issuing commands and retrieving events. These commands can be used to answer questions relating to state/event combinations.
Description:
The
aditest
is a menu-driven program. Enter one- and two-letter mnemonics to execute AG Access commands. Some commands will prompt for more information such as frequencies and amplitudes for tone generators.
You can enter commands while asynchronous functions execute. This allows you to execute multiple asynchronous functions concurrently or to stop functions. For example, you can run a tone detector (
ET
) and record voice (
RF
) simultaneously. Any of these functions can be aborted by entering the respective "stop" command (
DT
and
RS
for tone and record).
To experiment with "output" and "input" functions simultaneously, execute two instances of
aditest
and configure the MVIP bus such that the two AG Access ports feed each other. For example, to interactively experiment with tone generation and detection, start a tone detector in the first
aditest
instance and a tone generator in the second
aditest
instance.
Procedure:
The following assumes that you are testing on an AG-8 DID with a 2500-type telephone connected to one of the lines.
Begin execution of
aditest
. Ensure you specify the proper AG board and MVIP stream.
A menu of one- and two-letter commands is presented to you. Take a moment to scan the menu and see which functions are available and their general location on the menu.
Enter the
OP
command to open a port. You should see
ADIEVN_OPENPORT_DONE
displayed on your terminal.
Enter the
SP
command to start a protocol. Select a protocol appropriate for the functions you wish to test. You should see
ADIEVN_STARTPROTOCOL_DONE
displayed on your terminal. The port is now ready to accept telephony functions.
Enter commands with which you wish to experiment.
You can select a new protocol by first stopping the active protocol (
UP
command) and then entering the
SP
command again. Any functions that are active when you stop the protocol will terminate and you will see
ADIEVN_function_DONE
printed on the monitor for each active function.
When finished, close the port by entering the
CP
command.
Note:
Much of the software in
aditest
is for retrieving commands from the keyboard and executing them. The demo functions of primary interest are:
PerformFunc
: Executes the keyboard commands and initiates AG Access functions.
WaitForAnyEvent
: OS-specific asynchronous I/O wait. Some implementations poll the keyboard and then poll the AG driver.
MyPlayAccess
: Voice play callback.
MyRecAccess
: Voice record callback.
(Page 3 of 12 in this chapter)