RComm Class Reference

class RComm : public RSubSessionBase

A sub-session to the C32 Serial Server used for addressing a serial port.

All the necessary functions are provided by this class for communicating via a port, including functions for opening, closing, reading, writing, port configuration and capability checking. An RComm session represents a single serial port and once opened cannot be altered to represent another port.

Ports are referenced by a character string whose format is referred to as Port Prefix format. This format is also known as the CSY internal name, and the ports "short" name in older releases.

Inherits from

Public Member Functions
RComm()
IMPORT_C voidBreak(TRequestStatus &, TTimeIntervalMicroSeconds32)
IMPORT_C TIntBreakCancel()
IMPORT_C TIntCancel()
IMPORT_C TIntCaps(TDes8 &)
IMPORT_C voidClose()
IMPORT_C TIntConfig(TDes8 &)
IMPORT_C TIntDebugState(TCommDebugInfo &)
IMPORT_C TIntGetFlowControlStatus(TFlowControl &)
IMPORT_C TIntGetRole(TCommRole &)
IMPORT_C TIntMode(TCommServerConfig &)
IMPORT_C voidNotifyBreak(TRequestStatus &)
IMPORT_C TIntNotifyBreakCancel()
IMPORT_C voidNotifyConfigChange(TRequestStatus &, TDes8 &)
IMPORT_C TIntNotifyConfigChangeCancel()
IMPORT_C voidNotifyDataAvailable(TRequestStatus &)
IMPORT_C TIntNotifyDataAvailableCancel()
IMPORT_C voidNotifyFlowControlChange(TRequestStatus &, TFlowControl &)
IMPORT_C TIntNotifyFlowControlChangeCancel()
IMPORT_C voidNotifyOutputEmpty(TRequestStatus &)
IMPORT_C TIntNotifyOutputEmptyCancel()
IMPORT_C voidNotifySignalChange(TRequestStatus &, TUint &, TUint)
IMPORT_C TIntNotifySignalChangeCancel()
IMPORT_C TIntOpen(RCommServ &, const TDesC &, TCommAccess)
IMPORT_C TIntOpen(RCommServ &, const TDesC &, TCommAccess, TCommRole)
IMPORT_C voidOpenWhenAvailable(TRequestStatus &, RCommServ &, const TDesC &)
IMPORT_C voidOpenWhenAvailable(TRequestStatus &, RCommServ &, const TDesC &, TCommRole)
IMPORT_C voidOpenWhenAvailableCancel()
IMPORT_C TIntQueryReceiveBuffer()
IMPORT_C voidRead(TRequestStatus &, TDes8 &)
IMPORT_C voidRead(TRequestStatus &, TDes8 &, TInt)
IMPORT_C voidRead(TRequestStatus &, TTimeIntervalMicroSeconds32, TDes8 &)
IMPORT_C voidRead(TRequestStatus &, TTimeIntervalMicroSeconds32, TDes8 &, TInt)
IMPORT_C TIntReadCancel()
IMPORT_C voidReadOneOrMore(TRequestStatus &, TDes8 &)
IMPORT_C TIntReceiveBufferLength()
IMPORT_C TIntResetBuffers(TUint)
IMPORT_C TIntSetAccessMode(TCommAccess)
IMPORT_C TIntSetConfig(const TDesC8 &)
IMPORT_C TIntSetMode(const TCommServerConfig &)
IMPORT_C TIntSetReceiveBufferLength(TInt)
voidSetSignals(TUint, TUint)
IMPORT_C TIntSetSignalsToMark(TUint)
IMPORT_C TIntSetSignalsToSpace(TUint)
IMPORT_C TUintSignals(TUint)
IMPORT_C voidWrite(TRequestStatus &, const TDesC8 &)
IMPORT_C voidWrite(TRequestStatus &, const TDesC8 &, TInt)
IMPORT_C voidWrite(TRequestStatus &, TTimeIntervalMicroSeconds32, const TDesC8 &)
IMPORT_C voidWrite(TRequestStatus &, TTimeIntervalMicroSeconds32, const TDesC8 &, TInt)
IMPORT_C TIntWriteCancel()
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Private Attributes
TPtr8 iFlowNotification
TPtr8 iSignalsNotification

Constructor & Destructor Documentation

RComm()

IMPORT_CRComm()

Member Functions Documentation

Break(TRequestStatus &, TTimeIntervalMicroSeconds32)

IMPORT_C voidBreak(TRequestStatus &aStatus,
TTimeIntervalMicroSeconds32aTime
)

Parameters

TRequestStatus & aStatus
TTimeIntervalMicroSeconds32 aTime

BreakCancel()

IMPORT_C TIntBreakCancel()

Cancel()

IMPORT_C TIntCancel()

Caps(TDes8 &)

