Initialization and Shutdown

This section describes the "housekeeping" functions used to initialize and shutdown a Voicetronix card. The initialization function vpb_open() must be called before any other API functions will work:

Example 1. Initialization and Shutdown

void main() {
        handle = vpb_open(1, 2);
        vpb_close(handle);
}

This program demonstrates initialization and shutdown of a single channel, (number 2), on the first board in the system. Each channel (or port) of the card has an associated number. On the OpenLine4 card, channel 1 is the port furthest from the motherboard. Port 4 is closest to the motherboard.

The vpb_open() function returns a handle to the open channel. This handle then provides a reference to all other operations with this channel. A call to vpb_open() is required for each channel that is to be used. If a channel is not opened, then no operations can be performed with that channel.