Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Accessing serial port services

The lowest level interface to serial comms is actually implemented by the RDevComm class. This provides a handle to a channel to the serial device driver. This device driver only implements the basic data transfer and break operations, and is not intended for use directly by comms applications.

Instead, serial devices should be accessed via the comms server RCommServ using the RComm client class. There are clear advantages in general terms to accessing devices in this way. More specifically, the use of RCommServ and RComm incorporates significant extra functionality, such as time-outs. It also adds a virtualisation layer that both permits ports to be shared between applications and also facilitates their use with different protocol modules (such as those handing RS232 and infra-red serial communications respectively).

While its basic RComm::Read() and RComm::Write() data transfer functions are overloaded to provide a number of variants to suit the needs of the calling application, it is important to realise that effective communications depend at least as much in the decisions made when the port is configured as they do on the choice of i/o functions.