How to Configure a Port for Efficient Reading: Tutorial

To configure a port for efficient reading the precise number of terminators needs to be set with RComm::SetConfig() and TCommConfig through iTerminatorCount, with the actual characters being set as elements in the iTerminator array.

Example

In the following code extract, the line feed character is set as a single terminator:

TCommConfig portSettings;
commPort.Config (portSettings);
portSettings ().iTerminator[0] = 10;
portSettings ().iTerminatorCount = 1;
commPort.SetConfig (portSettings);