Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OpalVpbDevice Class Reference

#include <vpblid.h>

Inheritance diagram for OpalVpbDevice:

OpalLineInterfaceDevice List of all members.

Public Member Functions

 OpalVpbDevice ()
 ~OpalVpbDevice ()
virtual BOOL Open (const PString &device)
virtual BOOL Close ()
virtual PString GetName () const
virtual unsigned GetLineCount ()
virtual BOOL IsLineOffHook (unsigned line)
virtual BOOL SetLineOffHook (unsigned line, BOOL newState=TRUE)
virtual BOOL IsLineRinging (unsigned line, DWORD *cadence=NULL)
virtual BOOL IsLineDisconnected (unsigned line, BOOL checkForWink=TRUE)
virtual OpalMediaFormat::List GetMediaFormats () const
virtual BOOL SetReadFormat (unsigned line, const OpalMediaFormat &mediaFormat)
virtual BOOL SetWriteFormat (unsigned line, const OpalMediaFormat &mediaFormat)
virtual OpalMediaFormat GetReadFormat (unsigned line)
virtual OpalMediaFormat GetWriteFormat (unsigned line)
virtual BOOL StopReadCodec (unsigned line)
virtual BOOL StopWriteCodec (unsigned line)
virtual BOOL SetReadFrameSize (unsigned line, PINDEX frameSize)
virtual BOOL SetWriteFrameSize (unsigned line, PINDEX frameSize)
virtual PINDEX GetReadFrameSize (unsigned line)
virtual PINDEX GetWriteFrameSize (unsigned line)
virtual BOOL ReadFrame (unsigned line, void *buf, PINDEX &count)
virtual BOOL WriteFrame (unsigned line, const void *buf, PINDEX count, PINDEX &written)
virtual BOOL SetRecordVolume (unsigned line, unsigned volume)
virtual BOOL SetPlayVolume (unsigned line, unsigned volume)
int GetOSHandle (unsigned line)
virtual char ReadDTMF (unsigned line)
virtual BOOL PlayDTMF (unsigned line, const char *digits, DWORD onTime=90, DWORD offTime=30)
virtual unsigned IsToneDetected (unsigned line)
virtual BOOL PlayTone (unsigned line, CallProgressTones tone)
virtual BOOL StopTone (unsigned line)
virtual BOOL PlayAudio (unsigned line, const PString &filename)
virtual BOOL StopAudio (unsigned line)

Protected Types

enum  { MaxLineCount = 8 }

Protected Attributes

unsigned cardNumber
unsigned lineCount
OpalVpbDevice::LineState lineState [MaxLineCount]

Detailed Description

This class describes the Voicetronix line interface device.


Member Enumeration Documentation

anonymous enum [protected]
 

Enumeration values:
MaxLineCount 


Constructor & Destructor Documentation

OpalVpbDevice::OpalVpbDevice  ) 
 

Create a new, closed, device for a VPB card.

OpalVpbDevice::~OpalVpbDevice  )  [inline]
 

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


Member Function Documentation

virtual BOOL OpalVpbDevice::Close  )  [virtual]
 

Close the device.

Reimplemented from OpalLineInterfaceDevice.

virtual unsigned OpalVpbDevice::GetLineCount  )  [virtual]
 

Get the total number of lines supported by this device.

Implements OpalLineInterfaceDevice.

virtual OpalMediaFormat::List OpalVpbDevice::GetMediaFormats  )  const [virtual]
 

Get the media formats this device is capable of using.

Implements OpalLineInterfaceDevice.

virtual PString OpalVpbDevice::GetName  )  const [virtual]
 

Get the device name.

Implements OpalLineInterfaceDevice.

int OpalVpbDevice::GetOSHandle unsigned  line  ) 
 

Return line handle

Parameters:
line  Number of line

virtual OpalMediaFormat OpalVpbDevice::GetReadFormat unsigned  line  )  [virtual]
 

Get the media format (codec) for reading on the specified line.

Parameters:
line  Number of line

Implements OpalLineInterfaceDevice.

virtual PINDEX OpalVpbDevice::GetReadFrameSize unsigned  line  )  [virtual]
 

Get the read frame size in bytes. All calls to ReadFrame() will return this number of bytes.

Parameters:
line  Number of line

Implements OpalLineInterfaceDevice.

virtual OpalMediaFormat OpalVpbDevice::GetWriteFormat unsigned  line  )  [virtual]
 

Get the media format (codec) for writing on the specified line.

Parameters:
line  Number of line

Implements OpalLineInterfaceDevice.

virtual PINDEX OpalVpbDevice::GetWriteFrameSize unsigned  line  )  [virtual]
 

