# Interactive test program: cditest

#### Name

cditest

#### Purpose

Demonstrates CDI service functions executing in asynchronous mode. cditest is used to:

- Verify proper installation and operation of the CDI service.

- Expose working examples of Natural Access and CDI service functions.

#### Usage

cditest [options]

where options are:

Option | Description | Default
--- | --- | ---
-b n | Board number n. | 0
-s [strm:]slot | DSP [stream] and timeslot. | 4:0
-? | Help |

#### Featured functions

Natural Access system functions and CDI service functions are featured.

#### Description

cditest is a menu-driven interactive program. Enter one- and two-letter commands to execute Natural Access and CDI service commands.

cditest operates only if default switch connections are nailed up on the board (SwitchConnections=Yes, or SwitchConnections=Auto and Clocking.HBus.ClockMode=STANDALONE, or the connections are made in another way).

#### Procedure

The following procedure assumes that you are testing on a CX 2000C board with an external power supply and an attached telephone.

To run cditest:

1. Navigate to the demonstration program directory:

Operating system | Path
--- | ---
Windows | nms\ctaccess\demos\cditest
UNIX | opt/nms/ctaccess/demos/cditest

2. Start cditest by entering the following at a command prompt:

cditest -b n -s [stream:]slot

Where n, stream and slot are the number and PCI stream and slot of the CX board. For example, to open port 01 on board 0, enter:

ditest -b0 -s4:0

A menu of commands is displayed.

3. Enter OP to create a context and open the CDI service.
   CTAEVN_OPEN_SERVICES_DONE is displayed on your screen.

4. Enter any additional commands that you want to use.

For example, the ET command enables the battery. EB enables the bit detector.

The stop event fetch (SE), get one event (GE), and continue event fetch (CE) commands allow you to step through board operations one at a time, retrieving events with each step. You can use these commands to answer questions you may have relating to state/event combinations.