The API uses the EPOC client/server framework. The API provides
R
classes that send requests to the Serial Comms server. The
server in turn passes requests to an appropriate plug-in module that handles
the particular communications protocol to be used.
The API is used by client applications, and extensively by other EPOC communications APIs. For example, Sockets and Telephony use the API to pass data over a serial link.
The API has four key concepts: server session, serial port, serial port configuration block, and serial port capabilities block.
The server session allows the client to:
discover the serial protocols available on the device, and select the appropriate one
discover the ports available on the device
The server session interface is provided by
RCommServ
.
The serial port allows the client to access a particular hardware serial port. The interface is used to read, write, configure, set break conditions, and get port state information.
The serial port interface is provided by
RComm
.
The serial port configuration block specifies the operation of a serial port. This includes settings such as the data rate, parity type, and handshaking control. A client sets up a serial port before use by providing a configuration block.
The serial port configuration block interface is provided by
TCommConfigV01
.
The serial port capabilities block specifies the capabilities of a serial port. This indicates the possible configuration settings for a port. A client can get the capabilities block for a serial port before configuring it, to ensure that the desired configuration is possible.
The serial port capabilities block interface is provided by
TCommCapsV01
.