IMPORT_C TIntCaps(TDes8 &aCaps)const

Parameters

TDes8 & aCaps

Close()

IMPORT_C voidClose()

Config(TDes8 &)

IMPORT_C TIntConfig(TDes8 &aConfig)const

Parameters

TDes8 & aConfig

DebugState(TCommDebugInfo &)

IMPORT_C TIntDebugState(TCommDebugInfo &)

Parameters

TCommDebugInfo &

GetFlowControlStatus(TFlowControl &)

IMPORT_C TIntGetFlowControlStatus(TFlowControl &aFlowControl)const

Parameters

TFlowControl & aFlowControl

GetRole(TCommRole &)

IMPORT_C TIntGetRole(TCommRole &aRole)const

Parameters

TCommRole & aRole

Mode(TCommServerConfig &)

IMPORT_C TIntMode(TCommServerConfig &aConfig)const

Parameters

TCommServerConfig & aConfig

NotifyBreak(TRequestStatus &)

IMPORT_C voidNotifyBreak(TRequestStatus &aStatus)const

Parameters

TRequestStatus & aStatus

NotifyBreakCancel()

IMPORT_C TIntNotifyBreakCancel()const

NotifyConfigChange(TRequestStatus &, TDes8 &)

IMPORT_C voidNotifyConfigChange(TRequestStatus &aStatus,
TDes8 &aNewConfig
)const

Parameters

TRequestStatus & aStatus
TDes8 & aNewConfig

NotifyConfigChangeCancel()

IMPORT_C TIntNotifyConfigChangeCancel()const

NotifyDataAvailable(TRequestStatus &)

IMPORT_C voidNotifyDataAvailable(TRequestStatus &aStatus)const

Parameters

TRequestStatus & aStatus

NotifyDataAvailableCancel()

IMPORT_C TIntNotifyDataAvailableCancel()const

NotifyFlowControlChange(TRequestStatus &, TFlowControl &)

IMPORT_C voidNotifyFlowControlChange(TRequestStatus &aStatus,
TFlowControl &aFlowControl
)

Parameters

TRequestStatus & aStatus
TFlowControl & aFlowControl

NotifyFlowControlChangeCancel()

IMPORT_C TIntNotifyFlowControlChangeCancel()const

NotifyOutputEmpty(TRequestStatus &)

IMPORT_C voidNotifyOutputEmpty(TRequestStatus &aStatus)const

Parameters

TRequestStatus & aStatus

NotifyOutputEmptyCancel()

IMPORT_C TIntNotifyOutputEmptyCancel()const

NotifySignalChange(TRequestStatus &, TUint &, TUint)

IMPORT_C voidNotifySignalChange(TRequestStatus &aStatus,
TUint &aSignals,
TUintaSignalMask = 0x3F
)

Parameters

TRequestStatus & aStatus
TUint & aSignals
TUint aSignalMask = 0x3F

NotifySignalChangeCancel()

IMPORT_C TIntNotifySignalChangeCancel()const

Open(RCommServ &, const TDesC &, TCommAccess)

IMPORT_C TIntOpen(RCommServ &aServer,
const TDesC &aName,
TCommAccessaMode
)

Parameters

RCommServ & aServer
const TDesC & aName
TCommAccess aMode

Open(RCommServ &, const TDesC &, TCommAccess, TCommRole)

IMPORT_C TIntOpen(RCommServ &aServer,
const TDesC &aName,
TCommAccessaMode,
TCommRoleaRole
)

Parameters

RCommServ & aServer
const TDesC & aName
TCommAccess aMode
TCommRole aRole

OpenWhenAvailable(TRequestStatus &, RCommServ &, const TDesC &)

IMPORT_C voidOpenWhenAvailable(TRequestStatus &aStatus,
RCommServ &aServer,
const TDesC &aName
)

Parameters

TRequestStatus & aStatus
RCommServ & aServer
const TDesC & aName

OpenWhenAvailable(TRequestStatus &, RCommServ &, const TDesC &, TCommRole)

IMPORT_C voidOpenWhenAvailable(TRequestStatus &aStatus,
RCommServ &aServer,
const TDesC &aName,
TCommRoleaRole
)

Parameters

TRequestStatus & aStatus
RCommServ & aServer
const TDesC & aName
TCommRole aRole

OpenWhenAvailableCancel()

IMPORT_C voidOpenWhenAvailableCancel()

QueryReceiveBuffer()

IMPORT_C TIntQueryReceiveBuffer()const

Read(TRequestStatus &, TDes8 &)

IMPORT_C voidRead(TRequestStatus &aStatus,
TDes8 &aDes
)

Parameters

TRequestStatus & aStatus
TDes8 & aDes

Read(TRequestStatus &, TDes8 &, TInt)

