|
libsangoma
1
|
WANPIPE(tm) API C++ Sample Code. More...
#include "sangoma_port.h"#include "sangoma_port_configurator.h"#include "sangoma_interface.h"#include <conio.h>#include <iostream>#include <string>
Go to the source code of this file.
Functions | |
| sangoma_interface * | init (int wanpipe_number, int interface_number) |
| Create a sangoma_interface class and setup callback functions. More... | |
| void | cleanup (sangoma_interface *sang_if) |
| Free Sangoma Interface Object. More... | |
| int | start (sangoma_interface *sang_if) |
| Run the main sangoma interface hanlder code. More... | |
| void | stop (sangoma_interface *sang_if) |
| Stop the Sangoma Interface Object. More... | |
| void | PrintRxData (wp_api_hdr_t *hdr, void *pdata) |
| Debug function used to print Rx Data. More... | |
| int | tx_file (sangoma_interface *sang_if) |
| Transmit a file on a sangoma interface / device. More... | |
| int | my_getch () |
| int __cdecl | main (int argc, char *argv[]) |
Variables | |
| wp_program_settings_t | program_settings |
| callback_functions_t | callback_functions |
| CRITICAL_SECTION | PrintCriticalSection |
| CRITICAL_SECTION | TdmEventCriticalSection |
WANPIPE(tm) API C++ Sample Code.
Author(s): David Rokhvarg Nenad Corbic
Copyright: (c) 2005-2009 Sangoma Technologies
THIS SOFTWARE IS PROVIDED BY Sangoma Technologies ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Sangoma Technologies BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Definition in file sample.cpp.
| sangoma_interface * init | ( | int | wanpipe_number, |
| int | interface_number | ||
| ) |
Create a sangoma_interface class and setup callback functions.
| wanpipe_number | wanpipe device number obtained from the hardware probe info, span |
| interface_number | wanpipe interface number, corresponds to a channel in a span |
Definition at line 111 of file sample.cpp.
| void cleanup | ( | sangoma_interface * | sang_if | ) |
Free Sangoma Interface Object.
| sang_if | Sangoma interface object pointer |
Definition at line 139 of file sample.cpp.
| int start | ( | sangoma_interface * | sang_if | ) |
Run the main sangoma interface hanlder code.
| sang_if | Sangoma interface object pointer |
Definition at line 153 of file sample.cpp.
Referenced by sangoma_hwec_audio_buffer_playout().

| void stop | ( | sangoma_interface * | sang_if | ) |
Stop the Sangoma Interface Object.
| sang_if | Sangoma interface object pointer |
Definition at line 165 of file sample.cpp.
| void PrintRxData | ( | wp_api_hdr_t * | hdr, |
| void * | data | ||
| ) |
Debug function used to print Rx Data.
| pRx | API data element strcutre containt header + data |
Definition at line 177 of file sample.cpp.
References wp_api_hdr::data_length, wp_api_hdr::time_stamp_sec, and wp_api_hdr::time_stamp_usec.
| int tx_file | ( | sangoma_interface * | sang_if | ) |
Transmit a file on a sangoma interface / device.
| sang_if_ptr | sangoma interface pointer |
Definition at line 385 of file sample.cpp.
References wp_api_hdr::data_length, wp_api_hdr::operation_status, SANG_STATUS_SUCCESS, SANG_STATUS_TX_TIMEOUT, and sangoma_interface::transmit().

1.8.5