Thu May 24 14:32:00 2007

Asterisk developer's documentation


tdd.h File Reference

TTY/TDD Generation support. More...

Go to the source code of this file.

Defines

#define TDD_BYTES_PER_CHAR   2700

Typedefs

typedef tdd_state TDDSTATE

Functions

int ast_tdd_gen_ecdisa (unsigned char *outbuf, int len)
int tdd_feed (struct tdd_state *tdd, unsigned char *ubuf, int samples)
void tdd_free (struct tdd_state *tdd)
int tdd_generate (struct tdd_state *tdd, unsigned char *buf, const char *string)
void tdd_init (void)
tdd_state * tdd_new (void)


Detailed Description

TTY/TDD Generation support.

Note:
Includes code and algorithms from the Zapata library.

Definition in file tdd.h.


Function Documentation

int ast_tdd_gen_ecdisa ( unsigned char *  outbuf,
int  len 
)

Parameters:
outbuf This is the buffer to receive the tone data
len This is the length (in samples) of the tone data to generate Returns 0 if no error, and -1 if error.

int tdd_feed ( struct tdd_state *  tdd,
unsigned char *  ubuf,
int  samples 
)

Parameters:
tdd Which state machine to act upon
ubuf containing your samples
samples number of samples contained within the buffer.
Send received audio to the TDD demodulator. Returns -1 on error, 0 for "needs more samples", and > 0 (the character) if reception of a character is complete.

void tdd_free ( struct tdd_state *  tdd  ) 

Parameters:
tdd This is the tdd_state state machine to free This function frees tdd_state tdd.

int tdd_generate ( struct tdd_state *  tdd,
unsigned char *  buf,
const char *  string 
)

Parameters:
tdd tdd structure
buf Buffer to use. This needs to be large enough to accomodate all the generated samples.
string This is the string to send. This function creates a stream of TDD data in ulaw format. It returns the size (in bytes) of the data (if it returns a size of 0, there is probably an error)

void tdd_init ( void   ) 

Initializes the TDD system. Mostly stuff for inverse FFT

struct tdd_state* tdd_new ( void   ) 

This function returns a malloc'd instance of the tdd_state data structure. Returns a pointer to a malloc'd tdd_state structure, or NULL on error.


Generated on Thu May 24 14:32:00 2007 for Asterisk - the Open Source PBX by  doxygen 1.5.1