sangoma_interface Class Reference

Sangoma Interface Class that deals with span/chan IO (read/write/events). More...

#include <sangoma_interface.h>

Inheritance diagram for sangoma_interface:

Inheritance graph
[legend]
Collaboration diagram for sangoma_interface:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 sangoma_interface (int wanpipe_number, int interface_number)
int DoManagementCommand (sng_fd_t drv, wan_udp_hdr_t *packet)
virtual int init (callback_functions_t *callback_functions_ptr)
int run ()
int stop ()
int transmit (wp_api_hdr_t *hdr, void *data)
int receive (wp_api_hdr_t *hdr, void *data)
void bit_swap_a_buffer (unsigned char *data, int len)
void get_te1_56k_stat (void)
void set_lb_modes (unsigned char type, unsigned char mode)
int loopback_command (u_int8_t type, u_int8_t mode, u_int32_t chan_map)
int get_operational_stats (wanpipe_chan_stats_t *stats)
virtual int flush_operational_stats (void)
int CreateSwDtmfTxThread (void *buffer)
int CreateFskCidTxThread (void *buffer)
int enable_rbs_monitoring ()
char get_rbs (rbs_management_t *rbs_management_ptr)
char set_rbs (rbs_management_t *rbs_management_ptr)
int tdm_enable_rbs_events (int polls_per_second)
int tdm_disable_rbs_events ()
int set_tx_idle_flag (unsigned char new_idle_flag)
int get_open_handles_counter ()
int flush_tx_buffers (void)
unsigned char get_adapter_type ()
unsigned int get_sub_media ()
void set_fe_debug_mode (sdla_fe_debug_t *fe_debug)
void get_api_driver_version (PDRIVER_VERSION version)
void get_card_customer_id (u_int8_t *customer_id)
int resetFSKCID (void)
int sendCallerID (char *name, char *number)
int sendSwDTMF (char dtmf_char)
int tdm_enable_rxhook_events ()
int tdm_disable_rxhook_events ()
int tdm_enable_rm_dtmf_events ()
int tdm_disable_rm_dtmf_events ()
int tdm_enable_dtmf_events (uint8_t channel)
int tdm_disable_dtmf_events (uint8_t channel)
int tdm_enable_ring_detect_events ()
int tdm_disable_ring_detect_events ()
int tdm_enable_ring_trip_detect_events ()
int tdm_disable_ring_trip_detect_events ()
int tdm_enable_ring_events ()
int tdm_disable_ring_events ()
int tdm_txsig_onhook ()
int tdm_txsig_offhook ()
int tdm_txsig_kewl ()
int tdm_txsig_onhooktransfer ()
int tdm_enable_tone_events (uint16_t tone_id)
int tdm_disable_tone_events ()
int tdm_front_end_activate ()
int tdm_front_end_deactivate ()
int tdm_control_flash_events (int rxflashtime)
int tdm_control_rm_txgain (int txgain)
int tdm_control_rm_rxgain (int rxgain)
int tdm_set_rm_polarity (int polarity)
int tdm_get_front_end_status (unsigned char *status)
int tdm_set_user_period (unsigned int usr_period)
int tdmv_api_ioctl (wanpipe_api_cmd_t *api_cmd)
int reset_interface_state ()
int start_ring_tone ()
int stop_ring_tone ()
int start_congestion_tone ()
int stop_congestion_tone ()
int start_busy_tone ()
int stop_busy_tone ()
int stop_all_tones ()
int start_dial_tone ()
int stop_dial_tone ()
int start_ringing_phone ()
int stop_ringing_phone ()
int fxo_go_off_hook ()
int fxo_go_on_hook ()
int fxs_txsig_offhook ()
int tdm_enable_bri_bchan_loopback (u_int8_t channel)
int tdm_disable_bri_bchan_loopback (u_int8_t channel)

Public Attributes

char device_name [DEV_NAME_LEN]
char is_logger_dev

Protected Member Functions

unsigned char get_wan_udphdr_data_byte (unsigned char off)
unsigned char * get_wan_udphdr_data_ptr (unsigned char off)
unsigned char set_wan_udphdr_data_byte (unsigned char off, unsigned char data)
void RxThreadFunc ()
void TxThreadFunc ()
int read_data ()
virtual int read_event ()
int write_data (wp_api_hdr_t *hdr, void *tx_buffer)
void cleanup ()
int get_wan_config ()
int get_interface_configuration (if_cfg_t *wanif_conf_ptr)
int get_fe_type (unsigned char *adapter_type)
int wanpipe_api_ioctl (wan_cmd_api_t *api_cmd)
void generate_bit_rev_table ()
void TxStelEncoderBuffer (void *pStelEncoderBuffer)
virtual unsigned long threadFunction (struct ThreadParam &thParam)

Protected Attributes

sng_fd_t sangoma_dev
sangoma_wait_obj_t * sng_wait_obj [SANGOMA_INTERFACE_NUMBER_OF_WAIT_OBJECTS]
ULONG rx_frames_count
ULONG rx_bytes_count
ULONG bad_rx_frames_count
DWORD dwRxThreadId
ULONG tx_bytes_count
ULONG tx_frames_count
UCHAR tx_test_byte
wan_udp_hdr_t wan_udp
int protocol_cb_size
int wan_protocol
unsigned char adapter_type
wanpipe_api_cmd_t tdm_api_cmd
wanpipe_api_t wp_api
unsigned char wp_brt [256]
char is_rbs_monitoring_enabled
stelephony_callback_functions_t scf
void * stelObj
void * DtmfBuffer
void * FskCidBuffer
CRITICAL_SECTION StelTxCriticalSection
char terminate_tx_rx_threads
wp_api_hdr_t rxhdr
unsigned char rx_data [MAX_NO_DATA_BYTES_IN_FRAME]
wp_api_hdr_t txhdr
unsigned char tx_data [MAX_NO_DATA_BYTES_IN_FRAME]
if_cfg_t wanif_conf_struct
int WanpipeNumber
int InterfaceNumber
callback_functions_t callback_functions


