RBusDevComm Class Reference

class RBusDevComm : public RBusLogicalChannel

The externally visible interface through which the clients can access serial devices. It also represents a user side handle to the serial device driver.

Inherits from

Public Member Functions
void Break ( TRequestStatus &, TInt )
void BreakCancel ()
void Caps ( TDes8 &)
void Config ( TDes8 &)
TUint MinTurnaroundTime ()
void NotifyReceiveDataAvailable ( TRequestStatus &)
void NotifyReceiveDataAvailableCancel ()
void NotifySignalChange ( TRequestStatus &, TUint &, TUint )
void NotifySignalChangeCancel ()
TInt Open ( TInt )
TInt QueryReceiveBuffer ()
void Read ( TRequestStatus &, TDes8 &)
void Read ( TRequestStatus &, TDes8 &, TInt )
void ReadCancel ()
void ReadOneOrMore ( TRequestStatus &, TDes8 &)
TInt ReceiveBufferLength ()
void ResetBuffers ()
TInt SetConfig (const TDesC8 &)
TInt SetMinTurnaroundTime ( TUint )
TInt SetReceiveBufferLength ( TInt )
void SetSignals ( TUint , TUint )
TUint Signals ()
TVersion VersionRequired ()
void Write ( TRequestStatus &, const TDesC8 &)
void Write ( TRequestStatus &, const TDesC8 &, TInt )
void WriteCancel ()
Inherited Functions
RBusLogicalChannel::DoCancel(TUint)
RBusLogicalChannel::DoControl(TInt)
RBusLogicalChannel::DoControl(TInt,TAny *)
RBusLogicalChannel::DoControl(TInt,TAny *,TAny *)
RBusLogicalChannel::DoCreate(const TDesC &,const TVersion &,TInt,const TDesC *,const TDesC8 *,TOwnerType,TBool)
RBusLogicalChannel::DoRequest(TInt,TRequestStatus &)
RBusLogicalChannel::DoRequest(TInt,TRequestStatus &,TAny *)
RBusLogicalChannel::DoRequest(TInt,TRequestStatus &,TAny *,TAny *)
RBusLogicalChannel::DoSvControl(TInt)
RBusLogicalChannel::DoSvControl(TInt,TAny *)
RBusLogicalChannel::DoSvControl(TInt,TAny *,TAny *)
RBusLogicalChannel::Open(RMessagePtr2,TInt,TOwnerType)
RBusLogicalChannel::Open(TInt,TOwnerType)
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RHandleBase::SetReturnedHandle(TInt)
RHandleBase::SetReturnedHandle(TInt,RHandleBase &)
Public Member Enumerations
enum TControl {
EControlConfig , EControlSetConfig , EControlCaps , EControlSignals , EControlSetSignals , EControlQueryReceiveBuffer , EControlResetBuffers , EControlReceiveBufferLength , EControlSetReceiveBufferLength , EControlMinTurnaroundTime , EControlSetMinTurnaroundTime
}
enum TRequest {
ERequestRead  = 0x0, ERequestReadCancel  = 0x1, ERequestWrite  = 0x1, ERequestWriteCancel  = 0x2, ERequestBreak  = 0x2, ERequestBreakCancel  = 0x4, ERequestNotifySignalChange  = 0x3, ERequestNotifySignalChangeCancel  = 0x8
}
enum TVer { EMajorVersionNumber  = 1, EMinorVersionNumber  = 0, EBuildVersionNumber  = KE32BuildVersionNumber }
Inherited Enumerations
RHandleBase:TAttributes
Inherited Attributes
RHandleBase::iHandle

Member Functions Documentation

Break(TRequestStatus &, TInt)

void Break ( TRequestStatus & aStatus,
TInt aTime
) [inline]

Causes a break condition to be transmitted to the receiving device

Parameters

TRequestStatus & aStatus The asynchronous request status
TInt aTime The time interval in microseconds after which the break condition will be released

BreakCancel()

void BreakCancel ( ) [inline]

Cancel a pending break request

Caps(TDes8 &)

void Caps ( TDes8 & aCaps ) [inline]

Get the capabilities of the serial device. TCommCapsV03

Parameters

TDes8 & aCaps A packaged object to be filled with the capabilities of the device.

Config(TDes8 &)

void Config ( TDes8 & aConfig ) [inline]

Get the current configuration of the serial device TCommConfigV02

Parameters

TDes8 & aConfig A packaged object to be filled with the configuration information by the driver

MinTurnaroundTime()

TUint MinTurnaroundTime ( ) [inline]

Get the minimum turnaround time before a transmission can begin after a receive operation

NotifyReceiveDataAvailable(TRequestStatus &)

void NotifyReceiveDataAvailable ( TRequestStatus & aStatus ) [inline]

Request notification when there is data available to be read from the driver receive buffer

Parameters

TRequestStatus & aStatus The asynchronous request status

NotifyReceiveDataAvailableCancel()

void NotifyReceiveDataAvailableCancel ( ) [inline]

Cancel a pending data notification request

NotifySignalChange(TRequestStatus &, TUint &, TUint)

void NotifySignalChange ( TRequestStatus & aStatus,
TUint & aSignals,
TUint aSignalMask = 0x3F
) [inline]

Request notification when one of the signals change. The signals that could change are KSignalCTS, KSignalDSR, KSignalDCD, KSignalRNG, KSignalRTS, KSignalDTR, KSignalBreak.

Parameters

