at_interpreter.c File Reference

#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <memory.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/logging.h"
#include "spandsp/queue.h"
#include "spandsp/power_meter.h"
#include "spandsp/complex.h"
#include "spandsp/tone_generate.h"
#include "spandsp/async.h"
#include "spandsp/hdlc.h"
#include "spandsp/fsk.h"
#include "spandsp/at_interpreter.h"
#include "at_interpreter_dictionary.h"

Defines

#define ms_to_samples(t)   (((t)*SAMPLE_RATE)/1000)
#define MANUFACTURER   "www.soft-switch.org"
#define SERIAL_NUMBER   "42"
#define GLOBAL_OBJECT_IDENTITY   "42"
#define ETX   0x03
#define DLE   0x10
#define SUB   0x1A

Typedefs

typedef const char *(* at_cmd_service_t )(at_state_t *s, const char *cmd)

Enumerations

enum  { ASCII_RESULT_CODES = 1, NUMERIC_RESULT_CODES, NO_RESULT_CODES }
enum  {
  T31_NONE = -1, T31_FLUSH = 0, T31_SILENCE_TX, T31_SILENCE_RX,
  T31_CED_TONE, T31_CNG_TONE, T31_NOCNG_TONE
}

Functions

void at_set_at_rx_mode (at_state_t *s, int new_mode)
void at_put_response (at_state_t *s, const char *t)
void at_put_numeric_response (at_state_t *s, int val)
void at_put_response_code (at_state_t *s, int code)
void at_call_event (at_state_t *s, int event)
void at_reset_call_info (at_state_t *s)
void at_set_call_info (at_state_t *s, char const *id, char const *value)
 Set the call information for an AT interpreter.
void at_display_call_info (at_state_t *s)
int at_modem_control (at_state_t *s, int op, const char *num)
void at_interpreter (at_state_t *s, const char *cmd, int len)
void at_set_class1_handler (at_state_t *s, at_class1_handler_t handler, void *user_data)
at_state_tat_init (at_state_t *s, at_tx_handler_t *at_tx_handler, void *at_tx_user_data, at_modem_control_handler_t *modem_control_handler, void *modem_control_user_data)
 Initialise an AT interpreter context.
int at_free (at_state_t *s)
 Free an AT interpreter context.

Detailed Description


Function Documentation

int at_free ( at_state_t s  ) 

Free an AT interpreter context.

Free an AT interpreter context.

Parameters:
s The AT context.
Returns:
0 for OK

References at_state_s::local_id.

at_state_t* at_init ( at_state_t s,
at_tx_handler_t *  at_tx_handler,
void *  at_tx_user_data,
at_modem_control_handler_t *  modem_control_handler,
void *  modem_control_user_data 
)

Initialise an AT interpreter context.

Initialise an AT interpreter context.

Parameters:
s The AT context.
at_tx_handler x.
at_tx_user_data x.
modem_control_handler x.
modem_control_user_data x.
Returns:
A pointer to the AT context, or NULL if there was a problem.

References at_state_s::at_tx_handler, at_state_s::at_tx_user_data, at_state_s::call_id, at_state_s::display_call_info, at_state_s::local_id, at_state_s::modem_control_handler, at_state_s::modem_control_user_data, and at_state_s::p.

Referenced by t31_init().

void at_set_call_info ( at_state_t s,
char const *  id,
char const *  value 
)

Set the call information for an AT interpreter.

Set the call information for an AT interpreter.

Parameters:
s The AT interpreter context.
id .
value .

References at_state_s::call_id.


Generated on Tue Oct 7 20:25:50 2008 for spandsp by  doxygen 1.5.6