libvpb
4.2.61
|
A collection of internal implementation functions. More...
Functions | |
int | RunTimeError (const Wobbly &w, const char *api_function) |
void | CheckHandle (VPBPortHandle handle, const char *where) |
Check for a valid device handle. More... | |
void | ValidHandleCheck (int handle) |
void | validate_digits (const char *digits) |
Validate a NULL terminated string of DTMF digits. More... | |
int | putevt (VPB_EVENT *event, unsigned long mask=0) |
Internal function to place an event on the API event queue. More... | |
void | apifunc_trace (char s[]) |
int | get_driver_type (int board) |
Return the symbolic type of the driver for board. | |
VPB_MODEL | get_board_type (int board) |
Return the symbolic VPB_MODEL type of a board. | |
void | get_board_model (int board, char *s) |
Return a descriptive model name for board in s. | |
VPB_PORT | get_port_type (int board, int port) |
Return the type of a port on some board. VPB_FXO or VPB_FXS . | |
size_t | get_total_port_count () |
Return the total number of ports on all registered boards. | |
void | set_country (int board, int port, const Country *country) |
Set the country data for port on board. | |
const Country * | get_country (int board, int port) |
Return the country data for port on board. | |
void | ring_station_async (int board, int port, int cadence) |
Internal function to control ringing on port of board. | |
void | set_codec_reg (int handle, unsigned short addr, unsigned short data, Comm *comm) |
Write directly to a V4PCI codec register. More... | |
Variables | |
Comm * | vpb_c |
Pointer to the global comm object. More... | |
A collection of internal implementation functions.
These functions mostly mirror some of those from the public API but are implemented without error checking, or for invocation using already decomposed parameters.
void CheckHandle | ( | VPBPortHandle | handle, |
const char * | where | ||
) |
Check for a valid device handle.
The handle is valid if the device has been opened with a prior call to vpb_open()
.
VpbException | will be thrown, stating where, if handle is invalid. |
References Totalchans, vpb_dev, and VPB_OFF.
int putevt | ( | VPB_EVENT * | event, |
unsigned long | mask = 0 |
||
) |
Internal function to place an event on the API event queue.
event | The event to place on the API queue. |
mask | The mask to use for this event (set to 0 if not required). |
References APIQ, VPB_DEV::callback_mutex, VPB_DEV::context, VPB_DEV::devstate, VPB_DEV::event_callback, VPB_DEV::evtmask, VPB_EVENT::handle, vpb_dev, and VPB_ON.
void set_codec_reg | ( | int | handle, |
unsigned short | addr, | ||
unsigned short | data, | ||
Comm * | comm | ||
) |
Write directly to a V4PCI
codec register.
handle | The handle returned by a call to vpb_open() . |
addr | 8-bit address of the codec register. |
data | 8-bit data to write to the register. |
comm | The comm object used to send the message. |
Used to set a register of the TS5070 codecs, allows driver-level config of codec, rather than hard-coding in DSP firmware.
References Comm::PutMessageVPB().
Referenced by playrec_open().
void validate_digits | ( | const char * | digits | ) |
Validate a NULL
terminated string of DTMF
digits.
DTMF
digits, user defined tone characters will fail if passed here, even if they are valid to be passed to vpb_dial_{a
,}sync(). Wobbly | will be thrown if any of the digits are not valid. |
|
extern |
Pointer to the global comm object.
Pointer to the global comm object.
Referenced by get_board_model(), get_board_type(), get_country(), get_driver_type(), get_port_type(), play_reset_hw_gain(), playrec_open(), record_reset_hw_gain(), VTCore::Reset(), ring_station_async(), set_country(), V4PCI_DSP::SetHookState(), and OpenPri::SetHookState().