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
voidBreak(TRequestStatus &, TInt)
voidBreakCancel()
voidCaps(TDes8 &)
voidConfig(TDes8 &)
TUint MinTurnaroundTime()
voidNotifyReceiveDataAvailable(TRequestStatus &)
voidNotifyReceiveDataAvailableCancel()
voidNotifySignalChange(TRequestStatus &, TUint &, TUint)
voidNotifySignalChangeCancel()
TInt Open(TInt)
TInt QueryReceiveBuffer()
voidRead(TRequestStatus &, TDes8 &)
voidRead(TRequestStatus &, TDes8 &, TInt)
voidReadCancel()
voidReadOneOrMore(TRequestStatus &, TDes8 &)
TInt ReceiveBufferLength()
voidResetBuffers()
TInt SetConfig(const TDesC8 &)
TInt SetMinTurnaroundTime(TUint)
TInt SetReceiveBufferLength(TInt)
voidSetSignals(TUint, TUint)
TUint Signals()
TVersion VersionRequired()
voidWrite(TRequestStatus &, const TDesC8 &)
voidWrite(TRequestStatus &, const TDesC8 &, TInt)
voidWriteCancel()
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
enumTControl {
EControlConfig, EControlSetConfig, EControlCaps, EControlSignals, EControlSetSignals, EControlQueryReceiveBuffer, EControlResetBuffers, EControlReceiveBufferLength, EControlSetReceiveBufferLength, EControlMinTurnaroundTime, EControlSetMinTurnaroundTime
}
enumTRequest {
ERequestRead = 0x0, ERequestReadCancel = 0x1, ERequestWrite = 0x1, ERequestWriteCancel = 0x2, ERequestBreak = 0x2, ERequestBreakCancel = 0x4, ERequestNotifySignalChange = 0x3, ERequestNotifySignalChangeCancel = 0x8
}
enumTVer { EMajorVersionNumber = 1, EMinorVersionNumber = 0, EBuildVersionNumber = KE32BuildVersionNumber }
Inherited Enumerations
RHandleBase:TAttributes
Inherited Attributes
RHandleBase::iHandle

Member Functions Documentation

Break(TRequestStatus &, TInt)

voidBreak(TRequestStatus &aStatus,
TIntaTime
)[inline]

Causes a break condition to be transmitted to the receiving device

Parameters

TRequestStatus & aStatusThe asynchronous request status
TInt aTimeThe time interval in microseconds after which the break condition will be released

BreakCancel()

voidBreakCancel()[inline]

Cancel a pending break request

Caps(TDes8 &)

voidCaps(TDes8 &aCaps)[inline]

Get the capabilities of the serial device. TCommCapsV03

Parameters

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

Config(TDes8 &)

voidConfig(TDes8 &aConfig)[inline]

Get the current configuration of the serial device TCommConfigV02

Parameters

TDes8 & aConfigA 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 &)

voidNotifyReceiveDataAvailable(TRequestStatus &aStatus)[inline]

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

Parameters

TRequestStatus & aStatusThe asynchronous request status

NotifyReceiveDataAvailableCancel()

voidNotifyReceiveDataAvailableCancel()[inline]

Cancel a pending data notification request

NotifySignalChange(TRequestStatus &, TUint &, TUint)

voidNotifySignalChange(TRequestStatus &aStatus,
TUint &aSignals,
TUintaSignalMask = 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 & aStatusThe asynchronous request status
TUint & aSignalsPointer to the bitmask containing the changed signals
TUint aSignalMask = 0x3FBitmask of signals to be monitored

NotifySignalChangeCancel()

voidNotifySignalChangeCancel()[inline]

Cancel a pending signal change notification request

Open(TInt)

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

Parameters

TInt aUnitThe 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 &)

voidRead(TRequestStatus &aStatus,
TDes8 &aDes
)[inline]

Read from the channel

Parameters

TRequestStatus & aStatusThe asynchronous request status
TDes8 & aDesBuffer to be filled in by the driver

Read(TRequestStatus &, TDes8 &, TInt)

voidRead(TRequestStatus &aStatus,
TDes8 &aDes,
TIntaLength
)[inline]

Read from the channel

Parameters

TRequestStatus & aStatusThe asynchronous request status
TDes8 & aDesBuffer to be filled in by the driver
TInt aLengthThe length of the data to be read

ReadCancel()

voidReadCancel()[inline]

Cancel a pending read request

ReadOneOrMore(TRequestStatus &, TDes8 &)

voidReadOneOrMore(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 & aStatusThe asynchronous request status
TDes8 & aDesBuffer to be filled in by the driver

ReceiveBufferLength()

TInt ReceiveBufferLength()[inline]

Get the length of the receive buffer

ResetBuffers()

voidResetBuffers()[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 & aConfigA packaged object containing the configuration information

SetMinTurnaroundTime(TUint)

TInt SetMinTurnaroundTime(TUintaMicroSeconds)[inline]

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

Parameters

TUint aMicroSecondsThe turnaround time in microseconds

SetReceiveBufferLength(TInt)

TInt SetReceiveBufferLength(TIntaLength)[inline]

Set the length of the receive buffer

Parameters

TInt aLengthThe length of the receive buffer to be set

SetSignals(TUint, TUint)

voidSetSignals(TUintaSetMask,
TUintaClearMask
)[inline]

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

Parameters

TUint aSetMaskBitmask of signals to set
TUint aClearMaskBitmask 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 &)

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

Write to the channel

Parameters

TRequestStatus & aStatusThe asynchronous request status
const TDesC8 & aDesBuffer containing the data to be sent

Write(TRequestStatus &, const TDesC8 &, TInt)

voidWrite(TRequestStatus &aStatus,
const TDesC8 &aDes,
TIntaLength
)[inline]

Write to the channel

Parameters

TRequestStatus & aStatusThe asynchronous request status
const TDesC8 & aDesBuffer containing the data to be sent
TInt aLengthThe length of the data to be sent

WriteCancel()

voidWriteCancel()[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