class OpalVpbDevice: public OpalLineInterfaceDevice

This class describes the xJack line interface device

Inheritance:


Public Methods

[more] OpalVpbDevice ()
Create a new, closed, device for a VPB card
[more] ~OpalVpbDevice ()
Destroy line interface device.
[more]virtual BOOL Open ( const PString & device )
Open the xJack device.
[more]virtual BOOL Close ()
Close the xJack device
[more]virtual PString GetName () const
Get the device name
[more]virtual unsigned GetLineCount ()
Get the total number of lines supported by this device
[more]virtual BOOL IsLineOffHook ( unsigned line )
Determine if line is currently off hook.
[more]virtual BOOL SetLineOffHook ( unsigned line, BOOL newState = TRUE )
Set the state of the line.
[more]virtual BOOL IsLineRinging ( unsigned line, DWORD * cadence = NULL )
Determine if line is ringing.
[more]virtual OpalMediaFormat::List GetMediaFormats () const
Get the media formats this device is capable of using
[more]virtual BOOL SetReadFormat ( unsigned line, const OpalMediaFormat & mediaFormat )
Set the codec for reading.
[more]virtual BOOL SetWriteFormat ( unsigned line, const OpalMediaFormat & mediaFormat )
Set the codec for writing.
[more]virtual OpalMediaFormat GetReadFormat ( unsigned line )
Get the media format (codec) for reading on the specified line.
[more]virtual OpalMediaFormat GetWriteFormat ( unsigned line )
Get the media format (codec) for writing on the specified line.
[more]virtual BOOL StopReadCodec ( unsigned line )
Stop the read codec.
[more]virtual BOOL StopWriteCodec ( unsigned line )
Stop the write codec.
[more]virtual BOOL SetReadFrameSize ( unsigned line, PINDEX frameSize )
Set the read frame size in bytes.
[more]virtual BOOL SetWriteFrameSize ( unsigned line, PINDEX frameSize )
Set the write frame size in bytes.
[more]virtual PINDEX GetReadFrameSize ( unsigned line )
Get the read frame size in bytes.
[more]virtual PINDEX GetWriteFrameSize ( unsigned line )
Get the write frame size in bytes.
[more]virtual BOOL ReadFrame ( unsigned line, void * buf, PINDEX & count )
Low level read of a frame from the device.
[more]virtual BOOL WriteFrame ( unsigned line, const void * buf, PINDEX count, PINDEX & written )
Low level write frame to the device.
[more]virtual BOOL SetRecordVolume ( unsigned line, unsigned volume )
Set volume level for recording.
[more]virtual BOOL SetPlayVolume ( unsigned line, unsigned volume )
Set volume level for playing.
[more]virtual char ReadDTMF ( unsigned line )
Read a DTMF digit detected.
[more]virtual BOOL PlayDTMF ( unsigned line, const char * digits, DWORD onTime = 90, DWORD offTime = 30 )
Play a DTMF digit.
[more]virtual unsigned IsToneDetected ( unsigned line )
See if a tone is detected.


Inherited from OpalLineInterfaceDevice:

Public Methods

ovirtual BOOL IsOpen() const
ovirtual BOOL IsLineTerminal( unsigned line )
ovirtual BOOL IsLinePresent( unsigned line, BOOL force = FALSE )
ovirtual BOOL SetLineOnHook( unsigned line )
ovirtual BOOL HookFlash( unsigned line, unsigned flashTime = 200 )
ovirtual BOOL HasHookFlash(unsigned line)
ovirtual BOOL RingLine( unsigned line, DWORD cadence )
ovirtual BOOL IsLineDisconnected( unsigned line, BOOL checkForWink = TRUE )
ovirtual BOOL SetLineToLineDirect( unsigned line1, unsigned line2, BOOL connect )
ovirtual BOOL IsLineToLineDirect( unsigned line1, unsigned line2 )
ovirtual BOOL SetReadCodec( unsigned line, RTP_DataFrame::PayloadTypes codec )
ovirtual BOOL SetWriteCodec( unsigned line, RTP_DataFrame::PayloadTypes codec )
ovirtual BOOL SetRawCodec( unsigned line )
ovirtual BOOL StopRawCodec( unsigned line )
ovirtual BOOL ReadBlock( unsigned line, void * buf, PINDEX count )
ovirtual BOOL WriteBlock( unsigned line, const void * buf, PINDEX count )
ovirtual unsigned GetAverageSignalLevel( unsigned line, BOOL playback )
ovirtual BOOL EnableAudio( unsigned line, BOOL enable = TRUE )
oBOOL DisableAudio( unsigned line )
ovirtual BOOL GetRecordVolume( unsigned line, unsigned & volume )
ovirtual BOOL GetPlayVolume( unsigned line, unsigned & volume )
ovirtual AECLevels GetAEC( unsigned line )
ovirtual BOOL SetAEC( unsigned line, AECLevels level )
ovirtual BOOL GetVAD( unsigned line )
ovirtual BOOL SetVAD( unsigned line, BOOL enable )
ovirtual BOOL GetCallerID( unsigned line, PString & idString, BOOL full = FALSE )
ovirtual BOOL SetCallerID( unsigned line, const PString & idString )
ovirtual BOOL SendCallerIDOnCallWaiting( unsigned line, const PString & idString )
ovirtual BOOL SendVisualMessageWaitingIndicator( unsigned line, BOOL on )
ovirtual BOOL GetRemoveDTMF( unsigned line )
ovirtual BOOL SetRemoveDTMF( unsigned line, BOOL removeTones )
ovirtual unsigned WaitForToneDetect( unsigned line, unsigned timeout = 3000 )
ovirtual BOOL WaitForTone( unsigned line, CallProgressTones tone, unsigned timeout = 3000 )
ovirtual BOOL SetToneFilter( unsigned line, CallProgressTones tone, const PString & description )
ovirtual BOOL SetToneFilterParameters( unsigned line, CallProgressTones tone, unsigned lowFrequency, unsigned highFrequency, PINDEX numCadences, const unsigned * onTimes, const unsigned * offTimes )
ovirtual BOOL PlayTone( unsigned line, CallProgressTones tone )
ovirtual BOOL IsTonePlaying( unsigned line )
ovirtual BOOL StopTone( unsigned line )
ovirtual CallProgressTones DialOut( unsigned line, const PString & number, BOOL requireTones = FALSE )
oT35CountryCodes GetCountryCode() const
oPString GetCountryCodeName() const
ostatic PString GetCountryCodeName(T35CountryCodes code)
ovirtual BOOL SetCountryCode( T35CountryCodes country )
ovirtual BOOL SetCountryCodeName( const PString & countryName )
ovirtual PStringList GetCountryCodeNameList() const
oint GetErrorNumber() const
oPString GetErrorText() const