IMPORT_C voidRead(TRequestStatus &aStatus,
TDes8 &aDes,
TIntaLength
)

Parameters

TRequestStatus & aStatus
TDes8 & aDes
TInt aLength

Read(TRequestStatus &, TTimeIntervalMicroSeconds32, TDes8 &)

IMPORT_C voidRead(TRequestStatus &aStatus,
TTimeIntervalMicroSeconds32aTimeOut,
TDes8 &aDes
)

Parameters

TRequestStatus & aStatus
TTimeIntervalMicroSeconds32 aTimeOut
TDes8 & aDes

Read(TRequestStatus &, TTimeIntervalMicroSeconds32, TDes8 &, TInt)

IMPORT_C voidRead(TRequestStatus &aStatus,
TTimeIntervalMicroSeconds32aTimeOut,
TDes8 &aDes,
TIntaLength
)

Parameters

TRequestStatus & aStatus
TTimeIntervalMicroSeconds32 aTimeOut
TDes8 & aDes
TInt aLength

ReadCancel()

IMPORT_C TIntReadCancel()

ReadOneOrMore(TRequestStatus &, TDes8 &)

IMPORT_C voidReadOneOrMore(TRequestStatus &aStatus,
TDes8 &aDes
)

Parameters

TRequestStatus & aStatus
TDes8 & aDes

ReceiveBufferLength()

IMPORT_C TIntReceiveBufferLength()const

ResetBuffers(TUint)

IMPORT_C TIntResetBuffers(TUintaFlags = (KCommResetRx|KCommResetTx))

Parameters

TUint aFlags = (KCommResetRx|KCommResetTx)

SetAccessMode(TCommAccess)

IMPORT_C TIntSetAccessMode(TCommAccessaNewMode)

Parameters

TCommAccess aNewMode

SetConfig(const TDesC8 &)

IMPORT_C TIntSetConfig(const TDesC8 &aConfig)

Parameters

const TDesC8 & aConfig

SetMode(const TCommServerConfig &)

IMPORT_C TIntSetMode(const TCommServerConfig &aConfig)

Parameters

const TCommServerConfig & aConfig

SetReceiveBufferLength(TInt)

IMPORT_C TIntSetReceiveBufferLength(TIntaLength)

Parameters

TInt aLength

SetSignals(TUint, TUint)

voidSetSignals(TUintaSetMask,
TUintaClearMask
)[inline]

Sets or clears RS232 output lines (DTR and RTS).

For many applications, these lines will be read and set under driver control as determined by the handshaking options selected.

Parameters

TUint aSetMaskSet the handshaking lines in the mask.
TUint aClearMaskClear the handshaking lines in the mask.

SetSignalsToMark(TUint)

IMPORT_C TIntSetSignalsToMark(TUintaSignalMask)

Parameters

TUint aSignalMask

SetSignalsToSpace(TUint)

IMPORT_C TIntSetSignalsToSpace(TUintaSignalMask)

Parameters

TUint aSignalMask

Signals(TUint)

IMPORT_C TUintSignals(TUintaSignalMask = 0x3F)const

Parameters

TUint aSignalMask = 0x3F

Write(TRequestStatus &, const TDesC8 &)

IMPORT_C voidWrite(TRequestStatus &aStatus,
const TDesC8 &aDes
)

Parameters

TRequestStatus & aStatus
const TDesC8 & aDes

Write(TRequestStatus &, const TDesC8 &, TInt)

IMPORT_C voidWrite(TRequestStatus &aStatus,
const TDesC8 &aDes,
TIntaLength
)

Parameters

TRequestStatus & aStatus
const TDesC8 & aDes
TInt aLength

Write(TRequestStatus &, TTimeIntervalMicroSeconds32, const TDesC8 &)

IMPORT_C voidWrite(TRequestStatus &aStatus,
TTimeIntervalMicroSeconds32aTimeOut,
const TDesC8 &aDes
)

Parameters

TRequestStatus & aStatus
TTimeIntervalMicroSeconds32 aTimeOut
const TDesC8 & aDes

Write(TRequestStatus &, TTimeIntervalMicroSeconds32, const TDesC8 &, TInt)

IMPORT_C voidWrite(TRequestStatus &aStatus,
TTimeIntervalMicroSeconds32aTimeOut,
const TDesC8 &aDes,
TIntaLength
)

Parameters

TRequestStatus & aStatus
TTimeIntervalMicroSeconds32 aTimeOut
const TDesC8 & aDes
TInt aLength

WriteCancel()

IMPORT_C TIntWriteCancel()

Member Data Documentation

TPtr8 iFlowNotification

TPtr8 iFlowNotification[private]

TPtr8 iSignalsNotification

TPtr8 iSignalsNotification[private]