class OpalLineChannel

This class describes an I/O channel that uses a Line Interface Device

Inheritance:


Public Methods

[more] OpalLineChannel ( OpalLineInterfaceDevice & device, unsigned line, const H323AudioCodec & codec )
Create a new channel to a line interface device.
[more]PString GetName () const
Get the device name
[more]BOOL Close ()
Close the channel
[more]virtual BOOL Read ( void* buf, PINDEX len )
Low level read from the channel.
[more]virtual BOOL Write ( const void* buf, PINDEX len )
Low level write to the channel.
[more]OpalLineInterfaceDevice& GetDevice () const
Get the device the channel is writing to
[more]unsigned GetLineNumber () const
Get the line number on device the channel is writing to


Documentation

This class describes an I/O channel that uses a Line Interface Device
o OpalLineChannel( OpalLineInterfaceDevice & device, unsigned line, const H323AudioCodec & codec )
Create a new channel to a line interface device.
Parameters:
device - Device for channel I/O
line - Number of line
codec - Codec that uses the channel

oPString GetName() const
Get the device name

oBOOL Close()
Close the channel

ovirtual BOOL Read( void* buf, PINDEX len )
Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The GetLastReadCount() function returns the actual number of bytes read.

The GetErrorCode() function should be consulted after Read() returns FALSE to determine what caused the failure.

Parameters:
buf - Pointer to a block of memory to receive the read bytes.
len - Maximum number of bytes to read into the buffer.
Returns:
TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error.

ovirtual BOOL Write( const void* buf, PINDEX len )
Low level write to the channel. This function will block until the requested number of characters are written or the write timeout is reached. The GetLastWriteCount() function returns the actual number of bytes written.

The GetErrorCode() function should be consulted after Write() returns FALSE to determine what caused the failure.

Parameters:
buf - Pointer to a block of memory to write.
len - Number of bytes to write.
Returns:
TRUE if at least len bytes were written to the channel.

oOpalLineInterfaceDevice& GetDevice() const
Get the device the channel is writing to

ounsigned GetLineNumber() const
Get the line number on device the channel is writing to


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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