CA_TDD_Create_Segment()

Purpose

Convert text into TDD characters and store them as a voice segment.

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_Create_Segment(
 SEGMENT_PARM_ST *segment_parm_sp,
 char  *string
);

Description

This subroutine converts the specified ASCII text string into equivalent TDD characters. The characters are stored as a voice segment identified by the specified segment identifier, in the specified voice directory.

Parameters

segment_parm_sp
A pointer to a SEGMENT_PARM_ST input structure, filled in as described in SEGMENT_PARM_ST. Set language to the language code you are using for the TDD language. Set compression_type to UNCOMPRESSED_VOICE.
string
Contains the text to be converted into TDD characters. The text must consist of valid TDD characters shown below. The maximum number of characters allowed in this string is MAX_SEGMENT_TEXT_LENGTH.
Valid TDD Characters
A TDD has a limited character set consisting of:

the space character

the uppercase alphabet

the digits 0 through 9

- (hyphen)

: (colon)

? (question mark)

$ (dollar)

( (left parenthesis)

+ (plus)

' (single quote)

" (double quote)

. (period)

, (comma)

) (right parenthesis)

/ (slash)

! (exclamation mark)

= (equals)

; (semicolon)

Lowercase alphabetic characters are automatically folded to uppercase.

Your application must send only valid characters to a TDD. The TDD also supports the following control codes :

BACKSPACE

<BS>

LINEFEED

<LF>

CARRIAGE RETURN

<CR>

It is recommended that your application inserts a <CR><LF> sequence after at most 68 printable characters, to help the TDD printer to display the messages properly.

Return codes

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

Error names

CA_ACCESS_NOBUFS
CA_CHECK_LANG_FAILED
CA_INV_ADDR
CA_INV_SEGMENT_ID
CA_INV_SEGMENT_TEXT
CA_INV_TDD_CHARS
CA_INV_VOICE_FORMAT
CA_INV_VOICE_DIR
CA_LANG_NOT_FOUND
CA_MALLOC_FAILED
CA_NO_MSG_RECV
CA_NOT_INIT
CA_REQ_FAILED
CA_SGMT_TEXT_OPERATION_FAILED
CA_TERMINATING

Related information

CA_Create_Segment(), CA_TDD_Get_String(), and CA_TDD_Play_String().