Voicetronix Programming Guide | ||
---|---|---|
<<< Previous |
Synopsis
int WINAPI vpb_config(int num_cards, int *bases, char *firmware_file, int model) { |
Function
Set installation specific config info, call before vpb_open(). If this function is called, it overrides any other settings (for example compile-time defaults or env vars).
Synopsis
int WINAPI vpb_set_call(int handle, VPB_CALL *vpb_call) |
Function
Function to set call progress parameters.
Synopsis
int WINAPI vpb_get_call(int handle, VPB_CALL *vpb_call) |
Function
Function to get current call progress parameters.
Synopsis
int WINAPI vpb_call_sync(int handle, char *dialstr) |
Function
Place a call using call progress algorithm. Note: when this function is called, make sure dial tone has not been detected yet.
Synopsis
int WINAPI vpb_call_async(int handle, char *dialstr) |
Function
Place a call using call progress algorithm, async version. Note: when this function is called, make sure dial tone has not been detected yet.
Synopsis
void WINAPI vpb_cid_debug_on(char debug_file_name[]) { |
Function
Call this function to enable debugging of the CID module. Causes lots of debug info to be written to the text file "debug_file_name".
Synopsis
int WINAPI vpb_cid_decode( char *number, short *in, int n ) |
Function
As per cid-demodulate() but parse out all CID fields.
Synopsis
int WINAPI vpb_cid_demodulate(char* number, int* nChars, short* in, int n) |
Function
Attempts to decode CID information from an array of samples. Throws various exceptions should an error occur. Returns the caller number in "number". Will return a null-str in "number" if no caller number supplied.
Synopsis
int WINAPI vpb_start(int num_cards, int *bases, char *firmware_file, int model) |
Function
Initialises the API software (boots DSPs etc) when operating in "bayonne" mode. Calling this function before vpb_open() starts the driver in "bayonne" mode. If vpb_open() is called without calling this function first, the driver is started in "regular" mode. The major feature of bayonne mode is that the user must set up a thread to periodically call (poll) the vpb_get_event_async_bayonne() function. Without this thread the driver will not function. This has certain advantages where the user whishes to control the number of threads in the system, and was specifically written for the bayonne package (www.bayonne.cx). See the unittest tvpb.cpp for an example of a program implemented using bayonne mode. In regular mode, the driver sets up all sorts of polling threads which leads to generally simpler application code. In other words the choice of bayonne vs regular mode is the usual choice of flexibility vs complexity :-). Most of the programs in the unittest directory use regular mode. Note: bayonne mode was originally supported by the 2.0.x series vpb drivers, and regular mode by the 1.x.y series of drivers.
Synopsis
int WINAPI vpb_open(unsigned int board, unsigned int channel) |
Function
Opens a VPB device (channel), and returns a handle to that device. See also vpb_start().
Synopsis
int WINAPI vpb_close(int devhandle) |
Function
Closes a device. If this is the last device remaining, then the API is closed down (memory free-ed, DSP stopped etc).
Synopsis
int WINAPI vpb_stop() |
Function
API is closed down (memory free-ed, DSP stopped etc). Only used for "bayonne" mode.
Synopsis
int WINAPI vpb_get_event_async_bayonne( int board, // VPB board number: 1,2,3.. VPB_EVENT *ev // event ) |
Function
Note: This function is only used in "bayonne" mode. Please do not call in "regular" mode - see also vpb_start() This function returns an event from the specified VPB card. If an event is available it returns VPB_OK, otherwise it returns VPB_NO_EVENTS. When this function returns, it should be called again as soon as possible in a tight polling loop, as it is responsible for sequencing several time-sensitive operations (e.g. playing DTMF tones). Avoid placing blocking functions in the polling loop that calls this function, to ensure it is called regularly. Once every 20ms is recommended. IMPORTANT: This function must be called regularly, as the driver uses this function to service time critical tasks in the driver. This function must be polled regularly, even if no events are required for the program. Without it, other functions, such as play/record, will not work.
Synopsis
int WINAPI vpb_set_event_callback(int handle, void (WINAPI *event_callback)(VPB_EVENT *e, void *context), void *context) |
Function
Sets the event callback function for each channel. By default no event callback functions are set, in this case events are posted to the API event Q. If this function has been called with a non-null function pointer, the event callback funcion is called with the event as an argument rather than posting the event to the API Q. The user defined event callback function should be of the form: void event_callback(VPB_EVENT *e); To disable the event callback, call this function with a NULL pointer for the function argument.
Synopsis
int WINAPI vpb_set_event_mask(int handle, unsigned short mask) |
Function
Function to set the event mask for each device. Each call to this function overwrites the previous event mask.
Synopsis
int WINAPI vpb_get_event_mask(int handle) |
Function
Function to return the current event mask for a given device.
Synopsis
int WINAPI vpb_enable_event(int handle, unsigned short mask) |
Function
Function to unmask (enable) only the specified events while leaving the rest of the event masks unchanged.
Synopsis
int WINAPI vpb_disable_event(int handle, unsigned short mask) |
Function
Function to mask out (disable) specified events only, while leaving the rest of the event masks unchanged.
Synopsis
int WINAPI vpb_put_event(VPB_EVENT *e) |
Function
Function to place an event on the API event queue exported API version.
Synopsis
int WINAPI vpb_get_event_async(VPB_EVENT *e) |
Function
Function to get an event from the API event queue. Returns VPB_OK if an event available, other wise VPB_NO_EVENTS if Q empty.
Synopsis
int WINAPI vpb_get_event_sync(VPB_EVENT *e, unsigned int time_out) |
Function
This function waits until an event is available on the API Q, then returns. The thread is put to sleep until the event becomes available. Function returns VPB_OK if event returned, else VPB_TIME_OUT if sync function times out. Use tme_out = 0 for no timeout.
Synopsis
int WINAPI vpb_get_event_ch_sync(int h, VPB_EVENT *e, unsigned int time_out) |
Function
This function waits until an event is available on the API Q, then returns. The thread is put to sleep until the event becomes available. This version only returns events from a specified channel.
Synopsis
int WINAPI vpb_get_event_ch_async(int h, VPB_EVENT *e) |
Function
This reads an event on a channels event queue if available.
Synopsis
int WINAPI vpb_sethook_async(int chdev, int hookstate) |
Function
Function to set the hook status of a particular chnnel device. This version returns immediately.
Synopsis
int WINAPI vpb_sethook_sync(int chdev, int hookstate) |
Function
Function to set the hook status of a particular chnnel device. This version returns after the hook status has been changed.
Synopsis
int WINAPI vpb_set_station_sync(int chdev, int state) |
Function
Function to set the status (on or off) of a station port channel device. This version returns after the status has been changed. NOTE: DR 22/8/02 - this function is not normally required, as hook detector logic has been modified to automatically turn off/on station audio with hook switch.
Synopsis
int WINAPI vpb_ring_station_async(int chdev, int state) |
Function
Function to start/stop a station port ringing. This version rings stations with a pre-defined cadence.
Synopsis
int WINAPI vpb_ring_station_sync(int chdev, int state) |
Function
Function to start/stop a station port ringing.
Synopsis
int WINAPI vpb_user_ring_station_sync(int chdev, int state) |
Function
Function to start/stop a station port ringing. This version allows the caller (user) to define the cadence. Station will ring continuously when called with state==1, until called with state==0. Care should be taken to ring no more than that 4 stations at any one time, to prevent overloading the OpenSwitch12 ring generator. Excess load of the ring generator will not result in permanent damage, however the station power supply to shut down, requiring a power down of the OpenSwitch12 (ie switching the PC off) to reset. This function should not be used in conjunction with vpb_ring_station_sync, the cadenced ring generator function, as the driver will get confused!
Synopsis
void WINAPI vpb_sleep(long time) |
Function
Function to put the current thread to sleep for a certain time in ms. Used during testing to reduce the amount of time program spends in main polling loop so that the computational load of the timer callback can be measured.
Synopsis
int WINAPI vpb_adpcm_open(void **pv) |
Function
Sets up the state variables for ADPCM opertaions. Must be called before any other ADPCM functions.
Synopsis
void WINAPI vpb_adpcm_close(void *pv) |
Function
Closes down the ADPCM state variables, freeing memory. Call after all ADPCM operations have finished.
Synopsis
void WINAPI vpb_adpcm_reset(void *pv) |
Function
Resets the ADPCM state variables.
Synopsis
int WINAPI vpb_adpcm_decode( void *pv, // ADPCM state variables short linear[], // linear output samples unsigned short *size_lin, // number of 16 bit samples out char adpcm[], // packed ADPCM samples unsigned short size_adpcm // number of bytes in (must be even) |
Function
Converts a buffer of compressed OKI ADPCM samples to a buffer of 16 bit linear samples.
Synopsis
int WINAPI vpb_adpcm_encode( void *pv, // ADPCM state variables char adpcm[], // output packed ADPCM samples unsigned short *size_adpcm, // number of bytes out short linear[], // linear input samples unsigned short size_linear // number of 16 bit samples in ) |
Function
Converts a buffer of 16 bit linear samples to a buffer of compressed OKI ADPCM samples.
Synopsis
int WINAPI vpb_comp_load(unsigned short board) |
Function
Interrogates the DSP to determine the computational loading. Causes a comp load statement to be printed if mprintf's are enabled. Dont expose the function to the punters, keep it as undocumented for our use only.
Synopsis
int WINAPI vpb_echo_canc_force_adapt_on() |
Function
Forces the echo cancellers to adapt all of the time, ie switches off near end speech detector. Used to determine maximum computational load.
Synopsis
int WINAPI vpb_echo_canc_force_adapt_off() |
Function
Stops forced adaptation.
Synopsis
int WINAPI vpb_echo_canc_enable() |
Function
Enables the echo cancellers.
Synopsis
int WINAPI vpb_echo_canc_disable() |
Function
Disables the echo cancellers, but keeps adaptation on.
Synopsis
int WINAPI vpb_echo_canc_get_sup_thresh(short *thresh) |
Function
Gets the current echo suppressor threshold. This threshold is the same for all channels on all cards.
Synopsis
int WINAPI vpb_echo_canc_set_sup_thresh(short *thresh) |
Function
Sets the current echo suppressor threshold. This threshold is the same for all channels on all cards. 0x1000 (4096) -18dB 0x800 (2048) -24dB 0 0 no supressor
Synopsis
int WINAPI vpb_get_model(char *s) { |
Function
Returns a string containing the VPB model, driver should be started first by at least one call to vpb_open().
Synopsis
int WINAPI vpb_get_ports_per_card() { |
Function
Returns the number of ports on each card.
Synopsis
void WINAPI vpb_set_codec_reg(int chdev, // channel handle USHORT addr, // 8-bit address of codec register USHORT data // 8-bit data to write to register ) |
Function
Used to set a register of the TS5070 codecs, allows driver-level config of codec, rather than hard-coding in DSP firmware.
Synopsis
int WINAPI vpb_get_num_cards() |
Function
Returns the number of cards in the system. In current implemention need to call vpb_open() or vpb_start() before calling this function. This means e.g. one channel should be opened before determining how many cards there are! This is very silly and should be fixed some time!
Synopsis
int WINAPI vpb_bridge( int h1, // handle of first channel int h2, // handle of second channel int mode, // VPB_BRIDGE_ON | VPB_BRIDGE_OFF int resource // bridge resource 1 or 2 (V4PCI only) |
Function
Bridges two ports using the driver, to allow 2-way conferencing. The bridging is implemented at a low level (firmware and/or hardware) by the driver to ensure a low delay connection between the ports. Note that only ports on the same physical card can be bridged using this method on the V4PCI and ISA boards. Two bridging resources are available on the V4PCI (1 & 2). V4PCI: For 3 or more way conferencing (or bridging between ports on different cards) use "software bridging" using the play and record buf API functions. This results in a higher delay (20ms or so), however this does not cause a problem due to the echo canceller on each VPB port. OpenSwitch: This will auto-magically switch to a kernel-mode driver version of bridging when bridging across boards. For more information on this look at the vpb_listen function.
Synopsis
int WINAPI vpb_listen( int h1, // handle of first channel int h2, // handle of second channel int mode // VPB_BRIDGE_ON | VPB_BRIDGE_OFF ) |
Function
Software bridge/listen for OpenSwitch boards. Starts a half duplex bridge between two handles. For a full duplex bridge, both handles will need to listen between each other. This currently only works on OpenSwitch boards.
Synopsis
int WINAPI vpb_conf( int h, // Handle of channel/port int resource, // Conference/party resource to use (0-9) |
Function
Multi party conferencing. Can be used across any number of OpenSwitch boards. There is a maximum of 10 conferences with a max of 10 people each. You may need to reduce the HW-record gain if you experiance excesive feed back.
Synopsis
int WINAPI vpb_watchdog_enable(int h, int enable) { |
Function
Enables (enable == 1), or disables (enable == 0) V12PCI watchdog timer. There is one watchdog timer per board, so only one call per board is required, any handle h from that board can be used. Once enabled, it must be reset at least once every 8 seconds by vpb_watchdog_reset. If it is not reset the watchdog timer will fire. Once fired, the hardware will assume the PC has crashed, and the first 4 station ports will be connected to the first 4 loop ports to preserve basic phone functionality. Use of the watchdog timer assumes a mixed station/loop configuration. Do not use the watchdog timer when the card is configured as all loop or all station cards.
Synopsis
int WINAPI vpb_watchdog_reset(int h) { |
Function
Resets watchdog timer. Call at least once every 8 seconds to prevent watchdog timer firing. Does nothing when watchdog timer is disabled. There is one watchdog timer per board, so only one call per board is required, any handle h from that board can be used.
Synopsis
int WINAPI vpb_get_card_info( int board, // Board number VPB_CARD_INFO *detail // Card Info Structure to fill. ) |
Function
Returns the card details in a structure VPB_CARD_INFO. Includes: Model name, Serial number, Revision number, Manufacture Date All strings are null terminated. Note: Only supported under Linux at this time!
Synopsis
int WINAPI vpb_get_digits_async(int handle, VPB_DIGITS *newdig, char *buf) |
Function
Gets a buffer of digits based on the conditions passed to the function. Returns immediately, and posts a comletetion event when the buffer has been obtained. If this function is called while already collecting digits (by a prvious call to this function), the digit collection is reset, and digits collected so far are discarded.
Synopsis
int WINAPI vpb_get_digits_sync(int handle, VPB_DIGITS *newdig, char *buf) |
Function
Gets a buffer of digits based on the conditions passed to the function. Returns when digit buffer has been obtained, with appropriate VPB_DIGIT_XXX return code.
Synopsis
int WINAPI vpb_flush_digits(int handle) |
Function
Clears the internal digit buffer, often called before vpb_get_digits_xxxx.
Synopsis
int WINAPI vpb_wave_open_write(void **ppv, char filename[], int mode) |
Function
Opens a RIFF Wave file.
Synopsis
int WINAPI vpb_wave_open_read(void **ppv, char filename[]) |
Function
Opens a RIFF Wave file for reading.
Synopsis
void WINAPI vpb_wave_close_write(void *wv) |
Function
Closes a RIFF Wave file after writing.
Synopsis
void WINAPI vpb_wave_close_read(void *wv) |
Function
Closes a RIFF Wave file after reading.
Synopsis
int WINAPI vpb_wave_write(void *wv, char buf[], long n) |
Function
Writes a block of speech samples to a RIFF Wave file.
Synopsis
int WINAPI vpb_wave_read(void *wv, char buf[], long n) |
Function
Reads a block of speech samples from a RIFF Wave file. Returns the number of bytes read.
Synopsis
int WINAPI vpb_wave_seek(void *wv, long offset) |
Function
Moves wave pointer to a specified location in samples, with respect to the beginning of the file.
Synopsis
void WINAPI vpb_wave_set_sample_rate(void *wv, unsigned short rate) |
Function
Changes the sample rate of a wave file.
Synopsis
int WINAPI vpb_wave_get_mode(void *wv, unsigned short *mode) |
Function
Determines the compression mode of a wave file.
Synopsis
int WINAPI vpb_setagc(int handle, VPB_AGC *agc) |
Function
Sets the agc parameters for a specified channel.
Synopsis
int WINAPI vpb_getagc(int handle, VPB_AGC *agc) |
Function
Gets the agc parameters for a specified channel.
Synopsis
int WINAPI vpb_play_set(int handle, VPB_PLAY *vpb_play) |
Function
Sets play parameters or this channel.
Synopsis
int WINAPI vpb_play_buf_start(int handle, unsigned short mode) |
Function
API callable version of play_buf_start.
Synopsis
int WINAPI vpb_play_buf_sync(int handle, char *buf, unsigned short length) |
Function
API version of play_buf_sync(). Returns VPB_FINISH if playing should finish, else returns VPB_OK.
Synopsis
int WINAPI vpb_play_buf_finish(int handle) |
Function
Completes the playing of a channel.
Synopsis
int WINAPI vpb_play_file_sync(int handle, char file_name[]) |
Function
Utility function to play a file to a channel. Function returns when playing is finished.
Synopsis
int WINAPI vpb_play_voxfile_sync(int handle, char file_name[], unsigned short mode) |
Function
Function to play a vox file to a channel. Function returns when playing is finished.
Synopsis
int WINAPI vpb_play_file_async(int handle, char file_name[], int data) |
Function
Utility function to play a file to a channel. Function returns as soon as playing has started, and places an event on the API Q when playing has finished.
Synopsis
int WINAPI vpb_play_voxfile_async(int handle, char file_name[], unsigned short mode,int data) |
Function
Utility function to play a vox file to a channel. Function returns as soon as playing has started, and places an event on the API Q when playing has finished.
Synopsis
int WINAPI vpb_play_terminate(int handle) |
Function
Stops playing immediately. Does nothing if we are not playing. NOTE: this doesnt have to be in the same thread context as vpb_play_buf_xxxx
Synopsis
int WINAPI vpb_record_set(int handle, VPB_RECORD *vpb_record) |
Function
Sets record parameters or this channel.
Synopsis
int WINAPI vpb_record_buf_start(int handle, unsigned short mode) |
Function
API callable version of record_buf_start. NOTE: All vpb_record_buf_xxxx functions for a given channel must be executed in the same thread context.
Synopsis
int WINAPI vpb_record_buf_sync(int handle, char *buf, unsigned short length) |
Function
API version of record_buf_sync(). NOTE: All vpb_record_buf_xxxx functions for a given channel must be executed in the same thread context.
Synopsis
int WINAPI vpb_record_buf_finish(int handle) |
Function
Completes the recording of a channel. NOTE: All vpb_record_buf_xxxx functions for a given channel must be executed in the same thread context.
Synopsis
int WINAPI vpb_record_file_sync(int handle, char file_name[], unsigned short mode) |
Function
Utility function to record a file to a channel. Function returns when recording is finished.
Synopsis
int WINAPI vpb_record_voxfile_sync(int handle, char file_name[], unsigned short mode) |
Function
Utility function to record a vox file to a channel. Function returns when recording is finished.
Synopsis
int WINAPI vpb_record_file_async(int handle, char file_name[], unsigned short mode) |
Function
Utility function to record a file from a channel. Function returns as soon as recording has started, and places an event on the API Q when recording has finished.
Synopsis
int WINAPI vpb_record_voxfile_async(int handle, char file_name[], unsigned short mode) |
Function
Utility function to record a vox file from a channel. Function returns as soon as recording has started, and places an event on the API Q when recording has finished.
Synopsis
int WINAPI vpb_record_terminate(int handle) |
Function
Stops recording immediately. Does nothing if we are not recording. NOTE: this doesnt have to be in the same thread context as vpb_record_buf_xxxx
Synopsis
int WINAPI vpb_play_set_gain(int handle, float gain) |
Function
Sets the gain of the play channel, using the hardware gain of the TS5070 codec on the VPB4. JK: 9/4/02 Modified to only set software gain and not the hardware gain of the TS5050 codec.
Synopsis
int WINAPI vpb_play_set_hw_gain(int handle, float gain) |
Function
Externally accessible wrapper around play_set_hw_gain.
Synopsis
int WINAPI vpb_play_get_gain(int handle, float *gain) |
Function
Gets the total gain of the play channel. It comprising of a softare and hardware component (TS5070 codec) on the VPB4/V4PCI.
Synopsis
int WINAPI vpb_record_get_gain(int handle, float *gain) |
Function
Gets the total gain of the play channel. It comprising of a softare and hardware component (TS5070 codec) on the VPB4/V4PCI.
Synopsis
int WINAPI vpb_record_set_gain(int handle, float gain) |
Function
Sets the total gain of the record channel. The total gain is comprised of a software and hardware component (TS5070 codec). Previously it only comprised of the hardware component. JK 9/4/02 Modified to only set sofware record gain. Disabled hardware configured record gain.
Synopsis
int WINAPI vpb_record_set_hw_gain(int handle, float gain) |
Function
Externally accessible wrapper around record_set_hw_gain.
Synopsis
int WINAPI vpb_reset_record_fifo_alarm(int handle) |
Function
Resets the latch that detects record DSP buffer overflows. After calling this function another event may be generated if the buffer overflows.
Synopsis
int WINAPI vpb_reset_play_fifo_alarm(int handle) |
Function
Resets the latch that detects record DSP buffer underflows. After calling this function another event may be generated if the buffer underflows.
Synopsis
int WINAPI vpb_settonedet(int chdev, VPB_DETECT *d) |
Function
Enables user to set a user programmed tone, or replace an exisiting tone. Performs translation of user parameters to VPB message. The tones are defined on a per channel basis. This version (for the API), stops the config mamanger before download- ing a tone to prevent computational overoad probs.
Synopsis
int WINAPI vpb_gettonedet(int chdev, int id, VPB_DETECT *d) |
Function
Enables user to extract a tone detectors parameters.
Synopsis
int WINAPI vpb_debug_tonedet(int chdev, int id, char file_name[], int sec) |
Function
Instructs API to produce a debug file of tone detector parameters for one channel.
Synopsis
int WINAPI vpb_dial_async( int chdev, // handle char *dialstring // string to dial ) |
Function
Sends a DTMF string down a channel device, accepts the following characters by default, plus user defined chars if defined: 0 1 2 3 4 5 6 7 8 9 0 * # A B C D and: & (hook flash) , (pause)
Synopsis
int WINAPI vpb_dial_sync( int chdev, // handle char *dialstring // string to dial ) |
Function
Sends a DTMF string down a channel device, accepts the following characters by default, plus user defined chars if defined: 0 1 2 3 4 5 6 7 8 9 0 * # A B C D and: & (hook flash) , (pause)
Synopsis
int WINAPI vpb_settone( char ident, // single char that identifies tone VPB_TONE *t // structure containing tone parameters ) |
Function
Enables user to set a user programmed tone, or replace an existing tone. Performs translation of user parameters to VPB message.
Synopsis
int WINAPI vpb_gettone( char ident, // single char that identifies tone VPB_TONE *t // structure containing tone parameters ) |
Function
Enables user to retrieve the parameters of a tone. Performs translation of user parameters from VPB message.
Synopsis
int WINAPI vpb_playtone_async(int handle, VPB_TONE *vpb_tone) |
Function
Plays a user defined tone immediately, API version.
Synopsis
int WINAPI vpb_playtone_sync(int handle, VPB_TONE *vpb_tone) |
Function
Plays a user defined tone immediately, API version.
Synopsis
int WINAPI vpb_tone_terminate(int handle) |
Function
Terminates playing of tones (programmable or DTMFs).
Synopsis
char * WINAPI vpb_strerror(int code) |
Function
Converts a numeric error code to a human-readable error description. Passes back a pointer to a string which describes the error code.
Synopsis
int WINAPI vpb_setvox(int handle, VPB_VOX *vox) |
Function
Sets the vox parameters for a specified channel.
Synopsis
int WINAPI vpb_getvox(int handle, VPB_VOX *vox) |
Function
Gets the vox parameters for a specified channel.
Synopsis
int WINAPI vpb_cid_set(VPB_CID *cid_struct, int type, void *value) |
Function
VPBAPI function to load valid data of 'type' and 'value' into the passed CID structure. Loading some fields will set associated fields to NULL automaticly as the fiedls are exclusive Return: Error if invalid type of value out of range, else OK
Synopsis
int WINAPI vpb_cid_compose_dlp(VPB_CID *MESG, char *dlp) |
Function
Build the message dlp from the VPB_CID structure.
Synopsis
int WINAPI vpb_cid_compose_wav(char *DLP, int DLP_LEN, short *BUFF_WAV, int *BUFF_PTR) |
Function
Encodes the Data Link Packet recived into a CP-FSK wave including CSS & MSS bit headers. Returns *BUFF_WAV containing *BUFF_PTR samples.
Synopsis
int WINAPI vpb_set_pip(VPB_PIP *vpb_pip) |
Function
Sets the pip parameters for all channels.
Synopsis
int WINAPI vpb_set_pip_ch(int handle, VPB_PIP *vpb_pip) |
Function
Sets the pip parameters for a specifed channel.
Synopsis
int WINAPI vpb_get_pip(VPB_PIP *vpb_pip) |
Function
Gets the pip parameters for the first channel.
Synopsis
int WINAPI vpb_get_pip_ch(int handle, VPB_PIP *vpb_pip) |
Function
Gets the pip parameters for the specified channel.
Synopsis
int WINAPI vpb_pip_off(int handle) |
Function
Disables pip generation for a channel.
Synopsis
int WINAPI vpb_seterrormode( int mode ) |
Function
Helper function that determines the way errors are handled in the RunTimeError function below. See RunTimeError() for more info.
Synopsis
void WINAPI vpb_throw_exception(int c, char trans[], char api_function[]) |
Function
Helper function that throws a VpbException.
Synopsis
int WINAPI vpb_timer_open ( void **ppv, // ptr to timer state variables int chdev, // channel device handle int timer_id, // Optional ID for this timer unsigned long period // period in ms before posting event ) |
Function
Initialises a timer object for the specified channel device.
Synopsis
int WINAPI vpb_timer_close ( void *timer // ptr to timer state variables ) |
Function
Deletes a timer object.
Synopsis
int WINAPI vpb_timer_start ( void *pv // ptr to timer state variables ) |
Function
Starts a timer. When the period specified in vpb_timer_open expires, and event for this channel device is generated. If timer is already active, this function throws a wobbly.
Synopsis
int WINAPI vpb_timer_restart ( void *pv // ptr to timer state variables ) |
Function
ReStarts an already active timer.
Synopsis
int WINAPI vpb_timer_stop ( void *pv // ptr to timer state variables ) |
Function
Stops an active timer by removing it from the active list. This function allows the timer to be stopped from the API.
Synopsis
int WINAPI vpb_timer_change_period ( void *pv, // ptr to timer state variables unsigned long newperiod // period in ms before posting event ) |
Function
Changes the time out value of a timer that has already been initialised.
<<< Previous | Home | |
Miscellaneous Functions |