Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Writing serial ports

The functionality of a serial port is specified by the CPort abstract class.

The framework supplied by the Serial Comms server for serial protocol modules is not as rich as that provided by the socket server for protocol developers. This design decision was taken because the Serial Comms itself is expected to run for the lifetime of the machine with modules being loaded and unloaded as required. This means that the comms server must be as memory efficient as possible.

Requests are delivered to the CPort class using various pure virtual functions, such as CPort::StartRead(), which should be implemented to handle client requests to read data from the port, and CPort::StartWrite(), to handle client requests to write data to the port. Such implementations must get and send data over the IPC buffer to the client. The API supplies the functions CPort::IPCRead() and CPort::IPCRead() for this respectively.

The server is limited to managing port sharing between clients, resource management (including loading and unloading comm server modules themselves), and time-outs.