spandsp 0.0.6

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/super_tone_rx.h"`
`#include "spandsp/fax_modems.h"`
`#include "spandsp/at_interpreter.h"`
`#include "spandsp/private/logging.h"`
`#include "spandsp/private/at_interpreter.h"`
`#include "at_interpreter_dictionary.h"`

## Macros
#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 }

## 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_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.
int | at_release (at_state_t *s)
| Release an AT interpreter context.
int | at_free (at_state_t *s)
| Free an AT interpreter context.

## Function Documentation

## ◆ at_free()

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_release().

## ◆ at_init()

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::logging.

Referenced by t31_init().

## ◆ at_release()

int at_release | ( | at_state_t * | s | ) |

Release an AT interpreter context.

Release an AT interpreter context.

Parameters

  s | The AT context.

Returns
  0 for OK

Referenced by at_free().

## ◆ at_set_call_info()

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 | .