TRequestStatus & aStatus The asynchronous request status
TUint & aSignals Pointer to the bitmask containing the changed signals
TUint aSignalMask = 0x3F Bitmask of signals to be monitored

NotifySignalChangeCancel()

void NotifySignalChangeCancel ( ) [inline]

Cancel a pending signal change notification request

Open(TInt)

TInt Open ( TInt aUnit ) [inline]
This function opens a channel and creates a handle to the serial driver.
capability
CommDD

Parameters

TInt aUnit The unit number of the serial device.

QueryReceiveBuffer()

TInt QueryReceiveBuffer ( ) [inline]

Get the number of unread characters in the receive buffer of the driver

Read(TRequestStatus &, TDes8 &)

void Read ( TRequestStatus & aStatus,
TDes8 & aDes
) [inline]

Read from the channel

Parameters

TRequestStatus & aStatus The asynchronous request status
TDes8 & aDes Buffer to be filled in by the driver

Read(TRequestStatus &, TDes8 &, TInt)

void Read ( TRequestStatus & aStatus,
TDes8 & aDes,
TInt aLength
) [inline]

Read from the channel

Parameters

TRequestStatus & aStatus The asynchronous request status
TDes8 & aDes Buffer to be filled in by the driver
TInt aLength The length of the data to be read

ReadCancel()

void ReadCancel ( ) [inline]

Cancel a pending read request

ReadOneOrMore(TRequestStatus &, TDes8 &)

void ReadOneOrMore ( TRequestStatus & aStatus,
TDes8 & aDes
) [inline]

Read one or more characters from the channel. If there is data in the serial driver's buffer when ReadOneOrMore() is called it will read as much data as possible (up to the maximum length of the supplied buffer) and then return. If there is no data in the buffer the request will complete as soon as one or more bytes arrive at the serial hardware.

Parameters

TRequestStatus & aStatus The asynchronous request status
TDes8 & aDes Buffer to be filled in by the driver

ReceiveBufferLength()

TInt ReceiveBufferLength ( ) [inline]

Get the length of the receive buffer

ResetBuffers()

void ResetBuffers ( ) [inline]

Reset the receive and transmit buffers.

SetConfig(const TDesC8 &)

TInt SetConfig ( const TDesC8 & aConfig ) [inline]

Set the cofiguration of the serial device TCommConfigV02

Parameters

const TDesC8 & aConfig A packaged object containing the configuration information

SetMinTurnaroundTime(TUint)

TInt SetMinTurnaroundTime ( TUint aMicroSeconds ) [inline]

Set the minimum turnaround time between a receive and the next transmission operation

Parameters

TUint aMicroSeconds The turnaround time in microseconds

SetReceiveBufferLength(TInt)

TInt SetReceiveBufferLength ( TInt aLength ) [inline]

Set the length of the receive buffer

Parameters

TInt aLength The length of the receive buffer to be set

SetSignals(TUint, TUint)

void SetSignals ( TUint aSetMask,
TUint aClearMask
) [inline]

Set and clear the control lines Signals for a list of signals

Parameters

TUint aSetMask Bitmask of signals to set
TUint aClearMask Bitmask of signals to clear

Signals()

TUint Signals ( ) [inline]

Get the status of the control lines

VersionRequired()

TVersion VersionRequired ( ) const [inline]

Get the version number required by the driver TVersion

Write(TRequestStatus &, const TDesC8 &)

void Write ( TRequestStatus & aStatus,
const TDesC8 & aDes
) [inline]

Write to the channel

Parameters

TRequestStatus & aStatus The asynchronous request status
const TDesC8 & aDes Buffer containing the data to be sent

Write(TRequestStatus &, const TDesC8 &, TInt)

void Write ( TRequestStatus & aStatus,
const TDesC8 & aDes,
TInt aLength
) [inline]

Write to the channel

Parameters

TRequestStatus & aStatus The asynchronous request status
const TDesC8 & aDes Buffer containing the data to be sent
TInt aLength The length of the data to be sent

WriteCancel()

void WriteCancel ( ) [inline]

Cancel a pending write request

Member Enumerations Documentation

Enum TControl

Synchronous request types

Enumerators

EControlConfig

Get the current configuration

EControlSetConfig

Set the device configuration

EControlCaps

Get the device capabilities

EControlSignals

Read the state of Modem control signals supported

EControlSetSignals

Set the state of output modem control signals

EControlQueryReceiveBuffer

Query the driver receive buffer for data availability

EControlResetBuffers

Reset the driver buffers

EControlReceiveBufferLength

Get the driver receive buffer length

EControlSetReceiveBufferLength

Set the driver receive buffer length

EControlMinTurnaroundTime

Get the minimum turnaround time between a receive and subsequent transmission operation

EControlSetMinTurnaroundTime

Set the minimum turnaround time between a receive and subsequent transmission operation

Enum TRequest

Asynchronous request types

Enumerators

ERequestRead = 0x0

Read request

ERequestReadCancel = 0x1

Cancel read request

ERequestWrite = 0x1

Write reqeust

ERequestWriteCancel = 0x2

Cancel write request

ERequestBreak = 0x2

Break request

ERequestBreakCancel = 0x4

Cancel break request

ERequestNotifySignalChange = 0x3

Signal change notification request

ERequestNotifySignalChangeCancel = 0x8

Cancel signal change notification request

Enum TVer

Serial device driver build version.

Enumerators

EMajorVersionNumber = 1

Major Version

EMinorVersionNumber = 0

Minor Version

EBuildVersionNumber = KE32BuildVersionNumber

Build Version