Detailed Description

Sangoma Interface Class that deals with span/chan IO (read/write/events).

Definition at line 95 of file sangoma_interface.h.


Member Function Documentation

unsigned char sangoma_interface::get_wan_udphdr_data_byte ( unsigned char  off  )  [protected]

deprecated: Helper function to get data byte out of wan_udp structure

unsigned char* sangoma_interface::get_wan_udphdr_data_ptr ( unsigned char  off  )  [protected]

deprecated: Helper function to get data pointer out of wan_udp structure

unsigned char sangoma_interface::set_wan_udphdr_data_byte ( unsigned char  off,
unsigned char  data 
) [protected]

deprecated: Helper function to set data pointer out of wan_udp structure

void sangoma_interface::RxThreadFunc (  )  [protected]

Rx Thread function

void sangoma_interface::TxThreadFunc (  )  [protected]

Tx Thread function

int sangoma_interface::read_data (  )  [protected]

Rx Data handler function

virtual int sangoma_interface::read_event (  )  [protected, virtual]

Rx Event handler function

void sangoma_interface::cleanup (  )  [protected]

Shutdown function to cleanup the class

int sangoma_interface::get_wan_config (  )  [protected]

Get device span configuration

int sangoma_interface::get_interface_configuration ( if_cfg_t *  wanif_conf_ptr  )  [protected]

Get interface chan configuration

int sangoma_interface::get_fe_type ( unsigned char *  adapter_type  )  [protected]

Get front end type (T1/E1...)

int sangoma_interface::wanpipe_api_ioctl ( wan_cmd_api_t api_cmd  )  [protected]

deprecated: Execute API command IOCTL - one should use libsangoma directly

void sangoma_interface::generate_bit_rev_table (  )  [protected]

deprecated: Generate bit reversal table - not used with new sangoma cards

int sangoma_interface::transmit ( wp_api_hdr_t hdr,
void *  data 
)

Write data to device

Referenced by tx_file().

Here is the caller graph for this function:

int sangoma_interface::receive ( wp_api_hdr_t hdr,
void *  data 
)

Read data from device


Member Data Documentation

Sangoma IO device descriptor

Definition at line 99 of file sangoma_interface.h.

sangoma_wait_obj_t* sangoma_interface::sng_wait_obj[SANGOMA_INTERFACE_NUMBER_OF_WAIT_OBJECTS] [protected]

wait object for an IO device

Definition at line 102 of file sangoma_interface.h.

< rx count statistic

Definition at line 107 of file sangoma_interface.h.

rx byte statistic

Definition at line 109 of file sangoma_interface.h.

corrupted frame count statistic

Definition at line 112 of file sangoma_interface.h.

Rx thread id used for launching threads that handle rx path

Definition at line 114 of file sangoma_interface.h.

tx byte statistic

Definition at line 119 of file sangoma_interface.h.

tx frame statistic

Definition at line 121 of file sangoma_interface.h.

tx test byte sent statistic

Definition at line 123 of file sangoma_interface.h.

deprecated: ioctl management structure, used to execute management commands - one should use libsangoma directly

Definition at line 128 of file sangoma_interface.h.

deprecated: protocol command structure size

Definition at line 140 of file sangoma_interface.h.

device low level protocol (T1/E1...) currently running

Definition at line 142 of file sangoma_interface.h.

unsigned char sangoma_interface::adapter_type [protected]

device adapter type

Definition at line 144 of file sangoma_interface.h.

deprecated: API command structure used to execute API commands

Definition at line 147 of file sangoma_interface.h.

API command structure used to execute API commands. This command structure is used with libsangoma library

Definition at line 150 of file sangoma_interface.h.

unsigned char sangoma_interface::wp_brt[256] [protected]

Bert test pattern

Definition at line 180 of file sangoma_interface.h.

Flag indicating that rbs is enabled

Definition at line 186 of file sangoma_interface.h.

stelephony_callback_functions_t sangoma_interface::scf [protected]

Stelephony provides Analog CallierID and DTMF encoding/decoding

Definition at line 190 of file sangoma_interface.h.

API header for rx data

Definition at line 203 of file sangoma_interface.h.

unsigned char sangoma_interface::rx_data[MAX_NO_DATA_BYTES_IN_FRAME] [protected]

Data buffer to copy rx data into

Definition at line 205 of file sangoma_interface.h.

API header for tx data

Definition at line 208 of file sangoma_interface.h.

unsigned char sangoma_interface::tx_data[MAX_NO_DATA_BYTES_IN_FRAME] [protected]

Data buffer to copy tx data into

Definition at line 210 of file sangoma_interface.h.

Wanpipe Interface configuration structure to be populated on read configuration

Definition at line 213 of file sangoma_interface.h.

Wanpipe Device number based on hardware probe device enumeration (SPAN)

Definition at line 216 of file sangoma_interface.h.

Wanpipe Interface number based on a channel in a SPAN

Definition at line 219 of file sangoma_interface.h.

callback_functions_t sangoma_interface::callback_functions [protected]

Callback functions used to call the application on IO events

Definition at line 226 of file sangoma_interface.h.


The documentation for this class was generated from the following file:

Generated on Wed Jun 1 17:30:47 2011 for libsangoma by  doxygen 1.5.6