Get the write frame size in bytes. All calls to WriteFrame() must be this number of bytes.

Parameters:
line  Number of line

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::IsLineDisconnected unsigned  line,
BOOL  checkForWink = TRUE
[virtual]
 

Determine if line has been disconnected from a call. return TRUE if a tone is detected.

Parameters:
checkForWink  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::IsLineOffHook unsigned  line  )  [virtual]
 

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

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::IsLineRinging unsigned  line,
DWORD *  cadence = NULL
[virtual]
 

Determine if line is ringing.

Parameters:
cadence  Number of line Cadence of incoming ring

Reimplemented from OpalLineInterfaceDevice.

virtual unsigned OpalVpbDevice::IsToneDetected unsigned  line  )  [virtual]
 

See if a tone is detected.

Parameters:
line  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::Open const PString &  device  )  [virtual]
 

Open the device.

Parameters:
device  Device identifier name.

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::PlayAudio unsigned  line,
const PString &  filename
[virtual]
 

Play a wav file

Parameters:
filename  Number of line File Name

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::PlayDTMF unsigned  line,
const char *  digits,
DWORD  onTime = 90,
DWORD  offTime = 30
[virtual]
 

Play a DTMF digit. Any characters that are not in the set 0-9, A-D, * or # will be ignored.

Parameters:
digits  Number of line
onTime  DTMF digits to be played
offTime  Number of milliseconds to play each DTMF digit Number of milliseconds between digits

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::PlayTone unsigned  line,
CallProgressTones  tone
[virtual]
 

Play a tone.

Parameters:
tone  Number of line Tone to be played

Reimplemented from OpalLineInterfaceDevice.

virtual char OpalVpbDevice::ReadDTMF unsigned  line  )  [virtual]
 

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

Parameters:
line  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::ReadFrame unsigned  line,
void *  buf,
PINDEX &  count
[virtual]
 

Low level read of a frame from the device.

Parameters:
buf  Number of line
count  Pointer to a block of memory to receive the read bytes. Number of bytes read, <= GetReadFrameSize()

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetLineOffHook unsigned  line,
BOOL  newState = TRUE
[virtual]
 

Set the state of the line. Note that not be possible on a given line.

Parameters:
newState  Number of line New state to set

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetPlayVolume unsigned  line,
unsigned  volume
[virtual]
 

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:
volume  Number of line Volume level from 0 to 100%

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetReadFormat unsigned  line,
const OpalMediaFormat mediaFormat
[virtual]
 

Set the codec for reading.

Parameters:
mediaFormat  Number of line Codec type

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetReadFrameSize unsigned  line,
PINDEX  frameSize
[virtual]
 

Set the read frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.

Parameters:
frameSize  Number of line New frame size

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetRecordVolume unsigned  line,
unsigned  volume
[virtual]
 

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:
volume  Number of line Volume level from 0 to 100%

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetWriteFormat unsigned  line,
const OpalMediaFormat mediaFormat
[virtual]
 

Set the codec for writing.

Parameters:
mediaFormat  Number of line Codec type

Implements OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::SetWriteFrameSize unsigned  line,
PINDEX  frameSize
[virtual]
 

Set the write frame size in bytes. Note that a LID may ignore this value so always use GetReadFrameSize() for I/O.

Parameters:
frameSize  Number of line New frame size

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::StopAudio unsigned  line  )  [virtual]
 

Stop playing the Wave File

Parameters:
line  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::StopReadCodec unsigned  line  )  [virtual]
 

Stop the read codec.

Parameters:
line  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::StopTone unsigned  line  )  [virtual]
 

Stop playing a tone.

Parameters:
line  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::StopWriteCodec unsigned  line  )  [virtual]
 

Stop the write codec.

Parameters:
line  Number of line

Reimplemented from OpalLineInterfaceDevice.

virtual BOOL OpalVpbDevice::WriteFrame unsigned  line,
const void *  buf,
PINDEX  count,
PINDEX &  written
[virtual]
 

Low level write frame to the device.

Parameters:
buf  Number of line
count  Pointer to a block of memory to write.
written  Number of bytes to write, <= GetWriteFrameSize() Number of bytes written, <= GetWriteFrameSize()

Implements OpalLineInterfaceDevice.


Member Data Documentation

unsigned OpalVpbDevice::cardNumber [protected]
 

unsigned OpalVpbDevice::lineCount [protected]
 

struct OpalVpbDevice::LineState OpalVpbDevice::lineState[MaxLineCount] [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Jul 24 17:04:28 2004 for OpenH323 by doxygen 1.3.7