What are Serial Ports

The term Serial Port has different meanings at the different levels within the Serial Communications Server. These differences are caused by each level defining classes to represent a serial port.

At the client application level, the serial port is represented by the RComm API. The RComm API is used to open a particular serial port. The RComm API is used to read, write, configure, set break conditions, and get port state information. Each serial port is named by a text string to describe the protocol for the port and a number. The format is:

[text-string]::[0-255]

The protocol name and the range of possible numbers come from the CSY. The number zero (0) is used for the first port. For example, the port COMM::0 is the first port of the CSY named COMM. The COMM CSY is used to provide the RS232 serial protocol. Another example is the port ACM::0 which is the first port of the USB CSY.

NOTE: The filename for the CSY may be different to the string used to open ports with the same CSY. To load a CSY the filename must be provided. For example, to load the RS232 CSY, the filename ecuart.csy must be provided, while to open RS232 ports the name COMM must be used.

At the Serial Communications Server level, a serial port is represented by two classes in the CSY. These two classes are CSerial and CPort. These classes are not available to client applications. To create a port, the server gives the CSerial class a number for the port number, which results in a CPort class being created for that number. The instance of the CPort class then represents the port.