CA_TDD_Get_String()

Purpose

Interpret characters being typed at a TDD.

For information on TDD see the Blueworx Voice Response for AIX: Designing and Managing State Table Applications information.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

TDD library (libtdd.a)

C Syntax

#include “CA_header.h”
#include “CA_access_db.h”
int CA_TDD_Get_String (
 CHANNEL_INFO_ST   *channel_info_sp,
 char   *string
 int   wait_flag
);

Description

This subroutine reads the signals being received on the specified channel, and converts them to equivalent ASCII characters. It is similar to CA_Record_Voice_Stream(), but provides a string as output instead of digitized voice data.

If the wait_flag is set to CA_NOWAIT, the subroutine returns immediately with any characters received from the TDD, up to the first 72 characters or the first linefeed <LF> character.

If the wait_flag is set to CA_WAIT, the subroutine does not return until a linefeed character is received, or a least 72 characters have been received, or an end-of-data flag is encountered (CA_END_OF_DATA_REACHED).

Parameters

channel_info_sp
A pointer to a CHANNEL_INFO_ST structure, returned from a previous CA_Open_Channel(), filled in as described in CHANNEL_INFO_ST.
string
On return, contains an ASCII representation of the characters typed at the TDD keyboard. These characters will all be from the set of valid TDD characters listed in Valid TDD Characters. Any backspace characters typed by the TDD users are honored before the string is returned.

This string should be at least 80 characters long; if it is less, a trap or memory violation or corruption may occur.

wait_flag
If CA_WAIT is set, the subroutine may suspend execution until the required data is received, or recording has stopped on the channel. If CA_NOWAIT is set, the subroutine returns immediately with any data available.

Return codes

0
Successful
-1
Unsuccessful (CA_errno is set to an error code that indicates the error)

Error names

CA_CHANNEL_NOT_OPEN
CA_END_OF_DATA_REACHED
CA_FUNC_FAILED
CA_INV_ADDR
CA_INV_CHANNEL
CA_INV_VOICE_FORMAT
CA_NOT_CHANNEL_OWNER
CA_NOT_INIT
CA_TERMINATING

Related information

CA_Record_Voice_Stream(), CA_Open_Channel(), and CA_Close_Channel().