Documentation

This class describes the xJack line interface device
o OpalVpbDevice()
Create a new, closed, device for a VPB card

o ~OpalVpbDevice()
Destroy line interface device. This calls Close() on the device.

ovirtual BOOL Open( const PString & device )
Open the xJack device.
Parameters:
device - Device identifier name.

ovirtual BOOL Close()
Close the xJack device

ovirtual PString GetName() const
Get the device name

ovirtual unsigned GetLineCount()
Get the total number of lines supported by this device

ovirtual BOOL IsLineOffHook( unsigned line )
Determine if line is currently off hook. This returns TRUE if GetLineState() is a state that implies the line is off hook (eg OffHook or LineBusy).
Parameters:
line - Number of line

ovirtual BOOL SetLineOffHook( unsigned line, BOOL newState = TRUE )
Set the state of the line. Note that not be possible on a given line.
Parameters:
line - Number of line
newState - New state to set

ovirtual BOOL IsLineRinging( unsigned line, DWORD * cadence = NULL )
Determine if line is ringing.
Parameters:
line - Number of line
cadence - Cadence of incoming ring

ovirtual OpalMediaFormat::List GetMediaFormats() const
Get the media formats this device is capable of using

ovirtual BOOL SetReadFormat( unsigned line, const OpalMediaFormat & mediaFormat )
Set the codec for reading.
Parameters:
line - Number of line
mediaFormat - Codec type

ovirtual BOOL SetWriteFormat( unsigned line, const OpalMediaFormat & mediaFormat )
Set the codec for writing.
Parameters:
line - Number of line
mediaFormat - Codec type

ovirtual OpalMediaFormat GetReadFormat( unsigned line )
Get the media format (codec) for reading on the specified line.
Parameters:
line - Number of line

ovirtual OpalMediaFormat GetWriteFormat( unsigned line )
Get the media format (codec) for writing on the specified line.
Parameters:
line - Number of line

ovirtual BOOL StopReadCodec( unsigned line )
Stop the read codec.
Parameters:
line - Number of line

ovirtual BOOL StopWriteCodec( unsigned line )
Stop the write codec.
Parameters:
line - Number of line

ovirtual BOOL SetReadFrameSize( unsigned line, PINDEX frameSize )
Set the read frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.
Parameters:
line - Number of line
frameSize - New frame size

ovirtual BOOL SetWriteFrameSize( unsigned line, PINDEX frameSize )
Set the write frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.
Parameters:
line - Number of line
frameSize - New frame size

ovirtual PINDEX GetReadFrameSize( unsigned line )
Get the read frame size in bytes. All calls to ReadFrame() will return this number of bytes.
Parameters:
line - Number of line

ovirtual PINDEX GetWriteFrameSize( unsigned line )
Get the write frame size in bytes. All calls to WriteFrame() must be this number of bytes.
Parameters:
line - Number of line

ovirtual BOOL ReadFrame( unsigned line, void * buf, PINDEX & count )
Low level read of a frame from the device.
Parameters:
line - Number of line
buf - Pointer to a block of memory to receive the read bytes.
count - Number of bytes read, <= GetReadFrameSize()

ovirtual BOOL WriteFrame( unsigned line, const void * buf, PINDEX count, PINDEX & written )
Low level write frame to the device.
Parameters:
line - Number of line
buf - Pointer to a block of memory to write.
count - Number of bytes to write, <= GetWriteFrameSize()
written - Number of bytes written, <= GetWriteFrameSize()

ovirtual BOOL SetRecordVolume( unsigned line, unsigned volume )
Set volume level for recording. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.
Parameters:
line - Number of line
volume - Volume level from 0 to 100%

ovirtual BOOL SetPlayVolume( unsigned line, unsigned volume )
Set volume level for playing. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware.
Parameters:
line - Number of line
volume - Volume level from 0 to 100%

ovirtual char ReadDTMF( unsigned line )
Read a DTMF digit detected. This may be characters from the set 0-9, A-D, * or . A null ('\0')character indicates that there are no tones in the queue.

Parameters:
line - Number of line

ovirtual BOOL PlayDTMF( unsigned line, const char * digits, DWORD onTime = 90, DWORD offTime = 30 )
Play a DTMF digit. Any characters that are not in the set 0-9, A-D, * or will be ignored.
Parameters:
line - Number of line
digits - DTMF digits to be played
onTime - Number of milliseconds to play each DTMF digit
offTime - Number of milliseconds between digits

ovirtual unsigned IsToneDetected( unsigned line )
See if a tone is detected.
Parameters:
line - Number of line


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.