|
libsangoma
1
|
Sangoma Interface Class that deals with span/chan IO (read/write/events) More...
#include <sangoma_interface.h>


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 [SAMPLE_CPP_MAX_DATA_LEN] |
| wp_api_hdr_t | txhdr |
| unsigned char | tx_data [SAMPLE_CPP_MAX_DATA_LEN] |
| if_cfg_t | wanif_conf_struct |
| int | WanpipeNumber |
| int | InterfaceNumber |
| callback_functions_t | callback_functions |
Sangoma Interface Class that deals with span/chan IO (read/write/events)
Definition at line 104 of file sangoma_interface.h.
|
protected |
deprecated: Helper function to get data byte out of wan_udp structure
|
protected |
deprecated: Helper function to get data pointer out of wan_udp structure
|
protected |
deprecated: Helper function to set data pointer out of wan_udp structure
|
protected |
Rx Thread function
|
protected |
Tx Thread function
|
protected |
Rx Data handler function
|
protectedvirtual |
Rx Event handler function
Reimplemented in sangoma_api_logger_dev.
|
protected |
Shutdown function to cleanup the class
|
protected |
Get device span configuration
|
protected |
Get interface chan configuration
|
protected |
Get front end type (T1/E1...)
|
protected |
deprecated: Execute API command IOCTL - one should use libsangoma directly
|
protected |
deprecated: Generate bit reversal table - not used with new sangoma cards
| int sangoma_interface::transmit | ( | wp_api_hdr_t * | hdr, |
| void * | data | ||
| ) |
| int sangoma_interface::receive | ( | wp_api_hdr_t * | hdr, |
| void * | data | ||
| ) |
Read data from device
|
protected |
Sangoma IO device descriptor
Definition at line 108 of file sangoma_interface.h.
|
protected |
wait object for an IO device
Definition at line 111 of file sangoma_interface.h.
|
protected |
< rx count statistic
Definition at line 116 of file sangoma_interface.h.
|
protected |
rx byte statistic
Definition at line 118 of file sangoma_interface.h.
|
protected |
corrupted frame count statistic
Definition at line 121 of file sangoma_interface.h.
|
protected |
Rx thread id used for launching threads that handle rx path
Definition at line 123 of file sangoma_interface.h.
|
protected |
tx byte statistic
Definition at line 128 of file sangoma_interface.h.
|
protected |
tx frame statistic
Definition at line 130 of file sangoma_interface.h.
|
protected |
tx test byte sent statistic
Definition at line 132 of file sangoma_interface.h.
|
protected |
deprecated: ioctl management structure, used to execute management commands - one should use libsangoma directly
Definition at line 137 of file sangoma_interface.h.
|
protected |
deprecated: protocol command structure size
Definition at line 149 of file sangoma_interface.h.
|
protected |
device low level protocol (T1/E1...) currently running
Definition at line 151 of file sangoma_interface.h.
|
protected |
device adapter type
Definition at line 153 of file sangoma_interface.h.
|
protected |
deprecated: API command structure used to execute API commands
Definition at line 156 of file sangoma_interface.h.
|
protected |
API command structure used to execute API commands. This command structure is used with libsangoma library
Definition at line 159 of file sangoma_interface.h.
|
protected |
Bert test pattern
Definition at line 189 of file sangoma_interface.h.
|
protected |
Flag indicating that rbs is enabled
Definition at line 195 of file sangoma_interface.h.
|
protected |
Stelephony provides Analog CallierID and DTMF encoding/decoding
Definition at line 199 of file sangoma_interface.h.
|
protected |
API header for rx data
Definition at line 212 of file sangoma_interface.h.
|
protected |
Data buffer to copy rx data into
Definition at line 214 of file sangoma_interface.h.
|
protected |
API header for tx data
Definition at line 217 of file sangoma_interface.h.
|
protected |
Data buffer to copy tx data into
Definition at line 219 of file sangoma_interface.h.
|
protected |
Wanpipe Interface configuration structure to be populated on read configuration
Definition at line 222 of file sangoma_interface.h.
|
protected |
Wanpipe Device number based on hardware probe device enumeration (SPAN)
Definition at line 225 of file sangoma_interface.h.
|
protected |
Wanpipe Interface number based on a channel in a SPAN
Definition at line 228 of file sangoma_interface.h.
|
protected |
Callback functions used to call the application on IO events
Definition at line 235 of file sangoma_interface.h.
1.8.5